Bug 10930 - race condition between job submission, enumeration and background print queue process
Summary: race condition between job submission, enumeration and background print queue...
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Printing (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: David Disseldorp
QA Contact: Samba QA Contact
Depends on:
Reported: 2014-11-10 14:01 UTC by David Disseldorp
Modified: 2017-07-25 14:56 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description David Disseldorp 2014-11-10 14:01:02 UTC
The spoolss addprinter[ex].print_job_enum smbtorture test currently fails intermittently on the autobuild host.
I believe the failure is due to a race condition between the spoolss
process (S) and the print queue background process (BG).

On client submission, a new job is added by the spoolss client process to a INFO/jobs_added record in the print queue database.
The background print queue process then periodically queries the printing backend for the current queue status and removes jobs from the INFO/jobs_added record.
On client job enumeration, jobs carried in the current queue status and the INFO/jobs_added record are provided in the enumeration response.

IIUC, queue status and INFO/jobs_added record updates are not done atomically, so a newly added job may be carried twice in the EnumJobs response. Further investigation is required.

addprinter[ex].print_job_enum test results should be ignored until this bug is resolved.
Comment 1 Andreas Schneider 2017-07-25 14:56:41 UTC
There was an issue that the vlp backend was not started with the uid it should have. uid_wrapper did not have support for fork + exec.

Please check if this is still an issue.