strace improvement patch
Thanks, David. That original patch was indeed by me. I am now doing most of the strace maintenance on the sourceforge version directly. I was already planning to merge those changes in, along with some more clone-related changes I have to handle the 2.5 threads stuff that I will finish up and merge. I will incorporate your fixes and test it on IA64 before I commit those changes.
Quoted 4 lines
Also, I'd recommend to use gcc-3.2 for compiling strace. I encountered some strange bugs with gcc-2.96, though I did not try to track them down. With gcc-3.2, those bugs went away and strace now seems to work quite nicely (once again, that is).
Can you give me at least a clue what to look for?
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Roland McGrath
Roland> Thanks, David. That original patch was indeed by me. I am Roland> now doing most of the strace maintenance on the sourceforge Roland> version directly.
I'm very happy to hear that. Seems like you have made lots of nice improvements already.
Roland> I was already planning to merge those changes in, along with Roland> some more clone-related changes I have to handle the 2.5 Roland> threads stuff that I will finish up and merge. I will Roland> incorporate your fixes and test it on IA64 before I commit Roland> those changes.
Thanks!
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line · Roland McGrath
Also, I'd recommend to use gcc-3.2 for compiling strace. I encountered some strange bugs with gcc-2.96, though I did not try to track them down. With gcc-3.2, those bugs went away and strace now seems to work quite nicely (once again, that is).
Roland> Can you give me at least a clue what to look for?
Sure thing: what happened is that after an execve(), all syscall result values would come out wrong (usually as 0x8000000000000000 or -9223372036854775808). It didn't always happen, and the problem usually went away whenever I tried to track it down by adding printfs. I think the problem was that strace got out of sync and thought that the program was returning from a syscall when it was actually entering it.
--david
Quoted 5 lines
*
util.c(arg_setup) [IA64]: Make it work for syscall-stubs that have a non-empty local register partition.
(set_arg0) [IA64]: Fix it so it actually works. (set_arg1) [IA64]: Ditto.
(setbpt): TreatSYS_clone2likeSYS_clone.
Are you sure this really works on IA64? I've merged the changes, and though I fixed some other problems with my original code, the IA64 code in util.c is exactly what's in your patch. It doesn't work for me on IA64. The failure mode suggests the argument munging code is munging the wrong thing. I don't know IA64 halfway well enough to figure out how it might be wrong, and it looks to me like it matches the code that fetches those values in syscall_enter. When I do "strace -f /usr/bin/time /bin/true", both parent and child die with SIGSEGV upon continuing the clone syscall whose arguments should have been munged to set the CLONE_PTRACE flag. (It executes fine without -f.)
I've committed the changes (along with some more fixes and new support for the new threads features in Linux 2.5). Can you get the current sources from sourceforge and try them on IA64? After getting a cvs checkout, you'll need to run "autoreconf -i" with automake-1.7.2 and autoconf-2.57.
Unless someone can help me fix this right away, we'll probably go ahead with a 4.4.90 test release with this bug still biting IA64.
Thanks,
Roland
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Roland McGrath
Roland> Are you sure this really works on IA64?
Yes, it works very well on 2.5.52. I tested it on decidedly non-trivial, heavily multithreaded programs.
Roland> I've committed the changes (along with some more fixes and Roland> new support for the new threads features in Linux 2.5). Can Roland> you get the current sources from sourceforge and try them on Roland> IA64? After getting a cvs checkout, you'll need to run Roland> "autoreconf -i" with automake-1.7.2 and autoconf-2.57.
I tried it and it works fine with 2.5.52. Then I also tried on a 2.4.20 machine and sure enough, there it dies with a SIGSEGV. I can look into it, but not tonight, so you may want to go ahead with the test-release.
Thanks,
--david
Quoted 4 lines
I tried it and it works fine with 2.5.52. Then I also tried on a 2.4.20 machine and sure enough, there it dies with a SIGSEGV. I can look into it, but not tonight, so you may want to go ahead with the test-release.
Have you (or anyone) looked into strace -f on ia64 Linux 2.4.x yet? This is still broken, and I haven't heard a peep from you in six weeks. I really don't know ia64 well enough to be likely to have much luck myself.
It's not reasonable to release strace 4.5 with this still broken, and I've run out of other reasons not to make the release already.
A little help?
Thanks,
Roland