On Sat, Jan 9, 2016 at 11:14 PM, Alex Potapenko <opotapenko(a)gmail.com> wrote:
Hi Leonid, Waldemar,
2015-12-30 10:24 GMT+02:00 Leonid Lisovskiy <lly.dev(a)gmail.com>om>:
Anyway, are you able to:
1) update OpenJDK to latest jdk8u76-b01 & uClibc-ng to 1.0.10 ?
2) disable use of IPv6 at all, to exclude any chance of read of
"/proc/net/if_inet6" in initLocalIfs() ?
3) compile only libnet.so with -g3 switch to get a much more of debug info ?
I've upgraded OpenJDK and uClibc-ng, compiled libnet.so (and all
OpenJDK8) with -g3 switch, but gdb output hasn't changed much (see log
attached).
Well, it is a not well known bug, at least.
For unknown reasons, gdb unable to read full debug info from libnet.so:
#0 0x53be1804 in initLocalIfs () from
/opt/lib/openjdk8/arm/libnet.so
No symbol table info available.
Probably strip was run at install/deploy phase?
Second chance, I see, is to use addr2line utility against non-stripped library.
First of all, since initLocalIfs() is in shared library, we have to
know load address of it:
(gdb) info shared
From To Syms Read Shared Object
Library
0xf7ff7b20 0xf7ffaf9f Yes (*) /lib/ld-uClibc.so.1
0xf7faa8d0 0xf7fab475 Yes (*) /lib/libdl.so.1
0xf7f74860 0xf7fa2b88 Yes /lib/libc.so.1
...
Find line corresponding libnet.so, subtract "From" address from target
0x53be1804. You will get offset inside libnet.so and it is time to run
addr2line on cross-compile host:
$ addr2line -j .text -f -e libnet.so -a <offset>
You should get the line in source src/solaris/native/java/net/net_util_md.c.
P.S. If you use address space layout randomization(ASLR) on target,
you must use addresses from the single gdb session.
Regards,
Leonid