starting mathematica 9 crashes xserver

Bug #1256561 reported by Darko Veberic
40
This bug affects 7 people
Affects Status Importance Assigned to Milestone
xorg (Debian)
Invalid
Undecided
Unassigned
xorg (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

upon starting mathematica 9.0.1 the x server crashes and a login appears. with ubuntu 13.10 this happens on almost all computers to my disposal, with various video cards/drivers (exception being only one netbook with intel graphics). while on other systems the crash does not leave any trail and the log file does not seem to be closed, on this particular system the Xorg.0.log.old contains the following relevant lines:

[ 78030.098] (EE)
[ 78030.098] (EE) Backtrace:
[ 78030.102] (EE) 0: /usr/bin/X (xorg_backtrace+0x3d) [0x7f195a99a02d]
[ 78030.103] (EE) 1: /usr/bin/X (0x7f195a7f8000+0x1a5d99) [0x7f195a99dd99]
[ 78030.103] (EE) 2: /lib/x86_64-linux-gnu/libpthread.so.0 (0x7f19598f8000+0xfbb0) [0x7f1959907bb0]
[ 78030.103] (EE) 3: /lib/x86_64-linux-gnu/libc.so.6 (0x7f1958512000+0x40f8c) [0x7f1958552f8c]
[ 78030.103] (EE) 4: /usr/lib/x86_64-linux-gnu/xorg/extra-modules/modules/extensions/libglx.so (0x7f19551a8000+0x44b32) [0x7f19551ecb32]
[ 78030.103] (EE) 5: /usr/lib/x86_64-linux-gnu/xorg/extra-modules/modules/extensions/libglx.so (0x7f19551a8000+0x1f677) [0x7f19551c7677]
[ 78030.103] (EE) 6: /usr/bin/X (0x7f195a7f8000+0x5500e) [0x7f195a84d00e]
[ 78030.103] (EE) 7: /usr/bin/X (0x7f195a7f8000+0x4456a) [0x7f195a83c56a]
[ 78030.103] (EE) 8: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xf5) [0x7f1958533de5]
[ 78030.103] (EE) 9: /usr/bin/X (0x7f195a7f8000+0x448af) [0x7f195a83c8af]
[ 78030.103] (EE)
[ 78030.103] (EE) Segmentation fault at address 0x0
[ 78030.104] (EE)
Fatal server error:
[ 78030.104] (EE) Caught signal 11 (Segmentation fault). Server aborting
[ 78030.104] (EE)
[ 78030.104] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[ 78030.104] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 78030.104] (EE)
[ 78030.104] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 78030.105] (II) fglrx(0): Backup framebuffer data.
[ 78030.173] (II) fglrx(0): Backup complete.
[ 78030.618] (EE) Server terminated with error (1). Closing log file.

the crash most probably occurs when mathematica initializes the gl stuff.

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: xserver-xorg 1:7.7+1ubuntu6
ProcVersionSignature: Ubuntu 3.11.0-13.20-generic 3.11.6
Uname: Linux 3.11.0-13-generic x86_64
NonfreeKernelModules: wl fglrx
.tmp.unity.support.test.0:

ApportVersion: 2.12.5-0ubuntu2.1
Architecture: amd64
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CompositorRunning: None
Date: Sat Nov 30 20:56:00 2013
DistUpgraded: Fresh install
DistroCodename: saucy
DistroVariant: ubuntu
DkmsStatus:
 bcmwl, 6.30.223.141+bdcom, 3.11.0-12-generic, x86_64: installed
 bcmwl, 6.30.223.141+bdcom, 3.11.0-13-generic, x86_64: installed
 fglrx-updates, 13.101, 3.11.0-13-generic, x86_64: installed
ExtraDebuggingInterest: I just need to know a workaround
GraphicsCard:
 Advanced Micro Devices, Inc. [AMD/ATI] Seymour [Radeon HD 6400M/7400M Series] [1002:6760] (prog-if 00 [VGA controller])
   Subsystem: Hewlett-Packard Company Radeon HD 6470M [103c:161b]
