Bug 17337 - SIGSEGV in Linux 64bits when running nunit
Summary: SIGSEGV in Linux 64bits when running nunit
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: 3.2.x
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-01-20 14:44 UTC by Andres G. Aragoneses
Modified: 2017-07-08 03:26 UTC (History)
4 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 NOT_REPRODUCIBLE

Description Andres G. Aragoneses 2014-01-20 14:44:57 UTC
Repro:
1. Clone banshee master (as of today, fa0d60ad36043cb14842e8eedb1fbf1bec994c1c)
2. ./autogen.sh --enable-gst-native --disable-youtube --disable-gio --disable-gnome --disable-appledevice --enable-tests
3. Run tests (via `make test`)

(The one that reproduces the issue is "Banshee.Services" assembly, which you can run in a standalone way:
cd bin && MONO_PATH=/usr/lib/nunit:/usr/lib/cli/nunit.util-2.6:/usr/lib/cli/nunit.core.interfaces-2.6:/usr/lib/cli/nunit.core-2.6:/usr/lib/cli/nunit.framework-2.6 mono /usr/lib/nunit/nunit-console.exe Banshee.Services.dll -nologo -noshadow )

Result:

...............................................
Tests run: 176, Errors: 0, Failures: 1, Inconclusive: 0, Time: 10.008577 seconds
  Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0

Errors and Failures:
1) Test Failure : Banshee.MediaEngine.Tests.TestMediaEngineService
     Expected: StateChange
  But was:  EndOfStream

at Banshee.MediaEngine.Tests+<AssertTransition>c__AnonStorey1.<>m__0 (Banshee.MediaEngine.PlayerEventArgs a) [0x00000] in <filename unknown>:0
at Banshee.MediaEngine.Tests+<AssertTransition>c__AnonStorey1.<>m__1 (Banshee.MediaEngine.PlayerEventArgs args) [0x00000] in <filename unknown>:0



(mono:29723): GLib-CRITICAL **: Source ID 6 was not found when attempting to remove it

(mono:29723): GLib-CRITICAL **: Source ID 2 was not found when attempting to remove it

(mono:29723): GLib-CRITICAL **: Source ID 4 was not found when attempting to remove it
Stacktrace:


Native stacktrace:

	mono() [0x4b74d8]
	mono() [0x50f25b]
	mono() [0x423e82]
	/lib/x86_64-linux-gnu/libpthread.so.0(+0x10330) [0x7f1a6b9d0330]
	mono() [0x5a6404]
	mono() [0x5a654f]
	mono() [0x5a72c0]
	mono() [0x6009a5]
	mono() [0x5dd708]
	mono(mono_gc_collect+0x28) [0x5de308]
	mono() [0x5a377a]
	mono() [0x632c3e]
	/lib/x86_64-linux-gnu/libpthread.so.0(+0x8182) [0x7f1a6b9c8182]
	/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f1a6b6f3a6d]

Debug info from gdb:

Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.
No threads.

=================================================================
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.
=================================================================

Aborted (core dumped)
Comment 1 Andres G. Aragoneses 2014-01-20 20:37:19 UTC
Unfortunately gdb doesn't give me better clues of where's the culprit:

(gdb) bt
#0  0x000000004017f1af in ?? ()
#1  0x00007fffef2708a0 in ?? ()
#2  0x000000004017f15c in ?? ()
#3  0x00007fffef2708a0 in ?? ()
#4  0x000000004017f0a0 in ?? ()
#5  0x0000000040164b50 in ?? ()
#6  0x00007ffff7ee5c08 in ?? ()
#7  0x0000000040171048 in ?? ()
#8  0x000000004017f070 in ?? ()
#9  0x00007fffef2708a0 in ?? ()
#10 0x0000000040170f88 in ?? ()
#11 0x00007fffef270930 in ?? ()
#12 0x00007ffff5f5c910 in ?? ()
#13 0x0000000000000000 in ?? ()

And mono_pimp() (explained here: http://www.mono-project.com/Debugging) doesn't work:

(gdb) p mono_pimp (0x000000004017f1af)
No symbol "mono_pimp" in current context.


But at least the repro is 100% reproducible...
Comment 2 Zoltan Varga 2014-01-21 01:04:41 UTC
When did this started to happen ?
Comment 3 Andres G. Aragoneses 2014-01-21 05:21:48 UTC
Hi Zoltan!

> When did this started to happen ?

It started when I committed this (which I mention above already) change:

https://github.com/GNOME/banshee/commit/fa0d60ad36043cb14842e8eedb1fbf1bec994c1c


Are you able to reproduce it?
Comment 4 Zoltan Varga 2014-01-21 19:23:30 UTC
banshee contains a bunch of native code which can also cause this crash. Are you sure this is a mono problem ?
Comment 5 Andres G. Aragoneses 2014-01-28 15:40:30 UTC
That's a good point. Nonetheless in banshee the amount of C code is being reduced considerably. In version 2.9.1 we plan to switch to gstreamer-sharp by default, so will test again with that engine soon.

(Not saying that this way there's no native code, of course, but there are less probabilities of screwing up.)
Comment 6 Ludovic Henry 2017-07-08 03:26:51 UTC
Can you still reproduce with latest mono? If that's the case, please reopen and provide a repro case. Thank you.