Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Samba? streams leak

0 views
Skip to first unread message

sniggle

unread,
Aug 11, 2002, 5:57:19 PM8/11/02
to
Here's what I've got:

SCO 5.0.5
oss459b (coff linker) patch
oss497c (core os) patch
oss499a (elf linker) patch
oss505a (os supp)
oss505a (softmgr supp)
oss600a (y2k)
gcc from skunkware binaries
mysql-3.23.49 (with FSU-pthreads-3.5c)
apache 1.3.26

and finally
samba 2.2.5 skunkware

and I've got a streams leak of about 2.2meg/week
(lsof reports about 80 open handles of various types for 3 connections)

Stop samba, and streams leak stops.

I've tried several back versions of samba (224, 223a and 221 I built
myself) and they still leak. I've got a suspicion it's not really samba,
but something I've done incorrectly in applying the patches, or GCC or
something.

I've been thru the FAQ, and Caldera leak documents, and threads of other
peoples leaks in this newsgroup, to no avail.


With samba running, netstat -a reports zero in both Recv-Q and Send-Q for
all ESTABLISHED connections.

BUT

ldstat -l

Internal MAC Transmit 59115 Number of frames dropped on transmission
Errors because of errors not covered above

which is also reflected in netstat -i
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
net0 1504 67.125.240. genyc 2564792 59115 2419424 0 0
lo0 8232 loopback localhost 179826 0 179826 0 0

All this on a netgear fa311 network card.

AND it all stops when Samba stops.

So, here are the questions:

1. Anyone else seen this?

2. Is there a problem here that pops out at anyone?

3. How do I know what order the patches were applied in so I can remove
them and test samba without them.

4. This all started when samba was upgraded to support XP. Does XP do
anything "funny" that could cause samba to leak on SCO?

5. any pointers, help, criticism, flames.


Ron


Bela Lubkin

unread,
Oct 11, 2002, 4:36:17 AM10/11/02
to sco...@xenitec.on.ca
Someone calling himself "sniggle" wrote:

> Here's what I've got:
>
> SCO 5.0.5
> oss459b (coff linker) patch
> oss497c (core os) patch
> oss499a (elf linker) patch
> oss505a (os supp)
> oss505a (softmgr supp)
> oss600a (y2k)
> gcc from skunkware binaries
> mysql-3.23.49 (with FSU-pthreads-3.5c)
> apache 1.3.26
>
> and finally
> samba 2.2.5 skunkware
>
> and I've got a streams leak of about 2.2meg/week
> (lsof reports about 80 open handles of various types for 3 connections)
>
> Stop samba, and streams leak stops.
>
> I've tried several back versions of samba (224, 223a and 221 I built
> myself) and they still leak. I've got a suspicion it's not really samba,
> but something I've done incorrectly in applying the patches, or GCC or
> something.

Someone asked me about this at GeoForum in Las Vegas; maybe even the
same person (he didn't introduce himself as "sniggle"...)

We tracked it down to a small OpenServer kernel bug that Samba was
triggering repeatedly. The bug is fixed in OpenServer 5.0.7, but
meanwhile, a small patch to Samba causes it to stop triggering it. I
believe a similar change may also be included in a newer version of
Samba (perhaps not out yet).

I don't have Samba source in front of me, but from my notes: find
source/lib/util_sock.c. In its function print_socket_options(), notice
a loop where it prints out a bunch of information about socket options
using a Samba debug macro. In effect, it says:

loop over all options {
DEBUGPRINT(5, "...", getsockopt(...))
}

Either comment out this loop, or put at the top of the routine something
that says:

if (DEBUGLEVEL < 5) return; /* not the right variable name... */

The leak happens when Samba asks the kernel about socket options that
are not supported. The loop calls getsockopt() with every possible
option (including some that the kernel doesn't support), and then
discards the data without using it at all, unless the debug level is
high.

I would appreciate it if some Samba hacker would reply to this,
translating my handwaving into an actual source-level patch...

> 4. This all started when samba was upgraded to support XP. Does XP do
> anything "funny" that could cause samba to leak on SCO?

I don't know Samba history, but I wouldn't be surprised to find that
this code (either the debug code to display all socket options, or
possibly _all_ knowledge of socket options) was added to deal with some
sort of XP peculiarity...

>Bela<

0 new messages