Hanging

Allan Wind allan_wind at lifeintegrity.com
Sun Apr 1 16:15:56 BST 2012


offlineimap crashes on me from time to time, so I have a small 
restart script in place that checks that .offlineimap/pid is 
alive otherwise waits 3 seconds then starts up offlineimap.

oflineimap (commit: f5b82ad76d40c) was hanging sometime between 
last night and now so I send a term to the offlineimap.py 
process.  It did not shut down as usual, and I subsequently 
noticed a defunct process:

$user      7002  0.0  0.0      0     0 ?        Z    Mar11   0:00 [offlineimap] <defunct>
$user      7369  0.0  0.0  10612  1392 ?        S    Mar11   0:00 /bin/bash /home/$user/bin/offlineimap
$user     10672  0.0  0.4 172044 17012 ?        Sl   06:27   0:15 python /home/mona/src/offlineimap/offlineimap.py

Process 10672 attached - interrupt to quit
select(0, NULL, NULL, NULL, {0, 14100}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 50000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 50000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 50000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 50000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 50000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 50000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 50000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 50000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 50000}) = 0 (Timeout)
...

ltrace had endless stream of:

__errno_location()                                                                                = 0x7f5147ab66a8
sem_wait(0x1455cc0, 1, 0, -1, 0x7fff83209ee0)                                                     = 0
strcmp("cquire", "cquire_lock")                                                                   = -95
strcmp("cquire", "cquire")                                                                        = 0
__ctype_b_loc()                                                                                   = 0x7f5147ab66b0
__ctype_b_loc()                                                                                   = 0x7f5147ab66b0
__ctype_b_loc()                                                                                   = 0x7f5147ab66b0
sem_post(0x1455cc0, 0x83b560, 1, 2, 0x7fff83209c20)                                               = 0
sem_trywait(0x14562e0, 0, 1, 2, 0x7fff83209c20)                                                   = 0xffffffff
__errno_location()                                                                                = 0x7f5147ab66a8
__errno_location()                                                                                = 0x7f5147ab66a8
sem_wait(0x1455cc0, 1, -88, 2, 0x7fff83209c20)                                                    = 0
gettimeofday(0x7fff83209ef0, NULL)                                                                = 0
_setjmp(0x8a3d80, 0x13f9808, 0x13f9808, 8, 0x13170a0)                                             = 0
__finite(0x83c320, 0x83b560, 0x7f5147a78cf8, 2, 0x13170a0)                                        = 1
_setjmp(0x8a3d80, 0x83b560, 1, 2, 0x13170a0)                                                      = 0
_setjmp(0x8a3d80, 0x83b560, 0x7f5147a78cf8, 2, 0x13170a0)                                         = 0
_setjmp(0x8a3d80, 0x13f9628, 1, 0x1819e30, 0x13170a0)                                             = 0
_setjmp(0x8a3d80, 0x13f9628, 1, 0x1819e30, 0x13170a0)                                             = 0
__ctype_b_loc()                                                                                   = 0x7f5147ab66b0
__ctype_b_loc()                                                                                   = 0x7f5147ab66b0
floor(0, 0x7fff83209d70, 1, 0, 0x7fff83209bf0)                                                    = 0
sem_post(0x1455cc0, 0x3fa99999, 0xfffffffb, 0, 0)                                                 = 0
select(0, 0, 0, 0, 0x7fff83209ee0)                                                                = 0
__errno_location()                                                                                = 0x7f5147ab66a8
sem_wait(0x1455cc0, 1, 0, -1, 0x7fff83209ee0)                                                     = 0
strcmp("cquire", "cquire_lock")                                                                   = -95
strcmp("cquire", "cquire")                                                                        = 0
__ctype_b_loc()                                                                                   = 0x7f5147ab66b0
__ctype_b_loc()                                                                                   = 0x7f5147ab66b0
__ctype_b_loc()                                                                                   = 0x7f5147ab66b0
sem_post(0x1455cc0, 0x83b560, 1, 2, 0x7fff83209c20)                                               = 0
sem_trywait(0x14562e0, 0, 1, 2, 0x7fff83209c20)                                                   = 0xffffffff
__errno_location()                                                                                = 0x7f5147ab66a8
__errno_location()                                                                                = 0x7f5147ab66a8
sem_wait(0x1455cc0, 1, -88, 2, 0x7fff83209c20)                                                    = 0
gettimeofday(0x7fff83209ef0, NULL)                                                                = 0
_setjmp(0x8a3d80, 0x13f9628, 0x13f9628, 8, 0x13170a0)                                             = 0
__finite(0x83c320, 0x83b560, 0x7f5147a78cf8, 2, 0x13170a0)                                        = 1

and it seems that when I aborted ltrace it caused the process to finally cycle so I did not get a stack trace.

What would be helpful the next time around?


/Allan
-- 
Allan Wind
Life Integrity, LLC
<http://lifeintegrity.com>



More information about the OfflineIMAP-project mailing list