From: Jens Axboe <axboe@suse.de>
To: Michael Kerrisk <michael.kerrisk@gmx.net>
Cc: mtk-manpages@gmx.net, linux-kernel@vger.kernel.org,
akpm@osdl.org, Ingo Molnar <mingo@elte.hu>
Subject: Re: splice/tee bugs?
Date: Fri, 7 Jul 2006 15:14:04 +0200 [thread overview]
Message-ID: <20060707131403.GY4188@suse.de> (raw)
In-Reply-To: <20060707131247.GX4188@suse.de>
On Fri, Jul 07 2006, Jens Axboe wrote:
> On Fri, Jul 07 2006, Jens Axboe wrote:
> > On Fri, Jul 07 2006, Michael Kerrisk wrote:
> > > Jens Axboe wrote:
> > >
> > > > > > > > In this case I can't kill it with ^C or ^\. This is a
> > > > > > > > hard-to-reproduce behaviour on my (x86) system, but I have
> > > > > > > > seen it several times by now.
> > > > > > >
> > > > > > > aka local DoS. Please capture sysrq-T output next time.
> > > [...]
> > > > > I'll see about reproducing locally.
> > > >
> > > > With your modified ktee, I can reproduce it here. Here's the ktee and wc
> > > > output:
> > >
> > > Good; thanks.
> > >
> > > By the way, what about points a) and b) in my original mail
> > > in this thread?
> >
> > I'll look at them after this.
>
> I _think_ it was due to a bad check for ipipe->nrbufs, can you see if
> this works for you? It also changes some other things:
>
> - instead of returning EAGAIN on nothing tee'd because of the possible
> deadlock problem, release/regrab the ipipe/opipe mutex if we have to.
> This makes sys_tee block for that case if SPLICE_F_NONBLOCK isn't set.
>
> - Check that ipipe and opipe differ to avoid possible deadlock if user
> gives the same pipe.
>
> You can still see 0 results without SPLICE_F_NONBLOCK set, if we have no
> writers for instance. This is expected, not much we can do about that as
> we cannot block for that condition.
BTW, I'm seeing an odd lockdep message on the first invocation of the
test:
=============================================
[ INFO: possible recursive locking detected ]
---------------------------------------------
ktee2/6208 is trying to acquire lock:
(&inode->i_mutex){--..}, at: [<c03922c6>] mutex_lock+0x1c/0x1f
but task is already holding lock:
(&inode->i_mutex){--..}, at: [<c03922c6>] mutex_lock+0x1c/0x1f
other info that might help us debug this:
1 lock held by ktee2/6208:
#0: (&inode->i_mutex){--..}, at: [<c03922c6>] mutex_lock+0x1c/0x1f
stack backtrace:
[<c01041ab>] show_trace+0x12/0x14
[<c0104874>] dump_stack+0x19/0x1b
[<c01399b6>] __lock_acquire+0x645/0xc77
[<c013a32a>] lock_acquire+0x5d/0x79
[<c0392082>] __mutex_lock_slowpath+0x6e/0x296
[<c03922c6>] mutex_lock+0x1c/0x1f
[<c018d37f>] sys_tee+0x292/0x4a4
[<c0103075>] sysenter_past_esp+0x56/0x8d
I cannot see where this could be happening, Ingo is this valid?
--
Jens Axboe
next prev parent reply other threads:[~2006-07-07 13:11 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-07 7:07 splice/tee bugs? Michael Kerrisk
2006-07-07 11:07 ` Andrew Morton
2006-07-07 11:42 ` Michael Kerrisk
2006-07-07 12:03 ` Jens Axboe
2006-07-07 12:28 ` Jens Axboe
2006-07-07 12:31 ` Michael Kerrisk
2006-07-07 12:41 ` Jens Axboe
2006-07-07 13:12 ` Jens Axboe
2006-07-07 13:14 ` Jens Axboe [this message]
2006-07-07 13:21 ` Arjan van de Ven
2006-07-07 13:26 ` Jens Axboe
2006-07-07 13:54 ` Paulo Marques
2006-07-07 14:02 ` Jens Axboe
2006-07-07 14:05 ` Michael Kerrisk
2006-07-07 14:08 ` Jens Axboe
2006-07-07 16:13 ` Luiz Fernando N. Capitulino
2006-07-07 21:43 ` Luiz Fernando N. Capitulino
2006-07-08 6:41 ` Jens Axboe
2006-07-08 21:09 ` Luiz Fernando N. Capitulino
2006-07-09 10:36 ` Jens Axboe
2006-07-09 11:16 ` Jens Axboe
2006-07-09 16:47 ` Luiz Fernando N. Capitulino
2006-07-09 17:57 ` Jens Axboe
2006-07-10 6:25 ` Michael Kerrisk
2006-07-10 6:43 ` Jens Axboe
2006-07-10 8:09 ` Michael Kerrisk
2006-07-10 8:24 ` Jens Axboe
2006-07-10 8:40 ` Michael Kerrisk
2006-07-10 8:46 ` Jens Axboe
2006-07-10 8:50 ` Michael Kerrisk
2006-07-10 9:06 ` Jens Axboe
2006-07-10 9:08 ` Michael Kerrisk
2006-07-10 8:50 ` Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2006-07-08 5:33 Chuck Ebbert
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=20060707131403.GY4188@suse.de \
--to=axboe@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.kerrisk@gmx.net \
--cc=mingo@elte.hu \
--cc=mtk-manpages@gmx.net \
/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.