[Ltrace-devel] serious problem when running ltrace on an ARM board

Honggyu Kim honggyu at aces.snu.ac.kr
Wed Nov 23 05:33:38 UTC 2011


Hello,

I'm currently trying to use ltrace on my ARM board.
I found that ltrace works on many Linux systems running on ARM as well
from README doc.
However, Itrace seems not to be running on my ARM board.
The problem is that it often generates "Segmentation fault".
The meaning of "often" is that it doesn't work deterministically, which
is very weird.
It sometimes works fine and sometimes crashes.
To give better understand, I will show you the result below.
============================================================
$ ltrace -c ls
Segmentation fault

$ ltrace -c ls
% time seconds usecs/call calls function
------ ----------- ----------- --------- --------------------
------ ----------- ----------- --------- --------------------
100.00 0.000000 0 total

$ ltrace -c ls
% time seconds usecs/call calls function
------ ----------- ----------- --------- --------------------
98.36 0.009135 9135 1 setlocale
1.64 0.000152 152 1 bindtextdomain
------ ----------- ----------- --------- --------------------
100.00 0.009287 2 total
============================================================

As you can see the execution above, I have run the same command 3 times
and the result is different each.

I have tested it on 3 different boards and environements.
a. a tegra board(dual core) with ubuntu linux (ltrace downloaded from
apt-get package manager)
b. SMDK210 board(dual core) with android linux (ltrace ported by me)
c. qemu emulator(single core) with android linux (same version as 'b')

>From my test result, 'a' and 'b' often crash the execution and the
result is not deterministic.
However, 'c' works fine without any problems. This makes me very confused.

I'm just wondering if we have to flush instruction cache after modifying
code section using PTRACE_POKETEXT
Thanks in advance for your any kind of help.

Best Regards,

Honggyu Kim

-- 
Honggyu Kim

Advanced Compiler Research Lab.
School of Computer Science and Engineering
Seoul National University, Korea

Phone/Fax: +82-2-880-1837





More information about the Ltrace-devel mailing list