Bug 16362 - libgdk core dumped
Summary: libgdk core dumped
Status: RESOLVED INVALID
Alias: None
Product: Gtk#
Classification: Mono
Component: gtk-sharp ()
Version: 2.x
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-11-20 10:26 UTC by Victor
Modified: 2013-11-20 13:26 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED INVALID

Description Victor 2013-11-20 10:26:35 UTC
Hello,

I have a segmentation fault which seems due to gtk# lib.

======== Configuration :

Linux LXLYODEV30 2.6.32-279.el6.x86_64 #1 SMP Wed Jun 13 18:24:36 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux

[root@LXLYODEV30 Debug]# mono -V
Mono Runtime Engine version 3.2.5 (master/b5bc9d7 Mon Oct 28 12:04:22 CET 2013)
Copyright (C) 2002-2013 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            sgen

gtk-sharp2.x86_64                   2.12.11-1.el6
gtk-sharp2-gapi.x86_64              2.12.11-1.el6

Name:          gtk-sharp
Hash Algoritm: 0x00008004
Version:       2.12.0.0
Flags:         0x00000001
PublicKey:     BlobPtr (0x00014488)

Name:          gsf-sharp
Hash Algoritm: 0x00008004
Version:       0.0.0.7
Flags:         0x00000001
PublicKey:     BlobPtr (0x00000152)


======== 


[root@LXLYODEV30 abrt]# /usr/bin/mono --debug=gdb /opt/intranet/applications/DocConverterServer/bin/Debug/DocConverterServer.exe -t

(DocConverterServer:20584): GLib-GObject-CRITICAL **: gtype.c:2458: initialization assertion failed, use IA__g_type_init() prior to this function

(DocConverterServer:20584): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed

(DocConverterServer:20584): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed
Stacktrace:


Native stacktrace:

        /usr/bin/mono() [0x4a41c0]
        /usr/bin/mono() [0x4ff65b]
        /usr/bin/mono() [0x415a89]
        /lib64/libpthread.so.0() [0x3f7640f500]
        /usr/lib64/libgdk_pixbuf-2.0.so.0() [0x38c200b4ff]
        /usr/lib64/libgdk_pixbuf-2.0.so.0(gdk_pixbuf_loader_new_with_type+0x8d) [0x38c200bfcd]
        [0x402082f1]

Debug info from gdb:

/root/.gdbinit:1: Error in sourced command file:
Undefined command: "add-auto-load-safe-path".  Try "help".
Mono support loaded.
[Thread debugging using libthread_db enabled]
[New Thread 0x7f1037453700 (LWP 20616)]
[New Thread 0x7f1037654700 (LWP 20601)]
[New Thread 0x7f1037695700 (LWP 20600)]
[New Thread 0x7f10376d6700 (LWP 20593)]
[New Thread 0x7f1037717700 (LWP 20592)]
[New Thread 0x7f1037bfd700 (LWP 20591)]
[New Thread 0x7f1037dfe700 (LWP 20589)]
[New Thread 0x7f1037fff700 (LWP 20588)]
[New Thread 0x7f103cbb6700 (LWP 20585)]
0x0000003f7640e54d in read () from /lib64/libpthread.so.0
  10 Thread 0x7f103cbb6700 (LWP 20585)  0x0000003f7640d720 in sem_wait () from /lib64/libpthread.so.0
  9 Thread 0x7f1037fff700 (LWP 20588)  0x0000003f7640e84d in accept () from /lib64/libpthread.so.0
  8 Thread 0x7f1037dfe700 (LWP 20589)  0x0000003f7640b43c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  7 Thread 0x7f1037bfd700 (LWP 20591)  0x0000003f7640b7bb in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  6 Thread 0x7f1037717700 (LWP 20592)  0x0000003f75ce7c73 in epoll_wait () from /lib64/libc.so.6
  5 Thread 0x7f10376d6700 (LWP 20593)  0x0000003f7640d811 in sem_timedwait () from /lib64/libpthread.so.0
  4 Thread 0x7f1037695700 (LWP 20600)  0x0000003f7640ed2d in nanosleep () from /lib64/libpthread.so.0
  3 Thread 0x7f1037654700 (LWP 20601)  0x0000003f7640d811 in sem_timedwait () from /lib64/libpthread.so.0
  2 Thread 0x7f1037453700 (LWP 20616)  0x0000003f7640f09d in waitpid () from /lib64/libpthread.so.0
