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

[native-image] server usage doesn't produce reliable images across builds #1952

Closed
aclement opened this issue Dec 7, 2019 · 4 comments
Closed
Assignees
Labels
bug native-image spring spring related issue
Milestone

Comments

@aclement
Copy link

aclement commented Dec 7, 2019

I have my simplest spring app. If I compile with --no-server I always get the same image and same output. If I try to run with a server, my image changes size across multiple builds and the output from my app changes. Here are two images built in sequence with the server:


Compile with server, first build (69 seconds):

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::

Dec 06, 2019 4:07:41 PM org.springframework.boot.StartupInfoLogger logStarting
INFO: Starting CommandlinerunnerApplication on Andys-MacBook-Pro-2018.local with PID 51764 (/Users/aclement/gits/spring-graal-native/spring-graal-native-samples/commandlinerunner/clr started by aclement in /Users/aclement/gits/spring-graal-native/spring-graal-native-samples/commandlinerunner)
Dec 06, 2019 4:07:41 PM org.springframework.boot.SpringApplication logStartupProfileInfo
INFO: No active profile set, falling back to default profiles: default
Dec 06, 2019 4:07:41 PM org.springframework.boot.StartupInfoLogger logStarted
INFO: Started CommandlinerunnerApplication in 0.041 seconds (JVM running for 0.045)
CLR running!

real    0m0.136s
user    0m0.032s
sys     0m0.022s

Compile with server, second build (48s):

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::

CLR running!

real    0m0.138s
user    0m0.035s
sys     0m0.021s

Notice all the logging is gone in the second image. To recreate:

git clone https://github.com/spring-projects-experimental/spring-graal-native
cd spring-graal-native/spring-graal-native-feature
git checkout upgrade_19_3
mvn clean package
cd ../spring-graal-native-samples/commandlinerunner
Modify compile.sh to remove --no-server then run it.
@aclement
Copy link
Author

aclement commented Dec 7, 2019

Forgot to say, this is mac (pre catalina) with dev build of graal (commit #5a9edeb3ef) on Java 11 base.

@vjovanov vjovanov added the bug label Dec 18, 2019
@eginez eginez added the spring spring related issue label Mar 12, 2020
@eginez eginez added this to To do in Native Image via automation Mar 12, 2020
@eginez eginez removed this from To do in Native Image Mar 17, 2020
@sdeleuze
Copy link
Collaborator

sdeleuze commented Jun 3, 2020

FYI I am not able to build spring-graalvm-native in a reliable way without --no-server using GraalVM 20.1.0 so we are going to use this option by default for now.

@vjovanov vjovanov added this to To do in Native Image via automation Jun 3, 2020
@vjovanov vjovanov added this to the 20.2 milestone Jun 3, 2020
@eginez
Copy link
Contributor

eginez commented Jun 22, 2020

see #2598

@eginez
Copy link
Contributor

eginez commented Jun 30, 2020

close with #2598

@eginez eginez closed this as completed Jun 30, 2020
Native Image automation moved this from To do to Done Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug native-image spring spring related issue
Projects
Native Image
  
Done
Development

No branches or pull requests

5 participants