[stgt] tgtd crash with "too many targets" (out of memory)

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Wed May 6 15:09:52 CEST 2009

On Wed, 06 May 2009 14:51:52 +0200
Tomasz Chmielewski <mangoo at wpkg.org> wrote:

> Of course "too many targets" is debatable here, as on 32 bit hardware the number is very small.
> To reproduce the crash:
> - on the target machine, keep adding new targets until you see "tgtadm: out of memory"::
> # Adding target: iqn.2009-02.net.syneticon:superthecus.test28                                                                                             
> tgtadm --lld iscsi --op new --mode target --tid 23 -T iqn.2009-02.net.syneticon:superthecus.test28                                                        
> tgtadm --lld iscsi --op new --mode logicalunit --tid 23 --lun 1 -b /dev/superthecus/test                                                                                                                                                                              
> tgtadm --lld iscsi --op bind --mode target --tid 23 -I ALL     
> # Adding target: iqn.2009-02.net.syneticon:superthecus.test29                                                                                             
> tgtadm --lld iscsi --op new --mode target --tid 24 -T iqn.2009-02.net.syneticon:superthecus.test29                                                        
> tgtadm --lld iscsi --op new --mode logicalunit --tid 24 --lun 1 -b /dev/superthecus/test                                                                  
> tgtadm: out of memory                                                                                                                                                                                                                                      
> tgtadm --lld iscsi --op bind --mode target --tid 24 -I ALL 
> # Adding target: iqn.2009-02.net.syneticon:superthecus.test3                                                                                              
> tgtadm --lld iscsi --op new --mode target --tid 25 -T iqn.2009-02.net.syneticon:superthecus.test3                                                         
> tgtadm --lld iscsi --op new --mode logicalunit --tid 25 --lun 1 -b /dev/superthecus/test                                                                  
> tgtadm: out of memory                                                                                                                                                                                                                                                
> tgtadm --lld iscsi --op bind --mode target --tid 25 -I ALL
> - add some more targets
> - "tgtadm --op show --mode target" should show you your targets; the last ones without a disk

Well, the above is a known issue.

> - now, run discovery from the initiator and try to log in to all targets. tgtd will segfault

Hmm, this is a new problem. Can you get more information with gdb?

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