-
Bug
-
Resolution: Fixed
-
P1
-
9
-
b54
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8081879 | emb-9 | Erik Joelsson | P1 | Resolved | Fixed | b54 |
A race condition, possibly leading to a failed build on Solaris, was introduced with JDK-8072842.
The two Solaris helper script fix_empty_sec_hdr_flags and add_gnu_debuglink are built several times, in the same location.
If we are unlucky then thread A does:
A1: compile add_gnu_link.c
A2: link add_gnu_link
and thread B does:
B1: compile add_gnu_link.c
after A1 but before A2, so that when linking is about to start, the .o file has been truncated, and then linking will fail.
A typical error message looks like this:
Main.gmk:264: recipe for target 'build-test-hotspot-jtreg-native' failed
ld: fatal: file /opt/jprt/T/P1/002839.magnusi/s/build/solaris-sparcv9-normal-server-release/buildtools/objs/fix_empty_sec_hdr_flags/fix_empty_sec_hdr_flags.o: not an ELF object
ld: fatal: file processing errors. No output written to /opt/jprt/T/P1/002839.magnusi/s/build/solaris-sparcv9-normal-server-release/buildtools/bin/fix_empty_sec_hdr_flags
gmake[3]: *** [/opt/jprt/T/P1/002839.magnusi/s/build/solaris-sparcv9-normal-server-release/buildtools/bin/fix_empty_sec_hdr_flags] Error 2
The proper long-term solution is to fixJDK-8064808. However, since this causes a build break, a quicker and less risky fix is to let build-test-*-jtreg-native depend on buildtools-jdk.
The two Solaris helper script fix_empty_sec_hdr_flags and add_gnu_debuglink are built several times, in the same location.
If we are unlucky then thread A does:
A1: compile add_gnu_link.c
A2: link add_gnu_link
and thread B does:
B1: compile add_gnu_link.c
after A1 but before A2, so that when linking is about to start, the .o file has been truncated, and then linking will fail.
A typical error message looks like this:
Main.gmk:264: recipe for target 'build-test-hotspot-jtreg-native' failed
ld: fatal: file /opt/jprt/T/P1/002839.magnusi/s/build/solaris-sparcv9-normal-server-release/buildtools/objs/fix_empty_sec_hdr_flags/fix_empty_sec_hdr_flags.o: not an ELF object
ld: fatal: file processing errors. No output written to /opt/jprt/T/P1/002839.magnusi/s/build/solaris-sparcv9-normal-server-release/buildtools/bin/fix_empty_sec_hdr_flags
gmake[3]: *** [/opt/jprt/T/P1/002839.magnusi/s/build/solaris-sparcv9-normal-server-release/buildtools/bin/fix_empty_sec_hdr_flags] Error 2
The proper long-term solution is to fix
- backported by
-
JDK-8081879 Race condition in build since JDK-8072842 can cause failed builds on Solaris
-
- Resolved
-