* 1 Thread 0x7f104484b780 (LWP 20584)  0x0000003f7640e54d in read () from /lib64/libpthread.so.0

Thread 10 (Thread 0x7f103cbb6700 (LWP 20585)):
#0  0x0000003f7640d720 in sem_wait () from /lib64/libpthread.so.0
#1  0x0000000000626888 in mono_sem_wait (sem=0x96dba0, alertable=1) at mono-semaphore.c:119
#2  0x00000000005a3ec5 in finalizer_thread (unused=<value optimized out>) at gc.c:1073
#3  0x00000000005811d7 in start_wrapper_internal (data=0x2443bf0) at threads.c:609
#4  start_wrapper (data=0x2443bf0) at threads.c:654
#5  0x000000000061a233 in thread_start_routine (args=0x23b7c80) at wthreads.c:294
#6  0x000000000062b750 in inner_start_thread (arg=0x24346d0) at mono-threads-posix.c:49
#7  0x0000003f76407851 in start_thread () from /lib64/libpthread.so.0
#8  0x0000003f75ce767d in clone () from /lib64/libc.so.6

Thread 9 (Thread 0x7f1037fff700 (LWP 20588)):
#0  0x0000003f7640e84d in accept () from /lib64/libpthread.so.0
#1  0x0000000000613806 in _wapi_accept (fd=5, addr=0x0, addrlen=0x0) at sockets.c:221
#2  0x0000000000576923 in ves_icall_System_Net_Sockets_Socket_Accept_internal (sock=<value optimized out>, error=0x7f1037ffea2c, blocking=<value optimized out>) at socket-io.c:877
#3  0x0000000041bfe9a9 in ?? ()
#4  0x0000000041bfe54c in ?? ()
#5  0x0000000041bfe354 in ?? ()
#6  0x0000000041bfe144 in ?? ()
#7  0x00007f103cf33fda in System.Threading.Thread:StartInternal (this=...) at <unknown>:682
#8  0x0000000040cf319f in ?? ()
#9  0x000000000041ddb8 in mono_jit_runtime_invoke (method="System.Threading.ThreadStart:Invoke ()", obj=0x7f103e4cc420, params=0x7f1037ffed90, exc=0x0) at mini.c:6591
#10 0x00000000005a84bb in mono_runtime_invoke (method="System.Threading.ThreadStart:Invoke ()", obj=0x7f103e4cc420, params=0x7f1037ffed90, exc=0x0) at object.c:2827
#11 0x0000000000581299 in start_wrapper_internal (data=0x2b468f0) at threads.c:615
#12 start_wrapper (data=0x2b468f0) at threads.c:654
#13 0x000000000061a233 in thread_start_routine (args=0x23b7fa0) at wthreads.c:294
#14 0x000000000062b750 in inner_start_thread (arg=0x2897130) at mono-threads-posix.c:49
#15 0x0000003f76407851 in start_thread () from /lib64/libpthread.so.0
#16 0x0000003f75ce767d in clone () from /lib64/libc.so.6

