Thanks for narrowing it down to a reproducible state. I'll have a look at it this afternoon (in 6 - 8hrs time).. Cheers Mark On Wed, Oct 28, 2009 at 8:29 PM, Albert Pauw <albert.pauw at gmail.com> wrote: > I nailed it down to one bit, this is the targets.conf file that triggers the > problem: > > <target iqn.2008-09.com.example:server.tape> > <backing-store /root/smc> > lun 4 > device-type changer > removable 1 > vendor_id "STK" > product_id "L700" > product_rev "0001" > scsi_sn "123:456:789:000" > # Dummy 'page 0' > mode_page "0:0:0" > # Page 0x02: Disconnect/Reconnect SPC-3 > mode_page "0x02:0:14:0x80:0x80:0:0xa:0:0:0:0:0:0:0:0:0:0" > # Page 0x1a: Power Condition SPC-3 > mode_page "0x1a:0:18:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0" > # Page 0x1c: Informational Exceptions Control SPC-3 > mode_page "0x1c:0:10:8:0:0:0:0:0:0:0:0:0" > # Page 0x1d: Element Address Assignment SMC-3 7.3.4 > mode_page "0x1d:0:0x12:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0" > # Page 0x1e: Transport Geometry Parameters SMC-3 7.3.5 > mode_page "0x1e:0:2:0:0" > # Page 0x1f: Device Capabilities SMC-3 7.3.2 > # Page 0x1f/Subpage 0x41: Extended Device Capabilities SMC-3 7.3.3 > mode_page > "0x1f:0:0x12:0x0f:7:0x0f:0x0f:0x0f:0x0f:0:0:0:0:0x0f:0x0f:0x0f:0x0f:0:0:0:0" > # Type 2: Storage Elements (tape slots) > params > element_type=2,start_address=1000,quantity=24,media_home=/root/btapes > </backing-store> > </target> > > As you can see only element_type 2 triggers the problem. The only difference > with my script is > that I also define (or fill) several tapes. However, a completely empty > changer is a valid configuration, > and this is the last of the tgtd -f -d8 output on this: > tgtd: spc_inquiry(164) 0 0 > tgtd: target_cmd_queue(857) e 12 (nil) 0x89cb000 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 e 56 0 0 > tgtd: iscsi_data_rsp_build(1050) 56 56 56 8192e > tgtd: __cmd_done(918) 0 (nil) 0x89cb000 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 f > tgtd: iscsi_task_queue(1512) c c 1 > tgtd: target_cmd_queue(827) 0x89ca280 1a 4 > tgtd: target_cmd_queue(846) 0x89ca280 1a 4 1 > tgtd: target_cmd_queue(857) f 1a (nil) 0x89cb000 0 0 136 0 0 > tgtd: iscsi_task_tx_start(1858) found a task f 136 0 0 > tgtd: iscsi_data_rsp_build(1050) 24 136 24 8192f > tgtd: __cmd_done(918) 0 (nil) 0x89cb000 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 10 > tgtd: iscsi_task_queue(1512) d d 1 > tgtd: target_cmd_queue(827) 0x89ca280 b8 4 > tgtd: target_cmd_queue(846) 0x89ca280 b8 4 1 > *** glibc detected *** tgtd: free(): invalid next size (fast): 0x089c3488 > *** > *** glibc detected *** tgtd: malloc(): memory corruption: 0x089c34b8 *** > > Looks like a problem with the allocation of the slots. > > I hope this will give you guys enough clues. > > Reason I am trying to get such a targets.conf file working is that we can > add several example > targets.conf to the tgt distribution (and not only vtl configs) so people > can set it up more easily. > > Albert > -- > 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 > -- 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 |