#12543 BLOC 13.1.0: stopping X from inside X breaks the display

Zarro Boogs per Child bugtracker at laptop.org
Wed Apr 10 18:57:12 EDT 2013


#12543: stopping X from inside X breaks the display
---------------------------------------+------------------------------------
           Reporter:  dsd              |       Owner:  jnettlet     
               Type:  defect           |      Status:  new          
           Priority:  blocker          |   Milestone:  13.1.0       
          Component:  x window system  |     Version:  not specified
         Resolution:                   |    Keywords:               
        Next_action:  never set        |    Verified:  0            
Deployment_affected:                   |   Blockedby:               
           Blocking:                   |  
---------------------------------------+------------------------------------

Comment(by dsd):

 Trying to get a better handle on this. Exploring the possibility that
 there is some code somewhere that makes the return-to-VT-mode change
 successful when chvt happens, which does not happen on X shutdown:

 * Crippling pxa168fb_set_par does not cripple chvt.
 * Coudn't find anything relevant in galcore to cripple - but I didn't hunt
 very hard.
 * Crippling mrvl_scn_leavevt in the dove driver also does not cripple
 chvt.

 So I was unable to find such code.

 This might suggest that since we don't actually change video mode between
 X and VT, no special code is needed. However, if I "killall -9 X", the
 video does hang, which would suggest otherwise - something different is
 happening in the chvt path.

 Looking at the chvt case step-by-step there seem to be 3 important things
 that happen at different points:
  1. The screen goes black
  2. The cursor appears
  3. The console text appears

 Looking in detail at number 2, this happens on the chvt case because the
 VT_RELDISP ioctl calls complete_change_console which calls
 do_unblank_screen and from there we go into the core of the screen mode
 setting for console and cursor drawing.

 Why doesn't that happen on shutdown?

 On shutdown we would expect do_unblank_screen() to be called when
 KDSETMODE(text) is sent from the X server. But X isn't sending that.

 This is probably because X always seems to exit with SIGTERM
 {{{
 #0  0xb6b45e54 in writev () from /lib/libc.so.6
 #1  0x0007989c in _XSERVTransWritev (ciptr=ciptr at entry=0x4fe278,
     buf=buf at entry=0xbe881418, size=<optimized out>)
     at /usr/include/X11/Xtrans/Xtrans.c:884
 #2  0x0006e9b0 in FlushClient (who=0x1cb000, who at entry=0x4e6738, oc=0x0,
     oc at entry=0x4c76f0, __extraBuf=0x0, extraCount=0) at io.c:892
 #3  0x0006f214 in FlushAllOutput () at io.c:638
 #4  0x000389c8 in Dispatch () at dispatch.c:450
 #5  0x000282e8 in main (
     argc=<error reading variable: Cannot access memory at address
 0xbe8814f0>,
     argv=<error reading variable: can't compute CFA for this frame>,
     envp=<optimized out>) at main.c:298
 }}}
 and that doesn't seem right.

-- 
Ticket URL: <http://dev.laptop.org/ticket/12543#comment:5>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list