[stgt] Problem: automatic vtl setup using targets.conf vs script, failing on automatic

Albert Pauw albert.pauw at gmail.com
Tue Oct 27 12:27:09 CET 2009


On 10/27/2009 08:19 AM, Albert Pauw wrote:
> Ok,
>
> here is the idea:
>
> - I always used a script (vtl, attached) to set up a 3-drive virtual 
> tape library, logged in using open-iscsi and he presto. That works.
> One of the ways of testing it is using the mtx command to view the 
> contents of the slots and drives.
>
> - Now I wanted to convert it to a targets.conf file, so it can be used 
> automatically at start up of tgt. So I did created a file 
> (targets.conf, attached).
>
> Starting that up automatically works, login into the target also 
> works, I can see the devices using lsscsi. Asking the status of the 
> separate drives works also
> (mt -f /dev/nst0 status, etc). However, the mtx command hangs, in fact 
> the whole tgtd daemon seems to hang as after some time the iscsid (the 
> initiator)
> daemon starts to send login requests, but gets no answer. I've added 
> the two wireshark traces as well.
>
> Here's the actions you could find in the traces:
>
> -> login target
> mt -f /dev/nst0
> mt -f /dev/nst1
> mt -f /dev/nst2
> mtx -f /dev/changer status
> -> logout target (only when done manually, automatically this is not 
> possible)
>
Just tried running tgtd in the foreground (tgtd -f -d8) and see what 
happens after logging in the target and running the mtx -f /dev/changer 
status command.

This is what I get (i.e. tgtd died):

