linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: hangs on boot in 9984d7394618df9
       [not found]                   ` <20130408214834.GV4068@ZenIV.linux.org.uk>
@ 2013-04-08 22:17                     ` Stephen Warren
  2013-04-08 22:45                       ` Doug Anderson
  2013-04-08 22:46                       ` Al Viro
  0 siblings, 2 replies; 9+ messages in thread
From: Stephen Warren @ 2013-04-08 22:17 UTC (permalink / raw)
  To: Al Viro
  Cc: Nathan Zimmer, akpm, linux-kernel, linux-fsdevel,
	Eric W. Biederman, David Woodhouse, stable, linux-next

On 04/08/2013 03:48 PM, Al Viro wrote:
> On Mon, Apr 08, 2013 at 10:23:27PM +0100, Al Viro wrote:
>> On Mon, Apr 08, 2013 at 03:52:08PM -0500, Nathan Zimmer wrote:
>>
>>> Further digging seems to indicate 9984d7394618df9, the one right
>>> after the commit I previously identified.
>>> Not sure what I did wrong with my bisect to put it off by one.
>>
>> Ugh...  Can't reproduce here ;-/  Could you give more details on your
>> setup?
> 
> Anyway, I've just pushed a splitup of that commit (carved in 3 pieces)
> into vfs.git#pipe-splitup; could you check which part triggers that
> hang?  Should propagate in a few...

It looks like "pipe: unify ->release() and ->open()" introduces the
problem. Note that I had to add a prototype for fifo_open() before the
structs that reference it for that commit to compile.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: hangs on boot in 9984d7394618df9
  2013-04-08 22:17                     ` hangs on boot in 9984d7394618df9 Stephen Warren
@ 2013-04-08 22:45                       ` Doug Anderson
  2013-04-08 23:06                         ` Al Viro
  2013-04-08 22:46                       ` Al Viro
  1 sibling, 1 reply; 9+ messages in thread
From: Doug Anderson @ 2013-04-08 22:45 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Al Viro, Nathan Zimmer, Andrew Morton, linux-kernel,
	linux-fsdevel, Eric W. Biederman, David Woodhouse, stable,
	linux-next

Hi,

On Mon, Apr 8, 2013 at 3:17 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> Anyway, I've just pushed a splitup of that commit (carved in 3 pieces)
>> into vfs.git#pipe-splitup; could you check which part triggers that
>> hang?  Should propagate in a few...
>
> It looks like "pipe: unify ->release() and ->open()" introduces the
> problem. Note that I had to add a prototype for fifo_open() before the
> structs that reference it for that commit to compile.

It sounds like Stephen has provided you the info you needed so not
doing any extra testing now, but I figured I'd chime in that I hit
problems this morning with linux-next and it appears to be the same
thing.  I did a revert of 9984d7394618df9 and (plus a revert of a
handful of patches to the same file) and problems are resolved.  The
failure case is really weird in that everything works well booting to
a simple /bin/bash but fails when you do more complex tasks.

Anyway: If you need some extra testing feel free to CC me.

-Doug

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: hangs on boot in 9984d7394618df9
  2013-04-08 22:17                     ` hangs on boot in 9984d7394618df9 Stephen Warren
  2013-04-08 22:45                       ` Doug Anderson
@ 2013-04-08 22:46                       ` Al Viro
  2013-04-08 22:57                         ` Al Viro
  1 sibling, 1 reply; 9+ messages in thread
From: Al Viro @ 2013-04-08 22:46 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Nathan Zimmer, akpm, linux-kernel, linux-fsdevel,
	Eric W. Biederman, David Woodhouse, stable, linux-next

On Mon, Apr 08, 2013 at 04:17:17PM -0600, Stephen Warren wrote:
> On 04/08/2013 03:48 PM, Al Viro wrote:
> > On Mon, Apr 08, 2013 at 10:23:27PM +0100, Al Viro wrote:
> >> On Mon, Apr 08, 2013 at 03:52:08PM -0500, Nathan Zimmer wrote:
> >>
> >>> Further digging seems to indicate 9984d7394618df9, the one right
> >>> after the commit I previously identified.
> >>> Not sure what I did wrong with my bisect to put it off by one.
> >>
> >> Ugh...  Can't reproduce here ;-/  Could you give more details on your
> >> setup?
> > 
> > Anyway, I've just pushed a splitup of that commit (carved in 3 pieces)
> > into vfs.git#pipe-splitup; could you check which part triggers that
> > hang?  Should propagate in a few...
> 
> It looks like "pipe: unify ->release() and ->open()" introduces the
> problem. Note that I had to add a prototype for fifo_open() before the
> structs that reference it for that commit to compile.

