From: John B. <ba...@sp...> - 2010-02-25 14:57:02
|
Thanks! Vladislav Bolkhovitin wrote: > John Baboval, on 02/24/2010 07:42 PM wrote: > >> I've been experiencing a deadlock with iscsi-scst with both [iscsird0] >> and iscsi-scstd (in an ioctl) waiting on target_mutex. I've traced the >> problem down: >> >> iscsi_task_mgmt_affected_cmds_done() calls >> sess_reinst_finished() calls >> conn_reinst_finished()... >> >> If there are items on the pending commands list, conn_reinst_finished >> calls iscsi_restart_cmnd(). >> iscsi_restart_cmnd() does iscsi_extracheck_is_rd_thread(cmnd->conn)... >> At this point, conn->rd_task is NULL, so the printk causes a NULL >> pointer dereference, and the tm thread dies holding the target_mutex. >> Even fixing the NULL pointer dereference, though, this code path is not >> the rd_thread, so the check would BUG() and I'd still be dead in the >> water... >> >> I've tried replacing iscsi_restart_cmnd() with req_cmnd_release_force() >> and adding support for ISCSI_CMD_STATE_REINST_PENDING to cmnd_done as a >> hack to try to workaround the problem, but that caused other issues. >> >> If somebody could provide me with some pointers as to the correct fix >> for this issue, I'd appreciate it. >> > > Basically, iscsi_extracheck_is_rd_thread() is not needed in > iscsi_restart_cmnd(), it's an artifact. You can safely delete it. I did > it in r1520 together with some other small fixes and cleanups. > > Thanks for reporting, > Vlad > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Scst-devel mailing list > Scs...@li... > https://lists.sourceforge.net/lists/listinfo/scst-devel > |