[Mono-bugs] [Bug 522233] New: SIGSEGV when using WeakReferences in multi-threaded application
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Jul 15 07:06:05 EDT 2009
Summary: SIGSEGV when using WeakReferences in multi-threaded
Product: Mono: Runtime
Priority: P5 - None
AssignedTo: lupus at novell.com
ReportedBy: stefan.schultze at deepinvent.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Created an attachment (id=305198)
Small program that reproduces the bug within a few seconds
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1)
Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)
My multi-threaded server application holds a list of weak references to byte
arrays to increase performance and improve memory usage under Microsoft's .NET
Under Mono 22.214.171.124 (Linux+Windows), it crashes after a few seconds with a
I was able to write a small application that is able to reproduce the SIGSEGV
within 1-5 seconds. Please find it attached. Under Microsoft's .NET
implementation, it works perfectly, utilizing 200-300 MB of memory. Under Mono,
it crashes with a SIGSEGV. See additional information for details.
Steps to Reproduce:
1. Compile and run the attached program under Mono 126.96.36.199.
2. Wait 1-5 seconds.
Crashes ("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
Should not crash, but instead run forever.
gdb /usr/local/bin/mono GNU gdb Fedora (6.8-27.el5) Copyright (C) 2008 Free
Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...
(gdb) run MonoSigSegvRepro.exe
Starting program: /usr/local/bin/mono MonoSigSegvRepro.exe [Thread debugging
using libthread_db enabled] [New Thread 0x2ac3217736c0 (LWP 5060)] [New Thread
0x40894940 (LWP 5063)] [New Thread 0x41154940 (LWP 5064)] [New Thread
0x4047b940 (LWP 5065)] [New Thread 0x40c00940 (LWP 5066)] [New Thread
0x40844940 (LWP 5067)] [New Thread 0x40e01940 (LWP 5068)] [New Thread
0x42144940 (LWP 5069)] [New Thread 0x41709940 (LWP 5070)] [New Thread
0x41355940 (LWP 5071)] [New Thread 0x42345940 (LWP 5072)] [New Thread
0x41b56940 (LWP 5073)] [New Thread 0x4190a940 (LWP 5074)] [New Thread
0x41e45940 (LWP 5075)] [New Thread 0x42546940 (LWP 5076)] [New Thread
0x42747940 (LWP 5077)] [New Thread 0x42948940 (LWP 5078)] [New Thread
0x42b49940 (LWP 5079)] [New Thread 0x42d4a940 (LWP 5080)] [New Thread
0x42f4b940 (LWP 5081)] [New Thread 0x4314c940 (LWP 5082)] [New Thread
0x4334d940 (LWP 5083)] [New Thread 0x4354e940 (LWP 5086)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x42d4a940 (LWP 5080)]
0x0000000000579572 in GC_is_marked (p=0x2aaaabc6c000 "") at mark.c:209
209 return(mark_bit_from_hdr(hhdr, word_no));
Detaching after fork from child process 5101.
Debug info from gdb:
ptrace: Operation not permitted.
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.
Program received signal SIGABRT, Aborted.
0x0000003614a30215 in raise () from /lib64/libc.so.6
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs