Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hive docker container crash for integration test on M1 #835

Closed
kevinjqliu opened this issue Jun 19, 2024 · 8 comments · Fixed by #877
Closed

hive docker container crash for integration test on M1 #835

kevinjqliu opened this issue Jun 19, 2024 · 8 comments · Fixed by #877
Labels
bug Something isn't working

Comments

@kevinjqliu
Copy link
Contributor

Apache Iceberg version

None

Please describe the bug 🐞

While running integration tests on M1 mac, the hive container will crash randomly with a JVM error message.
Sometimes, restarting the container works.

Stacktrace

2024-06-18 22:58:18 /entrypoint.sh: line 26:     8 Aborted                 $HIVE_HOME/bin/schematool -dbType $DB_DRIVER -initSchema
2024-06-18 22:58:18 + '[' 134 -eq 0 ']'
2024-06-18 22:58:18 + echo 'Schema initialization failed!'
2024-06-18 22:58:18 + exit 1
2024-06-18 22:58:18 #
2024-06-18 22:58:18 # A fatal error has been detected by the Java Runtime Environment:
2024-06-18 22:58:18 #
2024-06-18 22:58:18 #  SIGBUS (0x7) at pc=0x00007ffffecc383f, pid=8, tid=0x00007ffffe26a700
2024-06-18 22:58:18 #
2024-06-18 22:58:18 # JRE version: OpenJDK Runtime Environment (8.0_342-b07) (build 1.8.0_342-b07)
2024-06-18 22:58:18 # Java VM: OpenJDK 64-Bit Server VM (25.342-b07 mixed mode linux-amd64 compressed oops)
2024-06-18 22:58:18 # Problematic frame:
2024-06-18 22:58:18 # V  [libjvm.so+0x91483f]  ObjectMonitor::enter(Thread*)+0x3f
2024-06-18 22:58:18 #
2024-06-18 22:58:18 # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
2024-06-18 22:58:18 #
2024-06-18 22:58:18 # An error report file with more information is saved as:
2024-06-18 22:58:18 # /opt/hive/hs_err_pid8.log
2024-06-18 22:58:18 #
2024-06-18 22:58:18 # If you would like to submit a bug report, please visit:
2024-06-18 22:58:18 #   http://bugreport.java.com/bugreport/crash.jsp
2024-06-18 22:58:18 #
2024-06-18 22:58:18 Schema initialization failed!

Possibly related:

@Fokko
Copy link
Contributor

Fokko commented Jun 19, 2024

@kevinjqliu thanks for reporting. This surprises me since I'm also on a M1. Do you know which Docker version you're using?

@kevinjqliu
Copy link
Contributor Author

➜  ~ docker --version
Docker version 26.1.4, build 5650f9b

Not sure if its my env / setup.

I've tried resetting docker a couple times

docker system prune --all --volumes

Its still intermittent for me

@kevinjqliu
Copy link
Contributor Author

Just to be sure, are you getting this warning?

 ! hive The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested 0.0s 

Screenshot 2024-06-18 at 11 16 48 PM

@kevinjqliu kevinjqliu added the bug Something isn't working label Jun 19, 2024
@ndrluis
Copy link
Collaborator

ndrluis commented Jun 19, 2024

A few weeks ago I received this error. Then I ran export DOCKER_DEFAULT_PLATFORM=linux/amd64 before executing the tests and it fixed the issue.

@kevinjqliu
Copy link
Contributor Author

@ndrluis are you using M1 Mac by chance? I tried DOCKER_DEFAULT_PLATFORM=linux/amd64 and ran into the same issue

@ndrluis
Copy link
Collaborator

ndrluis commented Jun 20, 2024

@kevinjqliu Yes, I'm using an M1 Mac. 🤔 Do you have the "Use Rosetta for x86_64/amd64 emulation on Apple Silicon" option activated?

@kevinjqliu
Copy link
Contributor Author

Looks like I do, I'll disable and give it a try. Thanks for the hint!
Screenshot 2024-06-20 at 9 22 26 AM

@Fokko Fokko mentioned this issue Jul 1, 2024
@kevinjqliu
Copy link
Contributor Author

Disabling Use Rosetta for x86_64/amd64 emulation on Apple Silicon helped prevent the container from crashing.
but connections to the container often time out.

@Fokko observes similar issues.

I was able to verify that #877 helps, the hive container no longer runs on emulation
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants