Bug 99388

Summary: RHEL 7.3, Matlab 2016a Segmentation fault - glEnable
Product: Mesa Reporter: Asya Dvorkin <advorkin>
Component: Drivers/OSMesaAssignee: mesa-dev
Status: RESOLVED MOVED QA Contact: mesa-dev
Severity: major    
Priority: medium CC: advorkin
Version: 11.2   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Failing code

Description Asya Dvorkin 2017-01-12 19:54:34 UTC
Created attachment 128918 [details]
Failing code

Hello.

Environment:
RHEL 7.3
Matlab 2016a
Osmesa - 11.2.2

It works without any issues on an older version of RHEL (6) and with Matlab 2014a.

I'm attaching the code.

I'm getting segmentation fault right before:

  glEnable(GL_DEPTH_TEST);
  glDisable(GL_LIGHTING);
  glEnable(GL_CULL_FACE);
  glCullFace(GL_BACK);

I have also compiled with mex -g and logs are below.

Thank you for your help,
Asya


>> [label,depth]=WarpMeshColor(P,outImsize(2),outImsize(1),XYZcamera);

MEX FILE: WarpMeshColor.mexa64 entry point located at address 0xb9396089
Add breakpoints at the debugger prompt and issue a "continue" to resume
execution of MATLAB.


Program received signal SIGUSR1, User defined signal 1.
0x00007ffff599f6d5 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
(gdb) continue
Continuing.
output size:
m_width=400
m_height=640
Step 1: setup off-screen binding
Step 2

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd392e700 (LWP 11194)]
0x00007fffb8bdf170 inc () from /lib64/libOSMesa.so.8
(gdb) continue
Continuing.
Attempt to restart MATLAB? [y or n]>>n
------------------------------------------------------------------------
       Segmentation violation detected at Wed Jan  4 12:57:49 2017
------------------------------------------------------------------------

Configuration:
  Crash Decoding      : Disabled
  Crash Mode          : continue (default)
  Current Graphics Driver: Unknown software
  Current Visual      : None
  Default Encoding    : UTF-8
  GNU C Library       : 2.17 stable
  Host Name           : HOST
  MATLAB Architecture : glnxa64
  MATLAB Root         : /usr/local/Matlab/R2016a
  MATLAB Version      : 9.0.0.341360 (R2016a)
  OpenGL              : software
  Operating System    : Linux 3.10.0-514.2.2.el7.x86_64 #1 SMP Wed Dec 7 11:19:34 EST 2016 x86_64
  Processor ID        : x86 Family 6 Model 37 Stepping 1, GenuineIntel
  Window System       : No active display

Fault Count: 1


Abnormal termination:
Segmentation violation

Register State (from fault):
  RAX = ffffffffffffff08  RBX = 0000000000000b71
  RCX = 00007ffff5bab2e0  RDX = 0000000000000001
  RSP = 00007fffd392abc0  RBP = 0000000000000000
  RSI = 0000000000000b71  RDI = 0000000000000000

   R8 = 00007ffff598fa00   R9 = 00007fffcd576f70
  R10 = 00007fffd392a970  R11 = 00007fffb8bdf6f0
  R12 = 0000000000000001  R13 = 00007fffccfbea80
  R14 = 00007fffd392b4f8  R15 = 00007fffd392b4f8

  RIP = 00007fffb8bdf170  EFL = 0000000000010246

   CS = 0033   FS = 0000   GS = 0000

