You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is some support for mvnd since NB 13 (#3210) and generally works ok for common build tasks.
However, the stop button can cause problems under some circumstances. It terminates the process tree, the JVM may not be in the tree of the mvnd process though (unless it runs for the first time and is not a reused daemon yet). Pressing stop will kill the mvnd process (which is sometimes just the client), but the "build" will continue running in the daemon.
what works:
pressing build, run etc and never pressing stop (let everything exit naturally)
killing the child JVM via shell will also work since it will cause "regular" shutdown
pressing run while having no mvnd daemons active -> stop will work since it kills the whole process tree which still includes the daemon (it seems to detach once idle)
what doesn't work / reproducer:
press build and wait till it finishes (there is now a daemon available)
press run (program runs as child of the daemon, the mvnd client process won't have any children)
press stop (this will kill the mvnd client process only, rest will continue running)
workaround:
run mvnd --stopbefore starting tasks where you expect to press stop, or clean up the processes periodically
Language / Project Type / NetBeans Component
java maven project
How to reproduce
see above
Did this work correctly in an earlier version?
No / Don't know
Operating System
linux
JDK
22.0.2, Temurin
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
No response
Are you willing to submit a pull request?
Yes (likely upstream)
The text was updated successfully, but these errors were encountered:
in principle, this could be fixed via a small change within mvnd and would also align with what the client already does on SIGINT (ctrl+c). (it sends a cancel message to the connected daemon which cancels the build and makes itself available again for other tasks)
adds a JVM shutdown hook which sends the cancel msg on irregular shutdown (SIGTERM)
this requires to build the native image with --install-exit-handlers, since without it, GraalVM would not trigger shutdown hooks on irregular shutdowns
The problem however is that the build is also setting -H:-ParseRuntimeOptions for the purpose of delegating -D params instead of parsing them as args. This seems to mess with the signal chaining and prevents the shutdown hook from running again.
This may or may not be a graalvm bug - needs more investigation
(there are other options how to implement this, e.g the daemon could cancel builds once the client connection is gone - it all depends on the requirements)
Apache NetBeans version
Apache NetBeans 22
What happened
There is some support for mvnd since NB 13 (#3210) and generally works ok for common build tasks.
However, the stop button can cause problems under some circumstances. It terminates the process tree, the JVM may not be in the tree of the mvnd process though (unless it runs for the first time and is not a reused daemon yet). Pressing stop will kill the mvnd process (which is sometimes just the client), but the "build" will continue running in the daemon.
what works:
what doesn't work / reproducer:
workaround:
run
mvnd --stop
before starting tasks where you expect to press stop, or clean up the processes periodicallyLanguage / Project Type / NetBeans Component
java maven project
How to reproduce
see above
Did this work correctly in an earlier version?
No / Don't know
Operating System
linux
JDK
22.0.2, Temurin
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
No response
Are you willing to submit a pull request?
Yes (likely upstream)
The text was updated successfully, but these errors were encountered: