-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Native application gets Killed: 9 on macOS Big Sur with binutils on the path #13856
Comments
@rsvoboda unfortunately no. Did you check oracle/graal#2984? Can you please give 21.0.0-dev a try https://github.com/graalvm/graalvm-ce-dev-builds/releases/ and open an issue in https://github.com/oracle/graal/ if the issue persists? |
hm, so I am able to compile helloworld from https://www.graalvm.org/docs/getting-started/#native-images using both
But using with getting-started based on Quarkus master ends up with Killed: 9 even with the 21.0.0-dev. Just for the record, I had to |
My current workaround is to use container based build of native binaries. I will try to keep an eye on https://github.com/oracle/graal/issues from time to time. |
@rsvoboda I don't have the issue (just tried to build and run the getting started guide). For me, everything works. |
What version of GraalVM are you using? How did you install it - sdkman / direct download ... ? |
@rsvoboda I use jabba - so |
This is really strange, I tried jabba way and getting the same
Edit: dtruss doesn't seem to be the right tool, it fails with curl too I checked Which version of BigSur are you on? |
I finally cracked the root cause of my problems. It's iTerm2 terminal in combination with Big Sur :/ I tried system Terminal and everything went well. The difference is that in case of iTerm2 "allow incoming connections" dialog doesn't appear and application get immediately killed. I tried iTerm2-3_4_4beta2.zip released yesterday and it has the same behavior. So my workaround us to deal with native binaries in system Terminal application. |
I have filed issue in iterm2 issue tracker Closing this issue as root cause was identified and workaround (use Terminal application) exists. |
That dialog is quite a 🤬 . Do you know why it appears? I wonder if it's something that only happens in corporate apple machines. Good catch btw! I've not yet upgraded to Big Sur. Was planning to do it later this month but might hold off a bit longer. |
That dialog is related to firewall and on corporate machine I can't do much with firewall settings. @cescoffier said he was using iTerm2 too, but he doesn't have the same troubles as I have. I will keep digging, but at least I have workaround ;) |
So I did more digging because Clement didn't see the same problem I had, iTerm2 is configured to source my I started with bisection of my
I installed binutils to be able to get debug symbols for native (objcopy command). @galderz I tried to remove binutils ++ install it again, did |
That's interesting. @rsvoboda is this also triggered when compiling a HelloWorld? Do you need to add I think we should report it to oracle/graal if it's not Quarkus/Mandrel specific. |
Hello World from https://www.graalvm.org/docs/getting-started/#native-images worked fine even when I had binutils, see #13856 (comment) No need to add |
Oops, sorry for not seeing this. OK so the issue is triggered when Quarkus uses quarkus/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java Line 299 in a4f84e0
Can you try stripping a C/C++ helloworld with |
After running
|
OK, so it looks like an |
So should be execution of System.getProperty("os.name") and System.getProperty("os.version") give |
That would be an option. In that case we should inform users (through an error message?) that |
@zakkak didn't the docu already explained the platforms on which debug symbols are available? I'm unsure about informing them via a message, but I would certainly avoid using |
We currently explicitly mention installing objcopy on macOS (it was working before BigSur AFAIK) So IMO we should change the documentation to reflect that native builds on macOS (without using the builder image) do not support debug symbols generation. In addition to that, I think printing a warning message in case someone tries to generate debug symbols on windows or macOS would improve the user/developer experience and save us some questions/issues :) |
I am on macOS Big Sur 11.2.3 and the native compiled app got also killed during startup, both under iTerm and Terminal. Removing the objcopy steps as mentioned. Gives for me a working application startup. So I am not using binutils / objcopy any more. native-image --version |
Just want you guys to know that this is still an issue and the guide is still pointing macOS users to install objcopy.
Is there anything that I'm missing? |
@patped Looks like some parts of this might have fallen through the cracks. What's exactly still an issue? Is the binary still getting killed? Or the fact that documentation is misleading? Or both? Even though the issue was closed and from what I can see from the commits associated with this, I don't see the |
Yes, the binary is still getting killed if I have
I'm not sure if mvn io.quarkus.platform:quarkus-maven-plugin:2.2.2.Final:create \
-DprojectGroupId=org.acme \
-DprojectArtifactId=getting-started \
-DclassName="org.acme.getting.started.GreetingResource" \
-Dpath="/hello" |
@patped I'm looking into it :) |
* `objcopy` invocations in macOS make the executable crash on startup. * Debug info is only available for Linux, so avoid `objcopy` altogether on macOS, even if present in PATH. * Updated documentation to avoid confusion.
* `objcopy` invocations in macOS make the executable crash on startup. * Debug info is only available for Linux, so avoid `objcopy` altogether on macOS, even if present in PATH. * Updated documentation to avoid confusion. * Adjusted warning messages about `objcopy`.
* `objcopy` invocations in macOS make the executable crash on startup. * Debug info is only available for Linux, so avoid `objcopy` altogether on macOS, even if present in PATH. * Updated documentation to avoid confusion. * Adjusted warning messages about `objcopy`.
* `objcopy` invocations in macOS make the executable crash on startup. * Debug info is only available for Linux, so avoid `objcopy` altogether on macOS, even if present in PATH. * Updated documentation to avoid confusion. * Adjusted warning messages about `objcopy`. (cherry picked from commit 7c12f02)
* `objcopy` invocations in macOS make the executable crash on startup. * Debug info is only available for Linux, so avoid `objcopy` altogether on macOS, even if present in PATH. * Updated documentation to avoid confusion. * Adjusted warning messages about `objcopy`. (cherry picked from commit 7c12f02)
Wow! Thanks for the quick responses and action! 🥇 I almost feel terrible now, responding so late. 😅 👏 |
* `objcopy` invocations in macOS make the executable crash on startup. * Debug info is only available for Linux, so avoid `objcopy` altogether on macOS, even if present in PATH. * Updated documentation to avoid confusion. * Adjusted warning messages about `objcopy`. (cherry picked from commit 7c12f02)
* `objcopy` invocations in macOS make the executable crash on startup. * Debug info is only available for Linux, so avoid `objcopy` altogether on macOS, even if present in PATH. * Updated documentation to avoid confusion. * Adjusted warning messages about `objcopy`. (cherry picked from commit 7c12f02)
I have a simple project created by maven extension as described in https://quarkus.io/guides/getting-started#bootstrapping-the-project. Running
mvn clean verify -Dnative
ends withFailed to start native image, process has exited
on macOS Big Sur.EDIT: the main problem is in
binutils
, see #13856 (comment)I didn't have this problem on the previous macOS version 10.15 Catalina. I noticed this issue only on macOS Big Sur.
Using GraalVM 20.3.0
Running just the native binary gives
Killed: 9
I tried to remove some metadata from the generated native binary, but that didn't help
Native image build went well:
The text was updated successfully, but these errors were encountered: