Bug 4787 - (GSHARED issue) ab2 load test with >1 threads crashes mod-mono-server4 as well as fastcgi-mono-server4
Summary: (GSHARED issue) ab2 load test with >1 threads crashes mod-mono-server4 as wel...
Status: RESOLVED ANSWERED
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-04-30 23:38 UTC by pgentoo
Modified: 2017-07-07 18:45 UTC (History)
8 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 ANSWERED

Description pgentoo 2012-04-30 23:38:37 UTC
I do not have a clean repro yet, but will try to put one together that doesn't have any of my companies code in it. 


Native stacktrace:

        mono() [0x48df8b]
        mono() [0x4db702]
        mono() [0x41b0d5]
        /lib64/libpthread.so.0(+0xf9c0) [0x7fce3ffa99c0]
        /lib64/libpthread.so.0(pthread_mutex_lock+0x7) [0x7fce3ffa3ea5]
        mono() [0x49763d]
        [0x41e71a3a]

Debug info from gdb:

Mono support loaded.
[Thread debugging using libthread_db enabled]
[New Thread 0x7fce30300700 (LWP 31005)]
[New Thread 0x7fce3cc80700 (LWP 31002)]
[New Thread 0x7fce2bde9700 (LWP 31000)]
[New Thread 0x7fce3585c700 (LWP 30998)]
[New Thread 0x7fce35a66700 (LWP 30953)]
[New Thread 0x7fce36c40700 (LWP 30951)]
[New Thread 0x7fce37288700 (LWP 30950)]
[New Thread 0x7fce37fff700 (LWP 30944)]
[New Thread 0x7fce3c344700 (LWP 30943)]
[New Thread 0x7fce3ccc1700 (LWP 30941)]
[New Thread 0x7fce3cd0a700 (LWP 30937)]
[New Thread 0x7fce3cd4b700 (LWP 30936)]
[New Thread 0x7fce3cf50700 (LWP 30935)]
[New Thread 0x7fce3d8de700 (LWP 30934)]
[New Thread 0x7fce3ec13700 (LWP 30933)]
[New Thread 0x7fce3f414700 (LWP 30932)]
[New Thread 0x7fce3fc15700 (LWP 30931)]
0x00007fce3fc4b084 in sigsuspend () from /lib64/libc.so.6
  Id   Target Id         Frame
  18   Thread 0x7fce3fc15700 (LWP 30931) "mono" 0x00007fce3ffa5e7c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  17   Thread 0x7fce3f414700 (LWP 30932) "mono" 0x00007fce3ffa5e7c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  16   Thread 0x7fce3ec13700 (LWP 30933) "mono" 0x00007fce3ffa5e7c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  15   Thread 0x7fce3d8de700 (LWP 30934) "mono" 0x00007fce3ffa7e50 in sem_wait () from /lib64/libpthread.so.0
  14   Thread 0x7fce3cf50700 (LWP 30935) "mono" 0x00007fce3ffa929d in nanosleep () from /lib64/libpthread.so.0
  13   Thread 0x7fce3cd4b700 (LWP 30936) "mono" 0x00007fce3fce9f93 in epoll_wait () from /lib64/libc.so.6
  12   Thread 0x7fce3cd0a700 (LWP 30937) "mono" 0x00007fce3ffa7f41 in sem_timedwait () from /lib64/libpthread.so.0
  11   Thread 0x7fce3ccc1700 (LWP 30941) "mono" 0x00007fce3ffa929d in nanosleep () from /lib64/libpthread.so.0
  10   Thread 0x7fce3c344700 (LWP 30943) "mono" 0x00007fce3ffa61fb in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  9    Thread 0x7fce37fff700 (LWP 30944) "mono" 0x00007fce3fcdd0cd in read () from /lib64/libc.so.6
  8    Thread 0x7fce37288700 (LWP 30950) "mono" 0x00007fce3ffa61fb in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  7    Thread 0x7fce36c40700 (LWP 30951) "mono" 0x00007fce3ffa61fb in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  6    Thread 0x7fce35a66700 (LWP 30953) "mono" 0x00007fce3ffa61fb in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  5    Thread 0x7fce3585c700 (LWP 30998) "mono" 0x00007fce3ffa86a4 in __lll_lock_wait () from /lib64/libpthread.so.0
  4    Thread 0x7fce2bde9700 (LWP 31000) "mono" 0x00007fce3ffa7e50 in sem_wait () from /lib64/libpthread.so.0
  3    Thread 0x7fce3cc80700 (LWP 31002) "mono" 0x00007fce3ffa8b9d in read () from /lib64/libpthread.so.0
  2    Thread 0x7fce30300700 (LWP 31005) "mono" 0x00007fce3ffa86a4 in __lll_lock_wait () from /lib64/libpthread.so.0
