Bug 10930 - race condition between job submission, enumeration and background print queue process
race condition between job submission, enumeration and background print queue...
Status: NEW
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Printing
All All
: P5 normal
: ---
Assigned To: David Disseldorp
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2014-11-10 14:01 UTC by David Disseldorp
Modified: 2014-11-11 07:23 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.