Bug 143823 - Matlab 7.3 on i686 linux segfaults under Valgrind
Summary: Matlab 7.3 on i686 linux segfaults under Valgrind
Status: RESOLVED WORKSFORME
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: 3.2.3
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords: investigated, triaged
Depends on:
Blocks:
 
Reported: 2007-04-04 07:08 UTC by Stephen McCracken
Modified: 2018-11-12 16:03 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Run 3, strace output (long) (996.36 KB, text/plain)
2007-04-04 07:11 UTC, Stephen McCracken
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen McCracken 2007-04-04 07:08:52 UTC
Version:           3.2.3 (using KDE KDE 3.5.6)
Installed from:    RedHat RPMs
OS:                Linux

Like in bug143822, I am trying to debug my MEX functions under Matlab.  On my i686 RedHat Linux EE4 machine, Matlab 7.3 does not run at all under Valgrind.  Soon after startup, it generates a segfault.  I will attach the output from 3 runs below:

* Run 1:  default arguments
* Run 2:  --trace-signals=yes --trace-syscalls=yes --smc-check=all
* Run 3:  strace output for a run with default arguments

Run 1:  I inserted the following command into the Matlab wrapper script:
   /home/stevem/pkg/linux/stow/valgrind-3.2.3/bin/valgrind \
      /home/stevem/debug/matlabvg/bin/glnx86/MATLAB -nodisplay -nojvm

doppelganger: ~/debug/matlabvg/bin % ./matlab
running the hacked wrapper script...
==16607== Memcheck, a memory error detector.
==16607== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==16607== Using LibVEX rev 1732, a library for dynamic binary translation.
==16607== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==16607== Using valgrind-3.2.3, a dynamic binary instrumentation framework.
==16607== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==16607== For more details, rerun with: -v
==16607== 
==16607== Invalid read of size 4
==16607==    at 0xA71A6D: open_path (in /lib/ld-2.3.4.so)
==16607==    by 0xA72271: _dl_map_object (in /lib/ld-2.3.4.so)
==16607==    by 0xA75D07: openaux (in /lib/ld-2.3.4.so)
==16607==    by 0xA7707D: _dl_catch_error (in /lib/ld-2.3.4.so)
==16607==    by 0xA75FA9: _dl_map_object_deps (in /lib/ld-2.3.4.so)
==16607==    by 0xA6D459: dl_main (in /lib/ld-2.3.4.so)
==16607==    by 0xA7A788: _dl_sysdep_start (in /lib/ld-2.3.4.so)
==16607==    by 0xA6C3EF: _dl_start (in /lib/ld-2.3.4.so)
==16607==    by 0xA6B7C6: (within /lib/ld-2.3.4.so)
==16607==  Address 0x2FA81BF8 is not stack'd, malloc'd or (recently) free'd
==16607== 
==16607== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==16607==  Access not within mapped region at address 0x2FA81BF8
==16607==    at 0xA71A6D: open_path (in /lib/ld-2.3.4.so)
==16607==    by 0xA72271: _dl_map_object (in /lib/ld-2.3.4.so)
==16607==    by 0xA75D07: openaux (in /lib/ld-2.3.4.so)
==16607==    by 0xA7707D: _dl_catch_error (in /lib/ld-2.3.4.so)
==16607==    by 0xA75FA9: _dl_map_object_deps (in /lib/ld-2.3.4.so)
==16607==    by 0xA6D459: dl_main (in /lib/ld-2.3.4.so)
==16607==    by 0xA7A788: _dl_sysdep_start (in /lib/ld-2.3.4.so)
==16607==    by 0xA6C3EF: _dl_start (in /lib/ld-2.3.4.so)
==16607==    by 0xA6B7C6: (within /lib/ld-2.3.4.so)
==16607== 
==16607== Jump to the invalid address stated on the next line
==16607==    at 0x246: ???
==16607==  Address 0x246 is not stack'd, malloc'd or (recently) free'd
==16607== 
==16607== Process terminating with default action of signal 11 (SIGSEGV)
==16607==  Bad permissions for mapped region at address 0x246
==16607==    at 0x246: ???
==16607== 
==16607== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 1 from 1)
==16607== malloc/free: in use at exit: 0 bytes in 0 blocks.
==16607== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
==16607== For counts of detected errors, rerun with: -v
==16607== All heap blocks were freed -- no leaks are possible.
./matlab: line 1754: 16607 Segmentation fault      /home/stevem/pkg/linux/stow/valgrind-3.2.3/bin/valgrind /home/stevem/debug/matlabvg/bin/glnx86/MATLAB -nodisplay -nojvm