* 1    Thread 0x7fce40a51740 (LWP 30930) "mono" 0x00007fce3fc4b084 in sigsuspend () from /lib64/libc.so.6

Thread 18 (Thread 0x7fce3fc15700 (LWP 30931)):
#0  0x00007fce3ffa5e7c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00000000005b6894 in GC_wait_marker () at pthread_support.c:1863
#2  0x00000000005bcd19 in GC_help_marker (my_mark_no=145) at mark.c:1116
#3  0x00000000005b53d3 in GC_mark_thread (id=<optimized out>) at pthread_support.c:552
#4  0x00007fce3ffa1abd in start_thread () from /lib64/libpthread.so.0
#5  0x00007fce3fce994d in clone () from /lib64/libc.so.6

Thread 17 (Thread 0x7fce3f414700 (LWP 30932)):
#0  0x00007fce3ffa5e7c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00000000005b6894 in GC_wait_marker () at pthread_support.c:1863
#2  0x00000000005bcd19 in GC_help_marker (my_mark_no=145) at mark.c:1116
#3  0x00000000005b53d3 in GC_mark_thread (id=<optimized out>) at pthread_support.c:552
#4  0x00007fce3ffa1abd in start_thread () from /lib64/libpthread.so.0
#5  0x00007fce3fce994d in clone () from /lib64/libc.so.6

Thread 16 (Thread 0x7fce3ec13700 (LWP 30933)):
#0  0x00007fce3ffa5e7c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00000000005b6894 in GC_wait_marker () at pthread_support.c:1863
#2  0x00000000005bcd19 in GC_help_marker (my_mark_no=145) at mark.c:1116
#3  0x00000000005b53d3 in GC_mark_thread (id=<optimized out>) at pthread_support.c:552
#4  0x00007fce3ffa1abd in start_thread () from /lib64/libpthread.so.0
#5  0x00007fce3fce994d in clone () from /lib64/libc.so.6

Thread 15 (Thread 0x7fce3d8de700 (LWP 30934)):
#0  0x00007fce3ffa7e50 in sem_wait () from /lib64/libpthread.so.0
#1  0x00000000005ac351 in mono_sem_wait (sem=0x8d9b40, alertable=1) at mono-semaphore.c:113
#2  0x00000000005802de in finalizer_thread (unused=<optimized out>) at gc.c:1066
#3  0x0000000000503a5a in start_wrapper_internal (data=<optimized out>) at threads.c:784
#4  start_wrapper (data=0x2025450) at threads.c:832
#5  0x0000000000594db8 in thread_start_routine (args=0x2008090) at wthreads.c:287
#6  0x00000000005b60a6 in GC_start_routine (arg=<optimized out>) at pthread_support.c:1468
#7  0x00007fce3ffa1abd in start_thread () from /lib64/libpthread.so.0
#8  0x00007fce3fce994d in clone () from /lib64/libc.so.6

