Re: Help: symlink problems building openjdk-6
Andreas Schwab dixit:
>Thorsten Glaser <tg@mirbsd.de> writes:
>
>>> relocation truncated to fit: R_68K_GOT16O against `.LC1'
>
>Compile with -fPIC.
Thanks, that helped – a bit. I mean, I knew Java™ was slow,
but not *that* slow:
17634 pts/1 Sl+ 4662:03 /tmp/buildd/openjdk-6-6b24-1.11.3/build/bootstrap/jdk1.6.0/bin/java -version
Attaching a gdb to that:
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "m68k-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /var/cache/pbuilder/build/cow.20573/tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk.build-ecj/j2sdk-image/bin/java...done.
Attaching to program: /var/cache/pbuilder/build/cow.20573/tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk.build-ecj/j2sdk-image/bin/java, process 17634
warning: Could not load shared library symbols for 4 libraries, e.g. /tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk.build-ecj/j2sdk-image/bin/../jre/lib/m68k/jli/libjli.so.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
Reading symbols from /usr/lib/libeatmydata/libeatmydata.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libeatmydata/libeatmydata.so
Reading symbols from /usr/lib/cowdancer/libcowdancer.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/cowdancer/libcowdancer.so
Reading symbols from /lib/m68k-linux-gnu/libz.so.1...(no debugging symbols found)...done.
[…]
(gdb) set sysroot /var/cache/pbuilder/build/cow.20573
Reading symbols from /var/cache/pbuilder/build/cow.20573/usr/lib/libeatmydata/libeatmydata.so...(no debugging symbols found)...done.
Loaded symbols for /var/cache/pbuilder/build/cow.20573/usr/lib/libeatmydata/libeatmydata.so
Reading symbols from /var/cache/pbuilder/build/cow.20573/usr/lib/cowdancer/libcowdancer.so...(no debugging symbols found)...done.
Loaded symbols for /var/cache/pbuilder/build/cow.20573/usr/lib/cowdancer/libcowdancer.so
Reading symbols from /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/libz.so.1
Reading symbols from /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/libpthread.so.0...(no debugging symbols found)...done.
Loaded symbols for /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/libpthread.so.0
Reading symbols from /var/cache/pbuilder/build/cow.20573/tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk.build-ecj/j2sdk-image/bin/../jre/lib/m68k/jli/libjli.so...done.
Loaded symbols for /var/cache/pbuilder/build/cow.20573/tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk.build-ecj/j2sdk-image/bin/../jre/lib/m68k/jli/libjli.so
Reading symbols from /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/libdl.so.2
Reading symbols from /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/libc.so.6
Reading symbols from /var/cache/pbuilder/build/cow.20573/lib/ld.so.1...(no debugging symbols found)...done.
Loaded symbols for /var/cache/pbuilder/build/cow.20573/lib/ld.so.1
Reading symbols from /var/cache/pbuilder/build/cow.20573/tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk.build-ecj/j2sdk-image/jre/lib/m68k/server/libjvm.so...done.
Loaded symbols for /var/cache/pbuilder/build/cow.20573/tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk.build-ecj/j2sdk-image/jre/lib/m68k/server/libjvm.so
Reading symbols from /var/cache/pbuilder/build/cow.20573/usr/lib/m68k-linux-gnu/libstdc++.so.6...(no debugging symbols found)...done.
Loaded symbols for /var/cache/pbuilder/build/cow.20573/usr/lib/m68k-linux-gnu/libstdc++.so.6
Reading symbols from /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/libm.so.6
Reading symbols from /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/libgcc_s.so.2...(no debugging symbols found)...done.
Loaded symbols for /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/libgcc_s.so.2
Reading symbols from /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/librt.so.1
Reading symbols from /var/cache/pbuilder/build/cow.20573/tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk.build-ecj/j2sdk-image/jre/lib/m68k/libverify.so...done.
Loaded symbols for /var/cache/pbuilder/build/cow.20573/tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk.build-ecj/j2sdk-image/jre/lib/m68k/libverify.so
Reading symbols from /var/cache/pbuilder/build/cow.20573/tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk.build-ecj/j2sdk-image/jre/lib/m68k/libjava.so...done.
Loaded symbols for /var/cache/pbuilder/build/cow.20573/tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk.build-ecj/j2sdk-image/jre/lib/m68k/libjava.so
Reading symbols from /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/libnsl.so.1...(no debugging symbols found)...done.
Loaded symbols for /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/libnsl.so.1
Reading symbols from /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/libnss_compat.so.2...(no debugging symbols found)...done.
Loaded symbols for /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/libnss_compat.so.2
Reading symbols from /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/libnss_nis.so.2...(no debugging symbols found)...done.
Loaded symbols for /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/libnss_nis.so.2
Reading symbols from /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/libnss_files.so.2...(no debugging symbols found)...done.
Loaded symbols for /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/libnss_files.so.2
(gdb) bt
#0 0xc004bfba in pthread_join () from /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/libpthread.so.0
#1 0x80005e9a in ContinueInNewThread (continuation=0x80002cac <JavaMain>, stack_size=1572864, args=0xefa248a6,
ret=0) at ../../../../src/solaris/bin/java_md.c:1754
#2 0x80001f26 in main (argc=1, argv=0x8000a09c) at ../../../../src/share/bin/java.c:370
(gdb) info threads
Id Target Id Frame
2 Thread 0xc07d34c0 (LWP 17635) "java" m68k_compare_and_swap (newval=94866335, ptr=0x80012020,
oldval=94866336)
at /tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk-ecj/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp:67
* 1 Thread 0xc0192210 (LWP 17634) "java" 0xc004bfba in pthread_join ()
from /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/libpthread.so.0
(gdb) thread 2
[Switching to thread 2 (Thread 0xc07d34c0 (LWP 17635))]
#0 m68k_compare_and_swap (newval=94866335, ptr=0x80012020, oldval=94866336)
at /tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk-ecj/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp:67
67 /tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk-ecj/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp: No such file or directory.
(gdb) dir /var/cache/pbuilder/build/cow.20573
Source directories searched: /var/cache/pbuilder/build/cow.20573:$cdir:$cwd
(gdb) list
67 int prev = *ptr;
68 if (prev != oldval)
69 return prev;
70
71 if (__m68k_cmpxchg (prev, newval, ptr) == newval)
72 // Success.
73 return prev;
74
75 // We failed even though prev == oldval. Try again.
76 }
(gdb) bt
#0 m68k_compare_and_swap (newval=94866335, ptr=0x80012020, oldval=94866336)
at /tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk-ecj/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp:67
#1 cmpxchg (compare_value=94866336, dest=0x80012020, exchange_value=94866335)
at /tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk-ecj/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp:266
#2 os::PlatformEvent::park (this=0x80012000)
at /tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk-ecj/hotspot/src/os/linux/vm/os_linux.cpp:4941
#3 0xc0416506 in ParkCommon (ev=0x80012000, timo=<optimized out>)
at /tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk-ecj/hotspot/src/share/vm/runtime/mutex.cpp:420
#4 ILock (Self=0x80010008, this=0x8000efa0)
at /tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk-ecj/hotspot/src/share/vm/runtime/mutex.cpp:487
#5 Monitor::ILock (this=0x8000efa0, Self=0x80010008)
at /tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk-ecj/hotspot/src/share/vm/runtime/mutex.cpp:452
#6 0xc0416b64 in Monitor::lock_without_safepoint_check (this=0x8000efa0, Self=0x80010008)
at /tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk-ecj/hotspot/src/share/vm/runtime/mutex.cpp:941
#7 0xc0416ba0 in Monitor::lock_without_safepoint_check (this=0x8000efa0)
at /tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk-ecj/hotspot/src/share/vm/runtime/mutex.cpp:947
#8 0xc0384bd0 in MutexLockerEx (mutex=0x8000efa0, this=<synthetic pointer>, no_safepoint_check=<optimized out>)
at /tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk-ecj/hotspot/src/share/vm/runtime/mutexLocker.hpp:207
#9 JNIHandleBlock::allocate_block (thread=0x0)
at /tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk-ecj/hotspot/src/share/vm/runtime/jniHandles.cpp:300
#10 0xc04a3956 in Threads::create_vm (args=0xc07d2ed6, canTryAgain=0xc07d2e87)
at /tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk-ecj/hotspot/src/share/vm/runtime/thread.cpp:3074
#11 0xc0371752 in JNI_CreateJavaVM (vm=0xc07d2ece, penv=0xc07d2ed2, args=0xc07d2ed6)
at /tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk-ecj/hotspot/src/share/vm/prims/jni.cpp:3344
#12 0x80002d20 in InitializeJVM (penv=0xc07d2ed2, pvm=0xc07d2ece, ifn=<optimized out>)
at ../../../../src/share/bin/java.c:1269
#13 JavaMain (_args=0xefa248a6) at ../../../../src/share/bin/java.c:404
#14 0xc004b056 in start_thread () from /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/libpthread.so.0
#15 0xc012829c in clone () from /var/cache/pbuilder/build/cow.20573/lib/m68k-linux-gnu/libc.so.6
The atomic_linux_zero.inline.hpp file contains:
52 static inline int __m68k_cmpxchg(int oldval, int newval, volatile int *ptr) {
53 int ret;
54 __asm __volatile ("cas%.l %0,%2,%1"
55 : "=d" (ret), "+m" (*(ptr))
56 : "d" (newval), "0" (oldval));
57 return ret;
58 }
I guess we should let it use __sync_val_compare_and_swap instead then?
Or is this related to the Qt4 problem, which also looks to my layman
eye like one thread is waiting for another (though it’s idle-spinning,
not busy-spinning like here)? Is cas broken in ARAnyM, or…? This is a
bit over what I normally see. (And why is the argument order of static
inline int m68k_compare_and_swap(volatile int *ptr, int oldval, int
newval) swapped?
A few "si" further:
(gdb) info r
d0 0xec2c25f5 -332651019
d1 0xec2c25f4 -332651020
d2 0x80010008 -2147418104
d3 0x80012001 -2147409919
d4 0x80010008 -2147418104
d5 0x0 0
d6 0x8000a09c -2147442532
d7 0xefa24818 -274577384
a0 0x80012020 0x80012020
a1 0xec2c25f5 0xec2c25f5
a2 0x80012000 0x80012000
a3 0x80012000 0x80012000
a4 0x800098aa 0x800098aa
a5 0xc052166c 0xc052166c
fp 0xc07d2d0c 0xc07d2d0c
sp 0xc07d2cfc 0xc07d2cfc
ps 0x8208 [ N I1 T1 ]
pc 0xc0438a4c 0xc0438a4c <os::PlatformEvent::park()+42>
fpcontrol 0x0 0
fpstatus 0x8 8
fpiaddr 0x0 0
(gdb) disas
Dump of assembler code for function os::PlatformEvent::park():
0xc0438a22 <+0>: linkw %fp,#0
0xc0438a26 <+4>: moveml %a2-%a5,%sp@-
0xc0438a2a <+8>: lea %pc@(0xc052166c),%a5
0xc0438a32 <+16>: moveal %fp@(8),%a2
0xc0438a36 <+20>: lea %a2@(32),%a0
0xc0438a3a <+24>: moveal %a2@(32),%a1
0xc0438a3e <+28>: movel %a1,%d1
0xc0438a40 <+30>: subql #1,%d1
0xc0438a42 <+32>: movel %a2@(32),%d0
0xc0438a46 <+36>: cmpl %a1,%d0
0xc0438a48 <+38>: bnes 0xc0438a3a <os::PlatformEvent::park()+24>
0xc0438a4a <+40>: movel %a1,%d0
=> 0xc0438a4c <+42>: casl %d0,%d1,%a0@
0xc0438a50 <+46>: cmpl %d1,%d0
0xc0438a52 <+48>: bnes 0xc0438a42 <os::PlatformEvent::park()+32>
0xc0438a54 <+50>: tstl %a1
0xc0438a56 <+52>: bltw 0xc0438b3e <os::PlatformEvent::park()+284>
0xc0438a5a <+56>: beqs 0xc0438a6c <os::PlatformEvent::park()+74>
0xc0438a5c <+58>: movel %a2@(32),%d0
0xc0438a60 <+62>: blts 0xc0438ac4 <os::PlatformEvent::park()+162>
0xc0438a62 <+64>: moveml %fp@(-16),%a2-%a5
0xc0438a68 <+70>: unlk %fp
0xc0438a6a <+72>: rts
0xc0438a6c <+74>: lea %a2@(40),%a3
0xc0438a70 <+78>: movel %a3,%sp@-
0xc0438a72 <+80>: bsrl 0xc02147c4 <pthread_mutex_lock@plt>
0xc0438a78 <+86>: movel %a2@(36),%d0
0xc0438a7c <+90>: addql #4,%sp
0xc0438a7e <+92>: bnes 0xc0438af8 <os::PlatformEvent::park()+214>
0xc0438a80 <+94>: movel %a2@(36),%d0
0xc0438a84 <+98>: addql #1,%d0
---Type <return> to continue, or q <return> to quit---
(gdb) si
m68k_compare_and_swap (newval=-332651020, ptr=0x80012020, oldval=-332651019)
at /tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk-ecj/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp:71
71 in /tmp/buildd/openjdk-6-6b24-1.11.3/build/openjdk-ecj/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp
(gdb) info r
d0 0xec2c25f5 -332651019
d1 0xec2c25f4 -332651020
d2 0x80010008 -2147418104
d3 0x80012001 -2147409919
d4 0x80010008 -2147418104
d5 0x0 0
d6 0x8000a09c -2147442532
d7 0xefa24818 -274577384
a0 0x80012020 0x80012020
a1 0xec2c25f5 0xec2c25f5
a2 0x80012000 0x80012000
a3 0x80012000 0x80012000
a4 0x800098aa 0x800098aa
a5 0xc052166c 0xc052166c
fp 0xc07d2d0c 0xc07d2d0c
sp 0xc07d2cfc 0xc07d2cfc
ps 0x8204 [ Z I1 T1 ]
pc 0xc0438a50 0xc0438a50 <os::PlatformEvent::park()+46>
fpcontrol 0x0 0
fpstatus 0x8 8
fpiaddr 0x0 0
(gdb) x/lx 0x80012020
0x80012020: 0xec2c25f4
Puzzled,
//mirabilos
--
[...] if maybe ext3fs wasn't a better pick, or jfs, or maybe reiserfs, oh but
what about xfs, and if only i had waited until reiser4 was ready... in the be-
ginning, there was ffs, and in the middle, there was ffs, and at the end, there
was still ffs, and the sys admins knew it was good. :) -- Ted Unangst über *fs
Reply to: