Re: [Valgrind-users] can't start any application on OS X 10.7.3
On Thursday, April 26, 2012, John Reiser wrote: It's a *BUG* in valgrind that valgrind does not print the bytes [or words, etc.] of the instruction stream that valgrind does not understand. [This is immediately obvious to *EVERY* user, but so far the developers have been oblivious.] It always prints the bytes of the instruction it can't parse. Without that we'd never be able to make sense of any unhandled insn style bug reports. It seems like you removed them from the initial posting, though. Do you have a line of the form vex amd64-IR: unhandled instruction bytes: 0xC5 0xF8 0x77 0xC3 0xF6 Anyway, I suspect that will merely tell us that abort crapped out on 0x0F 0x0D, which is the official undefined instruction ud2, so that's not useful. We need to know why the program jumped to abort() in the first place. The svn trunk does work on OSX 10.7.3 -- I was working with it at the weekend. Really what is needed is a way to reproduce this failure. J -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users
Re: [Valgrind-users] Massif: some --ignore-fn options are not respected
Hello, Is there any way how to suppress the messages from the library instead of installing a debug version? Most distributions do not have debug versions of all the libraries, and I want to suppress the allocations from that library anyway. Best regards Marian -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users
Re: [Valgrind-users] can't start any application on OS X 10.7.3
On Thu, 2012-04-26 at 09:29 -0400, Matt Broadstone wrote: As for doing a db-attach, that seems to have failed as well - I never make it to a gdb session. Here is the full output of a db-attach valgrind run on TextEdit.app: ==76980== Attach to debugger ? --- [Return/N/n/Y/y/C/c] Y valgrind: m_debugger.c:238 (ptrace_setregs): Assertion 'Unimplemented functionality' failed. The above assert indicates that --db-attach is not implemented on darwin. You could however try the Valgrind gdbserver, which is supposed to work (at least, I manually tested it on Darwin something like one year ago on a 3.7.0 SVN). You could try to investigate why abort is called by using 2 GDBs to debug: * a native run * a run under Valgrind and see at which point/instruction their executions are diverging. (e.g. put breakpoint in _SCSessionUniverseByUIDAcquireAndLock and then use stepi or similar.). Philippe -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users
Re: [Valgrind-users] can't start any application on OS X 10.7.3
On Thu, Apr 26, 2012 at 2:06 PM, Philippe Waroquiers philippe.waroqui...@skynet.be wrote: On Thu, 2012-04-26 at 09:29 -0400, Matt Broadstone wrote: As for doing a db-attach, that seems to have failed as well - I never make it to a gdb session. Here is the full output of a db-attach valgrind run on TextEdit.app: ==76980== Attach to debugger ? --- [Return/N/n/Y/y/C/c] Y valgrind: m_debugger.c:238 (ptrace_setregs): Assertion 'Unimplemented functionality' failed. The above assert indicates that --db-attach is not implemented on darwin. You could however try the Valgrind gdbserver, which is supposed to work (at least, I manually tested it on Darwin something like one year ago on a 3.7.0 SVN). You could try to investigate why abort is called by using 2 GDBs to debug: * a native run * a run under Valgrind and see at which point/instruction their executions are diverging. (e.g. put breakpoint in _SCSessionUniverseByUIDAcquireAndLock and then use stepi or similar.). Philippe first I ran: valgrind --vgdb=yes --vgdb-error=0 /Applications/TextEdit.app/Contents/MacOS/TextEdit then I ran: gdb /Applications/TextEdit.app/Contents/MacOS/TextEdit and then: (gdb) target remote | /usr/local/bin/vgdb | /usr/local/bin/vgdb: Undefined error: 0 I was just following the steps in the manual, is there something special I'm missing here? Matt -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users
Re: [Valgrind-users] can't start any application on OS X 10.7.3
On Thu, 2012-04-26 at 14:17 -0400, Matt Broadstone wrote: and then: (gdb) target remote | /usr/local/bin/vgdb | /usr/local/bin/vgdb: Undefined error: 0 You must have a version of gdb recent enough (I believe = 6.5) otherwise GDB does not understand the | target. Two alternatives: * compile + install a recent GDB (there is a kind of magic security signing which is needed). * alternatively: valgrind --vgdb-error=0 prog # and then in another shell, run: vgdb --port=1234 # in a third shell: gdb prog (gdb) target remote :1234 (NB: with this technique, there is no security: anybody which have access to your system can connect to the vgdb port nr). Philippe -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users
Re: [Valgrind-users] can't start any application on OS X 10.7.3
On Thu, Apr 26, 2012 at 3:27 PM, Philippe Waroquiers philippe.waroqui...@skynet.be wrote: On Thu, 2012-04-26 at 14:17 -0400, Matt Broadstone wrote: and then: (gdb) target remote | /usr/local/bin/vgdb | /usr/local/bin/vgdb: Undefined error: 0 You must have a version of gdb recent enough (I believe = 6.5) otherwise GDB does not understand the | target. Two alternatives: * compile + install a recent GDB (there is a kind of magic security signing which is needed). * alternatively: valgrind --vgdb-error=0 prog # and then in another shell, run: vgdb --port=1234 # in a third shell: gdb prog (gdb) target remote :1234 (NB: with this technique, there is no security: anybody which have access to your system can connect to the vgdb port nr). Philippe Okay, I was able to get that working. Here is the result of disassembling that instruction: Program received signal SIGILL, Illegal instruction. warning: Error 268435459 getting port names from mach_port_names [Switching to process 4359 thread 0x0] 0x03a36b8c in __abort () (gdb) disas Dump of assembler code for function __abort: 0x03a36aab __abort+0: push %rbp 0x03a36aac __abort+1: mov%rsp,%rbp 0x03a36aaf __abort+4: push %rbx 0x03a36ab0 __abort+5: sub$0x18,%rsp 0x03a36ab4 __abort+9: cmpq $0x0,0x9cf6c(%rip)# 0x3ad3a28 gCRAnnotations+8 0x03a36abc __abort+17:jne0x3a36acc __abort+33 0x03a36abe __abort+19:lea0x6f2b3(%rip),%rax# 0x3aa5d78 __rcsid_37+80 0x03a36ac5 __abort+26:mov%rax,0x9cf5c(%rip)# 0x3ad3a28 gCRAnnotations+8 0x03a36acc __abort+33:movq $0x0,-0x18(%rbp) 0x03a36ad4 __abort+41:movl $0x0,-0xc(%rbp) 0x03a36adb __abort+48:movl $0x,-0x10(%rbp) 0x03a36ae2 __abort+55:mov$0x6,%edi 0x03a36ae7 __abort+60:lea-0x18(%rbp),%rsi 0x03a36aeb __abort+64:xor%edx,%edx 0x03a36aed __abort+66:callq 0x3a97c1c sigaction 0x03a36af2 __abort+71:andb $0xdf,-0x10(%rbp) 0x03a36af6 __abort+75:lea0xa34b3(%rip),%rax# 0x3ad9fb0 __is_threaded 0x03a36afd __abort+82:cmpl $0x0,(%rax) 0x03a36b00 __abort+85:lea-0x10(%rbp),%rbx 0x03a36b04 __abort+89:je 0x3a36b4c __abort+161 0x03a36b06 __abort+91:movl $0x,-0x1c(%rbp) 0x03a36b0d __abort+98:lea-0x1c(%rbp),%rsi 0x03a36b11 __abort+102: mov$0x3,%edi 0x03a36b16 __abort+107: xor%edx,%edx 0x03a36b18 __abort+109: callq 0x3a9c772 dyld_stub_sigprocmask 0x03a36b1d __abort+114: mov$0x1,%edi 0x03a36b22 __abort+119: xor%al,%al 0x03a36b24 __abort+121: callq 0x3a42e3b __pthread_workqueue_setkill 0x03a36b29 __abort+126: mov$0x3,%edi 0x03a36b2e __abort+131: mov%rbx,%rsi 0x03a36b31 __abort+134: xor%edx,%edx 0x03a36b33 __abort+136: callq 0x3a42ca7 pthread_sigmask 0x03a36b38 __abort+141: callq 0x3a97540 pthread_self 0x03a36b3d __abort+146: mov$0x6,%esi 0x03a36b42 __abort+151: mov%rax,%rdi 0x03a36b45 __abort+154: callq 0x3a45773 pthread_kill 0x03a36b4a __abort+159: jmp0x3a36b6c __abort+193 0x03a36b4c __abort+161: mov$0x3,%edi 0x03a36b51 __abort+166: xor%edx,%edx 0x03a36b53 __abort+168: mov%rbx,%rsi 0x03a36b56 __abort+171: callq 0x3a9c772 dyld_stub_sigprocmask 0x03a36b5b __abort+176: callq 0x3a9c4f0 dyld_stub_getpid 0x03a36b60 __abort+181: mov$0x6,%esi 0x03a36b65 __abort+186: mov%eax,%edi 0x03a36b67 __abort+188: callq 0x3a9c54a dyld_stub_kill 0x03a36b6c __abort+193: mov$0x2710,%edi 0x03a36b71 __abort+198: callq 0x3a36c43 usleep$NOCANCEL 0x03a36b76 __abort+203: movl $0xffe7,-0x10(%rbp) 0x03a36b7d __abort+210: mov$0x3,%edi 0x03a36b82 __abort+215: xor%edx,%edx 0x03a36b84 __abort+217: mov%rbx,%rsi 0x03a36b87 __abort+220: callq 0x3a9c772 dyld_stub_sigprocmask 0x03a36b8c __abort+225: ud2a End of assembler dump. (gdb) Matt -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___
Re: [Valgrind-users] can't start any application on OS X 10.7.3
Okay, I was able to get that working. Here is the result of disassembling that instruction: 0x03a36b8c __abort+225: ud2a Yeah, so as expected it's died on ud2a, as the vex amd64-IR: unhandled instruction bytes: 0xF 0xB line implies -- 0F 0B is ud2a. The real question is, why did the program jump to abort() in the first place. That will have to wait till I or someone else finds the time to investigate locally. One thing you could do is run with --trace-flags=1000. This prints symbol names as code is visited for the first time. Grep this lot to see if there are any references to misaligned or stack (or some combination thereof) in it. That has been a known trouble spot in the past. Also, maybe post the last 100 or so lines of it here. Overall, though, your best bet is to file a bug report with a precise description of how to reproduce the problem. Bug reports sent by email tend to become lost or forgotten about. You can file a report by following the directions at http://valgrind.org/support/bug_reports.html J -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users