[Pkg-iscsi-maintainers] Bug#685422: iscsitarget-dkms: ata smart commands denial of service

mailing list subscriber mailinglists35 at gmail.com
Sun Aug 26 18:12:26 UTC 2012


On Mon, Aug 20, 2012 at 7:19 PM, Ritesh Raj Sarraf <rrs at researchut.com> wrote:
> On Monday 20 August 2012 10:27 PM, bug subscriber wrote:
>> ata smart commands generates kernel call trace and kernel process istd1 hangs running at 100% cpu. iscsi target becomes unuseable unless reboot
>> for example, I ran smartctl -i sdl on my windows xp initiator.
>> this is how kernel has responded:
> How frequently is this reproducible?

all the time

> Does the same have on a linux
> initiator also?

yes.
booting another machine with system rescue cd:

root at sysresccd /root % smartctl -i /dev/sdb
smartctl 5.42 2011-10-20 r3458 [i686-linux-3.2.19-std280-i586] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

Vendor:               IET
Product:              VIRTUAL-DISK
Revision:             0
User Capacity:        1,000,204,746,752 bytes [1.00 TB]
Logical block size:   512 bytes
^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C

on server:

Aug 26 20:39:16 homerouter kernel: [  664.952746] iscsi_trgt: BUG at
/var/lib/dkms/iscsitarget/1.4.20.2/build/kernel/iscsi.c:392
assert(req->tio)
Aug 26 20:39:16 homerouter kernel: [  664.952755] Pid: 3275, comm:
istiod1 Tainted: G           O 3.2.0-3-amd64 #1
Aug 26 20:39:16 homerouter kernel: [  664.952759] Call Trace:
Aug 26 20:39:16 homerouter kernel: [  664.952771]
[<ffffffffa04df3f1>] ? send_data_rsp+0x45/0x1f4 [iscsi_trgt]
Aug 26 20:39:16 homerouter kernel: [  664.952778]
[<ffffffffa04e8093>] ? ua_pending+0x19/0xa5 [iscsi_trgt]
Aug 26 20:39:16 homerouter kernel: [  664.952785]
[<ffffffffa04e6da8>] ? disk_execute_cmnd+0x1cf/0x22d [iscsi_trgt]
Aug 26 20:39:16 homerouter kernel: [  664.952792]
[<ffffffffa04e2a3d>] ? worker_thread+0xfd/0x255 [iscsi_trgt]
Aug 26 20:39:16 homerouter kernel: [  664.952799]
[<ffffffff8103f48f>] ? try_to_wake_up+0x197/0x197
Aug 26 20:39:16 homerouter kernel: [  664.952805]
[<ffffffffa04e2940>] ? nthread_stop+0x35/0x35 [iscsi_trgt]
Aug 26 20:39:16 homerouter kernel: [  664.952811]
[<ffffffff8105efad>] ? kthread+0x76/0x7e
Aug 26 20:39:16 homerouter kernel: [  664.952818]
[<ffffffff81351df4>] ? kernel_thread_helper+0x4/0x10
Aug 26 20:39:16 homerouter kernel: [  664.952823]
[<ffffffff8105ef37>] ? kthread_worker_fn+0x139/0x139
Aug 26 20:39:16 homerouter kernel: [  664.952828]
[<ffffffff81351df0>] ? gs_change+0x13/0x13
Aug 26 20:39:16 homerouter kernel: [  664.952854] ------------[ cut
here ]------------
Aug 26 20:39:16 homerouter kernel: [  664.952858] kernel BUG at
/var/lib/dkms/iscsitarget/1.4.20.2/build/kernel/iscsi.c:392!
Aug 26 20:39:16 homerouter kernel: [  664.952863] invalid opcode: 0000 [#1] SMP
Aug 26 20:39:16 homerouter kernel: [  664.952867] CPU 0
Aug 26 20:39:16 homerouter kernel: [  664.952869] Modules linked in:
pppoe pppox bluetooth ppp_generic slhc drbd lru_cache cn tun
ip6table_filter ip6_tables ebtable_nat ebtables iscsi_trgt(O) crc32c
ipt_LOG ipt_REJECT xt_multiport xt_conntrack iptable_filter xt_TCPMSS
xt_tcpmss iptable_mangle ipt_MASQUERADE xt_tcpudp iptable_nat nf_nat
nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack ip_tables x_tables
kvm_intel kvm ib_iser rdma_cm ib_addr iw_cm ib_cm ib_sa ib_mad ib_core
iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi fuse bridge stp
loop tpm_infineon snd_hda_codec_analog snd_hda_intel snd_hda_codec
snd_hwdep i915 snd_pcm snd_page_alloc snd_timer drm_kms_helper snd
hp_wmi asix mcs7830 drm soundcore i2c_algo_bit sparse_keymap usbnet
i2c_core rfkill iTCO_wdt iTCO_vendor_support acpi_cpufreq mperf
psmouse tpm_tis tpm video processor coretemp serio_raw pcspkr evdev
tpm_bios wmi button thermal_sys ext4 crc16 jbd2 mbcache usb_storage
uas raid1 md_mod dm_mirror dm_region_hash dm_log dm_mod sd_mod
crc_t10dif uhci_hcd ata
Aug 26 20:39:16 homerouter kernel: _generic ehci_hcd floppy ata_piix
e100 mii libata scsi_mod e1000e usbcore usb_common [last unloaded:
scsi_wait_scan]
Aug 26 20:39:16 homerouter kernel: [  664.952979]
Aug 26 20:39:16 homerouter kernel: [  664.952983] Pid: 3275, comm:
istiod1 Tainted: G           O 3.2.0-3-amd64 #1 Hewlett-Packard HP
Compaq dc5800 Microtower/2820h
Aug 26 20:39:16 homerouter kernel: [  664.952990] RIP:
0010:[<ffffffffa04df3f1>]  [<ffffffffa04df3f1>]
send_data_rsp+0x45/0x1f4 [iscsi_trgt]
Aug 26 20:39:16 homerouter kernel: [  664.953000] RSP:
0018:ffff88011368de10  EFLAGS: 00010286
Aug 26 20:39:16 homerouter kernel: [  664.953003] RAX:
0000000000000000 RBX: ffff880115fe40a0 RCX: 0000000000008a05
Aug 26 20:39:16 homerouter kernel: [  664.953008] RDX:
0000000000008a05 RSI: ffff88011368df58 RDI: ffff88011368df58
Aug 26 20:39:16 homerouter kernel: [  664.953012] RBP:
0000000000000000 R08: 0000000000000000 R09: 0720072007200720
Aug 26 20:39:16 homerouter kernel: [  664.953016] R10:
0000000000000001 R11: 0720072007200720 R12: ffff880113b8a9b0
Aug 26 20:39:16 homerouter kernel: [  664.953020] R13:
ffff880115d0c000 R14: ffff880115b710d8 R15: ffff880115b710e8
Aug 26 20:39:16 homerouter kernel: [  664.953025] FS:
0000000000000000(0000) GS:ffff88011bc00000(0000)
knlGS:0000000000000000
Aug 26 20:39:16 homerouter kernel: [  664.953030] CS:  0010 DS: 0000
ES: 0000 CR0: 000000008005003b
Aug 26 20:39:16 homerouter kernel: [  664.953034] CR2:
00007fcae5597600 CR3: 0000000115ea6000 CR4: 00000000000006f0
Aug 26 20:39:16 homerouter kernel: [  664.953039] DR0:
0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Aug 26 20:39:16 homerouter kernel: [  664.953043] DR3:
0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Aug 26 20:39:16 homerouter kernel: [  664.953047] Process istiod1
(pid: 3275, threadinfo ffff88011368c000, task ffff880113b8a9b0)
Aug 26 20:39:16 homerouter kernel: [  664.953052] Stack:
Aug 26 20:39:16 homerouter kernel: [  664.953054]  0000009800000000
ffff8801130ca970 0000000000013740 ffffffffa04e8093
Aug 26 20:39:16 homerouter kernel: [  664.953062]  ffff88011368dfd8
ffff880115fe40a0 ffff880113b8a9b0 ffff880113b8a9b0
Aug 26 20:39:16 homerouter kernel: [  664.953068]  ffff880115d0c000
ffff880115b710d8 ffff880115b710e8 ffffffffa04e6da8
Aug 26 20:39:16 homerouter kernel: [  664.953075] Call Trace:
Aug 26 20:39:16 homerouter kernel: [  664.953081]
[<ffffffffa04e8093>] ? ua_pending+0x19/0xa5 [iscsi_trgt]
Aug 26 20:39:16 homerouter kernel: [  664.953088]
[<ffffffffa04e6da8>] ? disk_execute_cmnd+0x1cf/0x22d [iscsi_trgt]
Aug 26 20:39:16 homerouter kernel: [  664.953095]
[<ffffffffa04e2a3d>] ? worker_thread+0xfd/0x255 [iscsi_trgt]
Aug 26 20:39:16 homerouter kernel: [  664.953100]
[<ffffffff8103f48f>] ? try_to_wake_up+0x197/0x197
Aug 26 20:39:16 homerouter kernel: [  664.953107]
[<ffffffffa04e2940>] ? nthread_stop+0x35/0x35 [iscsi_trgt]
Aug 26 20:39:16 homerouter kernel: [  664.953112]
[<ffffffff8105efad>] ? kthread+0x76/0x7e
Aug 26 20:39:16 homerouter kernel: [  664.953117]
[<ffffffff81351df4>] ? kernel_thread_helper+0x4/0x10
Aug 26 20:39:16 homerouter kernel: [  664.953123]
[<ffffffff8105ef37>] ? kthread_worker_fn+0x139/0x139
Aug 26 20:39:16 homerouter kernel: [  664.953128]
[<ffffffff81351df0>] ? gs_change+0x13/0x13
Aug 26 20:39:16 homerouter kernel: [  664.953131] Code: 48 85 ed 75 28
48 c7 c1 38 9d 4e a0 ba 88 01 00 00 48 c7 c6 a7 99 4e a0 48 c7 c7 df
99 4e a0 31 c0 e8 de 52 e6 e0 e8 19 38 e6 e0 <0f> 0b 48 89 df e8 d0 fa
ff ff 8b 55 14 39 d0 0f 46 d0 85 d2 0f
Aug 26 20:39:16 homerouter kernel: [  664.953172] RIP
[<ffffffffa04df3f1>] send_data_rsp+0x45/0x1f4 [iscsi_trgt]
Aug 26 20:39:16 homerouter kernel: [  664.953179]  RSP <ffff88011368de10>
Aug 26 20:39:16 homerouter kernel: [  664.953183] ---[ end trace
c7b4f131a18e1859 ]---
Aug 26 20:39:58 homerouter kernel: [  706.784220] iscsi_trgt: Abort
Task (01) issued on tid:1 lun:0 by sid:281474997486080 (Function
Complete)
Aug 26 20:39:58 homerouter kernel: [  706.788733] BUG: unable to
handle kernel NULL pointer dereference at           (null)
Aug 26 20:39:58 homerouter kernel: [  706.788741] IP: [<
(null)>]           (null)
Aug 26 20:39:58 homerouter kernel: [  706.788746] PGD 115e3a067 PUD
115e3b067 PMD 0
Aug 26 20:39:58 homerouter kernel: [  706.788752] Oops: 0010 [#2] SMP
Aug 26 20:39:58 homerouter kernel: [  706.788757] CPU 0
Aug 26 20:39:58 homerouter kernel: [  706.788758] Modules linked in:
pppoe pppox bluetooth ppp_generic slhc drbd lru_cache cn tun
ip6table_filter ip6_tables ebtable_nat ebtables iscsi_trgt(O) crc32c
ipt_LOG ipt_REJECT xt_multiport xt_conntrack iptable_filter xt_TCPMSS
xt_tcpmss iptable_mangle ipt_MASQUERADE xt_tcpudp iptable_nat nf_nat
nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack ip_tables x_tables
kvm_intel kvm ib_iser rdma_cm ib_addr iw_cm ib_cm ib_sa ib_mad ib_core
iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi fuse bridge stp
loop tpm_infineon snd_hda_codec_analog snd_hda_intel snd_hda_codec
snd_hwdep i915 snd_pcm snd_page_alloc snd_timer drm_kms_helper snd
hp_wmi asix mcs7830 drm soundcore i2c_algo_bit sparse_keymap usbnet
i2c_core rfkill iTCO_wdt iTCO_vendor_support acpi_cpufreq mperf
psmouse tpm_tis tpm video processor coretemp serio_raw pcspkr evdev
tpm_bios wmi button thermal_sys ext4 crc16 jbd2 mbcache usb_storage
uas raid1 md_mod dm_mirror dm_region_hash dm_log dm_mod sd_mod
crc_t10dif uhci_hcd ata
Aug 26 20:39:58 homerouter kernel: _generic ehci_hcd floppy ata_piix
e100 mii libata scsi_mod e1000e usbcore usb_common [last unloaded:
scsi_wait_scan]
Aug 26 20:39:58 homerouter kernel: [  706.788869]
Aug 26 20:39:58 homerouter kernel: [  706.788873] Pid: 3261, comm:
istd1 Tainted: G      D    O 3.2.0-3-amd64 #1 Hewlett-Packard HP
Compaq dc5800 Microtower/2820h
Aug 26 20:39:58 homerouter kernel: [  706.788881] RIP:
0010:[<0000000000000000>]  [<          (null)>]           (null)
Aug 26 20:39:58 homerouter kernel: [  706.788886] RSP:
0018:ffff880113525cd8  EFLAGS: 00010087
Aug 26 20:39:58 homerouter kernel: [  706.788890] RAX:
ffff88011368de90 RBX: 0000000000000001 RCX: 0000000000000000
Aug 26 20:39:58 homerouter kernel: [  706.788894] RDX:
0000000000000000 RSI: 0000000000000003 RDI: ffff88011368de90
Aug 26 20:39:58 homerouter kernel: [  706.788898] RBP:
0000000000000003 R08: 0000000000000000 R09: 0000000000013740
Aug 26 20:39:58 homerouter kernel: [  706.788903] R10:
0000000000013740 R11: ffff880112f158d0 R12: c6c166f1ffffffe9
Aug 26 20:39:58 homerouter kernel: [  706.788907] R13:
0000000000000000 R14: 0000000000000000 R15: ffff880115b710f0
Aug 26 20:39:58 homerouter kernel: [  706.788911] FS:
0000000000000000(0000) GS:ffff88011bc00000(0000)
knlGS:0000000000000000
Aug 26 20:39:58 homerouter kernel: [  706.788916] CS:  0010 DS: 0000
ES: 0000 CR0: 000000008005003b
Aug 26 20:39:58 homerouter kernel: [  706.788920] CR2:
0000000000000000 CR3: 0000000115e95000 CR4: 00000000000006f0
Aug 26 20:39:58 homerouter kernel: [  706.788924] DR0:
0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Aug 26 20:39:58 homerouter kernel: [  706.788929] DR3:
0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Aug 26 20:39:58 homerouter kernel: [  706.788933] Process istd1 (pid:
3261, threadinfo ffff880113524000, task ffff880112f158d0)
Aug 26 20:39:58 homerouter kernel: [  706.788938] Stack:
Aug 26 20:39:58 homerouter kernel: [  706.788940]  ffffffff810360b2
ffff880115fe4a60 0000000000000000 000000000000004f
Aug 26 20:39:58 homerouter kernel: [  706.788947]  ffff880115b710e8
0000000000000286 000000000000035e 000000000000035f
Aug 26 20:39:58 homerouter kernel: [  706.788954]  ffff8801135e6098
0000000000000001 ffffffff81037d6e ffff880112f158d0
Aug 26 20:39:58 homerouter kernel: [  706.788961] Call Trace:
Aug 26 20:39:58 homerouter kernel: [  706.788967]
[<ffffffff810360b2>] ? __wake_up_common+0x40/0x77
Aug 26 20:39:58 homerouter kernel: [  706.788973]
[<ffffffff81037d6e>] ? __wake_up+0x35/0x46
Aug 26 20:39:58 homerouter kernel: [  706.788981]
[<ffffffffa04e020c>] ? iscsi_session_push_cmnd+0x1ba/0x24f
[iscsi_trgt]
Aug 26 20:39:58 homerouter kernel: [  706.788988]
[<ffffffff813499cf>] ? _cond_resched+0x7/0x1c
Aug 26 20:39:58 homerouter kernel: [  706.788995]
[<ffffffffa04e1cca>] ? istd+0x500/0x101e [iscsi_trgt]
Aug 26 20:39:58 homerouter kernel: [  706.789000]
[<ffffffff81037ec0>] ? set_next_entity+0x32/0x55
Aug 26 20:39:58 homerouter kernel: [  706.789006]
[<ffffffff812d9898>] ? inet_dgram_connect+0x72/0x72
Aug 26 20:39:58 homerouter kernel: [  706.789011]
[<ffffffff81349974>] ? __schedule+0x5ac/0x5c3
Aug 26 20:39:58 homerouter kernel: [  706.789018]
[<ffffffffa04e17ca>] ? nthread_wakeup+0x2c/0x2c [iscsi_trgt]
Aug 26 20:39:58 homerouter kernel: [  706.789024]
[<ffffffff8105efad>] ? kthread+0x76/0x7e
Aug 26 20:39:58 homerouter kernel: [  706.789030]
[<ffffffff81351df4>] ? kernel_thread_helper+0x4/0x10
Aug 26 20:39:58 homerouter kernel: [  706.789035]
[<ffffffff8105ef37>] ? kthread_worker_fn+0x139/0x139
Aug 26 20:39:58 homerouter kernel: [  706.789040]
[<ffffffff81351df0>] ? gs_change+0x13/0x13
Aug 26 20:39:58 homerouter kernel: [  706.789043] Code:  Bad RIP value.
Aug 26 20:39:58 homerouter kernel: [  706.789049] RIP  [<
(null)>]           (null)
Aug 26 20:39:58 homerouter kernel: [  706.789053]  RSP <ffff880113525cd8>
Aug 26 20:39:58 homerouter kernel: [  706.789056] CR2: 0000000000000000
Aug 26 20:39:58 homerouter kernel: [  706.789059] ---[ end trace
c7b4f131a18e185a ]---

> I don't have the resources but I will soon try to reproduce this.

I'm surprised noone hit this yet...!

I couldn't hit this on ubuntu 12.04lts version of iscsitarget-dkms
1.4.20.2-5ubuntu3 but I reproduced it onto another wheezy machine, so
somewhere inbetween wheezy version and ubuntu 12.04lts version must be
some upstream/ubuntu fix. (all running amd64)



More information about the Pkg-iscsi-maintainers mailing list