InstallationDate: Installed on 2013-10-31 (30 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
MachineType: Hewlett-Packard HP ProBook 6560b
MarkForUpload: True
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.11.0-13-generic root=UUID=de3c16e3-d93d-48f5-9c43-fd9bdc9b778e ro
SourcePackage: xorg
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 08/26/2011
dmi.bios.vendor: Hewlett-Packard
dmi.bios.version: 68SCE Ver. F.08
dmi.board.name: 1619
dmi.board.vendor: Hewlett-Packard
dmi.board.version: KBC Version 97.45
dmi.chassis.type: 10
dmi.chassis.vendor: Hewlett-Packard
dmi.modalias: dmi:bvnHewlett-Packard:bvr68SCEVer.F.08:bd08/26/2011:svnHewlett-Packard:pnHPProBook6560b:pvrA0000C02:rvnHewlett-Packard:rn1619:rvrKBCVersion97.45:cvnHewlett-Packard:ct10:cvr:
dmi.product.name: HP ProBook 6560b
dmi.product.version: A0000C02
dmi.sys.vendor: Hewlett-Packard
version.compiz: compiz 1:0.9.10+13.10.20131011-0ubuntu1
version.fglrx-installer: fglrx-installer N/A
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.46-1ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 9.2.1-1ubuntu3
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 9.2.1-1ubuntu3
version.xserver-xorg-core: xserver-xorg-core 2:1.14.3-3ubuntu2
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.7.3-0ubuntu3.1
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.2.0-0ubuntu10
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.904-0ubuntu2
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.9-2ubuntu1
xserver.bootTime: Sat Nov 30 20:50:57 2013
xserver.configfile: default
xserver.errors: open /dev/dri/card0: No such file or directory
xserver.logfile: /var/log/Xorg.0.log
xserver.version: 2:1.14.3-3ubuntu2
xserver.video_driver: fglrx

Revision history for this message
Darko Veberic (darko-veberic-kit) wrote :
Revision history for this message
Darko Veberic (darko-veberic-kit) wrote :

reproducability: always (rendering mathematica notebook gui useless)

Revision history for this message
Darko Veberic (darko-veberic-kit) wrote :

after modifying the mathematica startup scripts it is clear that the crash occurs in the gltest. mathematica uses it to test the capabilities of the GL subsystem. the original command line is

env LD_LIBRARY_PATH=/opt/mathematica-9.0.1/SystemFiles/Libraries/Linux-x86-64 SHLIB_PATH=/opt/mathematica-9.0.1/SystemFiles/Libraries/Linux-x86-64 LIBPATH=/opt/mathematica-9.0.1/SystemFiles/Libraries/Linux-x86-64 /opt/mathematica-9.0.1/SystemFiles/FrontEnd/Binaries/Linux-x86-64/gltest 1 1 1 2 2>/dev/null | grep "GLTest_OK"

ie the crash occurs even before the mathematica frontend is started. after commenting this test out, the frontend starts normally. unfortunately, the xserver crashes when the frontend is exited, so this is not a real workaround.

i modified the test command-line above to

env LD_LIBRARY_PATH=/opt/mathematica-9.0.1/SystemFiles/Libraries/Linux-x86-64 SHLIB_PATH=/opt/mathematica-9.0.1/SystemFiles/Libraries/Linux-x86-64 LIBPATH=/opt/mathematica-9.0.1/SystemFiles/Libraries/Linux-x86-64 strace -o gltest.strace.1 /opt/mathematica-9.0.1/SystemFiles/FrontEnd/Binaries/Linux-x86-64/gltest 1 1 1 2 2>/dev/null | grep "GLTest_OK"

to get the strace output which is in the attachment. the crash occurs right after the exit, but the gltest executable output

XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
      after 28 requests (28 known processed) with 0 events remaining.
GLTest_OK

while having some io errors, reports that the gl test is ok.

Revision history for this message
Darko Veberic (darko-veberic-kit) wrote :

after some more modifications to the mathematica frontend startup script a workaround emerged: comment out the block which runs the "gltest" executable:

# Check for GL and GLU version
#GLTest="env LD_LIBRARY_PATH=${M_LIBRARY_PATH} SHLIB_PATH=${M_LIBRARY_PATH} LIBPATH=${M_LIBRARY_PATH} ${TopDirectory}/SystemFiles/FrontEnd/Binaries/${SystemID}/gltest"
#GLTestResult=`${GLTest} 1 1 1 2 ${userDisplay} 2> /dev/null | grep "GLTest_OK"`
#if [ -z "${GLTestResult}" ]; then
# mesa="-mesa"
#fi

it seems that this executable crashes the xserver upon exit, most probably since the "fatal io error 11" leaves the gl subsystem in a strange state. it is hilarious that the test program can wreck such a havoc...

i have also run this gltest executable with the gdb in batch mode but, except for the exit status, there is no other noise reported. so this is still a libgl bug, where some malformed call leaves it in undefined state.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xorg (Ubuntu):
status: New → Confirmed
Revision history for this message
Darko Veberic (darko-veberic-kit) wrote :

while the workaround solved the immediate crash, mathematica still crashes occasionally on exit. this looks increasingly like a regression in GL libraries.

Revision history for this message
Darko Veberic (darko-veberic-kit) wrote :

removing nvidia-304 and installing nvidia-319 solved the problem also.

Revision history for this message
Darko Veberic (darko-veberic-kit) wrote :

while replacing the nvidia driver seemed to fix the problem, after working with a mathematica notebook for some time, it still crashes the xserver on exit. this time xorg left some trail in the Xorg.0.log.old:

[162589.945] (EE)
[162589.945] (EE) Backtrace:
[162589.945] (EE) 0: /usr/bin/X (xorg_backtrace+0x3d) [0x7f9c6e96602d]
[162589.945] (EE) 1: /usr/bin/X (0x7f9c6e7c4000+0x1a5d99) [0x7f9c6e969d99]
[162589.945] (EE) 2: /lib/x86_64-linux-gnu/libpthread.so.0 (0x7f9c6d8c4000+0xfbb0) [0x7f9c6d8d3bb0]
[162589.945] (EE) 3: /usr/bin/X (dixDestroyPixmap+0x4) [0x7f9c6e814e54]
[162589.945] (EE) 4: /usr/bin/X (0x7f9c6e7c4000+0x76bf2) [0x7f9c6e83abf2]
[162589.945] (EE) 5: /usr/bin/X (FreeClientResources+0x6c) [0x7f9c6e83bc1c]
[162589.945] (EE) 6: /usr/bin/X (CloseDownClient+0x5f) [0x7f9c6e8184df]
[162589.945] (EE) 7: /usr/bin/X (0x7f9c6e7c4000+0x55046) [0x7f9c6e819046]
[162589.945] (EE) 8: /usr/bin/X (0x7f9c6e7c4000+0x4456a) [0x7f9c6e80856a]
[162589.945] (EE) 9: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xf5) [0x7f9c6c4ffde5]
[162589.945] (EE) 10: /usr/bin/X (0x7f9c6e7c4000+0x448af) [0x7f9c6e8088af]
[162589.945] (EE)
[162589.945] (EE) Segmentation fault at address 0x7f9c00000338
[162589.945] (EE)
Fatal server error:
[162589.945] (EE) Caught signal 11 (Segmentation fault). Server aborting
[162589.945] (EE)
[162589.945] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[162589.945] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[162589.945] (EE)
[162590.544] (EE) Server terminated with error (1). Closing log file.

