Using samba compiled with libclamav support, when an XP computer connects to a share, several smbd processes (7) are running and four of them compete for the CPU. The share behaves normally (though slowly), and the smbd processes continue to monopolise the CPU long after the XP computer has disconnected from the share. I tried /etc/init.d/samba stop (which reported success, but the processes were still there) killall smbd but the only remedy was killall -9 smbd I'm using net-fs/samba-3.0.14a-r2 app-antivirus/clamav-0.86.2 Reproducible: Always Steps to Reproduce: 1.Build samba with libclamav USE flag 2.Setup a share that makes use of clamav scanning 3.Connect to the share with Windows XP (haven't tested other clients), by using the UNC path (eg \\computer\share) 4.Browse the share and copy files to it (using Explorer). Actual Results: 7 smbd processes exist, 4 of which hog the CPU, even after all shares have been disconnected from. Expected Results: Not hogged the CPU! Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.5-r0, 2.6.11-ck8 i686) ================================================================= System uname: 2.6.11-ck8 i686 AMD Athlon(tm) XP 2400+ Gentoo Base System version 1.6.13 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] dev-lang/python: 2.3.5 sys-apps/sandbox: 1.2.11 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -Os -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-xp -Os -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distcc distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://mirror.pacific.net.au/linux/Gentoo http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo" LDFLAGS="-Wl,-O1" MAKEOPTS="-j4 -l2.5" PKGDIR="/usr/local/portage/packages" PORTAGE_TMPDIR="/tmp/portage" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow X a52 aac acl alsa apache2 apm audiofile avi bash-completion berkdb bitmap-fonts bonobo cdio cdparanoia cdr chroot crypt cups dga dts dv dvd dvdr dvdread eds emboss encode extensions fam ffmpeg flac gcj gd gdbm gif gphoto2 gstreamer gtk gtk2 gtkhtml guile hal imagemagick imlib insecure-drivers ipv6 jack java jikes jpeg jpeg2k junit kde kdeenablefinal lcms ldap libcaca libdvdread libg++ libwww live lm_sensors mad matroska mikmod mmx mng motif mozcalendar mozilla moznocompose mozxmlterm mp3 mpeg mysql ncurses net network nls nodrm nptl nptlonly oav ogg oggvorbis openexr opengl osiris-console oss pam pcmcia pdflib perl pic png pnp ppds python qt quicktime quotes rdesktop readline real rtc samba scanner sdl skey slang slp speex spell sse ssl tcltk tcpd tcsim theora tiff truetype truetype-fonts trusted type1-fonts unicode usb vorbis win32codecs wmf xine xml2 xmms xprint xv xvid xvmc zlib video_cards_via userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LINGUAS
Created attachment 66853 [details] The smb.conf on the problem server
Hello, i have a similiar bug.. Versions: Samba 3.0.20b Clamav 0.87 I also wrote a bug report to the developers of clamav, but they said if i can scan with clamdscan whereas Samba hangs (has a CPU usage of 100%) it
Hello, i have a similiar bug.. Versions: Samba 3.0.20b Clamav 0.87 I also wrote a bug report to the developers of clamav, but they said if i can scan with clamdscan whereas Samba hangs (has a CPU usage of 100%) it´s not a bug of clamav.. I should contact the samba developers for help.. But I never contacted them, because my english is bady and i had no time :-( Some Informations: emerge info Portage 2.0.51.22-r3 (default-linux/x86/2005.1, gcc-3.3.6, glibc-2.3.5-r2, 2.6.13.2-nitro1 i686) ================================================================= System uname: 2.6.13.2-nitro1 i686 AMD Athlon(tm) XP 3000+ Gentoo Base System version 1.6.13 ccache version 2.3 [enabled] dev-lang/python: 2.3.5-r2, 2.4.2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.20 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -m3dnow -msse -mfpmath=sse -mmmx -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -maccumulate-outgoing-args -fprefetch-loop-arrays" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-xp -m3dnow -msse -mfpmath=sse -mmmx -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -maccumulate-outgoing-args -fprefetch-loop-arrays" DISTDIR="/mnt/portage/distfiles/" FEATURES="autoconfig ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo" LANG="de_DE@euro" LC_ALL="de_DE@euro" LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common -s" LINGUAS="de" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/mnt/portage/tmp/" PORTDIR="/mnt/portage/usr/" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="x86 3dnow 3dnowext X alsa apache2 apm arts avi bitmap-fonts cdr crypt cups curl dvd dvdr dvdread eds emboss encode fam ffmpeg foomaticdb fortran gd gif gnome gpm gstreamer gtk gtk2 imlib jpeg kde libg++ libwww lm_sensors mad mikmod mmx motif mp3 mpeg mysql ncurses nls nptl nvidia ogg oggvorbis opengl openssh pam pdflib perl png python qt quicktime readline samba sdl softmmu sse ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts udev vorbis win32codecs wxwindows xine xinetd xml xml2 xmms xv zlib linguas_de userland_GNU kernel_linux elibc_glibc" And my configuration files: http://home.arcor.de/tost90/html/Skripte/smb.conf http://home.arcor.de/tost90/html/Skripte/vscan-clamav.conf Thanks for reading...
samba-3.0.21b ships with a new version of the samba-vscan wrapper package. Could you please try it? The new ebuild has just committed to portage, so re-'emerge sync' and unmask it ('=net-fs/samba-3.0.21b ~x86' in /etc/portage/package.keywords)
I ran into the same problem on amd64 with net-fs/samba-3.0.21b and net-fs/samba-3.0.22. My use flags did include libclamav. After reemerging the packet without libclamav in the use flags the problem disappeared. Additionally, I could also work around the problem by disabling all vfs object = vscan-clamav vscan-clamav: config-file = /etc/samba/vscan-clamav.conf entries. However I prefer to pipe my share I/O thru a virus scanner, hence I removed the use flag permanently.
I tried for a while to clean the libclamav support, but the samba people have changed the locking internals three times. So I'd like to remove the libclamav support until there is more stability.