Very interesting...  Just in case, could you try this on top of that
branch and see if it triggers?

diff --git a/fs/pipe.c b/fs/pipe.c
index 8ce279b..b6cd51b 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -1022,6 +1022,11 @@ static int fifo_open(struct inode *inode, struct file *filp)
 	/* We can only do regular read/write on fifos */
 	filp->f_mode &= (FMODE_READ | FMODE_WRITE);
 
+	if (inode->i_sb->s_magic == PIPEFS_MAGIC) {
+		WARN_ON(filp->f_flags & O_NONBLOCK);
+		filp->f_flags &= ~O_NONBLOCK;
+	}
+
 	switch (filp->f_mode) {
 	case FMODE_READ:
 	/*

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: hangs on boot in 9984d7394618df9
  2013-04-08 22:46                       ` Al Viro
@ 2013-04-08 22:57                         ` Al Viro
  0 siblings, 0 replies; 9+ messages in thread
From: Al Viro @ 2013-04-08 22:57 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Nathan Zimmer, akpm, linux-kernel, linux-fsdevel,
	Eric W. Biederman, David Woodhouse, stable, linux-next

On Mon, Apr 08, 2013 at 11:46:37PM +0100, Al Viro wrote:

> Very interesting...  Just in case, could you try this on top of that
> branch and see if it triggers?
> 
> diff --git a/fs/pipe.c b/fs/pipe.c
> index 8ce279b..b6cd51b 100644
> --- a/fs/pipe.c
> +++ b/fs/pipe.c
> @@ -1022,6 +1022,11 @@ static int fifo_open(struct inode *inode, struct file *filp)
>  	/* We can only do regular read/write on fifos */
>  	filp->f_mode &= (FMODE_READ | FMODE_WRITE);
>  
> +	if (inode->i_sb->s_magic == PIPEFS_MAGIC) {
> +		WARN_ON(filp->f_flags & O_NONBLOCK);
> +		filp->f_flags &= ~O_NONBLOCK;
> +	}

*d'oh*

OK, I'm an idiot.  I see what's going on now...  Give me a few and I'll push
a fix.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: hangs on boot in 9984d7394618df9
  2013-04-08 22:45                       ` Doug Anderson
@ 2013-04-08 23:06                         ` Al Viro
  2013-04-08 23:20                           ` Stephen Warren
  2013-04-08 23:46                           ` Doug Anderson
  0 siblings, 2 replies; 9+ messages in thread
From: Al Viro @ 2013-04-08 23:06 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Stephen Warren, Nathan Zimmer, Andrew Morton, linux-kernel,
	linux-fsdevel, Eric W. Biederman, David Woodhouse, stable,
	linux-next

On Mon, Apr 08, 2013 at 03:45:31PM -0700, Doug Anderson wrote:
> Hi,
> 
> On Mon, Apr 8, 2013 at 3:17 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> >> Anyway, I've just pushed a splitup of that commit (carved in 3 pieces)
> >> into vfs.git#pipe-splitup; could you check which part triggers that
> >> hang?  Should propagate in a few...
> >
> > It looks like "pipe: unify ->release() and ->open()" introduces the
> > problem. Note that I had to add a prototype for fifo_open() before the
> > structs that reference it for that commit to compile.
> 
> It sounds like Stephen has provided you the info you needed so not
> doing any extra testing now, but I figured I'd chime in that I hit
> problems this morning with linux-next and it appears to be the same
> thing.  I did a revert of 9984d7394618df9 and (plus a revert of a
> handful of patches to the same file) and problems are resolved.  The
> failure case is really weird in that everything works well booting to
> a simple /bin/bash but fails when you do more complex tasks.
> 
> Anyway: If you need some extra testing feel free to CC me.

Folks, see if vfs.git#experimental works for you; the PITA had apparently
been caused by change of open() semantics for /proc/<pid>/fd/<some_pipe> -
it started to behave like a FIFO, i.e. wait for peer to show up.  Normally
that's not a problem, but if you have closed e.g. the write end of a pipe
and try to open /proc/<pid>/fd/<read_end_of_pipe>, you'll get open() waiting
for writers to appear.  Which isn't what we used to do here (open succeeded
immediately) and apparently that was enough to trip drakut.

