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

Tomasz Chmielewski mangoo at wpkg.org
Wed May 6 14:51:52 CEST 2009


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

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



-- 
Tomasz Chmielewski
http://wpkg.org


--
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