Xorg crashed with SIGSEGV in __GI___libc_malloc()

Bug #971767 reported by José Alburquerque
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xorg-server (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Happens when the display manager starts.

nvidia-current, 295.33, 3.2.0-20-generic, x86_64: installed
nvidia-current, 295.33, 3.2.0-21-generic, x86_64: installed

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: xserver-xorg-core 2:1.11.4-0ubuntu8
ProcVersionSignature: Ubuntu 3.2.0-21.34-generic 3.2.13
Uname: Linux 3.2.0-21-generic x86_64
NonfreeKernelModules: nvidia
.proc.driver.nvidia.gpus.0: Error: [Errno 21] Is a directory: '/proc/driver/nvidia/gpus/0'
.proc.driver.nvidia.registry: Binary: ""
ApportVersion: 2.0-0ubuntu2
Architecture: amd64
CompizPlugins: [core,bailer,detection,composite,opengl,decor,imgpng,compiztoolbox,regex,snap,gnomecompat,vpswitch,move,grid,mousepoll,resize,place,unitymtgrabhandles,animation,expo,workarounds,session,wall,ezoom,fade,scale,unityshell]
CompositorRunning: None
CrashCounter: 1
Date: Mon Apr 2 11:45:22 2012
DistUpgraded: 2012-03-27 16:29:17,015 ERROR got an error from dpkg for pkg: '/var/cache/apt/archives/libsqlite3-0_3.7.9-2ubuntu1_i386.deb': 'cannot access archive: No such file or directory'
DistroCodename: precise
DistroVariant: ubuntu
ExecutablePath: /usr/bin/Xorg
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
MachineType: Gigabyte Technology Co., Ltd. M68M-S2P
ProcCmdline: /usr/bin/Xorg :0 -background none -verbose -auth /var/run/gdm/auth-for-gdm-yiH7IM/database vt7
ProcEnviron:
 LANG=en_US.UTF-8
 TERM=linux
 PATH=(custom, no user)
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-21-generic root=UUID=9fb22c9c-b286-42ea-b73c-9d9b32b3346e ro quiet splash vt.handoff=7
SegvReason: reading unknown VMA
Signal: 11
SourcePackage: nvidia-graphics-drivers
Title: Xorg crashed with SIGSEGV in __GI___libc_malloc()
UnitySupportTest: Error: command ['/usr/lib/nux/unity_support_test', '-p', '-f'] failed with exit code -11:
UpgradeStatus: Upgraded to precise on 2012-03-27 (5 days ago)
UserGroups:

dmi.bios.date: 11/18/2009
dmi.bios.vendor: Award Software International, Inc.
dmi.bios.version: F1
dmi.board.name: M68M-S2P
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.modalias: dmi:bvnAwardSoftwareInternational,Inc.:bvrF1:bd11/18/2009:svnGigabyteTechnologyCo.,Ltd.:pnM68M-S2P:pvr:rvnGigabyteTechnologyCo.,Ltd.:rnM68M-S2P:rvrx.x:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvr:
dmi.product.name: M68M-S2P
dmi.sys.vendor: Gigabyte Technology Co., Ltd.
version.compiz: compiz 1:0.9.7.2-0ubuntu4
version.ia32-libs: ia32-libs 20090808ubuntu35
version.libdrm2: libdrm2 2.4.32-1ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 8.0.2-0ubuntu3
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 8.0.2-0ubuntu3
version.nvidia-graphics-drivers: nvidia-graphics-drivers N/A
version.xserver-xorg-core: xserver-xorg-core 2:1.11.4-0ubuntu8
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.7.0-0ubuntu1
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.99~git20111219.aacbd629-0ubuntu2
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.17.0-1ubuntu4
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20111201+b5534a1-1build2

Revision history for this message
José Alburquerque (jaalburquerque) wrote :
Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : StacktraceTop.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in nvidia-graphics-drivers (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
Bryce Harrington (bryce)
description: updated
Revision history for this message
Bryce Harrington (bryce) wrote :

This one appears to be failing in this chunk of code:

static Bool
CreateCallbackList(CallbackListPtr *pcbl)
{
    ...
    if (!pcbl) return FALSE;
    cbl = malloc(sizeof(CallbackListRec)); /* CRASH */
    if (!cbl) return FALSE;
    ...

The error is:

#8 0x00007fcb64f9ba2e in __GI___libc_malloc (bytes=24) at malloc.c:2921
        ar_ptr = <error reading variable ar_ptr (Asked for position 0 of stack, stack only has 0 elements on it.)>

So, X is passing in a perfectly legitimate memory allocation request of 24 bytes, and malloc chokes on an empty stack. Very odd. Wonder if this is something deeper down than X?

visibility: private → public
affects: nvidia-graphics-drivers (Ubuntu) → xorg-server (Ubuntu)
Changed in xorg-server (Ubuntu):
importance: Medium → High
status: New → Triaged
Revision history for this message
José Alburquerque (jaalburquerque) wrote :

I'm truly sorry about this bug report. I had upgrade to precise a few days ago, but the upgrade process crashed because I mistakenly tried to cleanup the system /var partition because it was running out of disk space. I had to run 'apt-get dist-upgrade -f' to get the install to finish, but aperently there were problems still remaining. I just reinstalled the libc6 packages and X now starts fine.

Revision history for this message
Bryce Harrington (bryce) wrote :

<slangasek> I think you have heap corruption, and valgrind's the best tool for finding that

@José, does this occur every time the display manager starts? Would you be willing to try running X in valgrind to help isolate the memory failure?

Revision history for this message
José Alburquerque (jaalburquerque) wrote :

I just re-installed all the libc6 packages and the bug is gone. As I said, I think what happened to my system during the upgrade process might have caused this. When I saw your comment about the bug being deeper than X I decided to re-install the libc6 packages and the bug is now gone. I'm sorry about the confusion. I think this bug can be closed.

Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks for following up.

We do seem to have some problems in the X stack; this is far from the only one of these libc/malloc bug reports we've gotten. But I'm glad to hear that at least in this case it's gone for you.

Changed in xorg-server (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.