Branch head should be at 574179469f7370aadb9cbac1ceca7c3723c17bee.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: hangs on boot in 9984d7394618df9
  2013-04-08 23:06                         ` Al Viro
@ 2013-04-08 23:20                           ` Stephen Warren
  2013-04-08 23:46                           ` Doug Anderson
  1 sibling, 0 replies; 9+ messages in thread
From: Stephen Warren @ 2013-04-08 23:20 UTC (permalink / raw)
  To: Al Viro
  Cc: Doug Anderson, Nathan Zimmer, Andrew Morton, linux-kernel,
	linux-fsdevel, Eric W. Biederman, David Woodhouse, stable,
	linux-next

On 04/08/2013 05:06 PM, Al Viro wrote:
> On Mon, Apr 08, 2013 at 03:45:31PM -0700, Doug Anderson wrote:
>> Hi,
>>
>> On Mon, Apr 8, 2013 at 3:17 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>>> Anyway, I've just pushed a splitup of that commit (carved in 3 pieces)
>>>> into vfs.git#pipe-splitup; could you check which part triggers that
>>>> hang?  Should propagate in a few...
>>>
>>> It looks like "pipe: unify ->release() and ->open()" introduces the
>>> problem. Note that I had to add a prototype for fifo_open() before the
>>> structs that reference it for that commit to compile.
>>
>> It sounds like Stephen has provided you the info you needed so not
>> doing any extra testing now, but I figured I'd chime in that I hit
>> problems this morning with linux-next and it appears to be the same
>> thing.  I did a revert of 9984d7394618df9 and (plus a revert of a
>> handful of patches to the same file) and problems are resolved.  The
>> failure case is really weird in that everything works well booting to
>> a simple /bin/bash but fails when you do more complex tasks.
>>
>> Anyway: If you need some extra testing feel free to CC me.
> 
> Folks, see if vfs.git#experimental works for you; the PITA had apparently
> been caused by change of open() semantics for /proc/<pid>/fd/<some_pipe> -
> it started to behave like a FIFO, i.e. wait for peer to show up.  Normally
> that's not a problem, but if you have closed e.g. the write end of a pipe
> and try to open /proc/<pid>/fd/<read_end_of_pipe>, you'll get open() waiting
> for writers to appear.  Which isn't what we used to do here (open succeeded
> immediately) and apparently that was enough to trip drakut.
> 
> Branch head should be at 574179469f7370aadb9cbac1ceca7c3723c17bee.

That branch works.

Thanks!

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: hangs on boot in 9984d7394618df9
  2013-04-08 23:06                         ` Al Viro
  2013-04-08 23:20                           ` Stephen Warren
@ 2013-04-08 23:46                           ` Doug Anderson
  2013-04-09 17:12                             ` Nathan Zimmer
  1 sibling, 1 reply; 9+ messages in thread
From: Doug Anderson @ 2013-04-08 23:46 UTC (permalink / raw)
  To: Al Viro
  Cc: Stephen Warren, Nathan Zimmer, Andrew Morton, linux-kernel,
	linux-fsdevel, Eric W. Biederman, David Woodhouse, stable,
	linux-next

Al,

On Mon, Apr 8, 2013 at 4:06 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
> Folks, see if vfs.git#experimental works for you; the PITA had apparently
> been caused by change of open() semantics for /proc/<pid>/fd/<some_pipe> -
> it started to behave like a FIFO, i.e. wait for peer to show up.  Normally
> that's not a problem, but if you have closed e.g. the write end of a pipe
> and try to open /proc/<pid>/fd/<read_end_of_pipe>, you'll get open() waiting
> for writers to appear.  Which isn't what we used to do here (open succeeded
> immediately) and apparently that was enough to trip drakut.
>
> Branch head should be at 574179469f7370aadb9cbac1ceca7c3723c17bee.

That branch booted fine for me and didn't show any problems.

I wasn't easily able to merge onto linux-next and test there though.
I tried applying these the 4 top commits of your branch to
"next-20130408" and it didn't solve my problems.  A full merge of your
branch to linux-next showed conflicts and I didn't dig.

-Doug

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: hangs on boot in 9984d7394618df9
  2013-04-08 23:46                           ` Doug Anderson
