DynamoRIO / drmemory

Memory Debugger for Windows, Linux, Mac, and Android
Other
2.44k stars 262 forks source link

CRASH GNAT on linux #1433

Open derekbruening opened 9 years ago

derekbruening commented 9 years ago

From dmitriy....@gmail.com on January 31, 2014 09:00:07

Dr. Memory version 1.6.1 -- build 2

The steps:

  1. Download and install GNAT GPL 2013 for Linux. It could be installed to $HOME/usr/gnat directory to do not dusturb system.
  2. Build the attached program gnatmake asynch_transfer.adb
  3. See crush

$ ~/usr/drmem/bin/drmemory.pl -- ./asynch_transfer Dr.M Dr. Memory version 1.6.1 14580 14580 Error #1: UNINITIALIZED READ: reading 0xf6ffb091-0xf6ffb094 3 byte(s) within 0xf6ffb084-0xf6ffb094 14580 # 0 system call prctl 14580 # 1 libc.so.6!__GI_prctl 14580 # 2 systemtaskingstagestask_wrapper [../sysdeps/i386/start.S:118] 14580 Note: @0:00:00.452 in thread 14580 <Application /home/anisimkov/Ada/test/asynch_transfer (14576). Unrecoverable Error at PC 0x4cb3d9f0. Program aborted. Received SIGBUS at generated pc 0x4cb3d9f0 in thread 14576 Base: 0xf7000000 Registers: eax=0xf712c338 ebx=0x08947218 ecx=0x4cb3dc82 edx=0x00000001 esi=0x00000000 edi=0x08947244 esp=0x4cb1b000 ebp=0x00000080 eflags=0x00010206 version 4.1.2444, custom build -no_dynamic_options -logdir '/home/anisimkov/usr/drmem/drmemory/logs/dynamorio' -client_lib '/home/anisimkov/usr/drmem/bin/release/libdrmemory.so;0;-logdir /home/anisimkov/usr/drmem/drmemory/logs ' -code_api -stack_size 56K -disable_traces -no_enable_traces -max_elide_jmp 0 -max_elide_call 0 -max_bb_instrs 256 -no_shared_traces -bb_ibl_targets -bb_single_restore_prefix -no_sha>

I used GNAT GPL x86-linux compiler on 64 bit Linux.

The problem is not gone in "-light" mode. With -leaks_only -no_count_leaks -no_track_allocs problem persists too.

The most recent build http://build.chromium.org/p/client.drmemory/builds/drmemory-linux-r1689.tar.gz Give the same error

anisimkov@linux-jeud:~/Ada/test> ~/usr/DrMemory-package/bin/drmemory.pl -- ./asynch_transfer Dr.M Dr. Memory version 1.6.1689 15121 15121 Error #1: UNINITIALIZED READ: reading 0xf6ffb091-0xf6ffb094 3 byte(s) within 0xf6ffb084-0xf6ffb094 15121 # 0 system call prctl
15121 # 1 libc.so.6!__GI_prctl 15121 # 2 systemtaskingstagestask_wrapper [../sysdeps/i386/start.S:118] 15121 Note: @0:00:00.716 in thread 15121 <Application /home/anisimkov/Ada/test/asynch_transfer (15117). Unrecoverable Error at PC 0x494519f0. Program aborted. Received SIGBUS at generated pc 0x494519f0 in thread 15117 Base: 0xf7000000 Registers: eax=0xf711b338 ebx=0x09591218 ecx=0x49451c82 edx=0x00000001 esi=0x00000000 edi=0x09591244 esp=0x4942f000 ebp=0x00000080 eflags=0x00010206 version 4.2.2499, custom build -no_dynamic_options -logdir '/home/anisimkov/usr/DrMemory-package/drmemory/logs/dynamorio' -client_lib '/home/anisimkov/usr/DrMemory-package/bin/release/libdrmemory.so;0;-logdir /home/anisimkov/usr/DrMemory-package/drmemory/logs ' -code_api -stack_size 56K -disable_traces -no_enable_traces -max_elide_jmp 0 -max_elide_call 0 -max_bb_instrs 256 -no_shared_traces -bb_ibl_targets >

Debug mode: $ ~/usr/drmem/bin/drmemory.pl -debug -dr_debug -pause_at_assert -- ./asynch_transfer <Starting application /home/anisimkov/Ada/test/asynch_transfer (14730)> <Paste into GDB to debug DynamoRIO clients: set confirm off add-symbol-file '/home/anisimkov/usr/drmem/bin/debug/libdrmemory.so' 0x73810000 add-symbol-file '/home/anisimkov/usr/gnat/lib/libstdc++.so.6' 0xf74d6710 add-symbol-file '/lib/libm.so.6' 0xf744e660 add-symbol-file '/lib/libc.so.6' 0xf6e653a0 add-symbol-file '/lib/ld-linux.so.2' 0xf77a6860 add-symbol-file '/home/anisimkov/usr/gnat/lib/libgcc_s.so.1' 0xf742df70

<Initial options = -no_dynamic_options -logdir '/home/anisimkov/usr/drmem/drmemory/logs/dynamorio' -client_lib '/home/anisimkov/usr/drmem/bin/debug/libdrmemory.so;0;-logdir /home/anisimkov/usr/drmem/drmemory/logs -pause_at_assert' -code_api -stack_size 56K -disable_traces -no_enable_traces -max_elide_jmp 0 -max_elide_call 0 -max_bb_instrs 256 -no_shared_traces -bb_ibl_targets -bb_single_restore_prefix -no_shared_trace_ibl_routine -no_enable_reset -no_reset_at_switch_to_os_at_vmm_limit -reset_at_vmm_percent_free_limit 0 -no_reset_at_vmm_full -reset_at_commit_free_limit 0K -reset_every_nth_pending 0 -vm_size 262144K -no_inline_ignored_syscalls -native_exec_default_list '' -no_native_exec_managed_code -no_indcall2direct > Dr.M Dr. Memory version 1.6.1 <(1+x) Handling our fault in a TRY at 0xf725fcad> 14736 14736 Error #1: UNINITIALIZED READ: reading 0xf6e49091-0xf6e49094 3 byte(s) within 0xf6e49084-0xf6e49094 14736 # 0 system call prctl 14736 # 1 libc.so.6!__GI_prctl 14736 # 2 systemtaskingstagestask_wrapper [../sysdeps/i386/start.S:118] 14736 Note: @0:00:02.524 in thread 14736 14736 ASSERT FAILURE (thread 14736): /work/drmemory_package/drmemory/allocdrmem.c:1522: (cpt->sigaltstack < (byte)mc.xsp || (ptr_int_t)cpt->sigaltstack - cpt->sigaltsize - mc.xsp > options.stack_swapthreshold) && (cpt->sigaltstack > (byte)mc.xsp || mc.xsp - ((ptr_int_t)cpt->sigaltstack + cpt->sigaltsize) > options.stack_swap_threshold) (sigaltstack within swap threshold of esp)Dr. Memory is paused at an assert in pid=14730

Attachment: asynch_transfer.adb

Original issue: http://code.google.com/p/drmemory/issues/detail?id=1433

derekbruening commented 9 years ago

From bruen...@google.com on February 03, 2014 11:02:11

Summary: CRASH GNAT on linux (was: GNAT on linux crush)
Status: Accepted
Labels: -Priority-Medium Priority-High OpSys-Linux Hotlist-Release Bug-ToolCrash