Thread 14 (Thread 0x7fce3cf50700 (LWP 30935)):
#0  0x00007fce3ffa929d in nanosleep () from /lib64/libpthread.so.0
#1  0x0000000000594218 in SleepEx (ms=<optimized out>, alertable=1) at wthreads.c:1027
#2  0x0000000000503815 in ves_icall_System_Threading_Thread_Sleep_internal (ms=1000000) at threads.c:1325
#3  0x00000000400967ec in ?? ()
#4  0x00000000022fa450 in ?? ()
#5  0x00007fce3cf506c0 in ?? ()
#6  0x00007fce3cf65548 in ?? ()
#7  0x00007fce3cf65548 in ?? ()
#8  0x00000000022f88e0 in ?? ()
#9  0x00007fce3cf4fbb0 in ?? ()
#10 0x00007fce3cf4fab0 in ?? ()
#11 0x00007fce40a25cc0 in ?? ()
#12 0x00007fce3cf65548 in ?? ()
#13 0x00007fce3cf65548 in ?? ()
#14 0x00000000000f4240 in ?? ()
#15 0x0000000040096725 in ?? ()
#16 0x00007fce3cf655b0 in ?? ()
#17 0x0000000040096700 in ?? ()
#18 0x00007fce3cf4fbb0 in ?? ()
#19 0x00000000400961df in ?? ()
#20 0x00007fce3cf65548 in ?? ()
#21 0x00000000400960e6 in ?? ()
#22 0x0000000000000000 in ?? ()

Thread 13 (Thread 0x7fce3cd4b700 (LWP 30936)):
#0  0x00007fce3fce9f93 in epoll_wait () from /lib64/libc.so.6
#1  0x00000000004fbef2 in tp_epoll_wait (p=0x8d8cc0) at ../../mono/metadata/tpool-epoll.c:101
#2  0x0000000000503a5a in start_wrapper_internal (data=<optimized out>) at threads.c:784
#3  start_wrapper (data=0x22cde20) at threads.c:832
#4  0x0000000000594db8 in thread_start_routine (args=0x20082e8) at wthreads.c:287
#5  0x00000000005b60a6 in GC_start_routine (arg=<optimized out>) at pthread_support.c:1468
#6  0x00007fce3ffa1abd in start_thread () from /lib64/libpthread.so.0
#7  0x00007fce3fce994d in clone () from /lib64/libc.so.6

Thread 12 (Thread 0x7fce3cd0a700 (LWP 30937)):
#0  0x00007fce3ffa7f41 in sem_timedwait () from /lib64/libpthread.so.0
#1  0x00000000005ac456 in mono_sem_timedwait (sem=0x8d8c08, timeout_ms=<optimized out>, alertable=1) at mono-semaphore.c:76
#2  0x00000000004fd948 in async_invoke_thread (data=0x0) at threadpool.c:1485
#3  0x0000000000503a5a in start_wrapper_internal (data=<optimized out>) at threads.c:784
#4  start_wrapper (data=0x22cda40) at threads.c:832
#5  0x0000000000594db8 in thread_start_routine (args=0x20083b0) at wthreads.c:287
#6  0x00000000005b60a6 in GC_start_routine (arg=<optimized out>) at pthread_support.c:1468
#7  0x00007fce3ffa1abd in start_thread () from /lib64/libpthread.so.0
#8  0x00007fce3fce994d in clone () from /lib64/libc.so.6

Thread 11 (Thread 0x7fce3ccc1700 (LWP 30941)):
#0  0x00007fce3ffa929d in nanosleep () from /lib64/libpthread.so.0
#1  0x0000000000594218 in SleepEx (ms=<optimized out>, alertable=1) at wthreads.c:1027
#2  0x00000000004fb88f in monitor_thread (unused=<optimized out>) at threadpool.c:777
#3  0x0000000000503a5a in start_wrapper_internal (data=<optimized out>) at threads.c:784
#4  start_wrapper (data=0x22eeb50) at threads.c:832
#5  0x0000000000594db8 in thread_start_routine (args=0x2008478) at wthreads.c:287
#6  0x00000000005b60a6 in GC_start_routine (arg=<optimized out>) at pthread_support.c:1468
#7  0x00007fce3ffa1abd in start_thread () from /lib64/libpthread.so.0
#8  0x00007fce3fce994d in clone () from /lib64/libc.so.6

