On Wed, May 25, 2011 at 04:02:07PM +0100, David Gilbert wrote:
Hi,
I thought I'd just summarise some of the latrace quirks that I'd hit
hi,
so cool.. thanks
over the last few weeks of using it; I'm not
sure yet whether all of these are ARM specific (I've not had the
chance to try and replicate them all on x86)
1) C++ programs that throw exceptions don't seem to like running under
latrace (povray in SPEC 2k6 in particular);
it fails with an exception saying that its terminating 'after throwing
an instance of 'int''; it looks like it normally does
throw exceptions, and it seems to be misreading which exception it is.
so far I've never tried to trace C++ exception code..
I found adding:
-n_Unwind_RaiseException,__cxa_get_globals,__cxa_throw,__cxa_allocate_exception,__cxxabiv1::__cxa_allocate_exception
to latrace seems to help.
2) I'd also had problems with setjmp - I think this was in perl (in
the spec wrapper); adding
-nlongjmp,siglongjmp,_longjmp,__longjmp_chk,__libc_longjmp,__libc_siglongjmp
yep setjmp is a problem, as for x86_64 it fails in glibc code
which I'm not sure how to fix so far.. I'll probably endup sending
question to libc list
3) I don't think the output is opened with O_LARGEFILE, I found that
after the 4GB log file got truncated (I now pipe to bzip2)
nope, just simple fopen, will check how to do that
4) Given (1) and (2) and a few other quirks, I hit the limit on the
length of the symbol list (about 200 chars); unfortunately
it just fails silently rather than telling you this.
bug ;)
5) For my purposes I modified the code that prints args to print the
address and the length of strings passed as arguments;
quite useful to see where the strings are coming from.
nice, if you'd like to send a patch or whatever state your code is,
we can put it in or finish it
I've got a few other quirks I've not been able to get to the bottom of
yet (e.g. one program that I think is stuck in a loop when run
under latrace but I've not figured out why); but it's managed to get
me probably a few 100GB of logs - thanks!
you're welcome ;) I guess it's probably not publicly available program
since you didnt share the name, but if you happen to isolate the issue
or make a reproducer, I'll be happy to investigate
I'd be intereste d to know if anyone has seen (1) or (2) on any other
platform, else we need to go digging on ARM and figure out why.
(1) I'll try C++ throwing an exception and let you know
(2) not sure how setjmp/longjmp is implemented on ARM,
x86_64 answer is above
thanks for sharing these issues, I wish I'd have more such input
jirka