Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1632292

Re: iov_iter_pipe warning.

From Al Viro <viro@ZenIV.linux.org.uk>
Newsgroups linux.kernel
Subject Re: iov_iter_pipe warning.
Date 2017-04-27 19:50 +0200
Message-ID <tAVIe-3OA-29@gated-at.bofh.it> (permalink)
References (5 earlier) <tvtWi-7dn-21@gated-at.bofh.it> <tvvOq-8oz-17@gated-at.bofh.it> <tyM6m-1aE-23@gated-at.bofh.it> <tAJ4l-3G0-1@gated-at.bofh.it> <tAUCu-3ai-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Apr 27, 2017 at 12:34:44PM -0400, Dave Jones wrote:

> [977286.117268] RPC request reserved 116 but used 268
> [1918138.126285] RPC request reserved 200 but used 268
> [2327777.483077] RPC request reserved 200 but used 268
> [2327800.909007] RPC request reserved 200 but used 268
> 
> related ?

Rather unlikely...  AFAICS, that's nfsd miscalculating the response
size and generating longer response than it has reserved.  The warning
comes from svc_xprt_release().  Out of its callers, svc_recv() is
impossible (it zeroes rqstp->rq_res.len before calling the sucker, so
there's no way for it to be found too large), which leaves svc_drop()
and svc_send().  The last one is more likely, AFAICS, and there the
length is calculated by
        /* calculate over-all length */
        xb = &rqstp->rq_res;
        xb->len = xb->head[0].iov_len +
                xb->page_len +
                xb->tail[0].iov_len;

Might be interesting to slap WARN_ON(xb->len > rqstp->rq_reserved); there
and see if it triggers.  Or something like
	if (WARN_ON(rqstp->rq_res->head[0].iov_len +
		rqstp->rq_res->page_len +
		rqstp->rq_res->tail[0].iov_len > rqstp->rq_reserved) {
		try to print something useful about request and response
	}
right before the call of ->xpo_release_rqst() in there - I hadn't looked
at that code for a long time, but it smells like dumping the request is
better done before the skbs containing it get dropped...

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: iov_iter_pipe warning. Dave Jones <davej@codemonkey.org.uk> - 2017-04-27 06:20 +0200
  Re: iov_iter_pipe warning. Dave Jones <davej@codemonkey.org.uk> - 2017-04-27 18:40 +0200
    Re: iov_iter_pipe warning. Al Viro <viro@ZenIV.linux.org.uk> - 2017-04-27 19:50 +0200

csiph-web