[Open-FCoE] [PATCH] openfctgt: Fix for system hang during fcconf on Target

Ramesh Velusamy ramesh.velusamy at patni.com
Fri Jul 24 09:28:51 UTC 2009


We have created a workaround which helps resolve a problem we faced in the
open-fcoe target code. Please note that this is only a work around, to get
the target to work. We are still doing the root cause analysis of the error.
Request anyone with better solutions to please respond.

The message trace and solution are given below.

Regards,
Ramesh V.
Storage Center of Excellence
Patni Computers Ltd., Mumbai


Setup Details:
---------------
Topology: Point-to-point
Initiator: 2.6.29 kernel
Target: 2.6.23 kernel
Modules Loaded in Initiator: fcoe
Modules loaded in Target: scst, scst_disk, scsi_transport_fc, openfctgt,
fcoe

Problem:
---------
After setting up Initiator and Target as mentioned in open-fcoe.org wiki,
when “fcconf eth0 enable” command is executed, the system hangs.

Below call trace is observed in syslog.
Jul  3 12:48:55 FCoE kernel: ------------[ cut here ]------------
Jul  3 12:48:55 FCoE kernel: kernel BUG at
/home/FCoE_Target/open-fcoe-target/openfctgt/openfc_scst_pkt.h:119!
Jul  3 12:48:55 FCoE kernel: invalid opcode: 0000 [#1]
Jul  3 12:48:55 FCoE kernel: SMP 
Jul  3 12:48:55 FCoE kernel: Modules linked in: scst_cdrom fcoe openfctgt
scst_vdisk scst_disk scst scsi_transport_fc parport_pc lp parport autofs4
sunrpc dm_mirror dm_mod button battery ac ipv6 ohci_hcd ehci_hcd i2c_piix4
i2c_core tg3 floppy sr_mod ext3 jbd ahci libata sd_mod scsi_mod
Jul  3 12:48:55 FCoE kernel: CPU:    1
Jul  3 12:48:55 FCoE kernel: EIP:    0060:[<f8ae4027>]    Not tainted VLI
Jul  3 12:48:55 FCoE kernel: EFLAGS: 00010246   (2.6.23 #1)
Jul  3 12:48:55 FCoE kernel: EIP is at openfct_session_create+0x18/0xd1
[openfctgt]
Jul  3 12:48:55 FCoE kernel: eax: d58f8000   ebx: eb2bda80   ecx: f8ae400f  
edx: eb2bda80
Jul  3 12:48:55 FCoE kernel: esi: 00010102   edi: 00000000   ebp: 00000000  
esp: d1835e24
Jul  3 12:48:55 FCoE kernel: ds: 007b   es: 007b   fs: 00d8  gs: 0000  ss:
0068
Jul  3 12:48:55 FCoE kernel: Process fcoethread/1 (pid: 20832, ti=d1835000
task=df9d9020 task.ti=d1835000)
Jul  3 12:48:55 FCoE kernel: Stack: c02ba21b ccf0f580 c8a00710 f8ae6be9
d89d0840 c18c9f0c 00000000 c18c9f08 
Jul  3 12:48:55 FCoE kernel:        d1835ee0 c01df0f8 00000001 c0121117
ccf0fe40 eb2bda80 e146be00 00000000 
Jul  3 12:48:55 FCoE kernel:        f8ae6002 c8a00810 c031fe31 f8ae6ea3
00000001 f8ae5fb0 d7b91f24 e146be00 
Jul  3 12:48:55 FCoE kernel: Call Trace:
Jul  3 12:48:55 FCoE kernel:  [<c02ba21b>] __alloc_skb+0x25/0xef
Jul  3 12:48:55 FCoE kernel:  [<f8ae6be9>] fc_exch_complete_locked+0x6d/0x9b
[openfctgt]
Jul  3 12:48:55 FCoE kernel:  [<c01df0f8>] __next_cpu+0x12/0x1f
Jul  3 12:48:55 FCoE kernel:  [<c0121117>] find_busiest_group+0x1bc/0x505
Jul  3 12:48:55 FCoE kernel:  [<f8ae6002>]
fcs_local_port_prli_accept+0x52/0x95 [openfctgt]
Jul  3 12:48:55 FCoE kernel:  [<c031fe31>] _spin_unlock_bh+0x5/0xd
Jul  3 12:48:55 FCoE kernel:  [<f8ae6ea3>] fc_exch_alloc+0x26e/0x27a
[openfctgt]
Jul  3 12:48:55 FCoE kernel:  [<f8ae5fb0>]
fcs_local_port_prli_accept+0x0/0x95 [openfctgt]
Jul  3 12:48:55 FCoE kernel:  [<f8af2005>] fc_sess_recv_prli_req+0xa8/0x5b1
[openfctgt]
Jul  3 12:48:55 FCoE kernel:  [<f8af29dc>] fc_sess_lookup_create+0x103/0x10d
[openfctgt]
Jul  3 12:48:55 FCoE kernel:  [<f8ae6ecc>] fc_exch_resp+0xc/0x150
[openfctgt]
Jul  3 12:48:55 FCoE kernel:  [<f8aedca0>] fc_local_port_recv_req+0xb1/0x15b
[openfctgt]
Jul  3 12:48:55 FCoE kernel:  [<f8ae8557>] fc_exch_recv_req+0x396/0x457
[openfctgt]
Jul  3 12:48:55 FCoE kernel:  [<f8aedbef>] fc_local_port_recv_req+0x0/0x15b
[openfctgt]
Jul  3 12:48:55 FCoE kernel:  [<f8aedec9>] fc_local_port_recv+0x17f/0x261
[openfctgt]
Jul  3 12:48:55 FCoE kernel:  [<f8aedbef>] fc_local_port_recv_req+0x0/0x15b
[openfctgt]
Jul  3 12:48:55 FCoE kernel:  [<c031fe2a>] _spin_unlock_irq+0x5/0x7
Jul  3 12:48:55 FCoE kernel:  [<f8af2f0d>] fc_port_ingress+0x61/0x67
[openfctgt]
Jul  3 12:48:55 FCoE kernel:  [<f8b04d54>]
fcoe_percpu_receive_thread+0x431/0x581 [fcoe]
Jul  3 12:48:55 FCoE kernel:  [<c031fe2a>] _spin_unlock_irq+0x5/0x7
Jul  3 12:48:55 FCoE kernel:  [<c031ec20>] __sched_text_start+0x398/0x405
Jul  3 12:48:55 FCoE kernel:  [<f8b04923>]
fcoe_percpu_receive_thread+0x0/0x581 [fcoe]
Jul  3 12:48:55 FCoE kernel:  [<c013713b>] kthread+0x34/0x55
Jul  3 12:48:55 FCoE kernel:  [<c0137107>] kthread+0x0/0x55
Jul  3 12:48:55 FCoE kernel:  [<c01059e7>] kernel_thread_helper+0x7/0x10
Jul  3 12:48:55 FCoE kernel:  =======================
Jul  3 12:48:55 FCoE kernel: Code: <0f> 0b eb fe 8b 57 38 8d 47 38 8b 0a 39
c2 74 11 3b 72 10 74 04 89 
Jul  3 12:48:55 FCoE kernel: EIP: [<f8ae4027>]
openfct_session_create+0x18/0xd1 [openfctgt] SS:ESP 0068:d1835e24

Solution:
----------
1. Unload openfctgt and fcoe  module 
2. Apply the given patch (below) on
<path-to-open-fcoe-target>/libfc/fcs_state.c file. (Function name:
fcs_local_port_event)

diff -Naur old/fcs_state.c new/fcs_state.c
--- old/fcs_state.c   2009-07-14 11:06:40.000000000 +0530
+++ new/fcs_state.c            2009-07-14 11:07:38.000000000 +0530
@@ -287,6 +287,7 @@
      case FC_EV_DOWN:       /* local port will re-logon when it can */
                  break;
      case FC_EV_CLOSED:     /* local port closed by driver */
+                (*sp->fs_args.fca_disc_done) (sp->fs_args.fca_cb_arg);
                  fcs_ev_add(sp, OFC_EV_PT_OFFLINE, NULL, 0);
                  break;
      default:

3. Build openfctgt and fcoe modules. 
4. Use this newly built modules for FCoE Target Setup. 




_____________________________________________________________________ 

This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at netadmin at patni.com and delete this mail.
_____________________________________________________________________



More information about the devel mailing list