[Bug 481794] New: CUPS print job stalled after suspend/resume
https://bugzilla.novell.com/show_bug.cgi?id=481794 Summary: CUPS print job stalled after suspend/resume Classification: openSUSE Product: openSUSE 11.1 Version: Final Platform: i686 OS/Version: openSUSE 11.1 Status: NEW Severity: Normal Priority: P5 - None Component: Printing AssignedTo: jsmeix@novell.com ReportedBy: Ulrich.Windl@rz.uni-regensburg.de QAContact: jsmeix@novell.com Found By: --- User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.19) Gecko/20081213 SUSE/1.1.14-1.1 SeaMonkey/1.1.14 The computer was suspended to disk while a longer print job to a remote network printer was in progress. After resuming, the print job ist still displayed as active, but no pages are actually printed. There are no CUPS errors reported, and not TCP network connections are visible. However there is a "socket:" process that consumes a lot of CPU for a long time. What that process does is this: [...] read(5, "", 1024) = 0 select(6, [5], [5], NULL, NULL) = 1 (in [5]) read(5, "", 1024) = 0 select(6, [5], [5], NULL, NULL) = 1 (in [5]) read(5, "", 1024) = 0 [...] Reproducible: Didn't try Steps to Reproduce: 1. Print a lengthy job 2. Suspend computer to disk (for several hours) while the remote printer is still on 3. Resume from suspend Actual Results: Print job is displayed as active, but doesn't actually make progress. No errors are reported by CUPS. CUPS page logs indicates some progress, but pages aren't actually printed: LJ4250 wiu09524 249 [03/Mar/2009:12:56:59 +0100] 62 1 - localhost LJ4250 wiu09524 249 [03/Mar/2009:12:56:59 +0100] 63 1 - localhost LJ4250 wiu09524 249 [04/Mar/2009:07:57:43 +0100] 64 1 - localhost LJ4250 wiu09524 249 [04/Mar/2009:07:57:43 +0100] 65 1 - localhost Expected Results: Order of preference, one of: 1) The print job is resumed with the next page 2) The whole print job is restarted 3) The printer is disabled and an error is reported 4) An error is reported -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=481794
User jsmeix@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=481794#c1
Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=481794
User jsmeix@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=481794#c2
--- Comment #2 from Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=481794
User jsmeix@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=481794#c3
--- Comment #3 from Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=481794
User Ulrich.Windl@rz.uni-regensburg.de added comment
https://bugzilla.novell.com/show_bug.cgi?id=481794#c4
Ulrich Windl
https://bugzilla.novell.com/show_bug.cgi?id=481794
User jsmeix@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=481794#c5
Johannes Meixner
Is there any experience how suspend and resume should work for active print jobs?
On Mac OS X, yes - we actually watch for power/suspend events and act accordingly. There is supposed to be some DBUS stuff for this, but as of yet we've not received documentation or patches to use it. Basically, we need to know the system is about to suspect so we can stop any active jobs - if the interface allows it, we may even delay suspend to allow an active job to finish... ---------------------------------------------------------------------------- (There is a typo: "suspect" should read "suspend".) This shows that it cannot be fixed by us (i.e. Novell/Suse) alone but only via upstream (CUPS together with DBUS and probably Kernel) so that I close this bug report accordingly. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=481794
User jsmeix@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=481794#c6
Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=481794
User Ulrich.Windl@rz.uni-regensburg.de added comment
https://bugzilla.novell.com/show_bug.cgi?id=481794#c7
--- Comment #7 from Ulrich Windl
/usr/lib/pm-utils/sleep.d/
Shouldn't that be better located in /var or /etc, because /usr might be read-only? The files in package pm-utils are not flagged as "configuration files" BTW... While I'm trying your proposal, let me note:
case "$1" in hibernate|suspend) stopservice cups sleep 3
While we lack an equivalent for "[cups]disable -a" (disable all printers) here, and "[cups]enable -a" (enable all printers, or better those that were disabled before), this solution might be preferrable to "sleep 3": while /usr/bin/lpstat >/dev/null 2>&1 do #echo "Server is still running -- waiting" sleep 1 done (When there are no jobs queued or printing, the command returns nothing; if the server is down it returns an error ("lpstat: Verbindung zum Server nicht möglich" in Germany); otherwise it returns a list of print jobs) Your "sleep 3" will usually return a success code, even if the stop failed, BTW.
;; thaw|resume) restartservice cups ;; *) ;; esac
exit $?
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=481794
User jsmeix@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=481794#c8
--- Comment #8 from Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=481794
User seife@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=481794#c9
--- Comment #9 from Stefan Seyfried
participants (1)
-
bugzilla_noreply@novell.com