Bug 239748 - system-config-printer does not set or honour job-hold-until setting as set by lpoptions
Summary: system-config-printer does not set or honour job-hold-until setting as set by...
Alias: None
Product: Fedora
Classification: Fedora
Component: system-config-printer
Version: 6
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
Depends On: 239776
Blocks: FC6Update
TreeView+ depends on / blocked
Reported: 2007-05-10 22:29 UTC by Ben Li
Modified: 2007-11-30 22:12 UTC (History)
0 users

Clone Of:
Last Closed: 2007-07-30 11:13:03 UTC

Attachments (Terms of Use)
crash dump for system-config-printer when attempting to remove a printer option (22.48 KB, text/plain)
2007-05-12 00:52 UTC, Ben Li
no flags Details

Description Ben Li 2007-05-10 22:29:30 UTC
Description of problem: Adding or setting job-hold-until using lpoptions
correctly changes the printers job hold setting, and the change is reflected in
/etc/cups/lpoptions, but system-config-printer doesn't show that the option was
added or set fhr the printer in question. Conversely, adding or setting the
job-hold-until option from system-config-printer does not affect the options for
that printer displayed by lpoptions, nor does system-config-printer change

Settings such as Accepting Jobs configured through system-config-printer seem to
be correctly reflected in lpoptions. Pairing a change to the Accepting Jobs
setting from system-config-printer with a change to job-hold-until results in
only the Accepting Jobs setting being changed as far as lpoptions is concerned.
Restarting cups or the system does not help.

Steps to Reproduce:
1. as root, create a new printer called "printer" with system-config-printer
using default values
2. run lpoptions -p printer -o job-hold-until=indefinate
3. add and change the job-hold-until option to indefinite in system-config-printer
4. run lpoptions -p printer
Actual results:
No changes to the job-hold-until option in the "lpoptions -p" printer output

Expected results:
job-hold-until should have the value of indefinate in the "lpoptions -p" printer

Additional info:
Attempting to remove the job-hold-until option from a configured pritner causes
system-config-printer to crash. A dump follows:

*** glibc detected *** python: free(): invalid next size (normal): 0x08933e48 ***
======= Backtrace: =========
======= Memory map: ========
00101000-00238000 r-xp 00000000 fd:00 10586678   /lib/libc-2.5.so
00238000-0023a000 r-xp 00137000 fd:00 10586678   /lib/libc-2.5.so
0023a000-0023b000 rwxp 00139000 fd:00 10586678   /lib/libc-2.5.so
0023b000-0023e000 rwxp 0023b000 00:00 0
0023e000-00241000 r-xp 00000000 fd:00 15503394  
00241000-00242000 rwxp 00003000 fd:00 15503394  

Comment 1 Tim Waugh 2007-05-11 09:36:48 UTC
The real problem here is the crash.  The rest is an unfortunate confusion caused
by the two systems of providing job defaults.

The older system, lpoptions, sets job defaults on *client* systems, the machines
that the print jobs are sent from.  /etc/cups/lpoptions is read by libcups when
sending a job to a CUPS server.  Yes, this may be on the same machine, but
commonly the CUPS server is a separate machine altogether, and in this case the
job defaults need to be set on all of the client machines.

The newer system is network default options, and the options are stored in the
*server* configuration.  Incoming jobs have those default options applied if
they are not already set by the client.  To set a network default option from
the command line you can use 'lpadmin [-h server] -p printer -o option=value'.

The system-config-printer tool in Fedora Core 6 uses the network default options
method exclusively, while in Fedora Core 5 and earlier the older lpoptions
method was used (network default options are new to CUPS 1.2).

I haven't been able to reproduce that crash though.  Can you get it to happen
again?  If so, please make a note of exactly what steps you took.  Thanks.

Comment 2 Ben Li 2007-05-12 00:52:16 UTC
Created attachment 154576 [details]
crash dump for system-config-printer when attempting to remove a printer option

Comment 3 Ben Li 2007-05-12 00:57:02 UTC
Thanks for the insights about the changes. I suspected something like that was
happening, although the fact that from one action some changes took, while
others didn't, threw me off.

Steps to reproduce the system-config-printer crash:
1. install FC6 from DVD
2. yum update cups*
3. yum update system-config-*
4. run system-config-printer as root
5. set up a new ipp printer
6. add job-hold-until option using job options tab, with value of indefinite
7. click apply
8. close system-config-printer
9. run system-config-printer
10. select printer set up in 5
11. click job options tab
12. click remove next to job-hold-until
13. click apply

At this point, system-config-printer crashes with the attached dump.

Comment 4 Tim Waugh 2007-05-15 14:09:44 UTC
Thanks for the detailed instructions.  From the backtrace I got from a core-dump
with MALLOC_CHECK_=2 set in the environment, I think this is to do with the
table resizing on that screen.

Fedora 7 will have a re-worked version of that screen, although the specific
case of job-hold-until doesn't work there for a different reason. :-/

Is job-hold-until the option you need to set on that queue?  I'm curious to know
the reason you mention that particular option -- do you want queued jobs to be
individually approved by an administrator or something?

Comment 5 Ben Li 2007-05-22 23:55:18 UTC
Yes, we're using job-hold-until as part of our DiscoverStation multi-user public
computing solution to enable staff to manually release print jobs through a
web-based AJAX interface. Holding print jobs also enables us to do some neat
tricks with dbus to notify users of print job size and cost to allow them to
abort unwanted/broken/excessive print jobs before they hit the printer (in both
the paid and the non-print cost recovery scenarios).

Regarding the crash, we're currently advising customers to delete and recreate
the printer instead of fiddling with the job options if they want to transition
from gated printing to free printing.

Comment 6 Tim Waugh 2007-05-23 08:17:56 UTC
(Wow, cool stuff!)

My plan for fixing this is to implement the missing bits in the Fedora 7 package
that will make it work, then upgrade the Fedora Core 6 package to match. 
Unfortunately it means that the "Job Options" screen layout will change in FC6,
but it is much more robust and easier to understand.

Note You need to log in before you can comment on or make changes to this bug.