On Wed, Jan 20, 2016 at 3:51 PM, Alex Potapenko <opotapenko(a)gmail.com> wrote:
I enabled debug symbols, switched to
'fastdebug' debug level, and now
I have 'debuginfo' files. I also upgraded to 8u76-b02 and used
Waldemar's combined patch. For some reason, gdb backtrace now hangs at
certain stage (see gdb2.log),
If you enabled full debug info in all jdk libraries, it might be not
enough memory to load it.
but at least we have the culprit line
(openjdk/jdk/src/solaris/native/java/net/net_util_md.c:717):
Good catch! So, the problem is in code performing memory allocations
for localinterface structure, due to
lif variable points to 0x14 (broken/dummy address). Parse of
/proc/net/if_inet6 completed successfully.
Could you:
1. put breakpoint at line 704
2. run until break
3. display variables nifs , localifs , localifsSize
4. next, next - until line 707
5. display variable localifs
?
Looks like this piece of code misinterpret realloc() return value.
703: nifs ++;
704: if (nifs > localifsSize) {
705: localifs = (struct localinterface *) realloc (
706: localifs, sizeof (struct localinterface)* (localifsSize+5));
707: if (localifs == 0) {
708: nifs = 0;
709: fclose (f);
710: return;
711: }
712: lif = localifs + localifsSize;
713: localifsSize += 5;
714: } else {
715: lif ++;
716: }
717: memcpy (lif->localaddr, staddr, 16);
718: lif->index = index;
719: }
720: fclose (f);
721:}
Additionally, please provide information about malloc config settings
of your uClibc-ng. For example,
$ grep MALLOC .config
Regards,
Leonid