After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 424041 - Freeze when cups server can't be reached
Freeze when cups server can't be reached
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Printing
2.12.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
: 508905 (view as bug list)
Depends on: 424207
Blocks:
 
 
Reported: 2007-03-29 08:21 UTC by Jon Kåre Hellan
Modified: 2010-05-31 09:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jon Kåre Hellan 2007-03-29 08:21:39 UTC
An old friend has returned with the gtk printing code.

When the cups server is unreachable, gnumeric freezes when you press the print button or choose file/print.

Backtrace:

  • #0 __kernel_vsyscall
  • #1 connect
    from /lib/tls/i686/cmov/libc.so.6
  • #2 httpAddrConnect
    from /usr/lib/libcups.so.2
  • #3 httpReconnect
    from /usr/lib/libcups.so.2
  • #4 httpConnectEncrypt
    from /usr/lib/libcups.so.2
  • #5 gtk_cups_request_read_write
    from /usr/lib/gtk-2.0/2.10.0/printbackends/libprintbackend-cups.so
  • #6 gtk_cups_request_read_write
    from /usr/lib/gtk-2.0/2.10.0/printbackends/libprintbackend-cups.so
  • #7 pb_module_init
    from /usr/lib/gtk-2.0/2.10.0/printbackends/libprintbackend-cups.so
  • #8 g_main_context_prepare
    from /usr/lib/libglib-2.0.so.0
  • #9 g_main_context_check
    from /usr/lib/libglib-2.0.so.0
  • #10 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #11 gtk_dialog_run
    from /usr/lib/libgtk-x11-2.0.so.0
  • #12 _gtk_print_operation_platform_backend_run_dialog
    from /usr/lib/libgtk-x11-2.0.so.0
  • #13 gtk_print_operation_run
    from /usr/lib/libgtk-x11-2.0.so.0
  • #14 gnm_print_sheet
    at print.c line 1441


Relevant part of /etc/cups/client.conf

ServerName tyholt.uninett.no

This server is unreachable from here.
Comment 1 Andreas J. Guelzow 2007-03-29 15:29:02 UTC
I am not sure that "old friend" is the right turn. 

Of course now we could just turn her over to GTK since the problem lies clearly in their printing code. I am not doing that since we need to work around it here first. Printing can be done asynchroneously but then we need to provide feedback why the print dialog doesn't seem to appear.
Comment 2 Andreas J. Guelzow 2007-03-29 20:14:52 UTC
oops, 

that should have been:
"I am not sure that "old friend" is the right term."

I have failed trying to replicate this. If I change my client.conf file to point to a non-existing machine the print dialog appears without any printers and, on the console, I get repeated errors:

** (gnumeric:25650): WARNING **: Error getting printer list: Too many failed attempts

** (gnumeric:25650): WARNING **: Error getting printer list: Too many failed attempts

Could you please try it with a completely fake name?

Which version of gtk are you running? 

Thanks
Comment 3 Jon Kåre Hellan 2007-03-30 07:36:05 UTC
The gtk version is 2.10.6 from Ubuntu edgy - Ubuntu release 2.10.6-0ubuntu3.1

The cups client library bombards the server with connection requests. If the machine keeps rejecting the connection until the client library eventually gives up, we don't get the freeze. If the server just ignores the connection requests without responding, the UI freezes. This typically happens when the server machine is firewalled.

I don't get the freeze when the server machine doesn't exist, my computer is offline, or the server machine isn't running cups.
Comment 4 Jon Kåre Hellan 2007-10-28 22:49:06 UTC
Just was able to replicate. The CUPS server exists. It ignores requests. Not an easy situation to handle, but can easily happen when you bring a work computer home.

Adobe Acrobat Reader shows the same behaviour. So does OpenOffice.org and Firefox.
This is probably not something we should try to work around in Gnumeric or Gtk. 
Rather, it is proof that there ought to be a local cups server on the machine.

GTK folks, I'm reassigning to you. What do you think?
Comment 5 Matthias Clasen 2009-04-13 00:15:16 UTC
*** Bug 508905 has been marked as a duplicate of this bug. ***
Comment 6 Till Kamppeter 2009-08-20 15:48:08 UTC
Is there any ongoing work on solving this problem?
Comment 7 dakshay 2009-09-19 23:01:47 UTC
I have found a decent workaround for this problem. The solution is to configure the remote printer with an https URI rather than an IPP URI. The way to do that is to create the printer using the "Internet Printing Protocol (https)" option rather than the "Internet Printing Protocol (ipp)" option in the system-config-printer application (System->Administration->Printing). Now apps don't hang even if the remote printer is not available :)

On a side note: its crazy that system-config-printer can show a list of printers without hanging (whether ipp or https) but other GNOME apps cannot (Gnome apps fail to list ipp printers). Why not use the same method to get a list of printers for both system-config-printer and the other apps?
Comment 8 Marek Kašík 2010-05-28 15:15:32 UTC
Hi,

this should be fixed by the fix of the bug #586207.
Could you confirm that (gtk+ 2.18.1)?

Regards

Marek
Comment 9 dakshay 2010-05-28 17:04:18 UTC
I confirm. Its all good now.
Comment 10 Marek Kašík 2010-05-31 09:26:15 UTC
I'm closing this now then.

Marek