Bug 887285

Summary: iscsiadm fails to logout session
Product: Red Hat Enterprise Linux 7 Reporter: Bruno Goncalves <bgoncalv>
Component: iscsi-initiator-utilsAssignee: Chris Leech <cleech>
Status: CLOSED CURRENTRELEASE QA Contact: Bruno Goncalves <bgoncalv>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: agrover
Target Milestone: rcKeywords: Regression, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 13:17:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bruno Goncalves 2012-12-14 14:45:09 UTC
Description of problem:
Trying to logout from a session with LIO as target causes:
[  372.055000] BUG: soft lockup - CPU#2 stuck for 22s! [kworker/u:0:6]
[  372.055002] Modules linked in: bnx2i cnic cxgb4i cxgb3i ib_iser rdma_cm ib_addr iw_cm ib_cm ib_sa ib_mad ib_core iscsi_tcp dm_service_time target_core_pscsi target_core_file target_core_iblock iscsi_target_mod target_core_mod lockd nf_conntrack_netbios_ns nf_conntrack_broadcast ipt_MASQUERADE ip6table_mangle ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 iptable_nat nf_nat iptable_mangle ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ip_tables be2iscsi uio cxgb4 cxgb3 mdio libcxgbi libiscsi_tcp sg dm_multipath iTCO_wdt iTCO_vendor_support ppdev lpc_ich dcdbas mfd_core serio_raw pcspkr parport_pc shpchp parport microcode e752x_edac edac_core sd_mod crc_t10dif sr_mod cdrom ata_generic pata_acpi radeon i2c_algo_bit
[  372.055002]  drm_kms_helper ttm drm ata_piix libata i2c_core e1000 qla4xxx libiscsi scsi_transport_iscsi mptspi mptscsih qla3xxx iscsi_boot_sysfs mptbase scsi_transport_spi video floppy sunrpc dm_mirror dm_region_hash dm_log dm_mod [last unloaded: iscsi_tcp]
[  372.055002] CPU 2 
[  372.055002] Pid: 6, comm: kworker/u:0 Not tainted 3.6.0-0.29.el7.x86_64 #1 Dell Computer Corporation PowerEdge 2800/0NJ022
[  372.055002] RIP: 0010:[<ffffffff815d4882>]  [<ffffffff815d4882>] _raw_spin_unlock_irqrestore+0x12/0x20
[  372.055002] RSP: 0000:ffff88007d3fdd30  EFLAGS: 00000202
[  372.055002] RAX: 00000000fffffffa RBX: 000000000000d2dc RCX: ffff880078d1a000
[  372.055002] RDX: ffff880078d1a000 RSI: 0000000000000202 RDI: 0000000000000202
[  372.055002] RBP: ffff88007d3fdd30 R08: ffffffff81991380 R09: 0000000000000000
[  372.055002] R10: ffffffff811f9b5c R11: 0000000000000000 R12: ffffffff81991380
[  372.055002] R13: 0000000000000000 R14: ffffffff811f9b5c R15: 0000000000000000
[  372.055002] FS:  0000000000000000(0000) GS:ffff88007fc80000(0000) knlGS:0000000000000000
[  372.055002] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  372.055002] CR2: 00007f57cfbe69d0 CR3: 000000000189d000 CR4: 00000000000007e0
[  372.055002] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  372.055002] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[  372.055002] Process kworker/u:0 (pid: 6, threadinfo ffff88007d3fc000, task ffff88007c800000)
[  372.055002] Stack:
[  372.055002]  ffff88007d3fdd80 ffffffff813e6b11 0000000000000202 ffff880078d1a000
[  372.055002]  0000000000000003 ffff880078d01248 ffff880078d1c938 ffff880078d1c800
[  372.055002]  ffff880078d1c818 0000000000000000 ffff88007d3fddc0 ffffffffa00f873f
[  372.055002] Call Trace:
[  372.055002]  [<ffffffff813e6b11>] scsi_remove_target+0x191/0x1c0
[  372.055002]  [<ffffffffa00f873f>] __iscsi_unbind_session+0xbf/0x1a0 [scsi_transport_iscsi]
[  372.055002]  [<ffffffff8107b2a8>] process_one_work+0x148/0x4a0
[  372.055002]  [<ffffffffa00f8680>] ? iscsi_free_session+0x70/0x70 [scsi_transport_iscsi]
[  372.055002]  [<ffffffff8107d00e>] worker_thread+0x15e/0x480
[  372.055002]  [<ffffffff8107ceb0>] ? manage_workers+0x2f0/0x2f0
[  372.055002]  [<ffffffff81082613>] kthread+0x93/0xa0
[  372.055002]  [<ffffffff815ddbf4>] kernel_thread_helper+0x4/0x10
[  372.055002]  [<ffffffff81082580>] ? kthread_freezable_should_stop+0x70/0x70
[  372.055002]  [<ffffffff815ddbf0>] ? gs_change+0x13/0x13
[  372.055002] Code: 66 39 c2 74 0e 0f 1f 40 00 f3 90 0f b7 07 66 39 d0 75 f6 5d c3 0f 1f 40 00 55 48 89 e5 0f 1f 44 00 00 66 83 07 01 48 89 f7 57 9d <0f> 1f 44 00 00 5d c3 0f 1f 80 00 00 00 00 55 48 89 e5 0f 1f 44 


Version-Release number of selected component (if applicable):
uname -r
3.6.0-0.29.el7.x86_64

rpm -q targetcli
targetcli-2.0rc1.fb17-1.el7.noarch

rpm -q iscsi-initiator-utils
iscsi-initiator-utils-6.2.0.872-19.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.targetcli /iscsi create iqn.2009-10.com.redhat:storage-1
2.targetcli /iscsi/iqn.2009-10.com.redhat:storage-1/tpg1/portals create 10.16.70.101 3260
3.targetcli /backstores/fileio create target1-lun1 ./target1-lun1.img 100M
4.targetcli /iscsi/iqn.2009-10.com.redhat:storage-1/tpg1/luns create /backstores/fileio/target1-lun1 1

5.iscsiadm -m discovery -p 10.16.70.101 -t st
[  OK  ] iscsid: [  OK  ]
10.16.70.101:3260,1 iqn.2009-10.com.redhat:storage-1

6.iscsiadm -m node -l
Logging in to [iface: default, target: iqn.2009-10.com.redhat:storage-1, portal: 10.16.70.101,3260] (multiple)
Login to [iface: default, target: iqn.2009-10.com.redhat:storage-1, portal: 10.16.70.101,3260] successful.
Actual results:

7. iscsiadm -m node -u

Expected results:
it should logout without problems

Additional info:

Comment 1 Bruno Goncalves 2012-12-14 14:47:33 UTC
I forgot to add the acl after creating the LUN.
Step 5 would be:
5. targetcli /iscsi/iqn.2009-10.com.redhat:storage-1/tpg1/acls create iqn.1994-05.com.redhat:tcp-general

Comment 2 Bruno Goncalves 2012-12-19 12:32:17 UTC
Problem seems to occur only when CHAP session is established.

Comment 3 Bruno Goncalves 2012-12-20 14:34:47 UTC
Sorry for the confusion, but this issue seems to be a regression on the initiator side, and not on targetcli nor it is related to CHAP.

It seems to have been introduced on kernel-3.6.0-0.27.el7, as on kernel-3.5.0-0.26.el7 the problem has not been reproduced.

Comment 5 Bruno Goncalves 2013-02-20 08:59:48 UTC
It seems to have been fixed on 3.7.0-0.34.el7.

Comment 6 Ludek Smid 2014-06-13 13:17:53 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.