Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cupsd can crash when a browsed printer with active jobs times out #3754

Closed
michaelrsweet opened this issue Dec 16, 2010 · 4 comments
Closed

cupsd can crash when a browsed printer with active jobs times out #3754

michaelrsweet opened this issue Dec 16, 2010 · 4 comments
Labels
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

@michaelrsweet michaelrsweet commented Dec 16, 2010

Version: 1.4.5
CUPS.org User: twaugh.redhat

The scheduler can crash while performing a browse timeout for a printer. It happens because cupsdSetPrinterState() does not actually set the state of printers that have been discovered, so any jobs queued for that printer are started again before the printer is completely removed.

Original bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=660604

Suggested patch attached.

@michaelrsweet
Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Jan 6, 2011

CUPS.org User: mike

Fixed in Subversion repository.

1 similar comment
@michaelrsweet
Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Jan 6, 2011

CUPS.org User: mike

Fixed in Subversion repository.

@michaelrsweet
Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Jan 6, 2011

"cups-printer-timeout.patch":

diff -up cups-1.4.5/scheduler/printers.c.printer-timeout cups-1.4.5/scheduler/printers.c
--- cups-1.4.5/scheduler/printers.c.printer-timeout 2010-12-16 14:42:07.048865052 +0000
+++ cups-1.4.5/scheduler/printers.c 2010-12-16 14:43:05.325684376 +0000
@@ -785,6 +785,7 @@ cupsdDeletePrinter(
*/

cupsdSetPrinterState(p, IPP_PRINTER_STOPPED, update);

  • p->state = IPP_PRINTER_STOPPED;

if (p->job)
cupsdSetJobState(p->job, IPP_JOB_PENDING, CUPSD_JOB_FORCE,

@michaelrsweet
Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Jan 6, 2011

"str3754.patch":

Index: scheduler/printers.c

--- scheduler/printers.c (revision 9413)
+++ scheduler/printers.c (working copy)
@@ -770,6 +770,8 @@

cupsdSetPrinterState(p, IPP_PRINTER_STOPPED, update);

  • p->state = IPP_PRINTER_STOPPED; /* Force for browsed printers */

if (p->job)
cupsdSetJobState(p->job, IPP_JOB_PENDING, CUPSD_JOB_FORCE,
update ? "Job stopped due to printer being deleted." :

@michaelrsweet michaelrsweet added this to the Stable milestone Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.