@ 2013-04-09 17:12                             ` Nathan Zimmer
  0 siblings, 0 replies; 9+ messages in thread
From: Nathan Zimmer @ 2013-04-09 17:12 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Al Viro, Stephen Warren, Andrew Morton, linux-kernel,
	linux-fsdevel, Eric W. Biederman, David Woodhouse, stable,
	linux-next

On 04/08/2013 06:46 PM, Doug Anderson wrote:
> Al,
>
> On Mon, Apr 8, 2013 at 4:06 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
>> Folks, see if vfs.git#experimental works for you; the PITA had apparently
>> been caused by change of open() semantics for /proc/<pid>/fd/<some_pipe> -
>> it started to behave like a FIFO, i.e. wait for peer to show up.  Normally
>> that's not a problem, but if you have closed e.g. the write end of a pipe
>> and try to open /proc/<pid>/fd/<read_end_of_pipe>, you'll get open() waiting
>> for writers to appear.  Which isn't what we used to do here (open succeeded
>> immediately) and apparently that was enough to trip drakut.
>>
>> Branch head should be at 574179469f7370aadb9cbac1ceca7c3723c17bee.
> That branch booted fine for me and didn't show any problems.
>
> I wasn't easily able to merge onto linux-next and test there though.
> I tried applying these the 4 top commits of your branch to
> "next-20130408" and it didn't solve my problems.  A full merge of your
> branch to linux-next showed conflicts and I didn't dig.
>
> -Doug
I booted great for me too.
Also the numbers from the scaling test are improved also, at least on my 
128p box.
I'll verify on a 512 or larger box when I have the chance.
However I think I still should to provide some relief for the older kernels.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: hangs on boot in 9984d7394618df9
@ 2013-04-10 10:44 Sedat Dilek
  0 siblings, 0 replies; 9+ messages in thread
From: Sedat Dilek @ 2013-04-10 10:44 UTC (permalink / raw)
  To: linux-next; +Cc: LKML, Al Viro, Stephen Rothwell

The issue is fixed with Linux-Next (next-20130410).

- Sedat -

[1] http://marc.info/?l=linux-next&m=136559043516192&w=2

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-04-10 10:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <515DB465.1060004@sgi.com>
     [not found] ` <20130404204459.GU21522@ZenIV.linux.org.uk>
     [not found]   ` <515F0456.9040803@sgi.com>
     [not found]     ` <20130405173623.GE4068@ZenIV.linux.org.uk>
     [not found]       ` <515F3A71.9080008@sgi.com>
     [not found]         ` <20130405210042.GH4068@ZenIV.linux.org.uk>
     [not found]           ` <5162E36F.5020305@sgi.com>
     [not found]             ` <20130408155847.GS4068@ZenIV.linux.org.uk>
     [not found]               ` <51632DF8.2080402@sgi.com>
     [not found]                 ` <20130408212327.GU4068@ZenIV.linux.org.uk>
     [not found]                   ` <20130408214834.GV4068@ZenIV.linux.org.uk>
2013-04-08 22:17                     ` hangs on boot in 9984d7394618df9 Stephen Warren
2013-04-08 22:45                       ` Doug Anderson
2013-04-08 23:06                         ` Al Viro
2013-04-08 23:20                           ` Stephen Warren
2013-04-08 23:46                           ` Doug Anderson
2013-04-09 17:12                             ` Nathan Zimmer
2013-04-08 22:46                       ` Al Viro
2013-04-08 22:57                         ` Al Viro
2013-04-10 10:44 Sedat Dilek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).