Thread 10 (Thread 0x7fce3c344700 (LWP 30943)):
#0  0x00007fce3ffa61fb in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x000000000059b699 in _wapi_handle_timedwait_signal_handle (handle=0x413, timeout=0x7fce3c343870, alertable=1, poll=<optimized out>) at handles.c:1653
#2  0x00000000005986cc in WaitForSingleObjectEx (handle=0x413, timeout=9999, alertable=1) at wait.c:205
#3  0x0000000000503433 in ves_icall_System_Threading_WaitHandle_WaitOne_internal (this=<optimized out>, handle=0x413, ms=9999, exitContext=<optimized out>) at threads.c:1670
#4  0x000000004179baba in ?? ()
#5  0x00000000026ceb30 in ?? ()
#6  0x00007fce3c3446c0 in ?? ()
#7  0x00007fce3c34394f in ?? ()
#8  0x00007fce3c4be050 in ?? ()
#9  0x0000000000000001 in ?? ()
#10 0x00007fce3c343970 in ?? ()
#11 0x00007fce3c3438d0 in ?? ()
#12 0x0000000000000001 in ?? ()
#13 0x0000000000002710 in ?? ()
#14 0x00007fce3c5d4a78 in ?? ()
#15 0x000000000000270f in ?? ()
#16 0x000000004179b809 in ?? ()
#17 0x00007fce3c5d4a78 in ?? ()
#18 0x0000000000000000 in ?? ()

Thread 9 (Thread 0x7fce37fff700 (LWP 30944)):
#0  0x00007fce3fcdd0cd in read () from /lib64/libc.so.6
#1  0x0000000041742131 in ?? ()
#2  0x0000000002024090 in ?? ()
#3  0x00007fce37fff6c0 in ?? ()
#4  0x00007fce37ffe800 in ?? ()
#5  0x00000000413b48d5 in ?? ()
#6  0x00000000026d8a90 in ?? ()
#7  0x00007fce37ffeb30 in ?? ()
#8  0x00007fce37ffea50 in ?? ()
#9  0x00007fce40a25330 in ?? ()
#10 0x00007fce3c37a000 in ?? ()
#11 0xffffffffffffffff in ?? ()
#12 0x00007fce3c499bc0 in ?? ()
#13 0xffffffffffffffff in ?? ()
#14 0x00007fce3c37a020 in ?? ()
#15 0x0000000041741f76 in ?? ()
#16 0x00007fce3c377f08 in ?? ()
#17 0x0000000002691930 in ?? ()
#18 0x0000000000000000 in ?? ()

Thread 8 (Thread 0x7fce37288700 (LWP 30950)):
#0  0x00007fce3ffa61fb in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x000000000059b699 in _wapi_handle_timedwait_signal_handle (handle=0x423, timeout=0x7fce37287870, alertable=1, poll=<optimized out>) at handles.c:1653
#2  0x00000000005986cc in WaitForSingleObjectEx (handle=0x423, timeout=89999, alertable=1) at wait.c:205
#3  0x0000000000503433 in ves_icall_System_Threading_WaitHandle_WaitOne_internal (this=<optimized out>, handle=0x423, ms=89999, exitContext=<optimized out>) at threads.c:1670
#4  0x0000000040e84d9a in ?? ()
#5  0x00000000026413a0 in ?? ()
#6  0x00007fce372886c0 in ?? ()
#7  0x00007fce3728794f in ?? ()
#8  0x00007fce3c3d8f00 in ?? ()
#9  0x0000000000000003 in ?? ()
#10 0x00007fce37287970 in ?? ()
#11 0x00007fce372878d0 in ?? ()
#12 0x0000000000000000 in ?? ()