tgtd: iscsi_scsi_cmd_rx_start(1567) 1 1a 0 0 12 1 10000035
tgtd: iscsi_task_queue(1512) 2e 2e 1
tgtd: target_cmd_queue(827) 0x9c60390 1a 2
tgtd: target_cmd_queue(846) 0x9c60390 1a 2 1
tgtd: target_cmd_queue(857) 10000035 1a (nil) 0x9c61000 0 0 12 0 0
tgtd: iscsi_scsi_cmd_done(1185) shrunk too big device read len 14 > 12
tgtd: iscsi_task_tx_start(1858) found a task 10000035 12 0 0
tgtd: iscsi_data_rsp_build(1050) 12 12 12 819210000035
tgtd: __cmd_done(918) 0 (nil) 0x9c61000 0 12 0
tgtd: iscsi_task_tx_start(1883) no more data
tgtd: iscsi_noop_out_rx_start(1605) ffffffff 10000036 0
tgtd: iscsi_task_queue(1512) 2f 2f 40
tgtd: iscsi_task_tx_start(1858) found a task 0 4294967295 0 0
tgtd: iscsi_task_tx_start(1883) no more data
tgtd: iscsi_noop_out_rx_start(1605) ffffffff 10000037 0
tgtd: iscsi_task_queue(1512) 2f 2f 40
tgtd: iscsi_task_tx_start(1858) found a task 0 4294967295 0 0
tgtd: iscsi_task_tx_start(1883) no more data
tgtd: iscsi_noop_out_rx_start(1605) ffffffff 10000038 0
tgtd: iscsi_task_queue(1512) 2f 2f 40
tgtd: iscsi_task_tx_start(1858) found a task 0 4294967295 0 0
tgtd: iscsi_task_tx_start(1883) no more data
tgtd: iscsi_noop_out_rx_start(1605) ffffffff 10000039 0
tgtd: iscsi_task_queue(1512) 2f 2f 40
tgtd: iscsi_task_tx_start(1858) found a task 0 4294967295 0 0
tgtd: iscsi_task_tx_start(1883) no more data
tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 56 1 1000003a
tgtd: iscsi_task_queue(1512) 2f 2f 1
tgtd: target_cmd_queue(827) 0x9c60390 12 4
tgtd: target_cmd_queue(846) 0x9c60390 12 4 1
tgtd: spc_inquiry(164) 0 0
tgtd: target_cmd_queue(857) 1000003a 12 (nil) 0x9c61000 0 0 56 0 0
tgtd: iscsi_scsi_cmd_done(1185) shrunk too big device read len 66 > 56
tgtd: iscsi_task_tx_start(1858) found a task 1000003a 56 0 0
tgtd: iscsi_data_rsp_build(1050) 56 56 56 81921000003a
tgtd: __cmd_done(918) 0 (nil) 0x9c61000 0 56 0
tgtd: iscsi_task_tx_start(1883) no more data
tgtd: iscsi_scsi_cmd_rx_start(1567) 1 1a 0 0 136 1 1000003b
tgtd: iscsi_task_queue(1512) 30 30 1
tgtd: target_cmd_queue(827) 0x9c60390 1a 4
tgtd: target_cmd_queue(846) 0x9c60390 1a 4 1
tgtd: target_cmd_queue(857) 1000003b 1a (nil) 0x9c61000 0 0 136 0 0
tgtd: iscsi_task_tx_start(1858) found a task 1000003b 136 0 0
tgtd: iscsi_data_rsp_build(1050) 24 136 24 81921000003b
tgtd: __cmd_done(918) 0 (nil) 0x9c61000 0 136 0
tgtd: iscsi_task_tx_start(1883) no more data
tgtd: iscsi_scsi_cmd_rx_start(1567) 1 b8 0 0 40 1 1000003c
tgtd: iscsi_task_queue(1512) 31 31 1
tgtd: target_cmd_queue(827) 0x9c60390 b8 4
tgtd: target_cmd_queue(846) 0x9c60390 b8 4 1
*** glibc detected *** tgtd: free(): invalid next size (fast): 
0x09c554d0 ***
======= Backtrace: =========
/lib/libc.so.6[0xaf92a1]
tgtd[0x8062342]
tgtd[0x805b857]
tgtd[0x805a675]
tgtd[0x804c0f8]
tgtd[0x804c3ea]
tgtd[0x804edd7]
tgtd[0x8052038]
tgtd[0x8055156]
tgtd[0x8055694]
/lib/libc.so.6(__libc_start_main+0xe6)[0xa9fa66]
tgtd[0x804a051]
======= Memory map: ========
0088a000-008b4000 r-xp 00000000 fd:00 14112      
/lib/libgcc_s-4.4.1-20090729.so.1
008b4000-008b5000 rw-p 00029000 fd:00 14112      
/lib/libgcc_s-4.4.1-20090729.so.1
008e2000-00a33000 r-xp 00000000 fd:00 182494     
/usr/lib/libcrypto.so.0.9.8k
00a33000-00a49000 rw-p 00150000 fd:00 182494     
/usr/lib/libcrypto.so.0.9.8k
00a49000-00a4d000 rw-p 00000000 00:00 0
00a65000-00a85000 r-xp 00000000 fd:00 189414     /lib/ld-2.10.1.so
00a85000-00a86000 r--p 0001f000 fd:00 189414     /lib/ld-2.10.1.so
00a86000-00a87000 rw-p 00020000 fd:00 189414     /lib/ld-2.10.1.so
00a89000-00bf4000 r-xp 00000000 fd:00 182397     /lib/libc-2.10.1.so
00bf4000-00bf6000 r--p 0016b000 fd:00 182397     /lib/libc-2.10.1.so
00bf6000-00bf7000 rw-p 0016d000 fd:00 182397     /lib/libc-2.10.1.so
00bf7000-00bfa000 rw-p 00000000 00:00 0
00c26000-00c29000 r-xp 00000000 fd:00 182449     /lib/libdl-2.10.1.so
00c29000-00c2a000 r--p 00002000 fd:00 182449     /lib/libdl-2.10.1.so
00c2a000-00c2b000 rw-p 00003000 fd:00 182449     /lib/libdl-2.10.1.so
00c2d000-00c43000 r-xp 00000000 fd:00 182438     /lib/libpthread-2.10.1.so
00c43000-00c44000 ---p 00016000 fd:00 182438     /lib/libpthread-2.10.1.so
00c44000-00c45000 r--p 00016000 fd:00 182438     /lib/libpthread-2.10.1.so
00c45000-00c46000 rw-p 00017000 fd:00 182438     /lib/libpthread-2.10.1.so
00c46000-00c48000 rw-p 00000000 00:00 0
00c4a000-00c5c000 r-xp 00000000 fd:00 182445     /lib/libz.so.1.2.3
00c5c000-00c5d000 rw-p 00011000 fd:00 182445     /lib/libz.so.1.2.3
00f2b000-00f2c000 r-xp 00000000 00:00 0          [vdso]
08047000-08070000 r-xp 00000000 fd:00 20367      /sbin/tgtd
08070000-08074000 rw-p 00029000 fd:00 20367      /sbin/tgtd
08074000-08075000 rw-p 00000000 00:00 0
09c55000-09c76000 rw-p 00000000 00:00 0          [heap]
adf9a000-adf9b000 ---p 00000000 00:00 0
adf9b000-ae99b000 rw-p 00000000 00:00 0
ae99b000-ae99c000 ---p 00000000 00:00 0
ae99c000-af39c000 rw-p 00000000 00:00 0
af39c000-af39d000 ---p 00000000 00:00 0
af39d000-afd9d000 rw-p 00000000 00:00 0
afd9d000-afd9e000 ---p 00000000 00:00 0
afd9e000-b079e000 rw-p 00000000 00:00 0
b079e000-b079f000 ---p 00000000 00:00 0
b079f000-b119f000 rw-p 00000000 00:00 0
b119f000-b11a0000 ---p 00000000 00:00 0
b11a0000-b1ba0000 rw-p 00000000 00:00 0
b1ba0000-b1ba1000 ---p 00000000 00:00 0
b1ba1000-b25a1000 rw-p 00000000 00:00 0
b25a1000-b25a2000 ---p 00000000 00:00 0
b25a2000-b2fa2000 rw-p 00000000 00:00 0
b2fa2000-bAborted

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