Segmentation violation on startup, when missing HOME in env on 2020b
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
In my organisation we are switching our tool support from matlab 2016a to 2020b. We are calling matlab through a docker, that is currently in a frozen state.
It seems to loses the HOME environment variable when building within our scons environment. Matlab 2016a is unaffected by this.
However, when launching MATLAB 2020b with the unset HOME environment variable (both within and outside the docker, ie. on centos 7.5(docker) and debian 10 (host os)), the program crashes with a segmentation violation:
--------------------------------------------------------------------------------
Segmentation violation detected at 2020-10-22 11:21:17 +0200
--------------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : UTF-8
Desktop Environment : XFCE
GNU C Library : 2.28 stable
MATLAB Architecture : glnxa64
MATLAB Root : /usr/pack/matlab-r2020b-cgh/x86_64
MATLAB Version : 9.9.0.1467703 (R2020b)
Operating System : Debian GNU/Linux 10 (buster)
Process ID : 7913
Processor ID : x86 Family 6 Model 158 Stepping 13, GenuineIntel
Static TLS mitigation : Enabled: Full
Fault Count: 1
Abnormal termination:
Segmentation violation
Current Thread: 'MCR Main thread' id 140065066649344
Register State (from fault):
RAX = 0000000000000000 RBX = 00007f63708ae160
RCX = 0000000000000000 RDX = 0000000000000000
RSP = 00007f63708ad808 RBP = 00007f63708ae130
RSI = 00007f63787d6336 RDI = 0000000000000000
R8 = 0000000000000001 R9 = 00007f63708adcd0
R10 = fffffffffffff03d R11 = 0000000000000002
R12 = 00007f63708ae140 R13 = 00007f63708ad840
R14 = 0000000000000001 R15 = 0000000000000000
RIP = 00007f637893d181 EFL = 0000000000010283
CS = 0033 FS = 0000 GS = 0000
Stack Trace (from fault):
[ 0] 0x00007f637893d181 /lib/x86_64-linux-gnu/libc.so.6+01425793
[ 1] 0x00007f63787d4797 /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/libmwfoundation_filesystem.so+00112535
[ 2] 0x00007f63787d4de8 /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/libmwfoundation_filesystem.so+00114152 _ZN2fl10filesystem15pathname_traitsIDsE27replace_tilde_with_home_dirERKNSt7__cxx1112basic_stringIDsSt11char_traitsIDsESaIDsEEE+00000056
[ 3] 0x00007f63787c8ff4 /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/libmwfoundation_filesystem.so+00065524 _ZN2fl10filesystem6detail16make_native_formERKNSt7__cxx1112basic_stringIDsSt11char_traitsIDsESaIDsEEEb+00000692
[ 4] 0x00007f6361284a4b /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/spf/framework/agent/spf/framework/../../../../../../../bin/glnxa64/libmwfoundation_paths.so+00006731
[ 5] 0x00007f6361284f36 /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/spf/framework/agent/spf/framework/../../../../../../../bin/glnxa64/libmwfoundation_paths.so+00007990 _ZN10foundation5paths16getMathWorksPathE12LocationHint+00000070
[ 6] 0x00007f63615065e3 /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/spf/framework/agent/spf/framework/../../../../../../../bin/glnxa64/libmwmatlabconnectorfolderlocations.so+00005603 _ZN15matlabconnector15folderlocations15FolderLocationsC2ERKN7mwboost8optionalINSt7__cxx1112basic_stringIDsSt11char_traitsIDsESaIDsEEEEESC_+00000131
[ 7] 0x00007f6361506e28 /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/spf/framework/agent/spf/framework/../../../../../../../bin/glnxa64/libmwmatlabconnectorfolderlocations.so+00007720 _ZN15matlabconnector15folderlocations15FolderLocationsC2Ev+00000040
[ 8] 0x00007f6361861330 /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/spf/framework/agent/spf/framework/libmwagentspfframework.so+00213808
[ 9] 0x00007f636184c009 /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/spf/framework/agent/spf/framework/libmwagentspfframework.so+00126985
[ 10] 0x00007f637488a2d5 /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/libCppMicroServices.so.3.4.0+00656085
[ 11] 0x00007f637488a9d3 /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/libCppMicroServices.so.3.4.0+00657875
[ 12] 0x00007f637488aeca /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/libCppMicroServices.so.3.4.0+00659146
[ 13] 0x00007f6375999468 /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/libmwcppmicroservices.so+00181352 _ZN10foundation16cppmicroservices15installAndStartEN2fl10filesystem10basic_pathIcDsNS2_6detail11path_traitsIcDsEEEE+00000120
[ 14] 0x00007f63618a15d0 /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/matlab_startup_plugins/agent/spf/matlabstartup/../../../../../../bin/glnxa64/libmwagentspfframeworksetup.so+00013776 _ZN5agent3spf14frameworksetup14setupFrameworkESt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS8_ESaIS8_EESC_+00002384
[ 15] 0x00007f63618a1e77 /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/matlab_startup_plugins/agent/spf/matlabstartup/../../../../../../bin/glnxa64/libmwagentspfframeworksetup.so+00015991 _ZN5agent3spf14frameworksetup14setupFrameworkEv+00000103
[ 16] 0x00007f637668eac9 /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/libmwstartup_plugin_initializer.so+00527049
[ 17] 0x00007f63766a7333 /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/libmwstartup_plugin_initializer.so+00627507
[ 18] 0x00007f63766adcd2 /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/libmwstartup_plugin_initializer.so+00654546 _ZN15startup_plugins11initializer10initializeERKNS_14RuntimeOptionsE+00000738
[ 19] 0x00007f6369b6ef66 /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/libmwMVMLocal.so+00565094
[ 20] 0x00007f637971f8e0 /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/libmwmvm.so+03160288 _ZNK7mwboost9function1IvPN3mvm6detail11SessionImplEEclES4_+00000032
[ 21] 0x00007f637971dc54 /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/libmwmvm.so+03152980 _ZN3mvm6detail11SessionImpl4initEv+00000388
[ 22] 0x00007f6369b6d800 /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/libmwMVMLocal.so+00559104
[ 23] 0x00007f637971ce86 /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/libmwmvm.so+03149446
[ 24] 0x00007f6369b751c7 /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/libmwMVMLocal.so+00590279 _ZN7mwboost6detail8function21function_obj_invoker0INS_3_bi6bind_tINS3_11unspecifiedENS_9function1IiRKSt6vectorINSt7__cxx1112basic_stringIDsSt11char_traitsIDsESaIDsEEESaISD_EEEENS3_5list1INS3_5valueISF_EEEEEEiE6invokeERNS1_15function_bufferE+00000039
[ 25] 0x00007f636990194c /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/libmwmcr.so+00878924
[ 26] 0x00007f63699026d7 /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/libmwmcr.so+00882391 _ZN7mwboost6detail11thread_dataINS_8functionIFvvEEEE3runEv+00000039
[ 27] 0x00007f637814b482 /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/libmwboost_thread.so.1.70.0+00062594
[ 28] 0x00007f6378f46fa3 /lib/x86_64-linux-gnu/libpthread.so.0+00032675
[ 29] 0x00007f63788da4cf /lib/x86_64-linux-gnu/libc.so.6+01021135 clone+00000063
** This crash report has been saved to disk as /projectstmp/matlab_crash_dump.7913-1 **
MATLAB is exiting because of fatal error
I would seem, that the stack trace
[ 2] 0x00007f63787d4de8 /usr/pack/matlab-r2020b-cgh/x86_64/bin/glnxa64/libmwfoundation_filesystem.so+00114152 _ZN2fl10filesystem15pathname_traitsIDsE27replace_tilde_with_home_dirERKNSt7__cxx1112basic_stringIDsSt11char_traitsIDsESaIDsEEE+00000056
is at fault, as it tries to do something with HOME, but my question is what is the use for this replacing tilde, as this error does not occur on 2016a?
If the use for this is related to a configured path. e.g. a caching or log directory placement that defaults to HOME, how can this be changed.
0 Commenti
Risposte (1)
David Robinson
il 8 Gen 2024
Modificato: David Robinson
il 8 Gen 2024
MATLAB on Linux requires that it is run in a standard Linux environment. Linux follows the POSIX specification and requires that HOME is set for processes. MATLAB is not guaranteed to run in the expected way if the environment is modified in such a way that the system is no longer POSIX compliant.
It should be possible to set the HOME in the line running the MATLAB Command using:
env HOME=/path/to/folder matlab ....
or else modify the environment such that HOME is defined and points to an existing folder.
If the above workarounds do not work for you, please open a technical support request and we can see if we can find a solution better tailored to your use case (see https://www.mathworks.com/help/matlab/matlab_env/contact-technical-support.html).
0 Commenti
Vedere anche
Categorie
Scopri di più su Startup and Shutdown in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!