Thread 7 (Thread 0x7fce36c40700 (LWP 30951)):
#0  0x00007fce3ffa61fb in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x000000000059b699 in _wapi_handle_timedwait_signal_handle (handle=0x43f, timeout=0x7fce36c3f620, alertable=1, poll=<optimized out>) at handles.c:1653
#2  0x00000000005986cc in WaitForSingleObjectEx (handle=0x43f, timeout=30000, alertable=1) at wait.c:205
#3  0x0000000000503433 in ves_icall_System_Threading_WaitHandle_WaitOne_internal (this=<optimized out>, handle=0x43f, ms=30000, exitContext=<optimized out>) at threads.c:1670
#4  0x0000000040e84d9a in ?? ()
#5  0x0000000002690fd0 in ?? ()
#6  0x00007fce36c406c0 in ?? ()
#7  0x00007fce36c3f6ff in ?? ()
#8  0x00007fce3d05b140 in ?? ()
#9  0x00000000026eea00 in ?? ()
#10 0x00007fce36c3f720 in ?? ()
#11 0x00007fce36c3f680 in ?? ()
#12 0x00007fce40a25330 in ?? ()
#13 0x00007fce3738dc98 in ?? ()
#14 0x00007fce3612b000 in ?? ()
#15 0x0000000000007530 in ?? ()
#16 0x0000000040e84a09 in ?? ()
#17 0x00007fce3c568eb0 in ?? ()
#18 0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7fce35a66700 (LWP 30953)):
#0  0x00007fce3ffa61fb in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x000000000059b699 in _wapi_handle_timedwait_signal_handle (handle=0x441, timeout=0x7fce35a656b0, alertable=1, poll=<optimized out>) at handles.c:1653
#2  0x00000000005986cc in WaitForSingleObjectEx (handle=0x441, timeout=60000, alertable=1) at wait.c:205
#3  0x0000000000503433 in ves_icall_System_Threading_WaitHandle_WaitOne_internal (this=<optimized out>, handle=0x441, ms=60000, exitContext=<optimized out>) at threads.c:1670
#4  0x0000000040e84d9a in ?? ()
#5  0x00000000026c6a00 in ?? ()
#6  0x00007fce35a666c0 in ?? ()
#7  0x00007fce35a6578f in ?? ()
#8  0x00007fce3cfaec08 in ?? ()
#9  0x00000000026eea00 in ?? ()
#10 0x00007fce35a657b0 in ?? ()
#11 0x00007fce35a65710 in ?? ()
#12 0x00007fce40a25330 in ?? ()
#13 0x00007fce3738daf8 in ?? ()
#14 0x00007fce361abf78 in ?? ()
#15 0x000000000000ea60 in ?? ()
#16 0x0000000040e84a09 in ?? ()
#17 0x00007fce3c586b90 in ?? ()
#18 0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7fce3585c700 (LWP 30998)):
#0  0x00007fce3ffa86a4 in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x00007fce3ffa40bb in _L_lock_493 () from /lib64/libpthread.so.0
#2  0x00007fce3ffa3ed8 in pthread_mutex_lock () from /lib64/libpthread.so.0
#3  0x00000000005b7ff5 in GC_generic_malloc_many (lb=24, k=0, result=0x7fce351c5858) at mallocx.c:375
#4  0x00000000005b562d in GC_local_malloc_atomic (bytes=24) at pthread_support.c:395
#5  0x0000000000506673 in mono_object_new_ptrfree (vtable=0x23c59d0) at object.c:4353
#6  0x0000000000508a7a in mono_object_new_alloc_specific (vtable=0x23c59d0) at object.c:4326
#7  0x0000000000508b2a in mono_object_new_specific (vtable=0x23c59d0) at object.c:4317
#8  0x00000000406ab4ec in ?? ()
#9  0x00007fce3585b8e8 in ?? ()
#10 0x00007fce3585c6c0 in ?? ()
#11 0x00007fce408acd40 in ?? ()
#12 0x00000000005341b2 in ves_icall_type_is_subtype_of (type=0xa, c=0x0, check_interfaces=0 '\000') at icall.c:1543
#13 0x00007fce351c5858 in ?? ()
#14 0x00000000023c59d0 in ?? ()
#15 0x00000000413be35a in ?? ()
#16 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7fce2bde9700 (LWP 31000)):
#0  0x00007fce3ffa7e50 in sem_wait () from /lib64/libpthread.so.0
#1  0x00000000005beed3 in pthread_start_world () at pthread_stop_world.c:663
#2  GC_start_world () at pthread_stop_world.c:691
#3  0x00000000005b9b38 in GC_stopped_mark (stop_func=<optimized out>) at alloc.c:578
#4  0x00000000005ba070 in GC_try_to_collect_inner (stop_func=0x5b9830 <GC_never_stop_func>) at alloc.c:382
#5  0x00000000005ba96e in GC_collect_or_expand (needed_blocks=1, ignore_off_page=<optimized out>) at alloc.c:1045
#6  0x00000000005bab72 in GC_allocobj (sz=4, kind=1) at alloc.c:1125
#7  0x00000000005cd2fe in GC_generic_malloc_inner (lb=32, k=1) at malloc.c:136
#8  0x00000000005b80c5 in GC_generic_malloc_many (lb=32, k=1, result=0x7fce3454d268) at mallocx.c:513
#9  0x00000000005b5571 in GC_local_malloc (bytes=32) at pthread_support.c:370
#10 0x0000000000508a8d in mono_object_allocate (vtable=0x7fce39069fc0, size=<optimized out>) at object.c:4203
#11 mono_object_new_alloc_specific (vtable=0x7fce39069fc0) at object.c:4331
#12 0x0000000000508b2a in mono_object_new_specific (vtable=0x7fce39069fc0) at object.c:4317
#13 0x00000000406ab4ec in ?? ()
#14 0x00007fce2bde88e8 in ?? ()
#15 0x00007fce2bde96c0 in ?? ()
#16 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7fce3cc80700 (LWP 31002)):
#0  0x00007fce3ffa8b9d in read () from /lib64/libpthread.so.0
#1  0x000000000048e124 in read (__nbytes=1024, __buf=0x7fce40a58690, __fd=<optimized out>) at /usr/include/bits/unistd.h:45
#2  mono_handle_native_sigsegv (signal=<optimized out>, ctx=<optimized out>) at mini-exceptions.c:2208
#3  0x00000000004db702 in mono_arch_handle_altstack_exception (sigctx=0x7fce40a58c40, fault_addr=<optimized out>, stack_ovf=0) at exceptions-amd64.c:953
#4  0x000000000041b0d5 in mono_sigsegv_signal_handler (_dummy=11, info=0x7fce40a58d70, context=0x7fce40a58c40) at mini.c:5909
#5  <signal handler called>
#6  0x00007fce3ffa3ea5 in pthread_mutex_lock () from /lib64/libpthread.so.0
#7  0x000000000049763d in mono_class_fill_runtime_generic_context (class_vtable=<optimized out>, slot=6) at mini-generic-sharing.c:1296
#8  0x0000000041e71a3a in ?? ()
#9  0x4000000000000000 in ?? ()
#10 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fce30300700 (LWP 31005)):
#0  0x00007fce3ffa86a4 in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x00007fce3ffa40bb in _L_lock_493 () from /lib64/libpthread.so.0
#2  0x00007fce3ffa3ed8 in pthread_mutex_lock () from /lib64/libpthread.so.0
#3  0x00000000005b7ff5 in GC_generic_malloc_many (lb=80, k=0, result=0x7fce32824890) at mallocx.c:375
#4  0x00000000005b562d in GC_local_malloc_atomic (bytes=76) at pthread_support.c:395
#5  0x0000000000509590 in mono_object_allocate_ptrfree (vtable=0x2398eb0, size=<optimized out>) at object.c:4220
#6  mono_array_new_specific (vtable=0x2398eb0, n=11) at object.c:4779
#7  0x00000000406ab83f in ?? ()
#8  0x00007fce302ff8e8 in ?? ()
#9  0x00007fce303006c0 in ?? ()
#10 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fce40a51740 (LWP 30930)):
#0  0x00007fce3fc4b084 in sigsuspend () from /lib64/libc.so.6
#1  0x00000000005bea60 in _GC_suspend_handler (sig=<optimized out>) at pthread_stop_world.c:186
#2  GC_suspend_handler (sig=<optimized out>) at pthread_stop_world.c:211
#3  <signal handler called>
#4  0x00007fce3ffa5e7a in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#5  0x000000000059b872 in _wapi_handle_timedwait_signal_handle (handle=0x400, timeout=0x0, alertable=1, poll=<optimized out>) at handles.c:1655
#6  0x0000000000599223 in WaitForMultipleObjectsEx (numobjects=2, handles=0x7fff7537fda0, waitall=0, timeout=4294967295, alertable=1) at wait.c:722
#7  0x000000000050201f in wait_for_tids_or_state_change (wait=0x7fff7537fda0, timeout=<optimized out>) at threads.c:2807
#8  mono_thread_manage () at threads.c:3022
#9  0x000000000046a9e9 in mono_main (argc=<optimized out>, argv=<optimized out>) at driver.c:1856
#10 0x00007fce3fc38264 in __libc_start_main () from /lib64/libc.so.6
#11 0x0000000000414e79 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.
=================================================================
Comment 1 pgentoo 2012-05-21 12:19:31 UTC
Verified it still exists with 2.10.9.

