Bug 10808 - Job missing when the queue is paused
Job missing when the queue is paused
Status: RESOLVED FIXED
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Printing
unspecified
All All
: P5 major
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-10 16:11 UTC by Franz Pförtsch
Modified: 2015-02-16 20:01 UTC (History)
3 users (show)

See Also:


Attachments
compressed network capture (3.37 MB, application/gzip)
2014-09-10 16:19 UTC, Franz Pförtsch
no flags Details
compressed log.smbd part 1 (3.25 MB, application/x-bzip)
2014-09-10 16:25 UTC, Franz Pförtsch
no flags Details
compressed log.smbd part 2 (1.65 MB, application/x-bzip)
2014-09-10 16:25 UTC, Franz Pförtsch
no flags Details
simple smbtorture reproducer - don't commit (3.05 KB, patch)
2015-01-26 14:23 UTC, David Disseldorp
no flags Details
Samba patch to use IPP_TAG_KEYWORD instead of IPP_TAG_NAME for IPP_GET_JOBS requested-attributes (1.40 KB, patch)
2015-01-29 16:05 UTC, David Disseldorp
no flags Details
fix for v4-2-test branch (1.64 KB, patch)
2015-02-10 13:06 UTC, David Disseldorp
jra: review+
Details
fix for v4-1-test branch, cherry picked from master (1.64 KB, patch)
2015-02-10 13:07 UTC, David Disseldorp
jra: review+
Details
fix for v4-0-test branch, cherry picked from mast0r (1.64 KB, patch)
2015-02-10 13:07 UTC, David Disseldorp
jra: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Franz Pförtsch 2014-09-10 16:11:54 UTC
There is something wrong with samba printqueues since 4.0
When pause printerqueue an submit a printjob on this queue the following occurs:

- the printjob appears in the queue.
- select the printerjob->properties
  * This is not possible a windowsalert ( error 0x00000057 ) appears.

- after some seconds the job is not longer present in job list.
- the job is not printed and still visible in CUPS-printqueue
A network trace and logs captured.

This disfunction occurs on the samba from ubuntu 14.04 and from sernet.
Comment 1 Franz Pförtsch 2014-09-10 16:19:29 UTC
Created attachment 10278 [details]
compressed network capture
Comment 2 Franz Pförtsch 2014-09-10 16:25:18 UTC
Created attachment 10279 [details]
compressed log.smbd part 1
Comment 3 Franz Pförtsch 2014-09-10 16:25:43 UTC
Created attachment 10280 [details]
compressed log.smbd part 2
Comment 4 Franz Pförtsch 2014-09-10 21:17:44 UTC
The queue I worked on was HpUniveralsPS
Comment 5 Franz Pförtsch 2014-12-09 17:43:37 UTC
I tried this function with the lastest samba 4.1.14 from sernet and the problem persists.
Comment 6 Franz Pförtsch 2015-01-21 22:06:13 UTC
Today I tried this function with the lastest samba 4.1.16 from sernet and the problem persists.
Comment 7 David Disseldorp 2015-01-26 14:23:38 UTC
Created attachment 10665 [details]
simple smbtorture reproducer - don't commit
Comment 8 David Disseldorp 2015-01-29 15:55:08 UTC
There appears to be a CUPS regression in the handling of IPP_GET_JOBS requests. 

The CUPS IPP_GET_JOBS requested-attributes array indicates which job attributes the caller would like in the cupsd response. Until now, Samba has packed these attributes with a IPP_TAG_NAME format tag.

In recent versions of CUPS, this results in the IPP_GET_JOBS response only including the job-id and job-printer-uri fields, even with JobPrivateValues=none configured.
Using the IPP_TAG_KEYWORD format tag ensures that all requested fields are present in the IPP_GET_JOBS response. I've raised the issue with a local CUPS developer.
Comment 9 David Disseldorp 2015-01-29 16:05:13 UTC
Created attachment 10696 [details]
Samba patch to use IPP_TAG_KEYWORD instead of IPP_TAG_NAME for IPP_GET_JOBS requested-attributes

In addition to this change, users should also be aware of the new CUPS JobPrivateAccess/JobPrivateValues behaviour.

cupsd.conf should be configured with "JobPrivateValues" set to "none" for now. Samba doesn't always provide a "requesting-user-name" attribute in CUPS requests, and CUPS filters attributes in the IPP_GET_JOBS response unless it comes from a "JobPrivateAccess" member, or "JobPrivateValues" is "none".
Comment 10 David Disseldorp 2015-02-10 13:06:28 UTC
Created attachment 10710 [details]
fix for v4-2-test branch
Comment 11 David Disseldorp 2015-02-10 13:07:13 UTC
Created attachment 10711 [details]
fix for v4-1-test branch, cherry picked from master
Comment 12 David Disseldorp 2015-02-10 13:07:38 UTC
Created attachment 10712 [details]
fix for v4-0-test branch, cherry picked from mast0r
Comment 13 Jeremy Allison 2015-02-10 18:39:36 UTC
Comment on attachment 10710 [details]
fix for v4-2-test branch

LGTM.
Comment 14 Jeremy Allison 2015-02-10 18:44:13 UTC
Comment on attachment 10711 [details]
fix for v4-1-test branch, cherry picked from master

LGTM.
Comment 15 Jeremy Allison 2015-02-10 18:56:37 UTC
Comment on attachment 10712 [details]
fix for v4-0-test branch, cherry picked from mast0r

LGTM (edited title to specify 4.0, not 4.1 branch :-).
Comment 16 Jeremy Allison 2015-02-10 18:57:13 UTC
Re-assigning to Karolin for inclusion in 4.2.0, 4.1.next, 4.0.next.
Comment 17 Karolin Seeger 2015-02-10 20:02:42 UTC
(In reply to Jeremy Allison from comment #16)
Pushed to autobuild-v4-[0|1|2]-test.
Comment 18 Karolin Seeger 2015-02-16 20:01:46 UTC
Pushed to all branches,
Closing out bug report.

Thanks!