#11994 BLOC 12.1.0: runin-gtk crashes with segmentation fault

Zarro Boogs per Child bugtracker at laptop.org
Thu Jul 12 14:02:31 EDT 2012


#11994: runin-gtk crashes with segmentation fault
---------------------------------------------+------------------------------
           Reporter:  greenfeld              |       Owner:  Quozl                            
               Type:  defect                 |      Status:  new                              
           Priority:  blocker                |   Milestone:  12.1.0                           
          Component:  manufacturing process  |     Version:  Development build as of this date
         Resolution:                         |    Keywords:                                   
        Next_action:  diagnose               |    Verified:  0                                
Deployment_affected:                         |   Blockedby:                                   
           Blocking:                         |  
---------------------------------------------+------------------------------

Comment(by greenfeld):

 Simplified reproduction steps for the crash (possibly not minimal yet):

 1. Run the following python script in the background (possibly attached to
 gdb to see when it crashes, and not have bash or something tell you
 later):

 {{{
 import math

 while 1:
   x = math.cos(3.1415)
 }}}

 2. While that runs, use some sort of rtcwake loop script.  I used a quick
 perl hack to make sure I didn't kill the python script:
 {{{
 $a=0;
 $|=0;
 while (1) {
  sleep 5;
   system('rtcwake -s 5 -m mem');
   $a++;
   print "Slept $a cycles\n";
 }
 }}}

 Eventually this will core rather quickly - the first time after 26
 iterations (~5 minutes):
 {{{
 Program received signal SIGSEGV, Segmentation fault.
 Slept 26 cycles
 __cos (x=<error reading variable: Unable to access DWARF register number
 0x50>)
     at ../sysdeps/ieee754/dbl-64/s_sin.c:483
 483           cor=(ccs-s*ssn-cs*c)-sn*s;
 (gdb) bt
 #0  __cos (
     x=<error reading variable: Unable to access DWARF register number
 0x50>)
     at ../sysdeps/ieee754/dbl-64/s_sin.c:483
 #1  0x4004b2f8 in math_1 (arg=<optimized out>, func=0x402c99c8 <__cos>,
     can_overflow=0) at
 /usr/src/debug/Python-2.7.3/Modules/mathmodule.c:691
 #2  0x40205ed4 in call_function (oparg=<optimized out>,
 pp_stack=0xbe8a6b1c)
     at /usr/src/debug/Python-2.7.3/Python/ceval.c:4086
 #3  PyEval_EvalFrameEx (f=f at entry=
     Frame 0x2ea90, for file test.py, line 4, in <module> (),
     throwflag=<optimized out>)
     at /usr/src/debug/Python-2.7.3/Python/ceval.c:2740
 #4  0x40206c3c in PyEval_EvalCodeEx (co=co at entry=0x404def50,
     globals=globals at entry=
 [  499.891021] mmc1: new SDIO card at address 0001
     {'__builtins__': <module at remote 0x4047f710>, '__file__': 'test.py',
 '__package__': None, 'x': <float at remote 0x282e8>, '__name__':
 '__main__', '__doc__': None, 'math': <module at remote 0x4050b6f0>},
 locals=locals at entry=
     {'__builtins__': <module at remote 0x4047f710>, '__file__': 'test.py',
 '__package__': None, 'x': <float at remote 0x282e8>, '__name__':
 '__main__', '__doc__': None, 'math': <module at remote 0x4050b6f0>},
 args=args at entry=0x0,
     argcount=argcount at entry=0, kws=kws at entry=0x0, kwcount=kwcount at entry=0,
     defs=defs at entry=0x0, defcount=defcount at entry=0,
 closure=closure at entry=0x0)
     at /usr/src/debug/Python-2.7.3/Python/ceval.c:3330
 #5  0x40206d98 in PyEval_EvalCode (co=co at entry=0x404def50,
 ---Type <return> to continue, or q <return> to quit---
 {...}
    0x402c9b94 <__cos+460>:      vnegmi.f64      d7, d7
    0x402c9b98 <__cos+464>:      add     r1, pc, r1
    0x402c9b9c <__cos+468>:      vadd.f64        d12, d13, d7
    0x402c9ba0 <__cos+472>:      vstrmi  d7, [sp, #16](null)
    0x402c9ba4 <__cos+476>:      vsub.f64        d2, d12, d13
    0x402c9ba8 <__cos+480>:      vmov    r2, r3, d12
    0x402c9bac <__cos+484>:      lsl     r3, r2, #2
    0x402c9bb0 <__cos+488>:      add     r2, r1, r2, lsl #5
 => 0x402c9bb4 <__cos+492>:      vldr    d14, [r2]
    0x402c9bb8 <__cos+496>:      vstr    d14, [sp]
    0x402c9bbc <__cos+500>:      add     r0, r1, r3, lsl #3
 End of assembler dump.
 }}}

 The above can be done without runin running, although powerd probably
 should be stopped/inhibited.

 The next step would be to do a dumb while loop without any floating point
 operations, and see if that dies on its own.

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


More information about the Bugs mailing list