When testing with ab2 and a single thread (# ab2 -c 1 -n 10000 -v 9 "http://localhost:51003/MyTest.ashx") the requests process fine. 

When testing with ab2 and a single thread (# ab2 -c 2 -n 10000 -v 9 "http://localhost:51003/MyTest.ashx") the requests process fine at first, and then at some point the process crashes/restarts.



WARNING: Response code not 2xx (500)
LOG: header received:
HTTP/1.1 500 Internal Server Error
Date: Sun, 20 May 2012 19:41:17 GMT
Server: Apache
Content-Length: 601
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator,
 contact@georiot.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.</p>
<p>More information about this error may be available
in the server error log.</p>
<hr>
<address>Apache Server at localhost Port 51003</address>
</body></html>


The /var/log/apache2/error_log shows that the mod-mono-server process restarts after dying. (as in original post)

dmesg shows: mono[2711]: segfault at 18 ip 00007f80f89f2ea5 sp 00007f80f4840070 error 4 in libpthread-2.14.1.so[7f80f89e9000+17000]


I've tried to repro this in a simple ashx to isolate the specific cause, however have been unsuccessful so far.  It seems that there are many factors at play here which result in this behavior.
Comment 2 pgentoo 2012-05-21 12:21:36 UTC
Also, i tried the same with running the service on windows 7 and MS.NET framework, and am UNABLE to repro the same issue.  Seems it is Mono/Linux specific.
Comment 3 Zoltan Varga 2012-05-21 12:24:44 UTC
The crash in the stacktrace happens in 
Thread 3 (Thread 0x7fce3cc80700 (LWP 31002)):

If all the crashes happen at this location, you _might_ be able to work around it by passing the
-O=-gshared flag to the runtime. I don't know how to pass that when running mod-mono tough.
Comment 4 pgentoo 2012-05-21 12:53:36 UTC
Zoltan,

Setting this flag seems to have resolved the issue!  Thank you!

I'll still try to come up with an isolated repro so we can get the gshared issue resolved.

Thanks again!
Comment 5 pgentoo 2012-10-27 11:58:48 UTC
Has this issue been fixed in any of the recent releases?
Comment 6 Zoltan Varga 2012-10-28 07:52:27 UTC
We could never reproduce this, thus couldn't fix it. It might have been fixed independently by something else. The -O=-gshared workaround is safe to do, and won't affect performance etc. in a server env.
Comment 7 Rodrigo Kumpera 2014-01-29 17:44:55 UTC
Can you still trigger with a recent 3.2.X mono?
Comment 8 Jerod Venema 2015-08-14 17:11:37 UTC
FWIW, I have an app that triggers this exact behavior with the 4.0.1 build, and the same -O=-gshared seems to solve it.
Comment 9 Ludovic Henry 2017-07-07 18:45:08 UTC
If you can still reproduce with latest mono version, please feel free to reopen the bug. Thank you.