Thread 8 (Thread 0x7f1037dfe700 (LWP 20589)):
#0  0x0000003f7640b43c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x000000000060582c in _wapi_handle_timedwait_signal_handle (handle=0x410, timeout=0x0, alertable=1, poll=<value optimized out>) at handles.c:1588
#2  0x0000000000617f7b in WaitForSingleObjectEx (handle=0x410, timeout=4294967295, alertable=1) at wait.c:196
#3  0x00000000005a5993 in ves_icall_System_Threading_Monitor_Monitor_wait (obj=0x7f103e4cdc60, ms=4294967295) at monitor.c:1485
#4  0x0000000041bff610 in ?? ()
#5  0x00007f103cf2fc03 in System.Threading.Monitor:Wait (obj=System.Object, millisecondsTimeout=-1) at <unknown>:140
#6  0x0000000041bff408 in ?? ()
#7  0x0000000041bff308 in ?? ()
#8  0x0000000041bfefd0 in ?? ()
#9  0x00007f103cf33fda in System.Threading.Thread:StartInternal (this=...) at <unknown>:682
#10 0x0000000040cf319f in ?? ()
#11 0x000000000041ddb8 in mono_jit_runtime_invoke (method="System.Threading.ThreadStart:Invoke ()", obj=0x7f103e4cdd90, params=0x7f1037dfdd90, exc=0x0) at mini.c:6591
#12 0x00000000005a84bb in mono_runtime_invoke (method="System.Threading.ThreadStart:Invoke ()", obj=0x7f103e4cdd90, params=0x7f1037dfdd90, exc=0x0) at object.c:2827
#13 0x0000000000581299 in start_wrapper_internal (data=0x2b46c70) at threads.c:615
#14 start_wrapper (data=0x2b46c70) at threads.c:654
#15 0x000000000061a233 in thread_start_routine (args=0x23b8130) at wthreads.c:294
#16 0x000000000062b750 in inner_start_thread (arg=0x2b9a530) at mono-threads-posix.c:49
#17 0x0000003f76407851 in start_thread () from /lib64/libpthread.so.0
#18 0x0000003f75ce767d in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7f1037bfd700 (LWP 20591)):
#0  0x0000003f7640b7bb in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x000000000060576d in _wapi_handle_timedwait_signal_handle (handle=0x411, timeout=0x7f1037bfc820, alertable=1, poll=<value optimized out>) at handles.c:1586
#2  0x0000000000617d51 in WaitForSingleObjectEx (handle=0x411, timeout=999, alertable=1) at wait.c:198
#3  0x0000000000584011 in mono_wait_uninterrupted (thread=0x7f103e8c7870, multiple=0, numhandles=1, handles=0x7f1037bfc8c8, waitall=0, ms=999, alertable=1) at threads.c:1487
#4  0x0000000000584299 in ves_icall_System_Threading_WaitHandle_WaitOne_internal (this=<value optimized out>, handle=0x411, ms=999, exitContext=<value optimized out>) at threads.c:1619
#5  0x0000000041c08898 in ?? ()
#6  0x00007f103cf38141 in System.Threading.WaitHandle:WaitOne (this=..., millisecondsTimeout=999, exitContext=false) at <unknown>:382
#7  0x00007f103cf381cc in System.Threading.WaitHandle:WaitOne (this=..., millisecondsTimeout=999) from /usr/lib/mono/2.0/mscorlib.dll.so
#8  0x00007f103cf374e5 in System.Threading.Timer/Scheduler:SchedulerThread (this=...) at <unknown>:385
#9  0x00007f103cf33fda in System.Threading.Thread:StartInternal (this=...) at <unknown>:682
#10 0x0000000040cf319f in ?? ()
#11 0x000000000041ddb8 in mono_jit_runtime_invoke (method="System.Threading.ThreadStart:Invoke ()", obj=0x7f103e4f8080, params=0x7f1037bfcd90, exc=0x0) at mini.c:6591
#12 0x00000000005a84bb in mono_runtime_invoke (method="System.Threading.ThreadStart:Invoke ()", obj=0x7f103e4f8080, params=0x7f1037bfcd90, exc=0x0) at object.c:2827
#13 0x0000000000581299 in start_wrapper_internal (data=0x2d0a5b0) at threads.c:615
#14 start_wrapper (data=0x2d0a5b0) at threads.c:654
#15 0x000000000061a233 in thread_start_routine (args=0x23b85e0) at wthreads.c:294
#16 0x000000000062b750 in inner_start_thread (arg=0x2ceffa0) at mono-threads-posix.c:49
#17 0x0000003f76407851 in start_thread () from /lib64/libpthread.so.0
#18 0x0000003f75ce767d in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7f1037717700 (LWP 20592)):
#0  0x0000003f75ce7c73 in epoll_wait () from /lib64/libc.so.6
#1  0x00000000005857ca in tp_epoll_wait (p=0x96d600) at ../../mono/metadata/tpool-epoll.c:118
#2  0x00000000005811d7 in start_wrapper_internal (data=0x2ca9560) at threads.c:609
#3  start_wrapper (data=0x2ca9560) at threads.c:654
#4  0x000000000061a233 in thread_start_routine (args=0x23b8838) at wthreads.c:294
#5  0x000000000062b750 in inner_start_thread (arg=0x2dbe510) at mono-threads-posix.c:49
#6  0x0000003f76407851 in start_thread () from /lib64/libpthread.so.0
#7  0x0000003f75ce767d in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7f10376d6700 (LWP 20593)):
#0  0x0000003f7640d811 in sem_timedwait () from /lib64/libpthread.so.0
#1  0x0000000000626993 in mono_sem_timedwait (sem=0x96d768, timeout_ms=<value optimized out>, alertable=1) at mono-semaphore.c:82
#2  0x0000000000586aaa in async_invoke_thread (data=0x0) at threadpool.c:1565
#3  0x00000000005811d7 in start_wrapper_internal (data=0x2d67ea0) at threads.c:609
#4  start_wrapper (data=0x2d67ea0) at threads.c:654
#5  0x000000000061a233 in thread_start_routine (args=0x23b8900) at wthreads.c:294
#6  0x000000000062b750 in inner_start_thread (arg=0x2d6f2f0) at mono-threads-posix.c:49
#7  0x0000003f76407851 in start_thread () from /lib64/libpthread.so.0
#8  0x0000003f75ce767d in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f1037695700 (LWP 20600)):
#0  0x0000003f7640ed2d in nanosleep () from /lib64/libpthread.so.0
#1  0x00000000006197c5 in SleepEx (ms=<value optimized out>, alertable=1) at wthreads.c:842
#2  0x0000000000585013 in monitor_thread (unused=<value optimized out>) at threadpool.c:779
#3  0x00000000005811d7 in start_wrapper_internal (data=0x7f102c00c4b0) at threads.c:609
#4  start_wrapper (data=0x7f102c00c4b0) at threads.c:654
#5  0x000000000061a233 in thread_start_routine (args=0x23b8a90) at wthreads.c:294
#6  0x000000000062b750 in inner_start_thread (arg=0x7f102c00c6e0) at mono-threads-posix.c:49
#7  0x0000003f76407851 in start_thread () from /lib64/libpthread.so.0
#8  0x0000003f75ce767d in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f1037654700 (LWP 20601)):
#0  0x0000003f7640d811 in sem_timedwait () from /lib64/libpthread.so.0
#1  0x0000000000626993 in mono_sem_timedwait (sem=0x96d6a8, timeout_ms=<value optimized out>, alertable=1) at mono-semaphore.c:82
#2  0x0000000000586aaa in async_invoke_thread (data=0x0) at threadpool.c:1565
#3  0x00000000005811d7 in start_wrapper_internal (data=0x7f102c0286d0) at threads.c:609
#4  start_wrapper (data=0x7f102c0286d0) at threads.c:654
#5  0x000000000061a233 in thread_start_routine (args=0x23b8b58) at wthreads.c:294
#6  0x000000000062b750 in inner_start_thread (arg=0x7f102c002530) at mono-threads-posix.c:49
#7  0x0000003f76407851 in start_thread () from /lib64/libpthread.so.0
#8  0x0000003f75ce767d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f1037453700 (LWP 20616)):
#0  0x0000003f7640f09d in waitpid () from /lib64/libpthread.so.0
#1  0x00000000004a42d5 in mono_handle_native_sigsegv (signal=<value optimized out>, ctx=<value optimized out>) at mini-exceptions.c:2361
#2  0x00000000004ff65b in mono_arch_handle_altstack_exception (sigctx=0x7f103c013ac0, fault_addr=<value optimized out>, stack_ovf=0) at exceptions-amd64.c:909
#3  0x0000000000415a89 in mono_sigsegv_signal_handler (_dummy=11, info=0x7f103c013bf0, context=0x7f103c013ac0) at mini.c:6706
#4  <signal handler called>
#5  0x00000038c200b4ff in ?? () from /usr/lib64/libgdk_pixbuf-2.0.so.0
#6  0x00000038c200bfcd in gdk_pixbuf_loader_new_with_type () from /usr/lib64/libgdk_pixbuf-2.0.so.0
#7  0x00000000402082f1 in ?? ()
#8  0x00007f1037452380 in ?? ()
#9  0x00007f103e5da8f8 in ?? ()
#10 0x00007f103e5da830 in ?? ()
#11 0x00007f1037452240 in ?? ()
#12 0x00007f103c42c018 in ?? ()
#13 0x00007f1037451fb0 in ?? ()
#14 0x00007f1037451df0 in ?? ()
#15 0x00007f103e5da8f8 in ?? ()
#16 0x00007f103e5da830 in ?? ()
#17 0x00007f1037452240 in ?? ()
#18 0x000000000000004b in ?? ()
#19 0x00000000402081c4 in ?? ()
#20 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f104484b780 (LWP 20584)):
#0  0x0000003f7640e54d in read () from /lib64/libpthread.so.0
#1  0x0000000000607695 in read (handle=<value optimized out>, buffer=0x7f103e59ded0, numbytes=1024, bytesread=0x7fff3026925c, overlapped=<value optimized out>) at /usr/include/bits/unistd.h:45
#2  console_read (handle=<value optimized out>, buffer=0x7f103e59ded0, numbytes=1024, bytesread=0x7fff3026925c, overlapped=<value optimized out>) at io.c:1046
#3  0x00000000005fd653 in ves_icall_System_IO_MonoIO_Read (handle=0x0, dest=0x7f103e59deb0, dest_offset=<value optimized out>, count=1024, error=0x7fff302692f8) at file-io.c:833
#4  0x0000000040cf7d82 in ?? ()
#5  0x00007f103cddf623 in System.IO.FileStream:ReadData (this=..., handle=0, buf=byte [1024], offset=0, count=1024) at <unknown>:1090
#6  0x00007f103cddd8c8 in System.IO.FileStream:ReadInternal (this=..., dest=byte [1024], offset=0, count=1024) at <unknown>:544
#7  0x00007f103cddd72a in System.IO.FileStream:Read (this=..., array=byte [1024], offset=0, count=1024) at <unknown>:501
#8  0x00007f103cde711a in System.IO.StreamReader:ReadBuffer (this=...) at <unknown>:396
#9  0x00007f103cde737d in System.IO.StreamReader:Read (this=...) at <unknown>:456
#10 0x00007f103cd882a8 in System.TermInfoDriver:ReadKeyInternal (this=..., fresh=140734001222820) at <unknown>:992
#11 0x00007f103cd889fa in System.TermInfoDriver:ReadLine (this=...) at <unknown>:1169
#12 0x00007f103cd3d073 in System.ConsoleDriver:ReadLine () from /usr/lib/mono/2.0/mscorlib.dll.so
#13 0x00007f103cd3c003 in System.Console:ReadLine () at <unknown>:529
#14 0x000000004023eee5 in ?? ()
#15 0x000000004023f16f in ?? ()
#16 0x000000000041ddb8 in mono_jit_runtime_invoke (method="converter.ConverterServer:Main ()", obj=0x0, params=0x7fff30269830, exc=0x0) at mini.c:6591
#17 0x00000000005a84bb in mono_runtime_invoke (method="converter.ConverterServer:Main ()", obj=0x0, params=0x7fff30269830, exc=0x0) at object.c:2827
#18 0x00000000005ac313 in mono_runtime_exec_main (method="converter.ConverterServer:Main ()", args=<value optimized out>, exc=0x0) at object.c:4062
#19 0x000000000047b092 in main_thread_handler (argc=<value optimized out>, argv=<value optimized out>) at driver.c:1061
#20 mono_main (argc=<value optimized out>, argv=<value optimized out>) at driver.c:2023
#21 0x0000003f75c1ecdd in __libc_start_main () from /lib64/libc.so.6
#22 0x0000000000413069 in _start ()

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

Abandon (core dumped)


Any idea ? 
It worked with .NET1.1 on ubuntu and RHEL 5.x (now .NET2.0 + RHEL 6.4 fail).

Regards

Victor d'Agostino
Comment 1 Mikayla Hutchinson [MSFT] 2013-11-20 13:26:38 UTC
This is a bug in your app, it has not initialized GTK, and is calling GDK from a background thread.