Re: iov_iter_pipe warning.

From: Dave Jones
Date: Tue Apr 11 2017 - 18:25:21 EST


On Tue, Apr 11, 2017 at 10:12:16PM +0100, Al Viro wrote:
> On Tue, Apr 11, 2017 at 04:53:36PM -0400, Dave Jones wrote:
> > > if (WARN_ON(pipe->nrbufs)) {
> > > printk(KERN_ERR "->splice_write = %p",
> > > sd->u.file->f_op->splice_write);
> > > }
> > > }
> >
> > Ah, missed adding this 2nd WARN_ON.
>
> Good - it means that we don't have to chase memory corruption yet. That
> smells like some ->splice_write() claiming it has copied more than it
> has drained from the pipe.
>
> > I'll turn it back off, and retry with the missing WARN from above added.
>
> Please, do. And it would be nice if you printed sd->u.file->f_op as well
> (in the same printk).

Will add that for the next run. In the meantime..

[ 2675.049082] WARNING: CPU: 0 PID: 10149 at fs/splice.c:1020 splice_direct_to_actor+0x20c/0x2b0
[ 2675.061581] CPU: 0 PID: 10149 Comm: trinity-c2 Not tainted 4.11.0-rc6-think+ #6
[ 2675.086528] Call Trace:
[ 2675.098901] dump_stack+0x68/0x93
[ 2675.111242] __warn+0xcb/0xf0
[ 2675.123467] warn_slowpath_null+0x1d/0x20
[ 2675.135602] splice_direct_to_actor+0x20c/0x2b0
[ 2675.147636] ? generic_pipe_buf_nosteal+0x10/0x10
[ 2675.159675] do_splice_direct+0x9e/0xd0
[ 2675.171837] do_sendfile+0x1d7/0x3c0
[ 2675.183762] SyS_sendfile64+0x73/0xe0
[ 2675.195944] do_syscall_64+0x66/0x1d0
[ 2675.208090] entry_SYSCALL64_slow_path+0x25/0x25
[ 2675.220256] RIP: 0033:0x7fcf6cdb80f9
[ 2675.232338] RSP: 002b:00007fff12252418 EFLAGS: 00000246
[ 2675.244447] ORIG_RAX: 0000000000000028
[ 2675.256474] RAX: ffffffffffffffda RBX: 0000000000000028 RCX: 00007fcf6cdb80f9
[ 2675.268528] RDX: 00007fcf6af23000 RSI: 0000000000000187 RDI: 0000000000000158
[ 2675.280680] RBP: 00007fcf6d479000 R08: 9696969696969696 R09: adadadadadadadad
[ 2675.292870] R10: 0000000000000508 R11: 0000000000000246 R12: 0000000000000002
[ 2675.305049] R13: 00007fcf6d479048 R14: 00007fcf6d48ead8 R15: 00007fcf6d479000
[ 2675.317455] ---[ end trace 9e4e62cfabcb9081 ]---
[ 2675.329626] ->splice_write = ffffffff812b3130

$ grep ffffffff812b3130 /proc/kallsyms
ffffffff812b3130 T generic_splice_sendpage

This one spat out all by itself.

Dave