I have a Java application that is using a JAR package compiled in MATLAB. I am deploying this application onto an Amazon AMI instance and this causes the following crash:
Configuration:
Crash Decoding : Disabled – No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : US-ASCII
GNU C Library : 2.17 stable
Host Name : ip-10-247-70-115
MATLAB Architecture : glnxa64
MATLAB Root : /usr/local/MATLAB/MATLAB_Runtime/v93
MATLAB Version : 9.3.0.713579 (R2017b)
Operating System : Linux 4.9.77-31.58.amzn1.x86_64 #1 SMP Thu Jan 18 22:15:23 UTC 2018 x86_64
Processor ID : x86 Family 6 Model 45 Stepping 7, GenuineIntel
Fault Count: 1
Abnormal termination:
std::terminate()
Register State (captured):
RAX = 000001f8a674debc RBX = 00007f1a656112c8
RCX = 0000000000000000 RDX = 00007f1a65602360
RSP = 00007f1a13ade080 RBP = 00007f1a13ade440
RSI = 00007f1a653c47d7 RDI = 00007f1a13ade090
R8 = 00007f1a13adecb0 R9 = 00007f1a6929e9d0
R10 = 00007f1a6920a67a R11 = fbe7689c00000000
R12 = 00007f1a65621358 R13 = 00007f1a13ade830
R14 = 0000000000000002 R15 = 00007f1a13adf150
RIP = 00007f1a65338afe EFL = 0000000000000006
CS = 0014 FS = 0000 GS = 0005
Stack Trace (captured):
[ 0] 0x00007f1a65332f33 bin/glnxa64/libmwfl.so+00884531
[ 1] 0x00007f1a65332f8c bin/glnxa64/libmwfl.so+00884620 _ZN10foundation4core4diag15stacktrace_base7captureEm+00000028
[ 2] 0x00007f1a65335562 bin/glnxa64/libmwfl.so+00894306
[ 3] 0x00007f1a2c4abf1a bin/glnxa64/libmwmcr.so+00806682
[ 4] 0x00007f1a2c4adc88 bin/glnxa64/libmwmcr.so+00814216
[ 5] 0x00007f1a2c4ade6a bin/glnxa64/libmwmcr.so+00814698
[ 6] 0x00007f1a2c4ae3cc bin/glnxa64/libmwmcr.so+00816076
[ 7] 0x00007f1a2c4aef57 bin/glnxa64/libmwmcr.so+00819031
[ 8] 0x00007f1a67e98f16 /usr/lib64/libstdc++.so.6+00589590
[ 9] 0x00007f1a67e98f61 /usr/lib64/libstdc++.so.6+00589665
[ 10] 0x00007f1a67e991a4 /usr/lib64/libstdc++.so.6+00590244
[ 11] 0x00007f1a305e6bf3 bin/glnxa64/libmwservices.so+01887219 _ZNK5boost16exception_detail10clone_implINS0_39current_exception_std_exception_wrapperISt13runtime_errorEEE7rethrowEv+00000195
[ 12] 0x00007f1a305ebaaa bin/glnxa64/libmwservices.so+01907370 _ZN5boost6detail17shared_state_base13wait_internalERNS_11unique_lockINS_5mutexEEEb+00000538
[ 13] 0x00007f1a2f73f321 bin/glnxa64/libmwmclmcr.so+01737505 _ZN5boost13unique_futureINS_10shared_ptrIN3mvm3MVMEEEE3getEv+00000113
[ 14] 0x00007f1a2f73de22 bin/glnxa64/libmwmclmcr.so+01732130
[ 15] 0x00007f1a2f71b85f bin/glnxa64/libmwmclmcr.so+01591391
[ 16] 0x00007f1a2f7d611b bin/glnxa64/libmwmclmcr.so+02355483
[ 17] 0x00007f1a2f7d6747 bin/glnxa64/libmwmclmcr.so+02357063 _Z30mclInitializeComponentInstanceRKN5boost8functionIFiPKcEEES6_NS_9function0INS_10shared_ptrI21mclExtractedComponentEEEE+00000999
[ 18] 0x00007f1a31241670 bin/glnxa64/libnativemcl.so+01484400 Java_com_mathworks_toolbox_javabuilder_internal_MWMCR_mclInitializeComponentInstance+00002208
[ 19] 0x00007f1a510152f4 <unknown-module>+00000000
[ 20] 0x00007f1a51007d80 <unknown-module>+00000000
[ 21] 0x00007f1a51007d80 <unknown-module>+00000000
[ 22] 0x00007f1a510004e7 <unknown-module>+00000000
[ 23] 0x00007f1a687ff39a /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.36.amzn1.x86_64/jre/lib/amd64/server/libjvm.so+06755226
[ 24] 0x00007f1a68abdf30 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.36.amzn1.x86_64/jre/lib/amd64/server/libjvm.so+09633584
[ 25] 0x00007f1a68abe8d3 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.36.amzn1.x86_64/jre/lib/amd64/server/libjvm.so+09636051
[ 26] 0x00007f1a6884d5a3 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.36.amzn1.x86_64/jre/lib/amd64/server/libjvm.so+07075235 JVM_InvokeMethod+00000403
[ 27] 0x00007f1a5164fd6d <unknown-module>+00000000
[ 28] 0x00007f1a51653fbb <unknown-module>+00000000
If this problem is reproducible, please submit a Service Request via:
http://www.mathworks.com/support/contact_us/
A technical support engineer might contact you with further information.
Thank you for your help.** This crash report has been saved to disk as /tmp/matlab_crash_dump.12954-1
MATLAB is exiting because of fatal error
In order to narrow down the issue further, I tried to make a simple example from the documentation working. I only face this issue when I am using the JAR package created for my application. I am developing a website application and would like it to be hosted on AWS. I am also able to run my application on an Ubuntu EC2 instance but not on an AMI instance(Elastic Bean Stalk). Also, note that I am compiling the Java driver code into another executable JAR package using a Springboot application. I also made sure that proper class paths are added for the MCR location.
Here is my AWS AMI Linux instance configuration:
Amazon Linux AMI 2017.09.1 (HVM), SSD Volume Type – ami-d874e0a0
The Amazon Linux AMI is an EBS-backed, AWS-supported image. The default image includes AWS command line tools, Python, Ruby, Perl, and Java. The repositories include Docker, PHP, MySQL, PostgreSQL, and other packages.
Best Answer