Bug 19732 - lldb doesn't quit after printing native stack trace after crash
Summary: lldb doesn't quit after printing native stack trace after crash
Alias: None
Product: Runtime
Classification: Mono
Component: General (show other bugs)
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Blocks: 18654
  Show dependency tree
Reported: 2014-05-13 12:57 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2014-05-14 15:24 UTC (History)
3 users (show)

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:

Description Rolf Bjarne Kvinge [MSFT] 2014-05-13 12:57:15 UTC
using System;
using System.Runtime.InteropServices;

class C {
	[DllImport ("libc")]
	extern static IntPtr strlen (IntPtr ptr);
	static void Main ()	{
		strlen (IntPtr.Zero);

mcs test.cs && mono test.exe
> mono test.exe

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) C.strlen (intptr) <0xffffffff>
  at C.Main () <0x0000f>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

Debug info from gdb:

Process 62446 stopped
* thread #1: tid = 0x3f2d83, 0x9b606fed libsystem_kernel.dylib`__wait4 + 5, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  thread #2: tid = 0x3f2d84, 0x9b601fb6 libsystem_kernel.dylib`semaphore_wait_trap + 10
  thread #3: tid = 0x3f2d85, 0x9b607992 libsystem_kernel.dylib`kevent64 + 10, queue = 'com.apple.libdispatch-manager'
  thread #4: tid = 0x3f2d86, 0x9b607046 libsystem_kernel.dylib`__workq_kernreturn + 10
  thread #5: tid = 0x3f2d87, 0x9b607046 libsystem_kernel.dylib`__workq_kernreturn + 10
<stack trace>
Executing commands in '/tmp/mono-gdb-commands.MLWVzS'.
(lldb)  process attach --pid 62446
Process 62446 stopped
Executable module set to "/usr/bin/mono".
Architecture set to: i486-apple-macosx.
(lldb)  script lldb.debugger.HandleCommand ("thread list")
(lldb)  script lldb.debugger.HandleCommand ("thread backtrace all")
(lldb)  detach
Detaching from process 62446
(lldb)  quit
error: Aborting reading of commands after command #4: 'quit' failed with <unknown error>.
Aborting after_file command execution, command file: '/tmp/mono-gdb-commands.MLWVzS' failed.
Process 62446 detached

<and here I have to manually quit lldb using Ctrl-C>
Comment 1 Zoltan Varga 2014-05-14 15:24:11 UTC
Fixed in master 4d388f07d45698b2ef8a88c3c43cf0938cc5476e.