Hi.

Looks like it's just my personality that causes troubles all the time,
but maybe this time I'm more lucky:

Has anyone came across strange clamd behaviour, when cli_calloc()
called from cli_scandesc() does NOT return? (yes, i know that cli_* come
from libclamav). It happens to me when I use process-based clamd.
Further investigation shows that the child process receives SIGSEGV on
calloc(). This is _not_ happening when using threading model.
Furthermore, it doesn't happen if MALLOC_CHECK_ enviroment variable is
exported, either set to 0, 1 or 2. My operating system is Linux/2.4.23
[with Openwall patch applied].

My testing routine:

[EMAIL PROTECTED]:~# clamd
[...libclamav debugging output, nothing useful...]

[EMAIL PROTECTED]:~$ telnet localhost 3310
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
SCAN /etc/passwd
Connection closed by foreign host.
[EMAIL PROTECTED]:~$

[EMAIL PROTECTED]:~# killall clamd
[EMAIL PROTECTED]:~# export MALLOC_CHECK_=
[EMAIL PROTECTED]:~# clamd
malloc: using debugging hooks
[...libclamav debugging output, nothing useful...]

[EMAIL PROTECTED]:~$ telnet localhost 3310
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
SCAN /etc/passwd
/etc/passwd: OK
Connection closed by foreign host.
[EMAIL PROTECTED]:~$


My clamav.conf settings:

AllowSupplementaryGroups
ArchiveMaxFiles 100
ArchiveMaxFileSize 30M
ArchiveMaxRecursion 10
DataDirectory /usr/share/clamav
Debug
FixStaleSocket
FollowDirectorySymlinks
FollowFileSymlinks
Foreground
LogFileMaxSize 20M
LogFile /var/log/clamav/clamd.log
LogTime
LogVerbose
MaxConnectionQueueLength 10
MaxDirectoryRecursion 10
MaxThreads 5
PidFile /var/run/clamav/clamd.pid
ScanArchive
ScanMail
ScanRAR
StreamMaxLength 30M
StreamSaveToDisk
TCPAddr 127.0.0.1
TCPSocket 3310
ThreadTimeout 180
UseProcesses
User clamav

Reading malloc(3) manual page reminds me that the OOM killer might be in
charge here, because this machine doesn't have much free memory
(although there is some free swap space). But then -- why threaded
clamd works as a charm?

Tomasz, could you take a look on this issue? Do you need any other
information that'd help you debugging this problem?

s.

-- 
(0>  Jakub Jankowski  [url]: s.atn.pl  "Nawet w Krainie Czarow
//\   [EMAIL PROTECTED]   [rlu]: 174516     latwiej jest spotkac
V_/_  [EMAIL PROTECTED]   [ekg]: 921514     Babe Jage niz Alicje"
Fingerprint: FCBF F03D 9ADB B768 8B92 BB52 0341 9037 A875 942D


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Clamav-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/clamav-devel

Reply via email to