I've attached the wireshark iscsi trace of the following action: running tgtd -f -d8, with Tomo's latest patch for debugging. tgt-admin -e to active targets.conf file, 24 tape slots, 3 drives, 1 changer logged in with open-iscsi (that's where the trace begins) issued mtx -f /dev/changer status logged out Wireshark mentioned malformed scsi packets. Maybe this info sheds some light on this problem? Albert On 11/26/2009 01:34 AM, FUJITA Tomonori wrote:
On Wed, 25 Nov 2009 16:57:46 +0100 Albert Pauw<albert.pauw@xxxxxxxxx> wrote:This is getting interesting: [root@orange ~]# mtx -f /dev/changer status Warning:Too Many Storage Elements Reported (expected 0, now have 1 Too many Data Transfer Elements ReportedMark, any ideas?(and tgtd keeps running) and here is its output: tgtd: tgt_device_create(436) 1 4 tgtd: bs_thread_worker_fn(189) started this thread tgtd: bs_thread_worker_fn(189) started this thread tgtd: bs_thread_worker_fn(189) started this thread tgtd: bs_thread_worker_fn(189) started this thread tgtd: tgt_device_create(558) Add a logical unit 4 to the target 1 tgtd: tgt_mgmt(336) 150 0 2 5 1 0 4 targetOps scsi_sn=123:456:789:000, 2491 tgtd: tgt_mgmt(336) 140 0 2 5 1 0 4 targetOps vendor_id=STK, 2491 tgtd: tgt_mgmt(336) 143 0 2 5 1 0 4 targetOps product_rev=0001, 2491 tgtd: tgt_mgmt(336) 192 0 2 5 1 0 4 targetOps element_type=1,start_address=1,quantity=1,media_home=/root/btapes, 2491 tgtd: tgt_mgmt(336) 196 0 2 5 1 0 4 targetOps element_type=2,start_address=1000,quantity=24,media_home=/root/btapes, 2491 tgtd: tgt_mgmt(336) 193 0 2 5 1 0 4 targetOps element_type=3,start_address=10,quantity=5,media_home=/root/btapes, 2491 tgtd: tgt_mgmt(336) 194 0 2 5 1 0 4 targetOps element_type=4,start_address=500,quantity=3,media_home=/root/btapes, 2491 tgtd: tgt_mgmt(336) 165 0 2 5 1 0 4 targetOps element_type=4,address=500,tid=1,lun=1, 2491 tgtd: tgt_mgmt(336) 165 0 2 5 1 0 4 targetOps element_type=4,address=500,tid=1,lun=2, 2491 tgtd: tgt_mgmt(336) 165 0 2 5 1 0 4 targetOps element_type=4,address=500,tid=1,lun=3, 2491 tgtd: tgt_mgmt(336) 138 0 2 5 1 0 4 targetOps removable=1, 2491 tgtd: tgt_mgmt(336) 142 0 2 5 1 0 4 targetOps product_id=L700, 2491 tgtd: tgt_mgmt(336) 142 0 2 5 1 0 4 targetOps mode_page=0:0:0, 2491 tgtd: tgt_mgmt(336) 182 0 2 5 1 0 4 targetOps mode_page=0x02:0:14:0x80:0x80:0:0xa:0:0:0:0:0:0:0:0:0:0, 2491 tgtd: tgt_mgmt(336) 182 0 2 5 1 0 4 targetOps mode_page=0x1a:0:18:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0, 2491 tgtd: tgt_mgmt(336) 166 0 2 5 1 0 4 targetOps mode_page=0x1c:0:10:8:0:0:0:0:0:0:0:0:0, 2491 tgtd: tgt_mgmt(336) 184 0 2 5 1 0 4 targetOps mode_page=0x1d:0:0x12:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0, 2491 tgtd: tgt_mgmt(336) 149 0 2 5 1 0 4 targetOps mode_page=0x1e:0:2:0:0, 2491 tgtd: tgt_mgmt(336) 211 0 2 5 1 0 4 targetOps mode_page=0x1f:0:0x12:0x0f:7:0x0f:0x0f:0x0f:0x0f:0:0:0:0:0x0f:0x0f:0x0f:0x0f:0:0:0:0, 2491 tgtd: tgt_mgmt(336) 137 0 1 3 1 0 ffffffffffffffff initiator-address=ALL 2491 tgtd: tgt_mgmt(336) 116 0 1 2 -1 0 ffffffffffffffff 2491 tgtd: tgt_mgmt(336) 116 0 1 2 -1 0 ffffffffffffffff 2491 tgtd: accept_connection(99) 4 tgtd: cmnd_exec_login(685) Login request (operational negotiation): 0 tgtd: login_start(523) exp_cmd_sn: 0,0 tgtd: it_nexus_create(244) 1 1 0 tgtd: session_create(135) session_create: 0x10000013d0200 tgtd: conn_take_fd(211) 0 1 0 10000013d0200 tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 36 1 1 tgtd: iscsi_task_queue(1512) 0 0 1 tgtd: target_cmd_queue(843) 0x8f3e8f0 12 0 tgtd: target_cmd_queue(862) 0x8f3e8f0 12 0 1 tgtd: spc_inquiry(164) 0 0 tgtd: target_cmd_queue(873) 1 12 (nil) 0x8f3f000 0 0 36 0 0 tgtd: iscsi_scsi_cmd_done(1185) shrunk too big device read len 66> 36 tgtd: iscsi_task_tx_start(1858) found a task 1 36 0 0 tgtd: iscsi_data_rsp_build(1050) 36 36 36 81921 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 36 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 68 1 2 tgtd: iscsi_task_queue(1512) 1 1 1 tgtd: target_cmd_queue(843) 0x8f3e8f0 12 0 tgtd: target_cmd_queue(862) 0x8f3e8f0 12 0 1 tgtd: spc_inquiry(164) 0 0 tgtd: target_cmd_queue(873) 2 12 (nil) 0x8f3f000 0 0 66 0 0 tgtd: iscsi_task_tx_start(1858) found a task 2 66 0 0 tgtd: iscsi_data_rsp_build(1050) 66 66 66 81922 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 66 0 tgtd: iscsi_scsi_cmd_rx_start(1567) 1 a0 0 0 4096 1 3 tgtd: iscsi_task_queue(1512) 2 2 1 tgtd: target_cmd_queue(843) 0x8f3e8f0 a0 0 tgtd: target_cmd_queue(862) 0x8f3e8f0 a0 0 1 tgtd: target_cmd_queue(873) 3 a0 (nil) 0x8f3f000 0 0 4096 0 0 tgtd: iscsi_task_tx_start(1858) found a task 3 4096 0 0 tgtd: iscsi_data_rsp_build(1050) 48 4096 48 81923 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 4096 0 tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 36 1 4 tgtd: iscsi_task_queue(1512) 3 3 1 tgtd: target_cmd_queue(843) 0x8f3e8f0 12 1 tgtd: target_cmd_queue(862) 0x8f3e8f0 12 1 1 tgtd: spc_inquiry(164) 0 0 tgtd: target_cmd_queue(873) 4 12 (nil) 0x8f3f000 0 0 36 0 0 tgtd: iscsi_scsi_cmd_done(1185) shrunk too big device read len 66> 36 tgtd: iscsi_task_tx_start(1858) found a task 4 36 0 0 tgtd: iscsi_data_rsp_build(1050) 36 36 36 81924 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 36 0 tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 68 1 5 tgtd: iscsi_task_queue(1512) 4 4 1 tgtd: target_cmd_queue(843) 0x8f3e8f0 12 1 tgtd: target_cmd_queue(862) 0x8f3e8f0 12 1 1 tgtd: spc_inquiry(164) 0 0 tgtd: target_cmd_queue(873) 5 12 (nil) 0x8f3f000 0 0 66 0 0 tgtd: iscsi_task_tx_start(1858) found a task 5 66 0 0 tgtd: iscsi_data_rsp_build(1050) 66 66 66 81925 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 66 0 tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 36 1 6 tgtd: iscsi_task_queue(1512) 5 5 1 tgtd: target_cmd_queue(843) 0x8f3e8f0 12 2 tgtd: target_cmd_queue(862) 0x8f3e8f0 12 2 1 tgtd: spc_inquiry(164) 0 0 tgtd: target_cmd_queue(873) 6 12 (nil) 0x8f3f000 0 0 36 0 0 tgtd: iscsi_scsi_cmd_done(1185) shrunk too big device read len 66> 36 tgtd: iscsi_task_tx_start(1858) found a task 6 36 0 0 tgtd: iscsi_data_rsp_build(1050) 36 36 36 81926 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 36 0 tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 68 1 7 tgtd: iscsi_task_queue(1512) 6 6 1 tgtd: target_cmd_queue(843) 0x8f3e8f0 12 2 tgtd: target_cmd_queue(862) 0x8f3e8f0 12 2 1 tgtd: spc_inquiry(164) 0 0 tgtd: target_cmd_queue(873) 7 12 (nil) 0x8f3f000 0 0 66 0 0 tgtd: iscsi_task_tx_start(1858) found a task 7 66 0 0 tgtd: iscsi_data_rsp_build(1050) 66 66 66 81927 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 66 0 tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 36 1 8 tgtd: iscsi_task_queue(1512) 7 7 1 tgtd: target_cmd_queue(843) 0x8f3e8f0 12 3 tgtd: target_cmd_queue(862) 0x8f3e8f0 12 3 1 tgtd: spc_inquiry(164) 0 0 tgtd: target_cmd_queue(873) 8 12 (nil) 0x8f3f000 0 0 36 0 0 tgtd: iscsi_scsi_cmd_done(1185) shrunk too big device read len 66> 36 tgtd: iscsi_task_tx_start(1858) found a task 8 36 0 0 tgtd: iscsi_data_rsp_build(1050) 36 36 36 81928 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 36 0 tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 68 1 9 tgtd: iscsi_task_queue(1512) 8 8 1 tgtd: target_cmd_queue(843) 0x8f3e8f0 12 3 tgtd: target_cmd_queue(862) 0x8f3e8f0 12 3 1 tgtd: spc_inquiry(164) 0 0 tgtd: target_cmd_queue(873) 9 12 (nil) 0x8f3f000 0 0 66 0 0 tgtd: iscsi_task_tx_start(1858) found a task 9 66 0 0 tgtd: iscsi_data_rsp_build(1050) 66 66 66 81929 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 66 0 tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 36 1 a tgtd: iscsi_task_queue(1512) 9 9 1 tgtd: target_cmd_queue(843) 0x8f3e8f0 12 4 tgtd: target_cmd_queue(862) 0x8f3e8f0 12 4 1 tgtd: spc_inquiry(164) 0 0 tgtd: target_cmd_queue(873) a 12 (nil) 0x8f3f000 0 0 36 0 0 tgtd: iscsi_scsi_cmd_done(1185) shrunk too big device read len 66> 36 tgtd: iscsi_task_tx_start(1858) found a task a 36 0 0 tgtd: iscsi_data_rsp_build(1050) 36 36 36 8192a tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 36 0 tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 68 1 b tgtd: iscsi_task_queue(1512) a a 1 tgtd: target_cmd_queue(843) 0x8f3e8f0 12 4 tgtd: target_cmd_queue(862) 0x8f3e8f0 12 4 1 tgtd: spc_inquiry(164) 0 0 tgtd: target_cmd_queue(873) b 12 (nil) 0x8f3f000 0 0 66 0 0 tgtd: iscsi_task_tx_start(1858) found a task b 66 0 0 tgtd: iscsi_data_rsp_build(1050) 66 66 66 8192b tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 66 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 1a 0 0 256 1 c tgtd: iscsi_task_queue(1512) b b 1 tgtd: target_cmd_queue(843) 0x8f3e8f0 1a 4 tgtd: target_cmd_queue(862) 0x8f3e8f0 1a 4 1 tgtd: target_cmd_queue(873) c 1a (nil) 0x8f3f000 0 0 255 2 0 tgtd: iscsi_task_tx_start(1858) found a task c 255 0 0 tgtd: iscsi_data_rsp_build(1050) 255 255 255 8192c tgtd: iscsi_scsi_cmd_tx_done(1806) more data or sense or bidir c tgtd: iscsi_task_tx_start(1858) found a task c 255 255 0 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 255 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 1a 0 0 256 1 d tgtd: iscsi_task_queue(1512) c c 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 1a 4 tgtd: target_cmd_queue(862) 0x8f3e7e0 1a 4 1 tgtd: target_cmd_queue(873) d 1a (nil) 0x8f3f000 0 0 255 0 0 tgtd: iscsi_task_tx_start(1858) found a task d 255 0 0 tgtd: iscsi_data_rsp_build(1050) 32 255 32 8192d tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 255 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 7 0 0 0 1 e tgtd: iscsi_task_queue(1512) d d 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 7 4 tgtd: target_cmd_queue(862) 0x8f3e7e0 7 4 1 tgtd: target_cmd_queue(873) e 7 (nil) (nil) 0 0 0 0 0 tgtd: iscsi_task_tx_start(1858) found a task e 0 0 0 tgtd: __cmd_done(934) 0 (nil) (nil) 0 0 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 256 1 f tgtd: iscsi_task_queue(1512) e e 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 12 4 tgtd: target_cmd_queue(862) 0x8f3e7e0 12 4 1 tgtd: spc_inquiry(164) 0 0 tgtd: target_cmd_queue(873) f 12 (nil) 0x8f3f000 0 0 254 0 0 tgtd: iscsi_task_tx_start(1858) found a task f 254 0 0 tgtd: iscsi_data_rsp_build(1050) 66 254 66 8192f tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 254 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 256 1 10 tgtd: iscsi_task_queue(1512) f f 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 12 4 tgtd: target_cmd_queue(862) 0x8f3e7e0 12 4 1 tgtd: spc_inquiry(164) 1 0 tgtd: target_cmd_queue(873) 10 12 (nil) 0x8f3f000 0 0 254 0 0 tgtd: iscsi_task_tx_start(1858) found a task 10 254 0 0 tgtd: iscsi_data_rsp_build(1050) 7 254 7 819210 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 254 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 256 1 11 tgtd: iscsi_task_queue(1512) 10 10 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 12 4 tgtd: target_cmd_queue(862) 0x8f3e7e0 12 4 1 tgtd: spc_inquiry(164) 1 83 tgtd: target_cmd_queue(873) 11 12 (nil) 0x8f3f000 0 0 254 0 0 tgtd: iscsi_task_tx_start(1858) found a task 11 254 0 0 tgtd: iscsi_data_rsp_build(1050) 32 254 32 819211 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 254 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 256 1 12 tgtd: iscsi_task_queue(1512) 11 11 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 12 1 tgtd: target_cmd_queue(862) 0x8f3e7e0 12 1 1 tgtd: spc_inquiry(164) 0 0 tgtd: target_cmd_queue(873) 12 12 (nil) 0x8f3f000 0 0 254 0 0 tgtd: iscsi_task_tx_start(1858) found a task 12 254 0 0 tgtd: iscsi_data_rsp_build(1050) 66 254 66 819212 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 254 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 256 1 13 tgtd: iscsi_task_queue(1512) 12 12 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 12 1 tgtd: target_cmd_queue(862) 0x8f3e7e0 12 1 1 tgtd: spc_inquiry(164) 0 0 tgtd: target_cmd_queue(873) 13 12 (nil) 0x8f3f000 0 0 254 0 0 tgtd: iscsi_task_tx_start(1858) found a task 13 254 0 0 tgtd: iscsi_data_rsp_build(1050) 66 254 66 819213 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 254 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 256 1 14 tgtd: iscsi_task_queue(1512) 13 13 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 12 2 tgtd: target_cmd_queue(862) 0x8f3e7e0 12 2 1 tgtd: spc_inquiry(164) 0 0 tgtd: target_cmd_queue(873) 14 12 (nil) 0x8f3f000 0 0 254 0 0 tgtd: iscsi_task_tx_start(1858) found a task 14 254 0 0 tgtd: iscsi_data_rsp_build(1050) 66 254 66 819214 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 254 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 256 1 15 tgtd: iscsi_task_queue(1512) 14 14 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 12 2 tgtd: target_cmd_queue(862) 0x8f3e7e0 12 2 1 tgtd: spc_inquiry(164) 0 0 tgtd: target_cmd_queue(873) 15 12 (nil) 0x8f3f000 0 0 254 0 0 tgtd: iscsi_task_tx_start(1858) found a task 15 254 0 0 tgtd: iscsi_data_rsp_build(1050) 66 254 66 819215 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 254 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 256 1 16 tgtd: iscsi_task_queue(1512) 15 15 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 12 3 tgtd: target_cmd_queue(862) 0x8f3e7e0 12 3 1 tgtd: spc_inquiry(164) 0 0 tgtd: target_cmd_queue(873) 16 12 (nil) 0x8f3f000 0 0 254 0 0 tgtd: iscsi_task_tx_start(1858) found a task 16 254 0 0 tgtd: iscsi_data_rsp_build(1050) 66 254 66 819216 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 254 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 256 1 17 tgtd: iscsi_task_queue(1512) 16 16 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 12 3 tgtd: target_cmd_queue(862) 0x8f3e7e0 12 3 1 tgtd: spc_inquiry(164) 0 0 tgtd: target_cmd_queue(873) 17 12 (nil) 0x8f3f000 0 0 254 0 0 tgtd: iscsi_task_tx_start(1858) found a task 17 254 0 0 tgtd: iscsi_data_rsp_build(1050) 66 254 66 819217 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 254 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 256 1 18 tgtd: iscsi_task_queue(1512) 17 17 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 12 1 tgtd: target_cmd_queue(862) 0x8f3e7e0 12 1 1 tgtd: spc_inquiry(164) 1 0 tgtd: target_cmd_queue(873) 18 12 (nil) 0x8f3f000 0 0 254 0 0 tgtd: iscsi_task_tx_start(1858) found a task 18 254 0 0 tgtd: iscsi_data_rsp_build(1050) 7 254 7 819218 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 254 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 256 1 19 tgtd: iscsi_task_queue(1512) 18 18 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 12 1 tgtd: target_cmd_queue(862) 0x8f3e7e0 12 1 1 tgtd: spc_inquiry(164) 1 83 tgtd: target_cmd_queue(873) 19 12 (nil) 0x8f3f000 0 0 254 0 0 tgtd: iscsi_task_tx_start(1858) found a task 19 254 0 0 tgtd: iscsi_data_rsp_build(1050) 32 254 32 819219 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 254 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 256 1 1a tgtd: iscsi_task_queue(1512) 19 19 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 12 1 tgtd: target_cmd_queue(862) 0x8f3e7e0 12 1 1 tgtd: spc_inquiry(164) 1 0 tgtd: target_cmd_queue(873) 1a 12 (nil) 0x8f3f000 0 0 254 0 0 tgtd: iscsi_task_tx_start(1858) found a task 1a 254 0 0 tgtd: iscsi_data_rsp_build(1050) 7 254 7 81921a tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 254 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 256 1 1b tgtd: iscsi_task_queue(1512) 1a 1a 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 12 1 tgtd: target_cmd_queue(862) 0x8f3e7e0 12 1 1 tgtd: spc_inquiry(164) 1 83 tgtd: target_cmd_queue(873) 1b 12 (nil) 0x8f3f000 0 0 254 0 0 tgtd: iscsi_task_tx_start(1858) found a task 1b 254 0 0 tgtd: iscsi_data_rsp_build(1050) 32 254 32 81921b tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 254 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 256 1 1c tgtd: iscsi_task_queue(1512) 1b 1b 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 12 2 tgtd: target_cmd_queue(862) 0x8f3e7e0 12 2 1 tgtd: spc_inquiry(164) 1 0 tgtd: target_cmd_queue(873) 1c 12 (nil) 0x8f3f000 0 0 254 0 0 tgtd: iscsi_task_tx_start(1858) found a task 1c 254 0 0 tgtd: iscsi_data_rsp_build(1050) 7 254 7 81921c tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 254 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 256 1 1d tgtd: iscsi_task_queue(1512) 1c 1c 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 12 2 tgtd: target_cmd_queue(862) 0x8f3e7e0 12 2 1 tgtd: spc_inquiry(164) 1 0 tgtd: target_cmd_queue(873) 1d 12 (nil) 0x8f3f000 0 0 254 0 0 tgtd: iscsi_task_tx_start(1858) found a task 1d 254 0 0 tgtd: iscsi_data_rsp_build(1050) 7 254 7 81921d tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 254 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 256 1 1e tgtd: iscsi_task_queue(1512) 1d 1d 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 12 2 tgtd: target_cmd_queue(862) 0x8f3e7e0 12 2 1 tgtd: spc_inquiry(164) 1 83 tgtd: target_cmd_queue(873) 1e 12 (nil) 0x8f3f000 0 0 254 0 0 tgtd: iscsi_task_tx_start(1858) found a task 1e 254 0 0 tgtd: iscsi_data_rsp_build(1050) 32 254 32 81921e tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 254 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 256 1 1f tgtd: iscsi_task_queue(1512) 1e 1e 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 12 2 tgtd: target_cmd_queue(862) 0x8f3e7e0 12 2 1 tgtd: spc_inquiry(164) 1 83 tgtd: target_cmd_queue(873) 1f 12 (nil) 0x8f3f000 0 0 254 0 0 tgtd: iscsi_task_tx_start(1858) found a task 1f 254 0 0 tgtd: iscsi_data_rsp_build(1050) 32 254 32 81921f tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 254 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 256 1 20 tgtd: iscsi_task_queue(1512) 1f 1f 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 12 3 tgtd: target_cmd_queue(862) 0x8f3e7e0 12 3 1 tgtd: spc_inquiry(164) 1 0 tgtd: target_cmd_queue(873) 20 12 (nil) 0x8f3f000 0 0 254 0 0 tgtd: iscsi_task_tx_start(1858) found a task 20 254 0 0 tgtd: iscsi_data_rsp_build(1050) 7 254 7 819220 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 254 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 256 1 21 tgtd: iscsi_task_queue(1512) 20 20 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 12 3 tgtd: target_cmd_queue(862) 0x8f3e7e0 12 3 1 tgtd: spc_inquiry(164) 1 0 tgtd: target_cmd_queue(873) 21 12 (nil) 0x8f3f000 0 0 254 0 0 tgtd: iscsi_task_tx_start(1858) found a task 21 254 0 0 tgtd: iscsi_data_rsp_build(1050) 7 254 7 819221 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 254 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 256 1 22 tgtd: iscsi_task_queue(1512) 21 21 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 12 3 tgtd: target_cmd_queue(862) 0x8f3e7e0 12 3 1 tgtd: spc_inquiry(164) 1 83 tgtd: target_cmd_queue(873) 22 12 (nil) 0x8f3f000 0 0 254 0 0 tgtd: iscsi_task_tx_start(1858) found a task 22 254 0 0 tgtd: iscsi_data_rsp_build(1050) 32 254 32 819222 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 254 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 12 0 0 256 1 23 tgtd: iscsi_task_queue(1512) 22 22 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 12 3 tgtd: target_cmd_queue(862) 0x8f3e7e0 12 3 1 tgtd: spc_inquiry(164) 1 83 tgtd: target_cmd_queue(873) 23 12 (nil) 0x8f3f000 0 0 254 0 0 tgtd: iscsi_task_tx_start(1858) found a task 23 254 0 0 tgtd: iscsi_data_rsp_build(1050) 32 254 32 819223 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 254 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_noop_out_rx_start(1605) ffffffff 24 0 tgtd: iscsi_task_queue(1512) 23 23 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 25 0 tgtd: iscsi_task_queue(1512) 23 23 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 26 0 tgtd: iscsi_task_queue(1512) 23 23 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 27 0 tgtd: iscsi_task_queue(1512) 23 23 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 28 tgtd: iscsi_task_queue(1512) 23 23 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 12 4 tgtd: target_cmd_queue(862) 0x8f3e7e0 12 4 1 tgtd: spc_inquiry(164) 0 0 tgtd: target_cmd_queue(873) 28 12 (nil) 0x8f3f000 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 28 56 0 0 tgtd: iscsi_data_rsp_build(1050) 56 56 56 819228 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 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 29 tgtd: iscsi_task_queue(1512) 24 24 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 1a 4 tgtd: target_cmd_queue(862) 0x8f3e7e0 1a 4 1 tgtd: target_cmd_queue(873) 29 1a (nil) 0x8f3f000 0 0 136 0 0 tgtd: iscsi_task_tx_start(1858) found a task 29 136 0 0 tgtd: iscsi_data_rsp_build(1050) 24 136 24 819229 tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 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 2a tgtd: iscsi_task_queue(1512) 25 25 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 b8 4 tgtd: target_cmd_queue(862) 0x8f3e7e0 b8 4 1 tgtd: smc_read_element_status(372) 40 1256 24 tgtd: target_cmd_queue(873) 2a b8 (nil) 0x8f3f000 0 0 40 0 0 tgtd: iscsi_scsi_cmd_done(1185) shrunk too big device read len 1256> 40 tgtd: iscsi_task_tx_start(1858) found a task 2a 40 0 0 tgtd: iscsi_data_rsp_build(1050) 40 40 40 81922a tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 40 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 b8 0 0 1264 1 2b tgtd: iscsi_task_queue(1512) 26 26 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 b8 4 tgtd: target_cmd_queue(862) 0x8f3e7e0 b8 4 1 tgtd: smc_read_element_status(372) 1264 1256 24 tgtd: target_cmd_queue(873) 2b b8 (nil) 0x8f3f000 0 0 1264 0 0 tgtd: iscsi_task_tx_start(1858) found a task 2b 1264 0 0 tgtd: iscsi_data_rsp_build(1050) 1256 1264 1256 81922b tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 1264 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 b8 0 0 40 1 2c tgtd: iscsi_task_queue(1512) 27 27 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 b8 4 tgtd: target_cmd_queue(862) 0x8f3e7e0 b8 4 1 tgtd: smc_read_element_status(372) 40 164 3 tgtd: target_cmd_queue(873) 2c b8 (nil) 0x8f3f000 0 0 40 0 0 tgtd: iscsi_scsi_cmd_done(1185) shrunk too big device read len 164> 40 tgtd: iscsi_task_tx_start(1858) found a task 2c 40 0 0 tgtd: iscsi_data_rsp_build(1050) 40 40 40 81922c tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 40 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_scsi_cmd_rx_start(1567) 1 b8 0 0 172 1 2d tgtd: iscsi_task_queue(1512) 28 28 1 tgtd: target_cmd_queue(843) 0x8f3e7e0 b8 4 tgtd: target_cmd_queue(862) 0x8f3e7e0 b8 4 1 tgtd: smc_read_element_status(372) 172 164 3 tgtd: target_cmd_queue(873) 2d b8 (nil) 0x8f3f000 0 0 172 0 0 tgtd: iscsi_task_tx_start(1858) found a task 2d 172 0 0 tgtd: iscsi_data_rsp_build(1050) 164 172 164 81922d tgtd: __cmd_done(934) 0 (nil) 0x8f3f000 0 172 0 tgtd: iscsi_task_tx_start(1883) no more data tgtd: iscsi_noop_out_rx_start(1605) ffffffff 2e 0 tgtd: iscsi_task_queue(1512) 29 29 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 2f 0 tgtd: iscsi_task_queue(1512) 29 29 40 tgtd: iscsi_task_tx_start(1858) found a task 0 4294967295 0 0 tgtd: iscsi_task_tx_start(1883) no more data On 11/25/2009 04:38 PM, FUJITA Tomonori wrote:On Wed, 25 Nov 2009 16:34:41 +0100 Albert Pauw<albert.pauw@xxxxxxxxx> wrote:Please send a log file including tgt's debug message (as you did in 2009/10/28).Here's the last bit of tgtd -f -d8: tgtd: spc_inquiry(164) 0 0 tgtd: target_cmd_queue(873) 28 12 (nil) 0x84a1000 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 28 56 0 0 tgtd: iscsi_data_rsp_build(1050) 56 56 56 819228 tgtd: __cmd_done(934) 0 (nil) 0x84a1000 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 29 tgtd: iscsi_task_queue(1512) 24 24 1 tgtd: target_cmd_queue(843) 0x84a07e0 1a 4 tgtd: target_cmd_queue(862) 0x84a07e0 1a 4 1 tgtd: target_cmd_queue(873) 29 1a (nil) 0x84a1000 0 0 136 0 0 tgtd: iscsi_task_tx_start(1858) found a task 29 136 0 0 tgtd: iscsi_data_rsp_build(1050) 24 136 24 819229 tgtd: __cmd_done(934) 0 (nil) 0x84a1000 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 2a tgtd: iscsi_task_queue(1512) 25 25 1 tgtd: target_cmd_queue(843) 0x84a07e0 b8 4 tgtd: target_cmd_queue(862) 0x84a07e0 b8 4 1 tgtd: smc_read_element_status(372) 40 1256 24 *** glibc detected *** tgtd: double free or corruption (!prev): 0x084a0978 *** *** glibc detected *** tgtd: malloc(): memory corruption: 0x084a0c00 ***Try this instead of the previous: diff --git a/usr/smc.c b/usr/smc.c index 6430882..0e0d4d2 100644 --- a/usr/smc.c +++ b/usr/smc.c @@ -304,7 +304,7 @@ static int smc_read_element_status(int host_no, struct scsi_cmd *cmd) } } - data = zalloc(alloc_len); + data = zalloc(8192); if (!data) { dprintf("Can't allocate enough memory for cmd\n"); key = HARDWARE_ERROR; @@ -369,6 +369,7 @@ static int smc_read_element_status(int host_no, struct scsi_cmd *cmd) /* Lastly, fill in data header */ len = element_status_data_hdr(data, dvcid, voltag, first, count); + eprintf("%d %d %d\n", alloc_len, len, count); memcpy(scsi_get_in_buffer(cmd), data, min(len, alloc_len)); scsi_set_in_resid_by_actual(cmd, len); free(data);-- To unsubscribe from this list: send the line "unsubscribe stgt" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
Attachment:
output.wireshark
Description: Binary data