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 685041 - seg fault when connecting to VNC server
seg fault when connecting to VNC server
Status: RESOLVED FIXED
Product: vinagre
Classification: Applications
Component: VNC
3.6.x
Other Linux
: High critical
: ---
Assigned To: vinagre-maint
vinagre-maint
Depends on:
Blocks:
 
 
Reported: 2012-09-28 13:23 UTC by Christian Smith
Modified: 2012-11-12 21:06 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christian Smith 2012-09-28 13:23:07 UTC
If I try to connect to a VNC server, I get a seg fault before the password dialog comes up (I haven't tested with a none-password protected vnc).

using ubuntu 12.10 beta 2
vinagre 3.6.0-0ubuntu1

Output from `vinagre --gtk-vnc-debug`:
(vinagre:9884): gtk-vnc-DEBUG: ../../../src/vncconnection.c Init VncConnection=0x290d200
(vinagre:9884): gtk-vnc-DEBUG: ../../../src/vncdisplaykeymap.c Using evdev keycode mapping
(vinagre:9884): gtk-vnc-DEBUG: ../../../src/vncdisplay.c Grab sequence is now Control_L+Alt_L
(vinagre:9884): gtk-vnc-DEBUG: ../../../src/vncconnection.c Open host=gia-2409 port=5900
(vinagre:9884): gtk-vnc-DEBUG: ../../../src/vncconnection.c Open coroutine starting
(vinagre:9884): gtk-vnc-DEBUG: ../../../src/vncconnection.c Started background coroutine
(vinagre:9884): gtk-vnc-DEBUG: ../../../src/vncconnection.c Resolving host gia-2409 5900
(vinagre:9884): gtk-vnc-DEBUG: ../../../src/vncconnection.c Trying one socket
(vinagre:9884): gtk-vnc-DEBUG: ../../../src/vncconnection.c Socket pending
(vinagre:9884): gtk-vnc-DEBUG: ../../../src/vncconnection.c Finally connected
(vinagre:9884): gtk-vnc-DEBUG: ../../../src/vncconnection.c Emit main context 12
(vinagre:9884): gtk-vnc-DEBUG: ../../../src/vncdisplay.c Connected to VNC server
(vinagre:9884): gtk-vnc-DEBUG: ../../../src/vncconnection.c Protocol initialization
(vinagre:9884): gtk-vnc-DEBUG: ../../../src/vncconnection.c Server version: 3.8
(vinagre:9884): gtk-vnc-DEBUG: ../../../src/vncconnection.c Using version: 3.8
(vinagre:9884): gtk-vnc-DEBUG: ../../../src/vncconnection.c Possible auth 17
(vinagre:9884): gtk-vnc-DEBUG: ../../../src/vncconnection.c Possible auth 2
(vinagre:9884): gtk-vnc-DEBUG: ../../../src/vncconnection.c Emit main context 10
(vinagre:9884): gtk-vnc-DEBUG: ../../../src/vncconnection.c Thinking about auth type 2
(vinagre:9884): gtk-vnc-DEBUG: ../../../src/vncconnection.c Decided on auth type 2
(vinagre:9884): gtk-vnc-DEBUG: ../../../src/vncconnection.c Waiting for auth type
(vinagre:9884): gtk-vnc-DEBUG: ../../../src/vncconnection.c Choose auth 2
(vinagre:9884): gtk-vnc-DEBUG: ../../../src/vncconnection.c Do Challenge
(vinagre:9884): gtk-vnc-DEBUG: ../../../src/vncconnection.c Requesting missing credentials
(vinagre:9884): gtk-vnc-DEBUG: ../../../src/vncconnection.c Emit main context 9
Segmentation fault (core dumped)
Comment 1 David King 2012-09-28 13:32:11 UTC
Thanks for taking the time to report this bug.
Without a stack trace from the crash it's very hard to determine what caused it.
Can you get us a stack trace? Please see http://live.gnome.org/GettingTraces for more information on how to do so. Thanks in advance!
Comment 2 Christian Smith 2012-09-28 14:05:26 UTC


  • #0 g_utf8_validate
    at /build/buildd/glib2.0-2.34.0/./glib/gutf8.c line 1629
  • #1 secret_attributes_buildv
    from /usr/lib/x86_64-linux-gnu/libsecret-1.so.0
  • #2 secret_password_lookup_sync
    from /usr/lib/x86_64-linux-gnu/libsecret-1.so.0
  • #3 ??
  • #4 ??
  • #5 g_cclosure_marshal_VOID__BOXEDv
    at /build/buildd/glib2.0-2.34.0/./gobject/gmarshal.c line 1160
  • #6 _g_closure_invoke_va
    at /build/buildd/glib2.0-2.34.0/./gobject/gclosure.c line 840
  • #7 g_signal_emit_valist
    at /build/buildd/glib2.0-2.34.0/./gobject/gsignal.c line 3211
  • #8 g_signal_emit
    at /build/buildd/glib2.0-2.34.0/./gobject/gsignal.c line 3356
  • #9 g_cclosure_marshal_VOID__BOXEDv
    at /build/buildd/glib2.0-2.34.0/./gobject/gmarshal.c line 1160
  • #10 _g_closure_invoke_va
    at /build/buildd/glib2.0-2.34.0/./gobject/gclosure.c line 840
  • #11 g_signal_emit_valist
    at /build/buildd/glib2.0-2.34.0/./gobject/gsignal.c line 3211
  • #12 g_signal_emit
    at /build/buildd/glib2.0-2.34.0/./gobject/gsignal.c line 3356
  • #13 ??
    from /usr/lib/libgvnc-1.0.so.0
  • #14 g_main_dispatch
    at /build/buildd/glib2.0-2.34.0/./glib/gmain.c line 2715
  • #15 g_main_context_dispatch
    at /build/buildd/glib2.0-2.34.0/./glib/gmain.c line 3219
  • #16 g_main_context_iterate
  • #17 g_main_context_iteration
    at /build/buildd/glib2.0-2.34.0/./glib/gmain.c line 3351
  • #18 g_application_run
    at /build/buildd/glib2.0-2.34.0/./gio/gapplication.c line 1620
  • #19 ??
  • #20 __libc_start_main
    at libc-start.c line 226
  • #21 ??
  • #22 ??
  • #23 ??
  • #24 ??
  • #25 ??
  • #26 ??

Comment 3 David King 2012-09-28 14:16:19 UTC
That backtrace has several missing symbols (most importantly, nothing from Vinagre). Please post a complete backtrace.
Comment 4 Christian Smith 2012-09-28 14:47:32 UTC
Sorry about that. it seems ubuntu doesn't have a vinagre-dbg package, had to get the source.

  • #0 g_utf8_validate
    at /build/buildd/glib2.0-2.34.0/./glib/gutf8.c line 1629
  • #1 secret_attributes_buildv
    from /usr/lib/x86_64-linux-gnu/libsecret-1.so.0
  • #2 secret_password_lookup_sync
    from /usr/lib/x86_64-linux-gnu/libsecret-1.so.0
  • #3 vinagre_tab_find_credentials_in_keyring
    at vinagre/vinagre-tab.c line 750
  • #4 vnc_authentication_cb
    at plugins/vnc/vinagre-vnc-tab.c line 495
  • #5 g_cclosure_marshal_VOID__BOXEDv
    at /build/buildd/glib2.0-2.34.0/./gobject/gmarshal.c line 1160
  • #6 _g_closure_invoke_va
    at /build/buildd/glib2.0-2.34.0/./gobject/gclosure.c line 840
  • #7 g_signal_emit_valist
    at /build/buildd/glib2.0-2.34.0/./gobject/gsignal.c line 3211
  • #8 g_signal_emit
    at /build/buildd/glib2.0-2.34.0/./gobject/gsignal.c line 3356
  • #9 g_cclosure_marshal_VOID__BOXEDv
    at /build/buildd/glib2.0-2.34.0/./gobject/gmarshal.c line 1160
  • #10 _g_closure_invoke_va
    at /build/buildd/glib2.0-2.34.0/./gobject/gclosure.c line 840
  • #11 g_signal_emit_valist
    at /build/buildd/glib2.0-2.34.0/./gobject/gsignal.c line 3211
  • #12 g_signal_emit
    at /build/buildd/glib2.0-2.34.0/./gobject/gsignal.c line 3356
  • #13 do_vnc_connection_emit_main_context
    at ../../../src/vncconnection.c line 497
  • #14 g_main_dispatch
    at /build/buildd/glib2.0-2.34.0/./glib/gmain.c line 2715
  • #15 g_main_context_dispatch
    at /build/buildd/glib2.0-2.34.0/./glib/gmain.c line 3219
  • #16 g_main_context_iterate
    at /build/buildd/glib2.0-2.34.0/./glib/gmain.c line 3290
  • #17 g_main_context_iteration
    at /build/buildd/glib2.0-2.34.0/./glib/gmain.c line 3351
  • #18 g_application_run
    at /build/buildd/glib2.0-2.34.0/./gio/gapplication.c line 1620
  • #19 main
    at vinagre/vinagre-main.c line 196

Comment 5 Bill C 2012-10-19 15:26:03 UTC
Just confirming the bug, will have to find a matching vinagre/debug package.
Comment 6 awilliam 2012-10-19 20:27:09 UTC
It crashes for me when I try to attach to a VNC host, signal 11.
-
  • #0 g_utf8_validate
    from /usr/lib64/libglib-2.0.so.0
  • #1 secret_attributes_buildv
    from /usr/lib64/libsecret-1.so.0
  • #2 secret_password_lookup_sync
    from /usr/lib64/libsecret-1.so.0
  • #3 vinagre_tab_find_credentials_in_keyring
    at vinagre/vinagre-tab.c line 750
  • #4 vnc_authentication_cb
    at plugins/vnc/vinagre-vnc-tab.c line 495
  • #5 g_cclosure_marshal_VOID__BOXEDv
    from /usr/lib64/libgobject-2.0.so.0
  • #6 _g_closure_invoke_va
    from /usr/lib64/libgobject-2.0.so.0
  • #7 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #8 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #9 g_cclosure_marshal_VOID__BOXEDv
    from /usr/lib64/libgobject-2.0.so.0
  • #10 _g_closure_invoke_va
    from /usr/lib64/libgobject-2.0.so.0
  • #11 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #12 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #13 do_vnc_connection_emit_main_context
    from /usr/lib64/libgvnc-1.0.so.0
  • #14 g_main_context_dispatch
    from /usr/lib64/libglib-2.0.so.0
  • #15 g_main_context_iterate.isra.24
    from /usr/lib64/libglib-2.0.so.0
  • #16 g_main_context_iteration
    from /usr/lib64/libglib-2.0.so.0
  • #17 g_application_run
    from /usr/lib64/libgio-2.0.so.0
  • #18 main
    at vinagre/vinagre-main.c line 196

Comment 7 awilliam 2012-10-23 10:42:38 UTC
Also tested on my openSUSE 12.2 workstation, fails there in the same way when performing a VNC connection.

(gdb) bt
  • #0 g_utf8_validate
    from /usr/lib64/libglib-2.0.so.0
  • #1 secret_attributes_buildv
    from /usr/lib64/libsecret-1.so.0
  • #2 secret_password_lookup_sync
    from /usr/lib64/libsecret-1.so.0
  • #3 vinagre_tab_find_credentials_in_keyring
    at vinagre/vinagre-tab.c line 750
  • #4 vnc_authentication_cb
    at plugins/vnc/vinagre-vnc-tab.c line 495
  • #5 g_cclosure_marshal_VOID__BOXEDv
    from /usr/lib64/libgobject-2.0.so.0
  • #6 _g_closure_invoke_va
    from /usr/lib64/libgobject-2.0.so.0
  • #7 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #8 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #9 g_cclosure_marshal_VOID__BOXEDv
    from /usr/lib64/libgobject-2.0.so.0
  • #10 _g_closure_invoke_va
    from /usr/lib64/libgobject-2.0.so.0
  • #11 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #12 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #13 do_vnc_connection_emit_main_context
    at vncconnection.c line 497
  • #14 g_main_context_dispatch
    from /usr/lib64/libglib-2.0.so.0
  • #15 g_main_context_iterate.isra.24
    from /usr/lib64/libglib-2.0.so.0
  • #16 g_main_context_iteration
    from /usr/lib64/libglib-2.0.so.0
  • #17 g_application_run
    from /usr/lib64/libgio-2.0.so.0
  • #18 main
    at vinagre/vinagre-main.c line 196

Comment 8 awilliam 2012-10-23 10:49:43 UTC
A slightly more complete backtrace; even with the glib debuginfo I can't get a line number for the failure in the g_utf8_validate call at the end of the stack


(gdb) bt
  • #0 g_utf8_validate
    from /usr/lib64/libglib-2.0.so.0
  • #1 secret_attributes_buildv
    at secret-attributes.c line 168
  • #2 secret_password_lookup_sync
    at secret-password.c line 468
  • #3 vinagre_tab_find_credentials_in_keyring
    at vinagre/vinagre-tab.c line 750
  • #4 vnc_authentication_cb
    at plugins/vnc/vinagre-vnc-tab.c line 495
  • #5 g_cclosure_marshal_VOID__BOXEDv
    from /usr/lib64/libgobject-2.0.so.0
  • #6 _g_closure_invoke_va
    from /usr/lib64/libgobject-2.0.so.0
  • #7 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #8 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #9 g_cclosure_marshal_VOID__BOXEDv
    from /usr/lib64/libgobject-2.0.so.0
  • #10 _g_closure_invoke_va
    from /usr/lib64/libgobject-2.0.so.0
  • #11 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #12 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #13 do_vnc_connection_emit_main_context
    at vncconnection.c line 497
  • #14 g_main_context_dispatch
    from /usr/lib64/libglib-2.0.so.0
  • #15 g_main_context_iterate.isra.24
    from /usr/lib64/libglib-2.0.so.0
  • #16 g_main_context_iteration
    from /usr/lib64/libglib-2.0.so.0
  • #17 g_application_run
    from /usr/lib64/libgio-2.0.so.0
  • #18 main
    at vinagre/vinagre-main.c line 196

Comment 9 Marc Deslauriers 2012-10-26 13:40:49 UTC
It looks like the switch to libsecret causes an empty username to segfault. There's a patch that works for me for vinagre in this downstream bug report:

https://bugs.launchpad.net/vinagre/+bug/1071055
Comment 10 David King 2012-10-26 13:46:14 UTC
(In reply to comment #9)
> There's a patch that works for me for vinagre in this downstream bug report:
> https://bugs.launchpad.net/vinagre/+bug/1071055

Is there any attribution that I can add to the commit? I would rather add some credit than have to redo the patch with some inaccurate information.
Comment 11 Marc Deslauriers 2012-10-26 13:49:06 UTC
Unfortunately, the bug reporter who provided the patch didn't provide much details to his identity besides his email address: https://launchpad.net/~nlkreaqm-ktw

It's a pretty trivial patch anyway.
Comment 12 Christian Smith 2012-10-26 14:32:23 UTC
Patch works here too.
Comment 13 Marc Deslauriers 2012-10-31 08:36:25 UTC
Actually, I think this was fixed in libsecret in bug #686015
Comment 14 David King 2012-10-31 08:45:55 UTC
Rather than depending on the behaviour of a new libsecret, which makes it clear that passing a NULL string is invalid, it seems that Vinagre should do the check listed in the Launchpad patch.
Comment 15 Bill C 2012-10-31 12:39:12 UTC
Confirming that vinagre is now working with the last batch of lib updates.
Comment 16 awilliam 2012-11-01 12:52:33 UTC
Confirming this issue is resolved, at least for me.
openSUSE 12.2 x86_64
libsecret-1-0-0.11-1.1.x86_64
vinagre-3.6.1-1.2.x86_64
Vendor for my vinagre package is obs://build.opensuse.org/GNOME GNOME:STABLE:3.6
Comment 17 David King 2012-11-12 21:06:20 UTC
I pushed a similar patch to that in the Launchpad bug to master and gnome-3-6 and master as commits b1e29b74002b227f3dea48a55eeb368ca37cb890 and 
commit 8c004946bc825e56ab8dc6684cae9e741e65f51a.