Hang up on MP system under stress LiS 2.18.0

"Richard Hilditch" <[email protected]> Mon, 16 May 2005 19:47:12 +0100
Newsgroups gmane.linux.kernel.streams
Message-ID <[email protected]>
I found a stress problem on 2.18.0 with a test that involved opening and closing many Streams from user space on an MP system. After the problem some of the Streams could not be used and I had to reboot to clear the problem.

The problem occurs in a close race in the head/stream.c code when the LIS_CHECK_Q_MAGIC check fails on line 145 or line 246. The code drops subsequent queues that are scheduled to run even though there is nothing wrong with them. I enclose a patch that solved the problem. I did not address the reason for the race.

I initially found this with a SLES9 ppc64 system but have also seen it on a SELS9 Intel and RHAS21 Intel system. I have only seen is on multi-processor systems.


diff -Naur LiS-2.18-orig/head/stream.c LiS-2.18/head/stream.c
--- LiS-2.18-orig/head/stream.c         2004-09-10 17:34:18.000000000 -0400
+++ LiS-2.18/head/stream.c              2005-05-12 13:01:52.838008472 -0400
@@ -142,10 +142,7 @@
        lis_currq[cpu_id] = q ;                 /* for debugging */
        if (!LIS_CHECK_Q_MAGIC(q))
        {
-           printk("queuerun: scan queue is broken\n") ;
-           lis_scanqhead = NULL ;
-           lis_scanqtail = NULL ;
-           K_ATOMIC_SET(&lis_runq_req_cnt, 0) ;
+           printk("queuerun: queue flags are 0x%lx\n",q->q_flag) ;
            goto scan_loop_bottom ;
        }

@@ -245,10 +242,7 @@
        lis_currq[cpu_id] = q ;                 /* for debugging */
        if (!LIS_CHECK_Q_MAGIC(q))
        {
-           printk("queuerun: service queue is broken\n") ;
-           lis_qhead = NULL ;
-           lis_qtail = NULL ;
-           K_ATOMIC_SET(&lis_runq_req_cnt, 0) ;
+           printk("queuerun(2): queue flags are 0x%lx\n",q->q_flag) ;
            goto qsched_loop_bottom ;
        }

____________________________________________________
Richard Hilditch
SNAP-IX Group
Data Connection Ltd.
Tel:	+44  20 8366 1177	Mail:	richard.hilditch at dataconnection dot com
Fax:	+44  20 8367 8501	Web:	http://www.dataconnection.com