GNOME Bugzilla – Bug 685041
seg fault when connecting to VNC server
Last modified: 2012-11-12 21:06:20 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)
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!
+ Trace 230929
That backtrace has several missing symbols (most importantly, nothing from Vinagre). Please post a complete backtrace.
Sorry about that. it seems ubuntu doesn't have a vinagre-dbg package, had to get the source.
+ Trace 230930
Just confirming the bug, will have to find a matching vinagre/debug package.
It crashes for me when I try to attach to a VNC host, signal 11. -
+ Trace 231070
Also tested on my openSUSE 12.2 workstation, fails there in the same way when performing a VNC connection. (gdb) bt
+ Trace 231080
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
+ Trace 231081
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
(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.
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.
Patch works here too.
Actually, I think this was fixed in libsecret in bug #686015
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.
Confirming that vinagre is now working with the last batch of lib updates.
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
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.