Török Edvin wrote:
> On 7/19/07, Steven <[EMAIL PROTECTED]> wrote:
>> I am running many different versions of FreeBSD but I only see this problem 
>> on
>> 6.0.  I have tried it on versions 4.10, 4.11, 5.3, 5.4, 6.1, and 6.2 without
>> any problems.  I have two boxes running 6.0 and they both exhibit this 
>> problem.
>> One is running 6.0-STABLE and one is running 6.0-RELEASE-p17.
> 
> To me this indicates that the problem probably is in FreeBSD 6.0.

I believe you are correct, or at least when the port is used with 6.0.

> 
>> I have tried compiling with debugging options (--enable-debug) but it did not
>> give me any further information.  I have also tried compiling with debugging
>> symbols (-g) and starting the program in gdb but gdb was telling me it could
>> not find any symbols.  I could very well be doing this wrong with gdb though
>> as I do not have much familiarity with gdb.
> 
> See http://www.clamav.net/bugs/ for some details on how to use gdb.
> Try to get a core file at least, and then use gdb on it.

I worked out some of my retardation with gdb and I get the following:

Starting program: /usr/local/bin/freshclam
(no debugging symbols found)...(no debugging symbols found)...(no debugging 
symbols found)...(no debugging symbols found)...(no debugging symbols 
found)...(no debugging symbols found)...[New LWP 100161]
(no debugging symbols found)...(no debugging symbols found)...(no debugging 
symbols found)...[New Thread 0x805c100 (LWP 100161)]
ClamAV update process started at Thu Jul 19 10:20:31 2007
main.cvd is up to date (version: 43, sigs: 104500, f-level: 14, builder: sven)
ERROR: Can't get information about test.clamav.net: Host not found
ERROR: Can't download daily.cvd from test.clamav.net
Trying again in 5 secs...

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x805c100 (LWP 100161)]
0x282668c7 in _nanosleep () from /usr/lib/libpthread.so.2
(gdb) bt
#0  0x282668c7 in _nanosleep () from /usr/lib/libpthread.so.2
#1  0x282b1a25 in sleep () from /lib/libc.so.6
#2  0x2824ae53 in sleep () from /usr/lib/libthr.so.2
#3  0x0804e788 in getopt_long_only ()
#4  0x0804f0b8 in getopt_long_only ()
#5  0x0804a32a in ?? ()
#6  0x00000001 in ?? ()
#7  0xbfbfec1c in ?? ()
#8  0xbfbfec24 in ?? ()
#9  0x00000010 in ?? ()
#10 0x08052ea8 in getopt_long_only ()
#11 0x00000001 in ?? ()

> 
>> Everything is built from ports.
> 
> Build it from sources downloaded from clamav.net

I built it from the source and not through the ports and it appears
not to have the problem anymore.  It looks like an incompatibility
between pthread and clamav.

I have looked through the Makefile for the port and I see this:

# This port has a problem with -pthread,
# force to use -lthr until it's not fixed.
.if ${OSVERSION} >= 601000
PTHREAD_LIBS=   -lthr
.endif

I changed 601000 to 600000 to force it to use -lthr for FreeBSD
version 6.0 and recompiled the port.  Freshclam no longer segfaults
on me so this definitely looks like a minor bug in the port Makefile.

Thanks for the assistance.

Steven
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html

Reply via email to