[Zope-dev] recipe for trapping SIGSEGV and SIGILL signals on solaris

Joseph Wayne Norton norton@alum.mit.edu
Wed, 12 Dec 2001 11:48:30 +0900


At Tue, 11 Dec 2001 10:42:46 -0500,
Matthew T. Kromer wrote:
> >
> >#0  0xef5b9810 in _lwp_sema_wait ()
> >(gdb) info threads
> >  19 Thread 10          0xef5b9810 in _lwp_sema_wait ()
> >  18 Thread 9          0xef5b9810 in _lwp_sema_wait ()
> >  17 Thread 8          0xef5b9810 in _lwp_sema_wait ()
> >  16 Thread 7 (LWP 8)  subtract_refs (containers=0x13dec8)
> >    at ./Modules/gcmodule.c:166
> >
> 
> Aha!  See?
> 

Matthew -

I performed the operations that you recommended and here are the
results (see below). The problem seems to be with the value of the
tp_traverse field.

I am not aware of any "T" type python object.  I'm wondering if this
is an extension class type (just a guess).  I searched through all of
the *.c files in zope, etc. but I as not able to find any type of name
"T".

I also ran across a bug posting at sourceforge ...

  http://sourceforge.net/tracker/?func=detail&atid=105470&aid=471942&group_id=5470

This bug report looks very similiar.

- j


#0  0xef5b9810 in _lwp_sema_wait ()
(gdb) info threads
  19 Thread 10          0xef5b9810 in _lwp_sema_wait ()
  18 Thread 9          0xef5b9810 in _lwp_sema_wait ()
  17 Thread 8          0xef5b9810 in _lwp_sema_wait ()
  16 Thread 7 (LWP 8)  subtract_refs (containers=0x13dec8)
    at ./Modules/gcmodule.c:166
  15 Thread 6          0xef647cac in _swtch ()
  14 Thread 5          0xef5b9810 in _lwp_sema_wait ()
  13 Thread 4 (LWP 0)  0xef647b7c in _swtch ()
  12 Thread 3          0xef647cac in _swtch ()
  11 Thread 2 (LWP 2)  0xef5b9958 in _signotifywait ()
  10 Thread 1 (LWP 6)  0xef5b7488 in _poll ()
  9 LWP    9          0xef5b6a24 in door_restart ()
  8 LWP    8          subtract_refs (containers=0x13dec8)
    at ./Modules/gcmodule.c:166
  7 LWP    7          0xef5b9810 in _lwp_sema_wait ()
  6 LWP    6          0xef5b7488 in _poll ()
  5 LWP    5          0xef5b9814 in _lwp_sema_wait ()
  4 LWP    4          0xef5b9810 in _lwp_sema_wait ()
  3 LWP    3          0xef5b9810 in _lwp_sema_wait ()
  2 LWP    2          0xef5b9958 in _signotifywait ()
* 1 LWP    1          0xef5b9810 in _lwp_sema_wait ()

(gdb) thread 16
[Switching to Thread 7 (LWP 8)]
#0  subtract_refs (containers=0x13dec8) at ./Modules/gcmodule.c:166
./Modules/gcmodule.c:166: No such file or directory.

(gdb) print *((PyObject *) gc)->ob_type
$1 = {ob_refcnt = 18213696, ob_type = 0x2d70b0, ob_size = 0, 
  tp_name = 0x1 "T", tp_basicsize = 1328272, tp_itemsize = 4156348, 
  tp_dealloc = 0x125865c, tp_print = 0x3c1b04, tp_getattr = 0,
tp_setattr = 0, 
  tp_compare = 0x29, tp_repr = 0x3adeb0, tp_as_number = 0xf66198, 
  tp_as_sequence = 0xdf3fa0, tp_as_mapping = 0x0, tp_hash = 0x1, 
  tp_call = 0x144490 <PyMethod_Type>, tp_str = 0x3f0a1c, 
  tp_getattro = 0x125865c, tp_setattro = 0x3c1b04, tp_as_buffer = 0x0,

  tp_flags = 158561192, tp_doc = 0x29 "", tp_traverse = 0x4c4f4144, 
  tp_clear = 0xd908c0, tp_richcompare = 0x1151300, tp_weaklistoffset =
0}

(gdb) print *((PyObject *) 0x2d70b0)->ob_type
$2 = {ob_refcnt = 2977968, ob_type = 0xff5b80, ob_size = 0, tp_name =
0x1 "T", 
  tp_basicsize = 1328272, tp_itemsize = 4155228, tp_dealloc =
0x125865c, 
  tp_print = 0x3c1b04, tp_getattr = 0, tp_setattr = 0, tp_compare =
0x29, 
  tp_repr = 0, tp_as_number = 0x1212b48, tp_as_sequence = 0xbf8d30, 
  tp_as_mapping = 0xffffffff, tp_hash = 0x1, 
  tp_call = 0x144490 <PyMethod_Type>, tp_str = 0x4ab2cc, 
  tp_getattro = 0x1089d5c, tp_setattro = 0x4ab30c, tp_as_buffer = 0x0,

  tp_flags = 0, tp_doc = 0x29 "", tp_traverse = 0, tp_clear =
0x122d140, 
  tp_richcompare = 0x11ccd70, tp_weaklistoffset = -1}

gdb) x 0x4c4f4144
0x4c4f4144:     Cannot access memory at address 0x4c4f4144.