Run 2: I used the following command:
   /home/stevem/pkg/linux/stow/valgrind-3.2.3/bin/valgrind \
      --trace-signals=yes --trace-syscalls=yes --smc-check=all \
      /home/stevem/debug/matlabvg/bin/glnx86/MATLAB -nodisplay -nojvm
   
doppelganger: ~/debug/matlabvg/bin % ./matlab
running the hacked wrapper script...
==17569== Memcheck, a memory error detector.
==17569== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==17569== Using LibVEX rev 1732, a library for dynamic binary translation.
==17569== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==17569== Using valgrind-3.2.3, a dynamic binary instrumentation framework.
==17569== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==17569== For more details, rerun with: -v
==17569== 
--17569-- Max kernel-supported signal is 64
SYSCALL[17569,1](122) sys_newuname ( 0xBEF41CEC )[sync] --> Success(0x0)
SYSCALL[17569,1]( 45) sys_brk ( 0x0 ) --> [pre-success] Success(0x804B000)
--17569-- signal 11 arrived ... si_code=1, EIP=0xA79C1C, eip=0x62756C4B
--17569-- SIGSEGV: si_code=1 faultaddr=0xBEF408C0 tid=1 ESP=0xBEF408C0 seg=0xBE543000-0xBEF40FFF
--17569--        -> extended stack base to 0xBEF40000
SYSCALL[17569,1]( 85) sys_readlink ( 0xA7E77C(/proc/self/exe), 0xBEF408D4, 4096 ) --> [pre-success] Success(0x26)
SYSCALL[17569,1]( 90) old_mmap ( 0x0, 4096, 3, 34, -1, 0 ) --> [pre-success] Success(0x4000000)
SYSCALL[17569,1](  5) sys_open ( 0x4000058(/home/stevem/pkg/linux/stow/valgrind-3.2.3/lib/valgrind/x86-linux/vgpreload_core.so), 0 ) --> [async] ... 
SYSCALL[17569,1](  5) ... [async] --> Success(0x3)
SYSCALL[17569,1](  3) sys_read ( 3, 0xBEF415D4, 512 ) --> [async] ... 
SYSCALL[17569,1](  3) ... [async] --> Success(0x200)
SYSCALL[17569,1](197) sys_fstat64 ( 3, 0xBEF414F4 )[sync] --> Success(0x0)
SYSCALL[17569,1]( 90) old_mmap ( 0x0, 5184, 5, 2050, 3, 0 ) --> [pre-success] Success(0x4001000)
SYSCALL[17569,1]( 90) old_mmap ( 0x4002000, 4096, 3, 2066, 3, 0 ) --> [pre-success] Success(0x4002000)
SYSCALL[17569,1](  6) sys_close ( 3 )[sync] --> Success(0x0)
SYSCALL[17569,1](  5) sys_open ( 0x40003A8(/home/stevem/pkg/linux/stow/valgrind-3.2.3/lib/valgrind/x86-linux/vgpreload_memcheck.so), 0 ) --> [async] ... 
SYSCALL[17569,1](  5) ... [async] --> Success(0x3)
SYSCALL[17569,1](  3) sys_read ( 3, 0xBEF415D4, 512 ) --> [async] ... 
SYSCALL[17569,1](  3) ... [async] --> Success(0x200)
SYSCALL[17569,1](197) sys_fstat64 ( 3, 0xBEF414F4 )[sync] --> Success(0x0)
SYSCALL[17569,1]( 90) old_mmap ( 0x0, 21748, 5, 2050, 3, 0 ) --> [pre-success] Success(0x4003000)
SYSCALL[17569,1]( 90) old_mmap ( 0x4008000, 4096, 3, 2066, 3, 16384 ) --> [pre-success] Success(0x4008000)
SYSCALL[17569,1](  6) sys_close ( 3 )[sync] --> Success(0x0)
SYSCALL[17569,1]( 33) sys_access ( 0xA7D858(/etc/ld.so.preload), 4 )[sync] --> Failure(0x2)
==17569== Invalid read of size 4
==17569==    at 0xA71A6D: open_path (in /lib/ld-2.3.4.so)
==17569==    by 0xA72271: _dl_map_object (in /lib/ld-2.3.4.so)
==17569==    by 0xA75D07: openaux (in /lib/ld-2.3.4.so)
==17569==    by 0xA7707D: _dl_catch_error (in /lib/ld-2.3.4.so)
==17569==    by 0xA75FA9: _dl_map_object_deps (in /lib/ld-2.3.4.so)
==17569==    by 0xA6D459: dl_main (in /lib/ld-2.3.4.so)
==17569==    by 0xA7A788: _dl_sysdep_start (in /lib/ld-2.3.4.so)
==17569==    by 0xA6C3EF: _dl_start (in /lib/ld-2.3.4.so)
==17569==    by 0xA6B7C6: (within /lib/ld-2.3.4.so)
==17569==  Address 0x2FA81BF8 is not stack'd, malloc'd or (recently) free'd
--17569-- signal 11 arrived ... si_code=1, EIP=0xA71A6D, eip=0x6277DB7A
--17569-- SIGSEGV: si_code=1 faultaddr=0x2FA81BF8 tid=1 ESP=0xBEF412E8 seg=NULL
--17569-- delivering signal 11 (SIGSEGV):1 to thread 1
--17569-- delivering 11 (code 1) to default handler; action: terminate+core
==17569== 
==17569== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==17569==  Access not within mapped region at address 0x2FA81BF8
==17569==    at 0xA71A6D: open_path (in /lib/ld-2.3.4.so)
==17569==    by 0xA72271: _dl_map_object (in /lib/ld-2.3.4.so)
==17569==    by 0xA75D07: openaux (in /lib/ld-2.3.4.so)
==17569==    by 0xA7707D: _dl_catch_error (in /lib/ld-2.3.4.so)
==17569==    by 0xA75FA9: _dl_map_object_deps (in /lib/ld-2.3.4.so)
==17569==    by 0xA6D459: dl_main (in /lib/ld-2.3.4.so)
==17569==    by 0xA7A788: _dl_sysdep_start (in /lib/ld-2.3.4.so)
==17569==    by 0xA6C3EF: _dl_start (in /lib/ld-2.3.4.so)
==17569==    by 0xA6B7C6: (within /lib/ld-2.3.4.so)
--17569-- Caught __NR_exit; running __libc_freeres()
++17569++ sys_sigaction: sigNo 11, new 0x627378C8, old 0x0, new flags 0x0
++17569++ sys_sigaction: sigNo 7, new 0x627378C4, old 0x0, new flags 0x0
++17569++ sys_sigaction: sigNo 4, new 0x627378C0, old 0x0, new flags 0x0
++17569++ sys_sigaction: sigNo 8, new 0x627378DC, old 0x0, new flags 0x0
==17569== 
==17569== Jump to the invalid address stated on the next line
==17569==    at 0x246: ???
==17569==  Address 0x246 is not stack'd, malloc'd or (recently) free'd
--17569-- delivering signal 11 (SIGSEGV):2 to thread 1
--17569-- delivering 11 (code 2) to default handler; action: terminate+core
==17569== 
==17569== Process terminating with default action of signal 11 (SIGSEGV)
==17569==  Bad permissions for mapped region at address 0x246
==17569==    at 0x246: ???
==17569== 
==17569== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 1 from 1)
==17569== malloc/free: in use at exit: 0 bytes in 0 blocks.
==17569== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
==17569== For counts of detected errors, rerun with: -v
==17569== All heap blocks were freed -- no leaks are possible.
./matlab: line 1754: 17569 Segmentation fault      /home/stevem/pkg/linux/stow/valgrind-3.2.3/bin/valgrind --trace-signals=yes --trace-syscalls=yes --smc-check=all /home/stevem/debug/matlabvg/bin/glnx86/MATLAB -nodisplay -nojvm


Run 3: <long, will include as attachment>
Comment 1 Stephen McCracken 2007-04-04 07:11:06 UTC
Created attachment 20169 [details]
Run 3, strace output (long)
Comment 2 Nicholas Nethercote 2009-06-30 04:24:07 UTC
I'm closing crashing and similar bugs that are more than two years old.  If 
you still see this problem with Valgrind 3.4.1 please reopen the bug report.
Thanks.
Comment 3 Andrew Crouthamel 2018-09-19 04:37:55 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2018-11-12 16:03:09 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!