Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Patrick Noffke <patrick-0qqNeQ6W4hOzQB+pC5nmwQ@public.gmane.org>
To: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: hung system with cifsd, cannot reduce timeout
Date: Fri, 06 Dec 2013 09:50:27 -0600	[thread overview]
Message-ID: <1774674.CzhmRQMMgZ@dingofarm.qg.com> (raw)
In-Reply-To: <52A0F1CB.5060709-0qqNeQ6W4hOzQB+pC5nmwQ@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2542 bytes --]

On Thursday, December 05, 2013 03:36:11 PM you wrote:
> On 12/05/2013 03:03 PM, Patrick Noffke wrote:
> > Hi,
> > 
> > I did check the cifsd stack (cat /proc/<cifsd PID>/stack) for previous
> > tests, and it was waiting on a recv, and its state was SW (not DW).
> > Unfortunately, I did not get the stack for this test.
> 
> I just repeated this test, and this time cifsd was in the SW state.
> 
> The stack was as follows:
> sk_wait_data
> tcp_recvmsg
> inet_recvmsg
> sock_recvmsg
> kernel_recvmsg
> cifs_readv_from_socket
> cifs_read_from_socket
> cifs_readv_discard
> cifs_readv_receive
> cifs_demultiplex_thread
> kthread
> ret_from_fork
> 
> For this test, my process and ps were hung after the first time pulling
> the cable (I hadn't rebooted from my earlier test, but I think the CIFS
> connection had disconnected due to inactivity).
> 
> As before, an Echo Request was sent on a previous connection after
> sending the SYN and Negotiate on a new connection.  The server RST the
> old connection right after the Echo Request, and 115 seconds later RST
> the new connection.  Another new connection was then made, and the
> process resumed and ps completed.
> 

I have a little more info from yet another test with the same symptoms.  I 
did:

echo 1 > /proc/fs/cifs/cifsFYI

and ran the test again.  I had klogd running, so the cifs debug logs went to 
the syslog.  I've attached the syslogs around the time when I pulled the 
cable, reattached it, and up until the system recovers.

A few notes about these logs:

22:29:18:  Ethernet cable is disconnected.
22:29:22:  Echo request is sent
22:29:27:  Second echo request is sent
22:29:31:  Reconnect due to no echo response.  Socket is created at this time.
22:29:31:  (Last log for this timestamp) Ethernet cable is reconnected.  I 
believe the echo request must have been queued up for sending, which is why I 
see it in wireshark after reconnecting the cable (even though the echo 
requests were logged prior to the reconnection).  Server also sends RST for 
first connection at this time.
22:29:57:  Last cifs log until server sends RST.  Last message is 
"fs/cifs/inode.c: Getting info on"
22:32:09:  Server sends RST on second connection, client reconnects, and the 
system recovers.

It seems like the "Getting info on" log message is missing a filename.  Would 
this explain why it's hung until the server sends a RST?

There are also logs like the following before the cable is reattached:
fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release

Best regards,
Patrick

[-- Attachment #2: cifs-lockup-syslogs.gz --]
[-- Type: application/gzip, Size: 3467 bytes --]

  parent reply	other threads:[~2013-12-06 15:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-05 21:03 hung system with cifsd, cannot reduce timeout Patrick Noffke
     [not found] ` <52A0EA24.9000600-0qqNeQ6W4hOzQB+pC5nmwQ@public.gmane.org>
2013-12-05 21:36   ` Patrick Noffke
     [not found]     ` <52A0F1CB.5060709-0qqNeQ6W4hOzQB+pC5nmwQ@public.gmane.org>
2013-12-06 15:50       ` Patrick Noffke [this message]
     [not found]         ` <1774674.CzhmRQMMgZ-J5+zLgb4AZ5BQzcUTsrH4w@public.gmane.org>
2013-12-10 15:15           ` Patrick Noffke
     [not found]             ` <3540393.5GuVZWBWRs-J5+zLgb4AZ5BQzcUTsrH4w@public.gmane.org>
2013-12-14 11:50               ` Jeff Layton
2013-12-31 22:43   ` ISHIKAWA,Chiaki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1774674.CzhmRQMMgZ@dingofarm.qg.com \
    --to=patrick-0qqneq6w4hozqb+pc5nmwq@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox