答复: [Samba] The memory maybe leak in samba 4.3.11

Volker Lendecke Volker.Lendecke at SerNet.DE
Mon May 15 05:29:30 UTC 2017


On Mon, May 15, 2017 at 02:42:01AM +0000, Zhangxiaoxu wrote:
> > Is the sendmsg error code really EINTR, or is it EAGAIN/EWOULDBLOCK?
> EAGAIN (Resource temporarily unavailable), the strace as below.
> Then somebody will reconnect to the socket.

Yep, that's the way it happens. We do a blocking connect when the
receiving process does not pick up its messages.

> Whether the message queue will leak after the reconnect?

It will pile up after the reconnect (which happens in a different
thread).

> > you should investigate why the receiving process can't pick up the messages it should receive
> From the message body when sendmsg, I think it is used for 'change notify'.
> If we use an more performance CPU, the speed of memory grows up slower than before.
> If the large load will cause the problem?
> 
> The straces:
> sendmsg(6, {msg_name(110)={sa_family=AF_LOCAL, sun_path="/var/lib/samba/private/msg.sock/1525222"}, msg_iov(3)=[{"\0\0\0\0\0\0\0\0", 8}, {"\346E\27\0\0\0\0\0\0\0\0\0\3\0\0\0\230\324)\303\356\245\213\222\7S\r\0\0\0\0\0"..., 52}, {"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200j\313?\205U\0\0\3\0\0\0win2"..., 53}], msg_controllen=0, msg_flags=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)

The question is -- what process is 1525222? Can you strace that one?
Does that one for example chew 100% CPU, or is it stuck? Is 1525222
the notifyd process that is a bottleneck for example, or is the
sending process the notifyd? You might want to take a look at the
ascii image in source3/smbd/notifyd/notifyd.h to get an idea of our
notify architecture. Maybe in your situation we need to do blocking
sends instead of queueing.

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de



More information about the samba-technical mailing list