All of lore.kernel.org
 help / color / mirror / Atom feed
* Futex problems with firebird3.0 and openjdk-8 on m68k
@ 2017-05-10 20:43 John Paul Adrian Glaubitz
  2017-05-10 21:21 ` Thorsten Glaser
  0 siblings, 1 reply; 14+ messages in thread
From: John Paul Adrian Glaubitz @ 2017-05-10 20:43 UTC (permalink / raw)
  To: Debian m68k, Linux/m68k, Thorsten Glaser

Hi!

We're having an odd issue on Debian/m68k with both firebird3.0 and openjdk-8
hanging during build until the build process is killed.

With openjdk-8, it looks like this [1]:

checking if we are using ecj as javac... [debian/buildwatch.sh] compiler/java/jar running ...
[debian/buildwatch.sh] compiler/java/jar running ...
[debian/buildwatch.sh] compiler/java/jar running ...
[debian/buildwatch.sh] compiler/java/jar running ...
[debian/buildwatch.sh] compiler/java/jar running ...
[debian/buildwatch.sh] compiler/java/jar running ...
E: ABORT: Received INT signal (requesting cleanup and shutdown)

Which means that running "javac" just hangs forever. It seems that Thorsten Glaser
has seen this problem in the past before [2] but I don't know whether he ever
managed to fix it. The openjdk-8 package that currently exists for m68k was
actually re-packed by me by replacing libjvm.so from Andreas Schwab's build
(see below why).

And with firebird3.0 we have [3]:

make[4]: Entering directory '/<<PKGBUILDDIR>>/gen'
sh -x -c "lockfile -1 /<<PKGBUILDDIR>>/gen/Release/firebird/bin/build-db.lock && /<<PKGBUILDDIR>>/gen/Release/firebird/bin/gpre_current -m -z -n
/<<PKGBUILDDIR>>/src/misc/codes.epp /<<PKGBUILDDIR>>/temp/Release/misc/codes.cpp; res=\$?; rm -f /<<PKGBUILDDIR>>/gen/Release/firebird/bin/build-db.lock; exit
\$res"
+ lockfile -1 /<<PKGBUILDDIR>>/gen/Release/firebird/bin/build-db.lock
+ /<<PKGBUILDDIR>>/gen/Release/firebird/bin/gpre_current -m -z -n /<<PKGBUILDDIR>>/src/misc/codes.epp /<<PKGBUILDDIR>>/temp/Release/misc/codes.cpp
gpre version LI-V3.0.1.32609 Firebird 3.0
    Version(s) for database "msg.fdb"
        Firebird/Linux/M68k (access method), version "LI-V3.0.1.32609 Firebird 3.0"
        on disk structure version 12.0
+ res=0
+ rm -f /<<PKGBUILDDIR>>/gen/Release/firebird/bin/build-db.lock
+ exit 0
g++ -I/<<PKGBUILDDIR>>/src/include/gen -I/<<PKGBUILDDIR>>/src/include -Wdate-time -D_FORTIFY_SOURCE=2 -ggdb -O3 -DLINUX -pipe -MMD -fPIC
-DFB_SEND_FLAGS=MSG_NOSIGNAL -pthread -fno-rtti -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security
-std=gnu++98 -fno-lifetime-dse -fno-delete-null-pointer-checks -fno-strict-aliasing  -c /<<PKGBUILDDIR>>/temp/Release/misc/codes.cpp -o
/<<PKGBUILDDIR>>/temp/Release/misc/codes.o
g++  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -std=gnu++98 -fno-lifetime-dse
-fno-delete-null-pointer-checks -fno-strict-aliasing -fPIE -pie -Wl,-z,relro -Wl,-z,now -pthread    -Wl,--version-script,empty.vers
/<<PKGBUILDDIR>>/temp/Release/misc/codes.o /<<PKGBUILDDIR>>/temp/Release/common.a -o /<<PKGBUILDDIR>>/gen/Release/firebird/bin/codes
-L/<<PKGBUILDDIR>>/gen/Release/firebird/lib -lfbclient -ltommath -latomic_ops -lm -ldl   -lcurses
sh -x -c "lockfile -1 /<<PKGBUILDDIR>>/gen/Release/firebird/bin/build-db.lock && /<<PKGBUILDDIR>>/gen/Release/firebird/bin/codes
/<<PKGBUILDDIR>>/src/include/gen /<<PKGBUILDDIR>>/lang_helpers; res=\$?; rm -f /<<PKGBUILDDIR>>/gen/Release/firebird/bin/build-db.lock; exit \$res"
+ lockfile -1 /<<PKGBUILDDIR>>/gen/Release/firebird/bin/build-db.lock
+ /<<PKGBUILDDIR>>/gen/Release/firebird/bin/codes /<<PKGBUILDDIR>>/src/include/gen /<<PKGBUILDDIR>>/lang_helpers
(hangs here)

In both cases, attaching to the running process shows we're hanging in the futex() system call:

root@mama:~# strace -p 28109
strace: Process 28109 attached
futex(0xc5aff4f8, FUTEX_WAIT, 28113, NULL

For the openjdk-8, the issue can be worked around by replacing libjvm.so with a copy
from Andreas Schwab's openjdk-8 build for openSUSE/m68k, so it seems like the JVM
gets miscompiled on Debian/m68k.

Something similar applies to firebird3.0. When building the package in an older
change root (with glibc2.19), the problem [4].

I have tested both on Aranym and qemu-m68k, both show the same behavior. I have
also rebuilt glibc with an upstream patch from Andreas which fixed 64-bit
atomics in glibc [5] but that didn't help either. I also tried rebuilding
glibc on Aranym to make sure it wasn't miscompiled on qemu-m68k on the
buildds.

Does anyone have a suggestion where to look for problems here? I am really
running out of ideas. It's one of the weirdest problems I have ever seen.

Adrian

> [1] https://people.debian.org/~glaubitz/openjdk-8_8u131-b11-1_m68k.build
> [2] https://lists.debian.org/debian-68k/2012/08/msg00023.html
> [3] https://people.debian.org/~glaubitz/firebird3.0_3.0.1.32609.ds4-14_m68k.build
> [4] https://buildd.debian.org/status/fetch.php?pkg=firebird3.0&arch=m68k&ver=3.0.1.32609.ds4-12%2Bb1&stamp=1481424918&raw=0
> [5] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=64ae9fe45662c8994b0e56ab469b01967408a154

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-05-25  5:17 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-10 20:43 Futex problems with firebird3.0 and openjdk-8 on m68k John Paul Adrian Glaubitz
2017-05-10 21:21 ` Thorsten Glaser
2017-05-10 21:58   ` John Paul Adrian Glaubitz
2017-05-11  2:46     ` Finn Thain
2017-05-11  5:55       ` John Paul Adrian Glaubitz
2017-05-11  6:27         ` Finn Thain
2017-05-11  6:38           ` John Paul Adrian Glaubitz
2017-05-11  8:20             ` John Paul Adrian Glaubitz
2017-05-20  6:53               ` Finn Thain
2017-05-21  5:27                 ` John Paul Adrian Glaubitz
2017-05-21  7:31                   ` Andreas Schwab
2017-05-21 11:15                     ` John Paul Adrian Glaubitz
2017-05-21 12:53                       ` John Paul Adrian Glaubitz
2017-05-25  5:17                   ` Finn Thain

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.