View Issue Details

IDProjectCategoryView StatusLast Update
0000863savapage-server[All Projects] Generalpublic2018-04-30 16:11
ReporterrijkrAssigned Torijkr 
PrioritynormalSeverityminorReproducibilitysometimes
Status closedResolutionfixed 
PlatformVMwareOSRHESOS Version
Product Version0.9.12 
Target Version1.0.0Fixed in Version1.0.0 
Summary0000863: Prevent race condition for read/write of savapage.json
DescriptionIST: Sometimes, a "com.fasterxml.jackson.core.JsonParseException: Unexpected end-of-input in field name" is encountered when reading a user's savapage.json file. This indicates that the file is incomplete, which could be due to a read/write "race condition". For example, after a PDF upload, the UserEventService gets a notification from the Linux file system of the newly created PDF, and immediately reads the PDF meta data from the savapage.json file, while at the same time the same json file is being written by another thread.
SOLL: Create savapage.json as temp file and do atomic move to target location.
NOTE: This issue was observed on VMware with an extra mounted disk (XFS File System) dedicated for temporary files and user inboxes.
Additional Information2017-09-07 14:56:23,468 ERROR UserEventService:559 - Error parsing from file [/opt/spool/savapage/safepages/0/1/some-userid/savapage.json] [jetty-threadpool-4604]
org.savapage.core.SpException: Error parsing from file [/opt/spool/savapage/safepages/0/1/some-userid/savapage.json]
        at org.savapage.core.services.impl.InboxServiceImpl.readInboxInfo(InboxServiceImpl.java:191)
        at org.savapage.core.services.impl.InboxServiceImpl.getInboxInfo(InboxServiceImpl.java:244)
        at org.savapage.core.services.helpers.InboxPageImageChunker.<init>(InboxPageImageChunker.java:212)
        at org.savapage.core.services.helpers.InboxPageImageChunker.chunk(InboxPageImageChunker.java:663)
        at org.savapage.core.services.impl.InboxServiceImpl.getPageChunks(InboxServiceImpl.java:754)
        at org.savapage.server.cometd.UserEventService.getChangedJobsEvent(UserEventService.java:1031)
        at org.savapage.server.cometd.UserEventService.watchUserFileEvents(UserEventService.java:897)
        at org.savapage.server.cometd.UserEventService.monitorUserEvent(UserEventService.java:518)
. . .
Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected end-of-input in field name
 at [Source: /opt/spool/savapage/safepages/0/1/some-userid/savapage.json; line: 168, column: 4010]
        at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1378)
. . .
 at org.savapage.core.services.impl.InboxServiceImpl.readInboxInfo(InboxServiceImpl.java:171)
        ... 32 more
2017-09-07 14:56:23,473 ERROR AppLogServiceImpl:121 - UserEventService: SpException: Error parsing from file [/opt/spool/savapage/safepages/0/1/some-userid/savapage.json] (User "some-userid" at WebApp 127.0.0.1) [jetty-threadpool-4604]
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2017-09-08 19:34 rijkr New Issue
2017-09-08 19:34 rijkr Status new => assigned
2017-09-08 19:34 rijkr Assigned To => rijkr
2017-09-08 19:37 rijkr OS => RHES
2017-09-08 19:37 rijkr Platform => VMware
2017-09-08 20:11 rijkr Description Updated View Revisions
2017-09-08 20:34 rijkr Description Updated View Revisions
2017-09-08 20:34 rijkr Additional Information Updated View Revisions
2017-10-23 14:49 rijkr Status assigned => resolved
2017-10-23 14:49 rijkr Resolution open => fixed
2017-10-23 14:49 rijkr Fixed in Version => 1.0.0
2018-04-30 16:11 rijkr Status resolved => closed