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 566148 - vinagre-2.24.2: core dump when pressing "connect"
vinagre-2.24.2: core dump when pressing "connect"
Status: RESOLVED FIXED
Product: gtk-vnc
Classification: Other
Component: general
0.3.x
Other NetBSD
: Normal major
: ---
Assigned To: gtk-vnc-maint
gtk-vnc-maint
Depends on:
Blocks:
 
 
Reported: 2008-12-31 16:06 UTC by Thomas Klausner
Modified: 2010-03-20 19:12 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24



Description Thomas Klausner 2008-12-31 16:06:44 UTC
I'm trying to run vinagre-2.24.2 with gtk-vnc-0.3.8 on NetBSD-5.99.5/amd64.

When I start vinagre and connect to "localhost", vinagre segfaults.

The backtrace is:
Program terminated with signal 11, Segmentation fault.
  • #0 pthread_curcpu_np
    from /usr/lib/libpthread.so.0
  • #0 pthread_curcpu_np
    from /usr/lib/libpthread.so.0
  • #1 calloc
    from /usr/lib/libc.so.12
  • #2 g_malloc0
    from /usr/pkg/lib/libglib-2.0.so.0
  • #3 g_slice_alloc
    from /usr/pkg/lib/libglib-2.0.so.0
  • #4 g_array_sized_new
    from /usr/pkg/lib/libglib-2.0.so.0
  • #5 gdk_keymap_get_entries_for_keyval
    from /usr/pkg/lib/libgdk-x11-2.0.so.0
  • #6 x_keymap_set_keymap_entries
    from /usr/pkg/lib/libgtk-vnc-1.0.so.0
  • #7 vnc_coroutine
    from /usr/pkg/lib/libgtk-vnc-1.0.so.0
  • #8 coroutine_trampoline
    from /usr/pkg/lib/libgtk-vnc-1.0.so.0
  • #9 swapcontext
    from /usr/lib/libc.so.12
  • #10 ??
  • #11 ??

I'm not sure which part (vinagre, gtk-vnc, glib2) is misbehaving here.
Ideas on how to debug this?
Comment 1 Jonh Wendell 2009-01-05 12:24:51 UTC
Hi. This seems to be a GLib/LibC issue. It's better you to ask some glib developer.
Comment 2 Matthias Clasen 2009-01-05 18:54:57 UTC
doesn't really look glib related to me. 
I'd suspect some interaction between the coroutine stuff that vnc apparently uses and pthreads...
Comment 3 Jonh Wendell 2009-01-07 13:11:13 UTC
Hi, Thomas. Could you run vinagre under valgrind? Thanks.
Comment 4 Thomas Klausner 2009-01-07 21:54:24 UTC
I'm sorry, but valgrind hasn't been ported to NetBSD.
Does ktrace (similar to strace) output help?
Comment 5 Jonh Wendell 2009-01-08 12:27:49 UTC
Daniel, could you comment here please?
Comment 6 Thomas Klausner 2009-04-02 08:07:30 UTC
Matthias Drochner <drochner@NetBSD.org> explained to me that currently NetBSD's pthread library can't coexist with anything which uses user-defined stacks, and suggested adding "--with-coroutine=gthread" to gtk-vnc's compilation flags. That seems to fix the problem.

Perhaps this can be added to gtk-vnc's README, then I guess there's nothing more to do here.
Comment 7 Daniel P. Berrange 2009-04-02 10:11:24 UTC
Is there any webpage somewhere describing this restriction with NetBSD pthreads that we can refer to ?  Its a little surprising/annoying that using pthreads would break any application use of makecontext/swapcontext().

If this is expected to be a long term limitation of NetBSD, then we should make the configure script automatically pick the gthreads impl when run on NetBSD
Comment 8 Thomas Klausner 2009-05-19 14:19:01 UTC
The pthread(3) man page on NetBSD now contains a paragraph to this effect in the CAVEATS section.
You can look at it online e.g. at http://man.netbsd.org/cgi-bin/man-cgi?pthread++NetBSD-current
Comment 9 Daniel P. Berrange 2010-03-20 19:12:03 UTC
I've added a note about this problem in the GTK-VNC README


commit 232ba0224e1bf98d7505f2e13c7d80119775b4eb
Author: Daniel P. Berrange <berrange@redhat.com>
Date:   Sat Mar 20 19:11:00 2010 +0000

    Add some installation caveats to README
    
    Add note about NetBSD swapcontext() problems & Mingw SASL limitation