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 695354 - [3.7.12] gtkprintdialog hangs in new avahi code
[3.7.12] gtkprintdialog hangs in new avahi code
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Printing
3.7.x
Other Linux
: Normal normal
: ---
Assigned To: Marek Kašík
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-03-07 12:43 UTC by Sebastien Bacher
Modified: 2014-12-09 09:07 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastien Bacher 2013-03-07 12:43:59 UTC
Using gtk+ 3.7.12, if I open the gtkprintdialog in gedit, the cursor starts spinning and the dialog doesn't respond to interaction (it might timeout after some time but after a minute it's still not back):

stacktrace from gedit after trying to select a printer in the print dialog:

"#0  0xb76e5424 in __kernel_vsyscall ()
  • #1 read
    at ../sysdeps/unix/syscall-template.S line 81
  • #2 _IO_new_file_underflow
    at fileops.c line 621
  • #3 __GI__IO_default_uflow
    at genops.c line 436
  • #4 __GI___uflow
    at genops.c line 390
  • #5 __GI__IO_getline_info
    at iogetline.c line 69
  • #6 __GI__IO_getline
    at iogetline.c line 38
  • #7 _IO_fgets
    at iofgets.c line 56
  • #8 fgets
    at /usr/include/i386-linux-gnu/bits/stdio2.h line 255
  • #9 avahi_resolve_name
    at /build/buildd/nss-mdns-0.10/src/avahi.c line 85
  • #10 _nss_mdns4_minimal_gethostbyname2_r
    at /build/buildd/nss-mdns-0.10/src/nss.c line 371
  • #11 gaih_inet
    at ../sysdeps/posix/getaddrinfo.c line 959
  • #12 __GI_getaddrinfo
    at ../sysdeps/posix/getaddrinfo.c line 2465
  • #13 httpAddrGetList
    at http-addrlist.c line 494
  • #14 gtk_cups_connection_test_new
    at gtk+3.0-3.7.12/./modules/printbackends/cups/gtkcupsutils.c line 1532
  • #15 cups_printer_request_details
    at gtk+3.0-3.7.12/./modules/printbackends/cups/gtkprintbackendcups.c line 3625
  • #16 gtk_printer_request_details
    at gtk+3.0-3.7.12/./gtk/gtkprinter.c line 895
  • #17 selected_printer_changed
    at gtk+3.0-3.7.12/./gtk/gtkprintunixdialog.c line 1912
  • #18 g_cclosure_marshal_VOID__VOIDv
    at /build/buildd/glib2.0-2.35.8/./gobject/gmarshal.c line 115
  • #19 _g_closure_invoke_va
    at /build/buildd/glib2.0-2.35.8/./gobject/gclosure.c line 840
  • #20 g_signal_emit_valist
    at /build/buildd/glib2.0-2.35.8/./gobject/gsignal.c line 3225
  • #21 g_signal_emit
    at /build/buildd/glib2.0-2.35.8/./gobject/gsignal.c line 3370
  • #22 _gtk_tree_selection_internal_select_node
  • #23 gtk_tree_view_real_set_cursor
  • #24 gtk_tree_view_button_press
    at gtk+3.0-3.7.12/./gtk/gtktreeview.c line 3141

Comment 1 Marek Kašík 2013-03-07 15:42:24 UTC
Hi Sebastien,

does the dialog show you printers advertised on Avahi before it stops to respond? Does it stop to respond when you are trying to select an Avahi printer?
What does "avahi-browse -r _ipp._tcp" and "avahi-browse -r _ipps._tcp" returns to you?
It seems that it get stuck when the CUPS backend tries to connect to the server on which the printer is installed. Is the server accessible (pingable)?

Regards

Marek
Comment 2 Sebastien Bacher 2013-03-07 17:26:48 UTC
Hey Marek,

> does the dialog show you printers advertised on Avahi before it stops to
respond? 

the dialog lists 3 entries:
- print to file
- samsung-clp-315 (seems avahi detected, but by cups not gtk since it was there already with 3.7.10)
- samsung-clp-325 (I manually added this one)

The printing panel says that 
clp-315's ip is "shared-printer.local"
clp-325's ip is "shared-printer"

> Does it stop to respond when you are trying to select an Avahi printer?
> What does "avahi-browse -r _ipp._tcp" and "avahi-browse -r _ipps._tcp" returns
> to you?
> It seems that it get stuck when the CUPS backend tries to connect to the server
> on which the printer is installed. Is the server accessible (pingable)?

Ok, sorry but it stopped reproducing the issue at the moment, I will try to figure if it's due to the state of the remote machine and what's the state of the machine when it happens (the printer is shared on a desktop is not always turned on)
Comment 3 Marek Kašík 2013-03-12 16:31:12 UTC
Hi,

I've filled bug https://bugzilla.gnome.org/show_bug.cgi?id=695714 which is similar to this one. I think that the patch there is able to prevent print dialog from those hangs you see. But I think that it is not the same bug.

Marek
Comment 4 Matthias Clasen 2014-12-09 04:21:17 UTC
Sebastian, still seeing this after the fix for bug 695714 ?
Comment 5 Sebastien Bacher 2014-12-09 09:07:07 UTC
I didn't see that bug for a while, assuming it has been fixed and closing it, thanks