
MWApplication.initialize in java segfaults in Docker container
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am trying to build a Docker container for a Compiler SDK program. I've done this multiple times on R2023ab and R2024a. It fails on R2024b. I have reduced it to the simplest crashable unit:
import com.mathworks.toolbox.javabuilder.*;
public class App {
public static void main(String[] args) {
MWApplication.initialize(MWMCROption.NODISPLAY);
}
}
I compile and run:
javac -cp /usr/local/MATLAB/R2024b/toolbox/javabuilder/jar/javabuilder.jar App.java
java -XX:+CreateCoredumpOnCrash -cp /usr/local/MATLAB/R2024b/toolbox/javabuilder/jar/javabuilder.jar:. App
java: SessionIdUtils.cpp:58: std::shared_future<void> foundation::runtime_registry::sessionid::updateSessionId(const mwboost::uuids::uuid&): Assertion `Internal error: ConfigurationAdmin service is not available' failed.
Aborted (core dumped)
I've looked at the core dump with jstack:
jhsdb jstack --exe /usr/lib/jvm/java-17-openjdk-amd64/bin/java --core core
Attaching to core core from executable /usr/lib/jvm/java-17-openjdk-amd64/bin/java, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 17.0.13+11-Ubuntu-2ubuntu124.04
Deadlock Detection:
No deadlocks found.
"main" #1 prio=5 tid=0x00007ee578018960 nid=0xde6d3 runnable [0x00007ee57d5fe000]
java.lang.Thread.State: RUNNABLE
JavaThread state: _thread_in_native
- com.mathworks.toolbox.javabuilder.internal.MWMCR.mclInitializeApplication(java.lang.String[]) @bci=0 (Interpreted frame)
- com.mathworks.toolbox.javabuilder.internal.MWMCR.access$15900(java.lang.String[]) @bci=1, line=33 (Interpreted frame)
- com.mathworks.toolbox.javabuilder.internal.MWMCR$6.mclInitializeApplication(java.lang.String[]) @bci=105, line=1700 (Interpreted frame)
- jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.lang.reflect.Method, java.lang.Object, java.lang.Object[]) @bci=0 (Interpreted frame)
- jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=133, line=77 (Interpreted frame)
- jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=6, line=43 (Interpreted frame)
- java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) @bci=59, line=569 (Interpreted frame)
- com.mathworks.toolbox.javabuilder.internal.MWMCR$2.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[]) @bci=8, line=795 (Interpreted frame)
- jdk.proxy1.$Proxy0.mclInitializeApplication(java.lang.String[]) @bci=16 (Interpreted frame)
- com.mathworks.toolbox.javabuilder.MWApplication.initialize(com.mathworks.toolbox.javabuilder.MWMCROption[]) @bci=329, line=69 (Interpreted frame)
- App.main(java.lang.String[]) @bci=18, line=5 (Interpreted frame)
And with jmap, which spits out the map of all of the shareable objects with no suggestions that something can't be found. Just running this (or anything that calls my actual Compiler SDK code) on the production system works just fine, but something is missing or improperly linked in my docker container. I've even looked at this with strace to see if I could find OPENAT calls that are failing without any insight. So can someone tell me what the ConfigurationAdmin service is and why it isn't getting started in my container? Conversely, what .so is SessionIdUtils.cpp in?
1 commentaire
Harsh
le 13 Mai 2025
I tried to reproduce this issue on my end (Ubuntu 22.04), but both commands ran successfully without any problems.

I recommend reaching out to MathWorks Technical Support for further assistance. You can use the following link to create a support case:
Thanks!
Réponses (0)
Voir également
Catégories
En savoir plus sur EEG/MEG/ECoG dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!