All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: "Alan J. Wylie" <alan@wylie.me.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Thorsten Leemhuis <regressions@leemhuis.info>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: 4.9.0 regression in pipe-backed iov_iter with systemd-nspawn
Date: Fri, 13 Jan 2017 09:33:59 +0000	[thread overview]
Message-ID: <20170113093359.GJ1555@ZenIV.linux.org.uk> (raw)
In-Reply-To: <22648.32903.752857.203733@wylie.me.uk>

On Fri, Jan 13, 2017 at 07:23:51AM +0000, Alan J. Wylie wrote:
> at 15:28 on Thu 12-Jan-2017 Linus Torvalds (torvalds@linux-foundation.org) wrote:
> 
> > So assuming Al hasn't figured it out by the time you get back, can
> > you try to send us the same strace for the working case?
> 
> Full output at https://wylie.me.uk/tmp/strace1.txt
> 
> 1735  splice(5, NULL, 1, NULL, 9223372036854775807, 0) = -1 EAGAIN (Resource temporarily unavailable)

Lovely...  So it was getting -EAGAIN all along.  Just in case - could you
try the delta below and see if it triggers?  Simply to exclude the possibility
that it *is* this call of splice() and the change has somehow buggered cleanup
after the kernel_readv() failure...

diff --git a/fs/splice.c b/fs/splice.c
index 873d83104e79..1a2d1bc7f19e 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -393,6 +393,9 @@ static ssize_t default_file_splice_read(struct file *in, loff_t *ppos,
 	size_t offset, dummy, copied = 0;
 	ssize_t res;
 	int i;
+	unsigned nrbufs = pipe->nrbufs,
+		 curbuf = pipe->curbuf,
+		 buffers = pipe->buffers;
 
 	if (pipe->nrbufs == pipe->buffers)
 		return -EAGAIN;
@@ -445,6 +448,16 @@ static ssize_t default_file_splice_read(struct file *in, loff_t *ppos,
 		put_page(pages[i]);
 	kvfree(pages);
 	iov_iter_advance(&to, copied);	/* truncates and discards */
+	if (res == -EAGAIN && (
+		pipe->nrbufs != nrbufs ||
+		pipe->curbuf != curbuf ||
+		pipe->buffers != buffers)
+	    ) {
+		printk(KERN_ERR "nr: %d->%d, cur: %d->%d, buffers: %d->%d\n",
+			nrbufs, pipe->nrbufs,
+			curbuf, pipe->curbuf,
+			buffers, pipe->buffers);
+	}
 	return res;
 }
 

  reply	other threads:[~2017-01-13  9:34 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-12 20:26 4.9.0 regression in pipe-backed iov_iter with systemd-nspawn Alan J. Wylie
2017-01-12 20:31 ` Al Viro
2017-01-12 20:38   ` Alan J. Wylie
2017-01-12 22:26 ` Linus Torvalds
2017-01-12 22:37   ` Al Viro
2017-01-12 22:46     ` Al Viro
2017-01-12 23:02       ` Linus Torvalds
2017-01-12 23:14         ` Al Viro
2017-01-12 23:14         ` Linus Torvalds
2017-01-12 23:27           ` Al Viro
2017-01-12 22:46   ` Alan J. Wylie
2017-01-12 22:58     ` Al Viro
2017-01-12 23:28     ` Linus Torvalds
2017-01-13  4:00       ` Al Viro
2017-01-13  7:38         ` Alan J. Wylie
2017-01-13  7:23       ` Alan J. Wylie
2017-01-13  9:33         ` Al Viro [this message]
2017-01-13  9:54           ` Alan J. Wylie
2017-01-13 10:20             ` Al Viro
2017-01-13 10:32               ` Alan J. Wylie
2017-01-13 11:25                 ` Al Viro
2017-01-13 11:18               ` Al Viro
2017-01-13 19:33                 ` Linus Torvalds
2017-01-13 20:08                   ` Al Viro
2017-01-13 20:11                     ` Al Viro
2017-01-13 20:32                       ` Linus Torvalds
2017-01-13 20:47                         ` Al Viro
2017-01-13 21:55                           ` Al Viro
2017-01-13 21:59                             ` Al Viro
2017-01-13 22:13                               ` Al Viro
2017-01-13 22:50                                 ` Al Viro
2017-01-14  0:59                                   ` Linus Torvalds
2017-01-14  1:24                                     ` Al Viro
2017-01-14  1:43                                       ` Al Viro
2017-01-14  1:46                                       ` Linus Torvalds
2017-01-14  1:57                                         ` Al Viro
2017-01-15  0:53                                           ` Al Viro
2017-01-14 13:16                                   ` Alan J. Wylie
2017-01-14 16:29                                     ` Alan J. Wylie
2017-01-14 17:57                                       ` Linus Torvalds
2017-01-13 20:08                   ` Linus Torvalds
2017-01-13 20:16                     ` Al Viro

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=20170113093359.GJ1555@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=alan@wylie.me.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=regressions@leemhuis.info \
    --cc=torvalds@linux-foundation.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.