From: "Aurélien Aptel" <aaptel@suse.com>
To: Duncan Findlay <duncf@duncf.ca>, linux-cifs@vger.kernel.org
Subject: Re: [bug report] Inconsistent state with CIFS mount after interrupted process in Linux 5.10
Date: Wed, 13 Jan 2021 13:29:47 +0100 [thread overview]
Message-ID: <87ft35kojo.fsf@suse.com> (raw)
In-Reply-To: <CAE-Mgq2kwwZJicbU9oenD4M5SQhbErhXovGX+LKtcnRbLC4xSg@mail.gmail.com>
Duncan Findlay <duncf@duncf.ca> writes:
> There seems to be a problem with the CIFS module in Linux 5.10. Files
> that are opened and not cleanly closed end up in an inconsistent
> state. This can be triggered by writing to a file and interrupting the
> writer with Ctrl-C. Once this happens, attempting to delete the file
> causes access to the mount to hang. Afterwards, the files are visible
> to ls, but cannot be accessed or deleted.
>
> I'm running Debian unstable with a Debian unstable kernel
> (5.10.5-1). I attempted to but could not reproduce this with a 4.19 kernel.
>
>
> Repro steps:
>
> $ sudo mount -t cifs //test/share /mnt/test --verbose -o
> rw,user,auto,nosuid,uid=user,gid=user,vers=3.1.1,credentials=/home/user/tmp/creds
> $ mkdir /mnt/test/subdir
> $ cat > /mnt/test/subdir/foo
> [ Hit Ctrl-C to interrupt ]
> $ ls /mnt/test/subdir/
> foo
> $ rm /mnt/test/subdir/foo
> [ Hangs for 35 seconds, errors in dmesg log -- see below ]
> $ ls /mnt/test/subdir/
> foo
> $ stat /mnt/test/subdir/foo
> stat: cannot statx '/mnt/test/subdir/foo': No such file or directory
>
> At this point, the file still exists on the server side, and
> restarting the server causes it to be deleted.
>
> I can provide pcaps if necessary. It looks like with 4.19, when the
> cat command is killed, the client sends a Close Request, and on 5.10
> no commands are sent.
I can reproduce this on Steve's current for-next branch but only against
a Samba server.
On Windows server, doing ^C kills cat properly but the output file is
never created, which is also a bug.
Cheers,
--
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)
next prev parent reply other threads:[~2021-01-13 12:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-13 7:21 [bug report] Inconsistent state with CIFS mount after interrupted process in Linux 5.10 Duncan Findlay
2021-01-13 12:29 ` Aurélien Aptel [this message]
2021-01-13 16:31 ` Pavel Shilovsky
2021-01-13 16:51 ` Paulo Alcantara
2021-01-13 17:02 ` Steve French
2021-01-13 17:16 ` [PATCH] cifs: fix interrupted close commands Paulo Alcantara
2021-01-13 18:28 ` Pavel Shilovsky
2021-01-14 7:32 ` Shyam Prasad N
2021-01-14 17:22 ` [EXTERNAL] " Pavel Shilovskiy
2021-01-13 18:35 ` [bug report] Inconsistent state with CIFS mount after interrupted process in Linux 5.10 Pavel Shilovsky
2021-01-14 15:21 ` Aurélien Aptel
2021-01-14 17:10 ` Pavel Shilovsky
2021-01-13 16:57 ` Steve French
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=87ft35kojo.fsf@suse.com \
--to=aaptel@suse.com \
--cc=duncf@duncf.ca \
--cc=linux-cifs@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.