Bug 1969787

Summary: Memory leak in RPC server could allocate a lot of memory for print servers
Product: Red Hat Enterprise Linux 8 Reporter: Andreas Schneider <asn>
Component: sambaAssignee: Andreas Schneider <asn>
Status: CLOSED ERRATA QA Contact: Denis Karpelevich <dkarpele>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.5CC: abokovoy, asharov, asn, beat, ddas, dkarpele, gdeschner, jarrpa, orion, suwu, tscherf
Target Milestone: betaKeywords: Regression, Triaged, ZStream
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: samba-4.14.5-0.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1969831 (view as bug list) Environment:
Last Closed: 2021-11-09 19:48:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1969831    

Description Andreas Schneider 2021-06-09 09:14:42 UTC
Description of problem:
Memory leak in RPC server could allocate a lot of memory for print servers

On a heavily loaded Samba printserver with several hundred queque it was noted that after upgrading from 4.6 to 4.13 smbd processes were eating up memory over the cause of a few days.

As an example the smbd process with the highest resided set size was

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
 7657 WIN\pet+  20   0 1369160 398484   7824 S   0,0  2,5   1:02.80 smbd

398 MB...

talloc report of the process:

  full talloc report on 'null_context' (total 153473847 bytes in 2253252 blocks)

153 MB....

The talloc report has a myriad duplicate printer related metadata objects. The talloc report is 2M lines, still grinding through it.

Comment 1 Alexander Bokovoy 2021-06-09 09:29:12 UTC
FYI, this was fixed by a backport in Fedora 34: https://bugzilla.redhat.com/show_bug.cgi?id=1946950

Comment 4 Alexander Bokovoy 2021-06-14 16:33:46 UTC
*** Bug 1971714 has been marked as a duplicate of this bug. ***

Comment 8 errata-xmlrpc 2021-11-09 19:48:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (samba bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:4438