[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: F11: xorg decision to disable Ctrl-Alt-Backspace

On Tue, 2009-03-31 at 10:16 -0400, Adam Jackson wrote: 
> So let's list the cases that zap would actually recover from:
> 1: stuck grabs
> 2: focus reverts to None and your window manager is dead
> 3: X driver that's decided to stop rendering (or stop rendering
> correctly)
> In case 3, you need to blow away the session and there's no getting
> around it.  So VT switch and killall gnome-session will do just fine.
> For case 2, I seem to recall this being an unpleasant requirement of the
> X protocol somewhere along the line; but I'm looking into it.
> For case 1, you might be able to recover if you could just figure out
> which client was being obstreperous.  So clearly the right thing is to
> dump active grab state to the X log on VT switch.  If there's anything
> there, then you know who to blame and you can pkill just that and
> recover.  If there's not, then the session is doomed.
> Something like this perhaps:
> http://ajax.fedorapeople.org/patches/xserver-grab-debugging.patch
> I mean, I know it's bad form to post code to a development list, but I
> hope I can be forgiven this time.

You are honestly expecting Aunt Tillie to log in to a console and grovel
through log files?

Here, how about a real life test case:

#include <stdlib.h>
#include <SDL/SDL.h>

int main(int argc, char *argv[]){
    fprintf(stderr, "Unable to init SDL: %s\n", SDL_GetError());
  SDL_Surface *screen;
  screen = SDL_SetVideoMode(640, 480, 32, SDL_SWSURFACE|SDL_FULLSCREEN);
  if ( screen == NULL ) {
    fprintf(stderr, "Unable to set 640x480 video: %s\n", SDL_GetError());
  return 0;

Compile with 'gcc -O2 -Wall -lSDL sdlcrash.c -o sdlcrash'.

Little Billy's game of Quake 3 crashes. How does he recover? What does
Aunt Tille tell him if he asks for help? (This seems to have gotten
better at some point, apparently the GNOME menu learned to stay in the
visible part of the goddamn screen...)

Now how about Seg, the guy who debugs Little Billy's game. Take out the
'SDL_FULLSCREEN' flag from sdlcrash, recompile and run it under gdb.
Wait for the crash... kablooey! I run in to this situation all the
goddamn time trying to debug Second Life. It grabs the mouse when you
click to move the camera, which is what you're doing most of the time.
If it crashes then you're screwed.

Is there some way to recover other than killing off the process, which
screws any chance of debugging it because it's no longer running? Remote
debugging isn't always particularly convenient.

Attachment: signature.asc
Description: This is a digitally signed message part

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]