Revision history for this message
Darko Veberic (darko-veberic-kit) wrote :

interesting detail: on certain machines with fglrx launching of the mathematica frontend does not crash x11 immediately, also not upon exit. but, after the frontend has been left opened for several hours, a simple disturbance, like starting firefox, crashes the x11 and lightdm comes up with the login request. what is even more interesting, logging in after such a crash and starting the firefox again (no mathematica frontend around anymore after the crash), this again, repeatedly crashes the x11. logging in and starting firefox crashes x11 again and so long in infinity. the only thing that clears this mess up is rebooting. i have never before encountered such a bug in my life with linux. it seems that mathematica does not break the x11 directly, but somehow corrupts some system library, probably libc or even kernel itself...

Revision history for this message
penalvch (penalvch) wrote :

Darko Veberic, this bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? If so, could you please test for this with the latest development release of Ubuntu? ISO images are available from http://cdimage.ubuntu.com/daily-live/current/ .

If it remains an issue, could you please run the following command in the development release from a Terminal (Applications->Accessories->Terminal), as it will automatically gather and attach updated debug information to this report:

apport-collect -p xorg REPLACE-WITH-BUG-NUMBER

Thank you for your understanding.

Helpful bug reporting tips:
https://wiki.ubuntu.com/ReportingBugs

