Saturday, March 24, 2012

strace in Android is Outdated

The strace utility is part of the Android Open Source Project (AOSP) code base. The project path as declared in the manifest is external/strace.


I downloaded Android 2.3 as well as the regular strace source code which is hosted on sourceforge. 


The entire strace source code on SourceForge was forked and ported over to Android's code base. (But it seems like some OS-specific components are missing which makes sense since Android doesn't use them anyway.)


A quick look at the Android code base for external/strace shows that the version is 4.5.12 while the latest on SourceForge as at the time of this writing, is 4.6. Well at first glance the version difference is not that great, but hey, the times of release between those two versions are almost 6 years apart (2005 vs 2011)!


I wanted to check whether the strace utility in the latest version of Android, which is 4.0, has been upgraded. So this time round I downloaded the Android 4.0 source code, and did a quick diff with Android 2.3 source code. The result is disappointing -- the entire external/strace directory was unmodified, which means that nobody bothered porting over the bug fixes since 2005. In fact I suspect since the start of the Android project, no one ported over the changes.





3 comments:

Mahdieh Kazemipour said...

my problem is this error

output

"futex(0x13830c, FUTEX_WAIT, 0, NULL) = 0"

I use strace for threads pid but problem is not solved!

why?


when I use strace with -e trace=open,read
example
strace -e trace=open,read -p 1233

get this eror
I fond thead id and use this for all theads!
example
strace -e trace=open,read -p 1233,-p 1234,-p1235

but problem not solved and

print this as out put

"futex(0x13830c, FUTEX_WAIT, 0, NULL) = 0"

Mahdieh Kazemipour said...

my problem is this error

output

"futex(0x13830c, FUTEX_WAIT, 0, NULL) = 0"

I use strace for threads pid but problem is not solved!

why?


when I use strace with -e trace=open,read
example
strace -e trace=open,read -p 1233

get this eror
I fond thead id and use this for all theads!
example
strace -e trace=open,read -p 1233,-p 1234,-p1235

but problem not solved and

print this as out put

"futex(0x13830c, FUTEX_WAIT, 0, NULL) = 0"

Lucas Tan said...

You mean your error is
""futex(0x13830c, FUTEX_WAIT, 0, NULL) = 0"" ?

"0" seems like a normal return value. See http://man7.org/linux/man-pages/man2/futex.2.html

I don't really understand what you're trying to say.