Bug 35928 - Server crash on suspend on iBook G4: Null ptr unref in dix/gc.c:250
Summary: Server crash on suspend on iBook G4: Null ptr unref in dix/gc.c:250
Status: RESOLVED INVALID
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-03 07:01 UTC by Cyril Brulebois
Modified: 2018-06-12 18:42 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
X log (176.31 KB, text/plain)
2011-04-03 07:01 UTC, Cyril Brulebois
no flags Details
gdb session (7.17 KB, text/plain)
2011-04-03 07:02 UTC, Cyril Brulebois
no flags Details

Description Cyril Brulebois 2011-04-03 07:01:18 UTC
Created attachment 45182 [details]
X log

HW: iBook G4 (powerpc)
VGA:  ATI Technologies Inc M11 NV [FireGL Mobility T2e] (rev 80) (prog-if 00 [VGA controller])
Server: 1.10.0.901
Driver: ati 6.14.1
Kernel: 2.6.38.2 (as shipped/patched by Debian)

On suspend, the server crashes, due to a null pointer dereference in that code path:
dix/gc.c:248--
	    case GCTile:
		NEXT_PTR(PixmapPtr, pPixmap);
		if ((pPixmap->drawable.depth != pGC->depth) ||
		    (pPixmap->drawable.pScreen != pGC->pScreen))
		{
		    error = BadMatch;
		}
since pPixmap is NULL.

X log and gdb session attached.
Comment 1 Cyril Brulebois 2011-04-03 07:02:06 UTC
Created attachment 45183 [details]
gdb session
Comment 2 Michel Dänzer 2011-04-04 02:46:15 UTC
Does this also happen with EXA?

(Not sure why the radeon driver is defaulting to XAA, did you build it with --disable-exa or something?)
Comment 3 Cyril Brulebois 2011-04-04 05:43:35 UTC
It does also happen with EXA, with the same backtrace.

Interestingly, running "sudo pm-suspend" from a terminal inside X just works. On the other hand, pressing the Power button, which through acpid and /etc/acpi/powerbtn-acpi-support.sh calls pm-suspend (instead of the default shutdown command) triggers this issue.

Now, trying the Power button outside X (from tty1), again as a user and through "sudo pm-suspend" doesn't crash X. I've succeeded multiple times in a row. And doing that again from the X session triggered that crash again.


(No, I didn't build the driver with any specific options besides directory locations; I switched to EXA with:
Section "Device"
	Identifier "MyBuggyRadeon"
	Driver "radeon"
	Option "AccelMethod" "EXA"
EndSection
)
Comment 4 Cyril Brulebois 2011-04-04 06:38:08 UTC
Ah, fun. It actually has little to do with pm-suspend. I commented out the "pm-suspend" call in the acpid shell script which gets run when the button is pressed, and X still crashes.

So I suspected xfce4-power-manager might be trying to display some sort of notification when the Power button gets pressed, and killed that process; and tada! X no longer crashes when pressing that button.

Now I guess I need to look into what it tries to do, and why the server doesn't like it…
Comment 5 Cyril Brulebois 2011-04-04 10:44:20 UTC
OK, so after a bit of tracing, it appears the issue is "xfce4-session-logout". It can be called through dbus from xfce4-power-manager (what I experienced), or it can be called directly (that's a command).

It's supposed to display a dialog asking what to do: Logging out, suspending, shutting down, etc.

I'll update this bug (and its title) once I've got a few more minutes to kill through stepping and restarting my session…
Comment 6 Cyril Brulebois 2011-04-04 11:24:34 UTC
Hmm, so if "prompt on logout" isn't ticked, the default behaviour is to just close the session right away. Closing as not a bug, and sorry for the noise.
Comment 7 Julien Cristau 2011-04-05 03:37:46 UTC
The server shouldn't crash, even on logout...
Comment 8 Adam Jackson 2018-06-12 18:42:55 UTC
Mass closure: This bug has been untouched for more than six years, and is not obviously still valid. Please file a new report if you continue to experience issues with a current server.


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.