GNOME Bugzilla – Bug 387889
cups backend has problems when there are too many printers
Last modified: 2007-04-30 17:40:43 UTC
Steps to reproduce: 1. In oowriter (or evince), go to file -> print 2. If we have more than 227 printers (I am using CUPS for printing), the print dialog box comes up, but it is blank, and the whole application hangs (freezes). The only way to proceed is to kill the application. 3. Stack trace: Other information: I have reported this bug to openoffice (as I noticed it in openoffice initially), but on further investigation, it seems to happen in evince as well. It seems to be a problem with the gtk2 print dialog (as both these applications uses this for the printing dialog).
This is a GTK+ bug which was recently fixed, I think Does the hang really depend the number of printers in the list? Please provide your GTK+ version, possible strace output, and a backtrace :)
1. My gtk+ version is gtk+-1.2.10-55.fc6 2. Yes it does seems to depend on the number of printers installed (in CUPS). If I reduce the numbet of printers available to a number lower than 227, this problem does not occur, and I can print in both openoffice/evince. This only happens if the number of printers is more than 227. 3. Here is a backtrace output as obtained using gdb, as follows:- a) gdb evince b) (gdb) run test.pdf c) In evince file -> print d) (everything hangs at this stage) e) kill evince f) run bt in gdb, gets the output below Here is the output of 'bt'
+ Trace 96217
4. Attached is the output of strace
Created attachment 78786 [details] strace output for evince
So it seems this is a GTK problem. The connection to cups is established it seems (from the strace output), but something goes wrong when reading data from the socket (or something like that). Reassigning to GTK.
retitling for clarity
Looks to me like cups simply locks up if we start too many connections quickly, for getting the details of all printers. The patch below gets all the details we want about the printers in the initial printer list request. That seems to work better.
Created attachment 87255 [details] [review] the patch
2007-04-30 Matthias Clasen <mclasen@redhat.com> * modules/printbackends/cups/gtkprintbackendcups.c: Get all the printer attributes when getting the list of printers, not via separate requests. (#387889, Krishan Purahoo)