[Samba] Possible Samba Memory Leak
Anthony Russello
arussello at rogers.com
Wed Jun 29 12:19:18 GMT 2005
Hi Jeremy,
The same issue occurs when running samba 3.0.14a fresh
from samba.org.
Here are my .configure options:
<snip>
./configure --bindir=/bin \
--sbindir=/sbin \
--sysconfdir=/etc/samba \
--includedir=/opt/crosstool/powerpc-603e-linux-gnu/gcc-3.3.4-glibc-2.3.2/powerpc-603e-linux-gnu/sys-include
\
--libdir=/opt/crosstool/powerpc-603e-linux-gnu/gcc-3.3.4-glibc-2.3.2/powerpc-603e-linux-gnu/lib
\
--host=powerpc-603e-linux-gnu \
--disable-cups \
--disable-xmltest \
--without-afs \
--without-fake-kaserver \
--with-privatedir=/etc/samba \
--with-lockdir=/var/lock \
--with-piddir=/var/lock \
--without-sys-quotas \
--without-quotas \
--with-included-popt=yes \
--without-sendfile-support \
--without-winbind \
--prefix= \
--without-ldap \
--without-krb5 \
--without-libsmbclient \
--without-ads \
--with-configdir=/etc/samba \
--with-codepagedir=/etc/samba \
--without-automount \
--without-smbmount \
--without-pam \
--without-acl-support \
--without-utmp \
--without-python \
--without-libiconv
</snip>
Here is the output on the console:
<snip>
/ # oom-killer: gfp_mask=0xd2
DMA per-cpu:
cpu 0 hot: low 8, high 24, batch 4
cpu 0 cold: low 0, high 8, batch 4
Normal per-cpu: empty
HighMem per-cpu: empty
Free pages: 1272kB (0kB HighMem)
Active:36 inactive:364 dirty:12 writeback:14
unstable:0 free:318 slab:14662 mapped:156
pagetables:22
DMA free:1272kB min:1024kB low:1280kB high:1536kB
active:144kB inactive:1456kB present:65536kB pages
_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0
Normal free:0kB min:0kB low:0kB high:0kB active:0kB
inactive:0kB present:0kB pages_scanned:0 all_unr
eclaimable? no
lowmem_reserve[]: 0 0 0
HighMem free:0kB min:128kB low:160kB high:192kB
active:0kB inactive:0kB present:0kB pages_scanned:0
all_unreclaimable? no
lowmem_reserve[]: 0 0 0
DMA: 64*4kB 13*8kB 21*16kB 10*32kB 0*64kB 0*128kB
1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 1272k
B
Normal: empty
HighMem: empty
Swap cache: add 10790, delete 10714, find 3455/7078,
race 0+0
Free swap = 126680kB
Total swap = 128512kB
Out of Memory: Killed process 828 (smbd).
oom-killer: gfp_mask=0x1d2
DMA per-cpu:
cpu 0 hot: low 8, high 24, batch 4
cpu 0 cold: low 0, high 8, batch 4
Normal per-cpu: empty
HighMem per-cpu: empty
Free pages: 1312kB (0kB HighMem)
Active:84 inactive:124 dirty:0 writeback:0 unstable:0
free:328 slab:14837 mapped:184 pagetables:18
DMA free:1312kB min:1024kB low:1280kB high:1536kB
active:336kB inactive:496kB present:65536kB pages_
scanned:362 all_unreclaimable? no
lowmem_reserve[]: 0 0 0
Normal free:0kB min:0kB low:0kB high:0kB active:0kB
inactive:0kB present:0kB pages_scanned:0 all_unr
eclaimable? no
lowmem_reserve[]: 0 0 0
HighMem free:0kB min:128kB low:160kB high:192kB
active:0kB inactive:0kB present:0kB pages_scanned:0
all_unreclaimable? no
lowmem_reserve[]: 0 0 0
DMA: 64*4kB 20*8kB 20*16kB 10*32kB 0*64kB 0*128kB
1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 1312k
B
Normal: empty
HighMem: empty
Swap cache: add 29969, delete 29913, find 8669/19859,
race 0+0
Free swap = 126796kB
Total swap = 128512kB
Out of Memory: Killed process 934 (smbd).
oom-killer: gfp_mask=0xd2
DMA per-cpu:
cpu 0 hot: low 8, high 24, batch 4
cpu 0 cold: low 0, high 8, batch 4
Normal per-cpu: empty
HighMem per-cpu: empty
Free pages: 1472kB (0kB HighMem)
Active:52 inactive:163 dirty:0 writeback:2 unstable:0
free:368 slab:14820 mapped:193 pagetables:18
DMA free:1472kB min:1024kB low:1280kB high:1536kB
active:208kB inactive:652kB present:65536kB pages_
scanned:230 all_unreclaimable? no
lowmem_reserve[]: 0 0 0
Normal free:0kB min:0kB low:0kB high:0kB active:0kB
inactive:0kB present:0kB pages_scanned:0 all_unr
eclaimable? no
lowmem_reserve[]: 0 0 0
HighMem free:0kB min:128kB low:160kB high:192kB
active:0kB inactive:0kB present:0kB pages_scanned:0
all_unreclaimable? no
lowmem_reserve[]: 0 0 0
DMA: 112*4kB 16*8kB 20*16kB 10*32kB 0*64kB 0*128kB
1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 1472
kB
Normal: empty
HighMem: empty
Swap cache: add 48834, delete 48765, find 14402/32998,
race 0+0
Free swap = 126976kB
Total swap = 128512kB
Out of Memory: Killed process 957 (smbd).
</snip>
Thanks,
Anthony
--- Anthony Russello <arussello at rogers.com> wrote:
> Okay,
>
> If I manually edit include/config.h to change the
> iconv stuff to #undef and commented out, it now
> builds
> (might be an configure issue there).
>
> That setup is currently running, it'll take several
> hours before we hit the error condition (if we hit
> it
> with this build).
>
> I'll get back to you tomorrow with the results.
>
> Thanks again for responding so quickly.
>
> Cheers,
> Anthony
>
> --- Anthony Russello <arussello at rogers.com> wrote:
>
> >
> > --- Jeremy Allison <jra at samba.org> wrote:
> >
> > >
> > > 3.0.2a is very old. Can you attempt the same
> with
> > a
> > > 3.0.14a at least.
> >
> > Hi Jeremy,
> >
> > Attempts to configure samba 3.0.14a with
> > --without-libiconv result in the error:
> >
> > <snip>
> > checking whether pututline returns pointer... yes
> > checking for ut_syslen in utmpx... no
> > configure: error: argument to --with-libiconv must
> > be
> > a directory
> > </snip>
> >
> > <snip>
> > Linking bin/smbd
> > lib/iconv.o(.text+0x2a8): In function `sys_iconv':
> > : undefined reference to `libiconv'
> > lib/iconv.o(.text+0x2d8): In function `sys_iconv':
> > : undefined reference to `libiconv'
> > lib/iconv.o(.text+0x5a0): In function
> > `smb_iconv_open':
> > : undefined reference to `libiconv_open'
> > lib/iconv.o(.text+0x5bc): In function
> > `smb_iconv_open':
> > : undefined reference to `libiconv_open'
> > lib/iconv.o(.text+0x5f4): In function
> > `smb_iconv_open':
> > : undefined reference to `libiconv_open'
> > lib/iconv.o(.text+0x610): In function
> > `smb_iconv_open':
> > : undefined reference to `libiconv_open'
> > lib/iconv.o(.text+0x8d0): In function
> > `smb_iconv_close':
> > : undefined reference to `libiconv_close'
> > lib/iconv.o(.text+0x8e0): In function
> > `smb_iconv_close':
> > : undefined reference to `libiconv_close'
> > lib/iconv.o(.text+0x8f0): In function
> > `smb_iconv_close':
> > : undefined reference to `libiconv_close'
> > collect2: ld returned 1 exit status
> > make: *** [bin/smbd] Error 1
> > stripping using powerpc-603e-linux-gnu-strip
> > </snip>
> >
> > This worked fine in samba 3.0.2a. Unfortunately,
> > due
> > to space limitations in our flash filesystem on
> our
> > embedded device, we can't include libiconv.
> >
> > Any ideas?
> >
> > Thanks for getting back to me so soon.
> >
> > Anthony
> >
>
>
More information about the samba
mailing list