tags: added: bios-outdated-f.42
Changed in xorg (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
ebutler (ebutler) wrote :

This bug also affects me, but the work-around doesn't let me launch Mathematica _at_all_

Revision history for this message
Darko Veberic (darko-veberic-kit) wrote :

have you tried to launch mathematica from a terminal with the -mesa option?

Revision history for this message
ebutler (ebutler) wrote :

I implemented both your workaround and the "opposite" case, but it's no help -- I don't get any gui at all. But no crash ;)

Revision history for this message
ebutler (ebutler) wrote :
Download full text (4.4 KiB)

In a possible clue, all of my files in SystemFiles/Libraries/Linux and SystemFiles/Libraries/Linux-x86-64 have zero size.

/usr/local/Wolfram/Mathematica/9.0/SystemFiles/Libraries/Linux$ ls -l
total 4-
-rwxr-xr-x 1 root root 0 Jan 31 21:51 libaspell.so.1
-rwxr-xr-x 1 root root 0 Jan 31 21:51 libespeak.so.1
-rwxr-xr-x 1 root root 0 Jan 31 21:51 libfdl.so
-rwxr-xr-x 1 root root 0 Jan 31 21:51 libGLU.so.1
-rw-r--r-- 1 root root 0 Jan 31 21:51 libgmp.so.10
-rwxr-xr-x 1 root root 0 Jan 31 21:51 libHD.so.2.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libimf.so
-rw-r--r-- 1 root root 0 Jan 31 21:51 libintlc.so
-rw-r--r-- 1 root root 0 Jan 31 21:51 libintlc.so.5
-rw-r--r-- 1 root root 0 Jan 31 21:51 libiomp5.so
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippccg9.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippccp8.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippccpx.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippccs8.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippcc.so
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippcc.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippccv8.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippccw7.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippcore.so
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippcore.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippcvg9.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippcvp8.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippcvpx.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippcvs8.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippcv.so
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippcv.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippcvv8.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippcvw7.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippig9.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippip8.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippipx.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippis8.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippi.so
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippi.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippiv8.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippiw7.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippsg9.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippsp8.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippspx.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippss8.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libipps.so
-rw-r--r-- 1 root root 0 Jan 31 21:51 libipps.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippsv8.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libippsw7.so.7.0
-rw-r--r-- 1 root root 0 Jan 31 21:51 libirc.so
-rwxr-xr-x 1 root root 0 Jan 31 21:50 liblept.a
-rwxr-xr-x 1 root root 0 Jan 31 21:51 libMesaGL.so.1
-rwxr-xr-x 1 root root 0 Jan 31 21:51 libMesaGLU.so.1
-rw-r--r-- 1 root root 0 Jan 31 21:51 libmkl_core.so
-rw-r--r-- 1 root root 0 Jan 31 21:51 libmkl_def.so
-rw-r--r-- 1 root root 0 Jan 31 21:51 libmkl_intel.so
-rw-r--r-- 1 root root 0 Jan 31 21:51 libmkl_intel_thread.so
-rw-r--r-- 1 root root 0 Jan 31 21:51 libmkl_p4m3.so
-rw-r...

Read more...

Revision history for this message
ebutler (ebutler) wrote :

It seems that installing the latest beta fglrx driver (amd-catalyst-14.1-betav1.3) from ATI solves this

Revision history for this message
Matthias König (koenigma-qraum) wrote :

Same problem here. Installing beta fglrx driver (14.3-beta) does not solve this either.

Revision history for this message
g3n1uss (g3n1uss-yandex) wrote :

The same in Debian, installing 14.3 beta does not help.

no longer affects: xorg (Debian)
Revision history for this message
g3n1uss (g3n1uss-yandex) wrote :
Revision history for this message
Jhon Gonzalez (jwgonzal2) wrote :

I had the same problem with Mathematica 9.0 on Linux Mint, using "Mathematica -mesa" I have solved the problem

Changed in xorg (Ubuntu):
status: Incomplete → Invalid
Changed in xorg (Debian):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.