adoptium / temurin-build

Eclipse Temurin™ build scripts - common across all releases/versions
Apache License 2.0
1.03k stars 249 forks source link

Docker build crashes on Mac OS X? #3

Closed karianna closed 7 years ago

karianna commented 7 years ago

Quite a bit of the build runs but then towards the end I get:

...
...
...
## Starting langtools
Compiling 2 files for BUILD_TOOLS
Compiling 32 properties into resource bundles
Compiling 782 files for BUILD_BOOTSTRAP_LANGTOOLS
ERRO[0107] error getting events from daemon: EOF
Error response from daemon: dial unix /Users/karianna/Library/Containers/com.docker.docker/Data/*00000003.00000948: connect: connection refused
Error response from daemon: dial unix /Users/karianna/Library/Containers/com.docker.docker/Data/*00000003.00000948: connect: connection refused

Not sure if a regular Docker bug or something triggered by the build in the container...

gdams commented 7 years ago

@a-roberts any ideas ?

gdams commented 7 years ago

this is a known issue with docker https://github.com/docker/docker/issues/24045. I have not been able to recreate this myself, what docker version are you using ? I am running Docker version 17.03.0-ce, build 60ccb22

karianna commented 7 years ago

Same version: Docker version 17.03.0-ce, build 60ccb22

gdams commented 7 years ago

Can you reproduce the failure? Or is it a one off ?

karianna commented 7 years ago

@gdams repeatable but not at the same build step, so this time it got further:

...
...
...
## Starting jdk
Importing CORBA classes.jar
Importing JAXP classes.jar
Importing JAXWS classes.jar
Importing LANGTOOLS classes.jar
Importing CORBA src.zip
Importing JAXP src.zip
Importing JAXWS src.zip
Importing LANGTOOLS src.zip
Importing CORBA bin.zip
Compiling 163 files for BUILD_TOOLS
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Compiling 521 properties into resource bundles
Copying and cleaning 53 properties
Creating sun/util/LocaleDataMetaInfo.java from 423 found resources.
Generating sun/misc/Version.java
Generating sun/misc/Version.java compact1
Generating sun/misc/Version.java compact2
Generating sun/misc/Version.java compact3
Generating charsetmapping classes
Aliases: Table size 1024 (10 bits), shift 0, max chain depth 3
Classes: Table size 32 (5 bits), shift 1, max chain depth 3
Cache: Table size 32 (5 bits), shift 1, max chain depth 3
Generating buffer classes
Generating exceptions classes
Generating icon classes
Generating X11 wrapper (64-bit version)
Verifying /openjdk/jdk8u/openjdk/build/linux-x86_64-normal-server-release/jdk/gensrc_x11wrappers/sizes.64.verification.tmp to /openjdk/jdk8u/openjdk/build/linux-x86_64-normal-server-release/jdk/gensrc_x11wrappers/sizes.64
Generating beaninfo
Generating Nimbus source files
[Error] encoded value was less than 0: encode(-8.326673E-17, 5.0, 11.0, 16.0)
[Error] encoded value was less than 0: encode(-0.05882353, 1.0, 24.0, 25.0)
[Error] encoded value was greater than 3: encode(15.029411, 1.0, 14.0, 15.0)
[Error] encoded value was less than 0: encode(-0.05882353, 1.0, 24.0, 25.0)
[Error] encoded value was greater than 3: encode(15.029411, 1.0, 14.0, 15.0)
[Error] encoded value was less than 0: encode(-0.05882353, 1.0, 24.0, 25.0)
[Error] encoded value was less than 0: encode(-0.05882353, 1.0, 24.0, 25.0)
[Error] encoded value was greater than 3: encode(15.029411, 1.0, 14.0, 15.0)
[Error] encoded value was less than 0: encode(-0.05882353, 1.0, 24.0, 25.0)
[Error] encoded value was greater than 3: encode(15.029411, 1.0, 14.0, 15.0)
[Error] encoded value was less than 0: encode(-0.05882353, 1.0, 24.0, 25.0)
[Error] encoded value was less than 0: encode(-0.05882353, 1.0, 24.0, 25.0)
[Error] encoded value was greater than 3: encode(15.029411, 1.0, 14.0, 15.0)
[Error] encoded value was less than 0: encode(-0.05882353, 1.0, 24.0, 25.0)
[Error] encoded value was greater than 3: encode(15.029411, 1.0, 14.0, 15.0)
[Error] encoded value was less than 0: encode(-0.05882353, 1.0, 24.0, 25.0)
[Error] Encountered Infinity: encode(-0.00877193, 0.0, 7.0, 7.0)
Compiling 4 files for BUILD_BREAKITERATOR
ERRO[3641] error getting events from daemon: EOF
Error response from daemon: dial unix /Users/karianna/Library/Containers/com.docker.docker/Data/*00000003.00000948: connect: connection refused
Error response from daemon: dial unix /Users/karianna/Library/Containers/com.docker.docker/Data/*00000003.00000948: connect: connection refused

My guess is a core Docker bug

gdams commented 7 years ago

something seems weird with your docker installation. I have never seen this failure before, I'll do some investigation

karianna commented 7 years ago

Looking at the open issue list on mac docker I do see a number of crash bugs - but I'm certainly no docker expert.

Perhaps we should see if some other mac user has the same issue?

If it's just me I don't want to waste people's time 🙂

On Fri, 17 Mar 2017 at 19:36, George Adams notifications@github.com wrote:

something seems weird with your docker installation. I have never seen this failure before, I'll do some investigation

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/AdoptOpenJDK/openjdk-build/issues/3#issuecomment-287451473, or mute the thread https://github.com/notifications/unsubscribe-auth/AALCaLRQ527CvzHJL6QfhFqhLROB80iKks5rmuDSgaJpZM4MgyKD .

-- Cheers, Martijn (Sent from Gmail Mobile)

gdams commented 7 years ago

well in IBM we have used 3 or 4 different macs with no issues but I'll do some more testing on monday

neomatrix369 commented 7 years ago

@karianna Are you using native Docker for Mac or DockerMachine?

...connection refused

sounds like the client isn't able to talk to the daemon - but we will need to debug further.

gdams commented 7 years ago

I'm kind of hoping that someone else can re create this because I am unable to right now

neomatrix369 commented 7 years ago

I don't have a proper Mac environment but I can run it in my Linux environment, we also have some scripts we wrote long ago to help build OpenJDK via Docker - https://github.com/neomatrix369/BuildHelpers/tree/master/openjdk-docker

neomatrix369 commented 7 years ago

I have been able to make some progress:

Adding debian:Visa_eCommerce_Root.pem
Adding debian:WellsSecure_Public_Root_Certificate_Authority.pem
Adding debian:WoSign.pem
Adding debian:WoSign_China.pem
Adding debian:XRamp_Global_CA_Root.pem
Adding debian:certSIGN_ROOT_CA.pem
Adding debian:ePKI_Root_Certification_Authority.pem
Adding debian:thawte_Primary_Root_CA.pem
Adding debian:thawte_Primary_Root_CA_-_G2.pem
Adding debian:thawte_Primary_Root_CA_-_G3.pem
done.
done.
 ---> f6160bbf2379
Removing intermediate container bfa923d5586c
Step 4 : RUN mkdir -p /openjdk/jdk8u
 ---> Running in f29c9a8ed948
 ---> 0c3ed04bb1f3
Removing intermediate container f29c9a8ed948
Step 5 : COPY build.sh /bin/
lstat build.sh: no such file or directory

build.sh is missing from our git repo

gdams commented 7 years ago

I haven't seen that error before, so build.sh is located in https://github.com/AdoptOpenJDK/openjdk-build/blob/master/sbin/build.sh and is copied into the docked root before being executed

gdams commented 7 years ago

It gets copied here: https://github.com/AdoptOpenJDK/openjdk-build/blob/master/makejdk.sh#L159

gdams commented 7 years ago

@karianna is way ahead of that step though when he is getting errors as it is actually executing build.sh

gdams commented 7 years ago

It is also worth noting that docker is a Linux environment so there should be no difference between running this script on mac or Linux

neomatrix369 commented 7 years ago

@gdams Running the makejdk.sh so shouldn#t get the prior error.

gdams commented 7 years ago

Ahh okay, running ./makejdk.sh should work for everyone

neomatrix369 commented 7 years ago

@gdams the script maybe fine, its the docker environment that might differ between the Mac or Linux (although I'm not a Docker internals expert), I'll feedback when my build has finished running, its now building hotspot

gdams commented 7 years ago

The docker environment is identical as it is running an ubuntu 14 machine internally. I'm a mac user myself and haven't had any issues with the script but I'll keep playing with it to see if I can recreate. I will be providing a demo on a hangouts call on Monday at 2:30 so feel free to join

neomatrix369 commented 7 years ago

That's right the docker environment is (in theory) identical, the error "ERRO[3641] error getting events from daemon: EOF" - and later "...connection refused" is possibly caused by docker daemon <==> docker client communication failure, daemon dropped out/restarted possibly.

Its not dependent on this work we are doing but might be a docker bug as @karianna suggested.

If found this - https://github.com/docker/docker/issues/30724, @karianna do you mind checking it and seeing if you can reproduce the issue.

neomatrix369 commented 7 years ago

Build process has gone past jdk and nashorn builds and has successfully built everything now.

Your final tar.gz is here at /openjdk/jdk8u/openjdk/build/linux-x86_64-normal-server-release/images
OpenJDK.tar.gz  alsa-lib-1.0.27.2  cacerts_area  freetype-2.4.0  installedfreetype  openjdk
All done!
neomatrix369 commented 7 years ago

@gdams I'll be there during the hangout, lets have a look at this or any other issues on Monday.

karianna commented 7 years ago

I'll test again when my machine is quiet and get back to you. If it crashes again I might need some help in sending the right diagnostics for a docker bug report :-).

tellison commented 7 years ago

Any progress on this @karianna ?

gdams commented 7 years ago

I have worked out that the failure was almost certainly to do with a lack of ram, I had a very similar failure trying to build on a basic ec2 instance he other night...

karianna commented 7 years ago

Built successfully overnight on a quiet machine. I'm calling this a core Docker bug :-).