I'm in the process of Android bringup on a new HW, and due to multiple 
services failures on init tried to debug them manually. I compiled a static 
shell and booted straight into it, without running /init process.
At this stage any dynamic linked binary was segfaulting straight on 
execution. Here is the backtrace of the fault:

Program received signal SIGSEGV, Segmentation fault.
find_property (trie=0x80, name=0x77d3dc68 "debug.libc.pthread", 
namelen=Unhandled dwarf expression opcode 0xf3
) at bionic/libc/bionic/system_properties.c:403
403 bionic/libc/bionic/system_properties.c: No such file or directory.
in bionic/libc/bionic/system_properties.c
(gdb) bt
#0  find_property (trie=0x80, name=0x77d3dc68 "debug.libc.pthread", 
namelen=Unhandled dwarf expression opcode 0xf3
) at bionic/libc/bionic/system_properties.c:403
#1  0x77d1d8b0 in __system_property_find (name=0x77d3dc68 
"debug.libc.pthread") at bionic/libc/bionic/system_properties.c:438
#2  0x77d1d9e8 in __system_property_get (name=Unhandled dwarf expression 
opcode 0xf3
) at bionic/libc/bionic/system_properties.c:469
#3  0x77ce4424 in pthread_debug_init () at 
bionic/libc/bionic/pthread_debug.cpp:668
#4  0x77ce2940 in __libc_preinit () at 
bionic/libc/bionic/libc_init_dynamic.cpp:79
#5  0x77d6b7b0 in CallFunction (this=0x77d8512c, function_name=0x77d7bb7c 
"function", function=0x77ce2904 <__libc_preinit()>) at 
bionic/linker/linker.cpp:1324
#6  soinfo::CallFunction (this=0x77d8512c, function_name=0x77d7bb7c 
"function", function=0x77ce2904 <__libc_preinit()>) at 
bionic/linker/linker.cpp:1318
#7  0x77d6b93c in soinfo::CallArray (this=0x77d8512c, array_name=0x77d7bc4c 
"DT_INIT_ARRAY", functions=Unhandled dwarf expression opcode 0xf3
) at bionic/linker/linker.cpp:1312
#8  0x77d6bbd0 in CallConstructors (this=Unhandled dwarf expression opcode 
0xf3
) at bionic/linker/linker.cpp:1375
#9  soinfo::CallConstructors (this=Unhandled dwarf expression opcode 0xf3
) at bionic/linker/linker.cpp:1338
#10 0x77d6bb44 in CallConstructors (this=0x77d85004) at 
bionic/linker/linker.cpp:1366
#11 soinfo::CallConstructors (this=0x77d85004) at 
bionic/linker/linker.cpp:1338
#12 0x77d6ddd0 in __linker_init_post_relocation (raw_args=Unhandled dwarf 
expression opcode 0xf3
) at bionic/linker/linker.cpp:1920
#13 __linker_init (raw_args=Unhandled dwarf expression opcode 0xf3
) at bionic/linker/linker.cpp:2028
#14 0x77d696e4 in __dl___start () at bionic/linker/arch/mips/begin.S:98

It seems like libc is trying to access system properties which are 
initialized by init process, and possible initialization error is ignored:

void __libc_init_common(....) {
...

__system_properties_init();
}

System properties are accessed afterward on pthread_debug_init() which 
causes the SEGFAULT.

I think it's a kind of a bug, and just wanted to share it to help anyone 
facing the same problem to understand its cause.

-- 
-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

--- 
You received this message because you are subscribed to the Google Groups 
"android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to