答复: [Samba] The connection would be broken when read rate is too big

Chenyehua chen.yehua at h3c.com
Fri Mar 3 09:15:24 UTC 2017


Thanks for the patch, Ralph
We applied your patch and began to test now!
The results may be reported in the next few days..

Cheers

-----邮件原件-----
发件人: Ralph Böhme [mailto:slow at samba.org]
发送时间: 2017年3月3日 5:39
收件人: Jeremy Allison
抄送: chenyehua 11692 (RD); samba-technical at lists.samba.org
主题: Re: [Samba] The connection would be broken when read rate is too big

On Thu, Mar 02, 2017 at 01:23:50PM -0800, Jeremy Allison wrote:
> On Thu, Mar 02, 2017 at 11:03:50AM +0100, Ralph Böhme wrote:
> > On Wed, Mar 01, 2017 at 05:12:23PM -0800, Jeremy Allison wrote:
> > > On Wed, Mar 01, 2017 at 04:29:49PM -0800, Jeremy Allison wrote:
> > > > On Wed, Mar 01, 2017 at 08:31:32AM +0000, Chenyehua via samba wrote:
> > > > > I don’t know why the fd is marked to readable when the send queue is more than the max.
> > > > > Or why mark the fd readable but not allocate memory to the state->req.
> > > > >
> > > > > My solution: Allocate memory to the state->req before return
> > > > > when the send queue is more than the max in smbd_smb2_request_next_incoming function.
> > > > >
> > > > > Could you give us some help about the problem.
> > > >
> > > > I'm looking at this now. Your report looks correct.
> > > > Can you log a bug at bugzilla.samba.org so we can track this ?
> > >
> > > Can you try the following (raw and untested) patch ?
> >
> > Fwiw, I looked into this as well and came to the same conclusion.
>
> Here's the official patch to the bug I logged:
>
> https://bugzilla.samba.org/show_bug.cgi?id=12608
>
> I managed to reproduce locally by
> setting aio read size = 1 and then mangling
> smbd_smb2_request_next_incoming() to block any reads if there were any
> outgoing entries in the queue - but it wasn't reliably reproducible or
> easily tested.

Something like the attached should work to reproduce it. Untested, but you get the idea.

> If you can think of a good way to add a reliable regression test I'd
> be happy to review, but I think the patch is good on its own.
>
> Please review and push if happy.

Pushed!

Cheerio!
-slow
-------------------------------------------------------------------------------------------------------------------------------------
本邮件及其附件含有杭州华三通信技术有限公司的保密信息,仅限于发送给上面地址中列出
的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、
或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本
邮件!
This e-mail and its attachments contain confidential information from H3C, which is
intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
by phone or email immediately and delete it!


More information about the samba-technical mailing list