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

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

 



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[]){
  if ( SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER) < 0 ) {
    fprintf(stderr, "Unable to init SDL: %s\n", SDL_GetError());
    exit(1);
  }
  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());
    exit(1);
  }
  SDL_WM_GrabInput(SDL_GRAB_ON);
  SDL_ShowCursor(SDL_DISABLE);
  SDL_Delay(1000);
  abort();
  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

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux