Bug 234753 - net/samba47: socket queue overflow stalls server
Summary: net/samba47: socket queue overflow stalls server
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Timur I. Bakeyev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-08 15:29 UTC by Michael Osipov
Modified: 2019-01-08 15:29 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (timur)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Osipov 2019-01-08 15:29:42 UTC
Our server (FreeBSD 11.2-STABLE i386) recently stalled several times with the following in the logs:

> Jan  8 09:31:30 blnn714x kernel: sonewconn: pcb 0xc85c4be0: Listen queue overflow: 193 already in queue awaiting acceptance (25 occurrences)
> Jan  8 09:32:47 blnn714x kernel: sonewconn: pcb 0xc85c4be0: Listen queue overflow: 193 already in queue awaiting acceptance (2 occurrences)
> Jan  8 09:33:58 blnn714x kernel: sonewconn: pcb 0xc85c4be0: Listen queue overflow: 193 already in queue awaiting acceptance (6 occurrences)
> Jan  8 09:39:30 blnn714x kernel: sonewconn: pcb 0xc85c4be0: Listen queue overflow: 193 already in queue awaiting acceptance (2 occurrences)

A similar issue has been reported on the Samba mailing list a year ago (https://lists.samba.org/archive/samba/2018-January/213309.html). The socket queue is too small and hardcoded in Samba:

> Current listen queue sizes (qlen/incqlen/maxqlen)
> Proto Listen                           Local Address
> tcp4  0/0/128                          *.22
> tcp4  0/0/50                           147.54.64.14.139
> tcp4  0/0/50                           147.54.64.14.445

A decent patch was provided (https://lists.samba.org/archive/samba/2018-January/213321.html, https://people.ifm.liu.se/peter/patches/samba/socket_listen_backlog.patch) though not yet applied.

I requested this on samba-technical (https://lists.samba.org/archive/samba-technical/2019-January/131870.html). While this might take time, can we apply this patch to 4.7 and 4.8 to easy the issue and raise connection queue length?

The patch looks straight-forward to me.