2018b segmentation fault on macOS Azure DevOps

I'm using 2018b to run a delaunay triangulation script which I have then built using the Compiler SDK and packaged for Java. From this, I then feed in my function arguments, obtain the result and then solve using Google OR-Tools. This workflow works well and on both my Ubuntu 18.04 machine and Mac laptop I encounter no issues.
I'm using an Azure DevOps instance to build my code and I run two jobs: an Ubuntu 16.04 instance and a macOS X Mojave (10.14) instance. Before compiling the code, a script runs which fetches the MATLAB Runtime 9.5 release, installs it and sets the environment variables. Unit tests then run successfully - which test the MATLAB code - and occasionally (1/5 builds) the process fail after the tests have finished - it appears to be when the environment is shutting down.
I have set the MWApplication to start with MWMCROptions NODISPLAY and NOJVM - this has been an attempt to resolve this issue. After using any MATLAB objects I dispose of them and after running the script from the Java library I dispose of the class and terminate the MWApplication. This solution works fine locally on both my machines but ocassionally fails on the build server and causes the macOS job to fail. The script itself has no UI objects within it and only returns the centroids of the calculated triangles, which I can see return fine when the unit tests run.
After the build failing I am presented with the following segmentation fault:
--------------------------------------------------------------------------------
Segmentation violation detected at Wed Jul 31 18:59:14 2019 +0000
--------------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : ISO-8859-1
Deployed : true
Graphics Driver : Unknown software
MATLAB Architecture : maci64
MATLAB Entitlement ID : <redacted>
MATLAB Root : /Users/vsts/agent/2.154.3/work/1/s/libraries/MATLAB/v95
MATLAB Version : 9.5.0.944444 (R2018b)
OpenGL : software
Operating System : Mac OS Version 10.14.6 (Build 18G84)
Process ID : 14437
Processor ID : x86 Family 6 Model 58 Stepping 9, GenuineIntel
Session Key : <redacted>
Window System : None
Fault Count: 1
Abnormal termination
Register State (from fault):
RAX = 00007fe0cb600000 RBX = 0000000000000029
RCX = 00007000056ae5b0 RDX = 00007fff68631282
RSP = 0000000000000002 RBP = 0000000000000002
RSI = 00007fe0d1efc080 RDI = 0000000000000000
R8 = 00007000056ae5e0 R9 = 00007fff68631282
R10 = 0000001800000000 R11 = 00007fe0cb6fc080
R12 = 00007fe000000003 R13 = 00007fe0d1e52f20
R14 = 00007fe0cb417678 R15 = 00007fe0cd975250
RIP = 00007000056ae5d0 RFL = 0000000104c8148b
CS = 00007fe0cb6f7400 FS = 0000000000000000 GS = 00007fe0d1854a80
Stack Trace (from fault):
[ 0] 0x000000010cf8fdd1 bin/maci64/libmwfl.dylib+00007633 _ZN10foundation4core4diag15stacktrace_base7captureERKNS1_14thread_contextEm+00000049
[ 1] 0x000000010cf954b5 bin/maci64/libmwfl.dylib+00029877 _ZN10foundation4core4test17terminate_handledEv+00006181
[ 2] 0x000000010cf939f5 bin/maci64/libmwfl.dylib+00023029 _ZN10foundation4core4diag13terminate_logEPKcPK17__darwin_ucontext+00000149
[ 3] 0x000000012311d67b bin/maci64/libmwmcr.dylib+00632443 _Z19mnPrintErrorMessageRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE+00012635
[ 4] 0x000000012311b207 bin/maci64/libmwmcr.dylib+00623111 _Z19mnPrintErrorMessageRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE+00003303
[ 5] 0x0000000123118d64 bin/maci64/libmwmcr.dylib+00613732 mnFatalSignalHandler+00000148
[ 6] 0x00007fff6866eb5d /usr/lib/system/libsystem_platform.dylib+00019293 _sigtramp+00000029
[ 7] 0x00007000056ae090 <unknown-module>+00000000
[ 8] 0x0000000104c8148b /Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/server/libjvm.dylib+03286155 jni_DeleteGlobalRef+00000053
[ 9] 0x000000010d1d55d3 /Users/vsts/agent/2.154.3/work/1/s/libraries/repo/ortools/libjniortools.jnilib+00435667 _ZN14GlobalRefGuardD2Ev+00000019
[ 10] 0x000000010d1d5785 /Users/vsts/agent/2.154.3/work/1/s/libraries/repo/ortools/libjniortools.jnilib+00436101 _ZNSt3__114__shared_count16__release_sharedEv+00000037
[ 11] 0x000000010d1d573e /Users/vsts/agent/2.154.3/work/1/s/libraries/repo/ortools/libjniortools.jnilib+00436030 _ZNSt3__119__shared_weak_count16__release_sharedEv+00000014
[ 12] 0x000000010d21c1e2 /Users/vsts/agent/2.154.3/work/1/s/libraries/repo/ortools/libjniortools.jnilib+00725474 _ZNSt3__110__function6__funcIZ86Java_com_google_ortools_constraintsolver_mainJNI_RoutingModel_1registerTransitCallbackE4$_95NS_9allocatorIS2_EEFxxxEE18destroy_deallocateEv+00000018
[ 13] 0x000000010e734728 /Users/vsts/agent/2.154.3/work/1/s/libraries/repo/ortools/libortools.dylib+04912936 _ZN19operations_research12RoutingModelD2Ev+00001272
[ 14] 0x000000010d1b5a86 /Users/vsts/agent/2.154.3/work/1/s/libraries/repo/ortools/libjniortools.jnilib+00305798 Java_com_google_ortools_constraintsolver_mainJNI_delete_1RoutingModel+00000022
[ 15] 0x0000000111ab1407 <unknown-module>+00000000
[ 16] 0x0000000111aa0ffd <unknown-module>+00000000
[ 17] 0x0000000111aa0ffd <unknown-module>+00000000
[ 18] 0x0000000111e928cc <unknown-module>+00000000
** This crash report has been saved to disk as /Users/vsts/matlab_crash_dump.14437-1 **
MATLAB is exiting because of fatal error
FAILURE: Build failed with an exception.
What I am slightly unsure about is why there are Google OR-Tool function calls in the stack trace.
Could I please have some assistance resolving this?

댓글 수: 1

Ankriti Sachan
Ankriti Sachan 2021년 4월 22일
편집: Ankriti Sachan 2021년 4월 22일
The crash log contains an unknown-module which could be related to to some third party component/library.framework involved in your workflow.
Please connect with MathWorks Technical Support along with a sample code and reproduction steps to reproduce the crash, for better assistance.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

릴리스

R2018b

질문:

TK
2019년 7월 31일

편집:

2021년 4월 22일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by