Stack Trace (from fault):
[  0] 0x00007fffb8bdf170                              /lib64/libOSMesa.so.8+00553328
[  1] 0x00007fffb939623d      WarpMeshColor.mexa64+00004669 mexFunction+00000436
[  2] 0x00007fffe0f868b0     /usr/local/Matlab/R2016a/bin/glnxa64/libmex.so+00149680 mexRunMexFile+00000064
[  3] 0x00007fffe0f83214     /usr/local/Matlab/R2016a/bin/glnxa64/libmex.so+00135700
[  4] 0x00007fffe0f83db4     /usr/local/Matlab/R2016a/bin/glnxa64/libmex.so+00138676
[  5] 0x00007fffe1d2d505 /usr/local/Matlab/R2016a/bin/glnxa64/libmwm_dispatcher.so+00746757 _ZN8Mfh_file16dispatch_fh_implEMS_FviPP11mxArray_tagiS2_EiS2_iS2_+00001509
[  6] 0x00007fffe1d2d9a0 /usr/local/Matlab/R2016a/bin/glnxa64/libmwm_dispatcher.so+00747936 _ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2_+00000032
[  7] 0x00007fffded191c9 /usr/local/Matlab/R2016a/bin/glnxa64/libmwm_lxe.so+09232841
[  8] 0x00007fffdee45dbf /usr/local/Matlab/R2016a/bin/glnxa64/libmwm_lxe.so+10464703
[  9] 0x00007fffdee3b8e6 /usr/local/Matlab/R2016a/bin/glnxa64/libmwm_lxe.so+10422502
[ 10] 0x00007fffdee04891 /usr/local/Matlab/R2016a/bin/glnxa64/libmwm_lxe.so+10197137
[ 11] 0x00007fffde8d2b2a /usr/local/Matlab/R2016a/bin/glnxa64/libmwm_lxe.so+04750122
[ 12] 0x00007fffde8d3a4c /usr/local/Matlab/R2016a/bin/glnxa64/libmwm_lxe.so+04753996
[ 13] 0x00007fffde8d1ebc /usr/local/Matlab/R2016a/bin/glnxa64/libmwm_lxe.so+04746940
[ 14] 0x00007fffde8cf9ea /usr/local/Matlab/R2016a/bin/glnxa64/libmwm_lxe.so+04737514
[ 15] 0x00007fffde8cfdb1 /usr/local/Matlab/R2016a/bin/glnxa64/libmwm_lxe.so+04738481
[ 16] 0x00007fffde8d1a63 /usr/local/Matlab/R2016a/bin/glnxa64/libmwm_lxe.so+04745827
[ 17] 0x00007fffde8d1be9 /usr/local/Matlab/R2016a/bin/glnxa64/libmwm_lxe.so+04746217
[ 18] 0x00007fffde98216f /usr/local/Matlab/R2016a/bin/glnxa64/libmwm_lxe.so+05468527
[ 19] 0x00007fffde98522a /usr/local/Matlab/R2016a/bin/glnxa64/libmwm_lxe.so+05481002
[ 20] 0x00007fffdec27543 /usr/local/Matlab/R2016a/bin/glnxa64/libmwm_lxe.so+08242499
[ 21] 0x00007fffdebf007e /usr/local/Matlab/R2016a/bin/glnxa64/libmwm_lxe.so+08015998
[ 22] 0x00007fffdebf4058 /usr/local/Matlab/R2016a/bin/glnxa64/libmwm_lxe.so+08032344
[ 23] 0x00007fffdebf4107 /usr/local/Matlab/R2016a/bin/glnxa64/libmwm_lxe.so+08032519
[ 24] 0x00007fffdec6a32c /usr/local/Matlab/R2016a/bin/glnxa64/libmwm_lxe.so+08516396
[ 25] 0x00007fffdec6a792 /usr/local/Matlab/R2016a/bin/glnxa64/libmwm_lxe.so+08517522
[ 26] 0x00007fffe11c1d7c /usr/local/Matlab/R2016a/bin/glnxa64/libmwbridge.so+00200060
[ 27] 0x00007fffe11c29c5 /usr/local/Matlab/R2016a/bin/glnxa64/libmwbridge.so+00203205 _Z8mnParserv+00000789
[ 28] 0x00007fffe2016c13   /usr/local/Matlab/R2016a/bin/glnxa64/libmwmcr.so+00695315
[ 29] 0x00007ffff777f81c   /usr/local/Matlab/R2016a/bin/glnxa64/libmwmvm.so+02410524 _ZNK5boost9function0IvEclEv+00000028
[ 30] 0x00007fffe2018925   /usr/local/Matlab/R2016a/bin/glnxa64/libmwmcr.so+00702757
[ 31] 0x00007fffe2019839   /usr/local/Matlab/R2016a/bin/glnxa64/libmwmcr.so+00706617 _ZN5boost6detail17task_shared_stateINS_3_bi6bind_tIvPFvRKNS_8functionIFvvEEEENS2_5list1INS2_5valueIS6_EEEEEEvE6do_runEv+00000025
[ 32] 0x00007ffff1f938a0    /usr/local/Matlab/R2016a/bin/glnxa64/libmwms.so+03168416 _ZN5boost6detail22task_base_shared_stateIvE3runEv+00000064
[ 33] 0x00007fffe201a717   /usr/local/Matlab/R2016a/bin/glnxa64/libmwmcr.so+00710423
[ 34] 0x00007fffe201675a   /usr/local/Matlab/R2016a/bin/glnxa64/libmwmcr.so+00694106
[ 35] 0x00007fffe2389c06   /usr/local/Matlab/R2016a/bin/glnxa64/libmwiqm.so+00969734
[ 36] 0x00007fffe2377b4c   /usr/local/Matlab/R2016a/bin/glnxa64/libmwiqm.so+00895820 _ZN5boost6detail8function21function_obj_invoker0ISt8functionIFNS_3anyEvEES4_E6invokeERNS1_15function_bufferE+00000028
[ 37] 0x00007fffe237821f   /usr/local/Matlab/R2016a/bin/glnxa64/libmwiqm.so+00897567 _ZNK5boost9function0INS_3anyEEclEv+00000031
[ 38] 0x00007fffe2377993   /usr/local/Matlab/R2016a/bin/glnxa64/libmwiqm.so+00895379 _ZN3iqm18PackagedTaskPlugin7executeEP15inWorkSpace_tagRN5boost10shared_ptrIN14cmddistributor17IIPCompletedEventEEE+00000163
[ 39] 0x00007fffe202b71d   /usr/local/Matlab/R2016a/bin/glnxa64/libmwmcr.so+00780061
[ 40] 0x00007fffe2359f98   /usr/local/Matlab/R2016a/bin/glnxa64/libmwiqm.so+00774040
[ 41] 0x00007fffe23445af   /usr/local/Matlab/R2016a/bin/glnxa64/libmwiqm.so+00685487
[ 42] 0x00007fffe23417e3   /usr/local/Matlab/R2016a/bin/glnxa64/libmwiqm.so+00673763
[ 43] 0x00007ffff713ca3a /usr/local/Matlab/R2016a/bin/glnxa64/libmwservices.so+03443258
[ 44] 0x00007ffff713b8a7 /usr/local/Matlab/R2016a/bin/glnxa64/libmwservices.so+03438759
[ 45] 0x00007ffff713c10c /usr/local/Matlab/R2016a/bin/glnxa64/libmwservices.so+03440908 _Z25svWS_ProcessPendingEventsiib+00000092
[ 46] 0x00007fffe2016ed2   /usr/local/Matlab/R2016a/bin/glnxa64/libmwmcr.so+00696018
[ 47] 0x00007fffe2017211   /usr/local/Matlab/R2016a/bin/glnxa64/libmwmcr.so+00696849
[ 48] 0x00007fffe2003cfd   /usr/local/Matlab/R2016a/bin/glnxa64/libmwmcr.so+00617725
[ 49] 0x00007ffff599bdc5                             /lib64/libpthread.so.0+00032197
[ 50] 0x00007ffff56ca73d                                   /lib64/libc.so.6+01013565 clone+00000109
[ 51] 0x0000000000000000                                   <unknown-module>+00000000


This error was detected while a MEX-file was running. If the MEX-file
is not an official MathWorks function, please examine its source code
for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.

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 matlab_crash_dump.11189-1 **



MATLAB is exiting because of fatal error
[Thread 0x7fffcb76b700 (LWP 11195) exited]
[Thread 0x7fffd392e700 (LWP 11194) exited]
[Thread 0x7fffd9989700 (LWP 11193) exited]
[Thread 0x7ffff7fb4780 (LWP 11189) exited]

Program terminated with signal SIGKILL, Killed.
The program no longer exists.
Comment 1 Timothy Arceri 2018-08-20 04:55:13 UTC
Is this still and issue with a more recent Mesa build?
Comment 2 GitLab Migration User 2019-09-18 20:12:50 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/882.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.