Bug 31121 - GDB sometimes crashes randomly due to debug helper libraries
Summary: GDB sometimes crashes randomly due to debug helper libraries
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: Debugger ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Zoltan Varga
URL:
Depends on:
Blocks:
 
Reported: 2015-06-15 14:27 UTC by Alexander Kyte
Modified: 2015-06-16 20:54 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 FIXED

Description Alexander Kyte 2015-06-15 14:27:14 UTC
On trying to debug a program on mono, about 1/10 of the time I will get this error which requires a restart of gdb/mono.

```
 Program received signal SIGSEGV, Segmentation fault.
0x000000000050dede in emit_line_number_info (w=0xf3f680, method="%s:%s ()", start_symbol=0x0, end_symbol=0x0, code=
    0x40036490 "H\203\354XH\211,$L\211d$\bL\211l$\020L\211t$\030L\211|$ L\213\377IcG$IcO \003\301\205\300u\rH\213\004%`\304\273", code_size=404, debug_info=0x0) at dwarfwriter.c:1585
1585        ln_array = g_new0 (MonoDebugLineNumberEntry, debug_info->num_line_numbers); 

```
Comment 1 Alexander Kyte 2015-06-15 15:24:09 UTC
Program received signal SIGSEGV, Segmentation fault.
0x000000000050dede in emit_line_number_info (w=0xf39d50, method="%s:%s ()", start_symbol=0x0, end_symbol=0x0, code=
    0x40036490 "H\203\354XH\211,$L\211d$\bL\211l$\020L\211t$\030L\211|$ L\213\377IcG$IcO \003\301\205\300u\rH\213\004%P\304\273", code_size=404, debug_info=0x0) at dwarfwriter.c:1585
1585		ln_array = g_new0 (MonoDebugLineNumberEntry, debug_info->num_line_numbers);

(gdb) p *method
$2 = {flags = 198, iflags = 0, token = 100672580, klass = "%s", signature = 0xb63810, name = 0x7ffff4b38277 "ToString", inline_info = 0, inline_failure = 0, wrapper_type = 0, string_ctor = 0, save_lmf =
    0, dynamic = 0, sre_method = 0, is_generic = 0, is_inflated = 0, skip_visibility = 0, verification_success = 0, is_mb_open = 0, slot = 0}

(gdb) p debug_info
$3 = (MonoDebugMethodJitInfo *) 0x0

(gdb) p method->klass->name
$4 = 0x7ffff4b2b6aa "StringBuilder"

(gdb) p method->name
$5 = 0x7ffff4b38277 "ToString"
Comment 2 Zoltan Varga 2015-06-15 15:48:47 UTC
Commited a workaround.
Comment 3 Zoltan Varga 2015-06-16 20:54:09 UTC
-> FIXED.