[stgt] tgtd crash when more than 40 LUNs per target (and a way to reproduce)

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Thu Sep 25 16:58:58 CEST 2008


On Thu, 25 Sep 2008 16:17:02 +0200
Tomasz Chmielewski <mangoo at wpkg.org> wrote:

> tgtd crashes if we want to use more than ~43 luns in a target.
> 
> To reproduce, use this bash script:
> 
> #!/bin/bash
> 
> i=1
> 
> tgtadm --lld iscsi --op new --mode target --tid 7 -T iqn.2007-02.com.example:test.break
> 
> while [ $i -ne 1024 ] ; do
> 
>     tgtadm --lld iscsi --op new --mode logicalunit --tid 7 --lun $i -b /dev/sda
>     [ $? -ne 0 ] && exit
>     echo lun $i
>     i=$((i+1))
> 
> done

You might fail to create pthreads with both problems.

This patch enables you to create more luns (but eventually, tgtd
crashes) ?


diff --git a/usr/bs_thread.h b/usr/bs_thread.h
index b97861c..bffc0db 100644
--- a/usr/bs_thread.h
+++ b/usr/bs_thread.h
@@ -1,4 +1,4 @@
-#define NR_WORKER_THREADS	4
+#define NR_WORKER_THREADS	1
 
 typedef void (request_func_t) (struct scsi_cmd *);
 
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list