Why is this php-imap process randomly hanging while reading mail?

162 Views Asked by At

I am trying to read mails from ftp using lib php-imap v2.0.3 with php 5.3 from symfony v2.8 command started by cron. For the exact same mail, sometimes the process hangs in Mailbox::getMail, sometimes it works fine. Can't figure out when. Best clue I have to date is this gdb backtrace. Any idea ? Thanks

(gdb) bt
#0  0x00007fa89485b970 in read () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fa896dd834a in ?? () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
#2  0x00007fa896dd60f9 in BIO_read () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
#3  0x00007fa896a9ec26 in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
#4  0x00007fa896aa00a3 in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
#5  0x00007fa896a9cf22 in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
#6  0x00007fa8875e7b79 in ssl_getdata () from /usr/lib/libc-client.so.2007e
#7  0x00007fa8875e7d66 in ssl_getbuffer () from /usr/lib/libc-client.so.2007e
#8  0x00007fa8876134f6 in imap_parse_string () from /usr/lib/libc-client.so.2007e
#9  0x00007fa887618acd in imap_parse_unsolicited () from /usr/lib/libc-client.so.2007e
#10 0x00007fa887618f6f in imap_reply () from /usr/lib/libc-client.so.2007e
#11 0x00007fa88761901b in imap_sout () from /usr/lib/libc-client.so.2007e
#12 0x00007fa88761a722 in imap_send () from /usr/lib/libc-client.so.2007e
#13 0x00007fa88761f69a in imap_msgdata () from /usr/lib/libc-client.so.2007e
#14 0x00007fa8875f391c in mail_fetch_body () from /usr/lib/libc-client.so.2007e
#15 0x00007fa8878ddcf5 in zif_imap_fetchbody () from /usr/lib/php5/20131226/imap.so
#16 0x00000000006f50d9 in dtrace_execute_internal ()
0

There are 0 best solutions below