Bug 8710 - connections.tdb - major leak with SMB2
Summary: connections.tdb - major leak with SMB2
Alias: None
Product: Samba 3.6
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All All
: P5 regression
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
Depends on:
Blocks: 8595
  Show dependency treegraph
Reported: 2012-01-18 04:50 UTC by Jeremy Allison
Modified: 2012-01-21 20:05 UTC (History)
1 user (show)

See Also:

git-am patch for 3.6.x. (7.55 KB, patch)
2012-01-18 22:38 UTC, Jeremy Allison
metze: review+

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Allison 2012-01-18 04:50:12 UTC
From Ira Cooper <ira@wakeful.net>

There's a major leak in connections.tdb.  I finally root caused it and did
the plumbing to fix it.  (you may disagree with my fix.  But it appears to
nail the issue.)

Basically it leaks all connections according to my tests, and this is why
our servers end up with 3GB+ connections.tdb files.  (We've seen this for a
while now, but never gotten close to the root cause until last week.)

Patch enclosed.

To replicate: net use n: \\samba-server\share
net use /delete n:

Then use tdbtooll to see the extra records left behind.

The issue is that the cnum in the connection for smb2 is initialized before
the actual connection is setup, and not passed into make_connection_snum.
 I just plumbed it in, with a boolean to say if it was passed.  (I'm
assuming it can be zero.)
Comment 1 Jeremy Allison 2012-01-18 04:53:18 UTC
Marking as blocker. As we have a patch should be a quick one to get fixed
before we ship the (delayed) 3.6.2.

Comment 2 Jeremy Allison 2012-01-18 22:38:40 UTC
Created attachment 7244 [details]
git-am patch for 3.6.x.

Patch I applied to master.
Comment 3 Stefan Metzmacher 2012-01-19 08:40:18 UTC
Comment on attachment 7244 [details]
git-am patch for 3.6.x.

Looks good
Comment 4 Stefan Metzmacher 2012-01-19 08:45:07 UTC
Karolin, please pick for the release
Comment 5 Karolin Seeger 2012-01-21 20:05:01 UTC
Pushed to v3-6-test.
Closing out bug report.