Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 314995 - app-antivirus/clamav-0.96: clamd and clamscan does not start with error "Segmentation fault"
Summary: app-antivirus/clamav-0.96: clamd and clamscan does not start with error "Segm...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Antivirus Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-13 14:27 UTC by Stas
Modified: 2010-04-19 16:41 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stas 2010-04-13 14:27:58 UTC
clamd and clamscan does not start with error "Segmentation fault"

Reproducible: Always

Steps to Reproduce:
1. # clamscan
2.
3.




# emerge --info
Portage 2.1.8.3 (default/linux/x86/10.0/desktop, gcc-4.3.4, glibc-2.10.1-r1, 2.6.32-gentoo-r7 i686)
=================================================================                                  
System uname: Linux-2.6.32-gentoo-r7-i686-Intel-R-_Pentium-R-_4_CPU_3.00GHz-with-gentoo-1.12.13    
Timestamp of tree: Tue, 13 Apr 2010 01:45:03 +0000                                                 
ccache version 2.4 [enabled]                                                                       
app-shells/bash:     4.0_p37                                                                       
dev-java/java-config: 2.1.10                                                                       
dev-lang/python:     2.6.4-r1                                                                      
dev-util/ccache:     2.4-r7                                                                        
dev-util/cmake:      2.6.4-r3                                                                      
sys-apps/baselayout: 1.12.13                                                                       
sys-apps/sandbox:    1.6-r2                                                                        
sys-devel/autoconf:  2.13, 2.63-r1                                                                 
sys-devel/automake:  1.4_p6, 1.8.5-r3, 1.9.6-r3, 1.10.3, 1.11.1                                    
sys-devel/binutils:  2.18-r3                                                                       
sys-devel/gcc:       3.4.6-r2, 4.3.4                                                               
sys-devel/gcc-config: 1.4.1                                                                        
sys-devel/libtool:   2.2.6b                                                                        
virtual/os-headers:  2.6.30-r1                                                                     
ACCEPT_KEYWORDS="x86"                                                                              
ACCEPT_LICENSE="* -@EULA PUEL Q3AEULA dlj-1.1"                                                     
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=pentium4 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O3 -march=pentium4 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests autoconfig ccache distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="ru_RU.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1"
LINGUAS="ru"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/pro-audio /var/lib/layman/games /var/lib/layman/sunrise /var/lib/layman/roslin"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac accessibility acl acpi alsa amrnb amrwb apache2 asf avi berkdb bitmap-fonts bluetooth branding bzip2 cairo caps cdparanoia cdr chardet clamav cli consolekit cpudetection cracklib crypt cxx dbus divx4linux doxywizard dri dts dv dvd dvdr dvdread emboss encode esd examples exif fam fame ffmpeg firefox flac ftp gd gdbm gif gimp glib glitz gnutls gphoto2 gpm gstramer gtk gtk2 gtkhtml hal iconv icq idn imagemagick ipv6 jabber jack jack-tmpfs javascript jpeg jpeg2k jpg kde kde4 ladspa ladspa%* lcms ldap libnotify libsamplerate libsamplerate% live lzo mad mad% man matroska midi mikmod mmap mng modplug modules mono mp3 mp4 mpeg mpg123 mplayer mudflap mysql ncurses nls nptl nptlonly ntfs nvidia ogg openal opengl openmp oscar oss pam pango pch pcre pda pdf perl php plugins png portaudio postgres ppds pppd python qt3support qt4 quicktime rar rar% raw readline reflection reiserfs sdl session skins slang sndfile speex spell spl ssl startup-notification subtitles subversion svga sysfs tcpd theora tiff truetype truetype-fonts type1 type1-fonts unicode usb utf utf8 vcd vorbis vst wavpack win32codecs wma wmf wxwindows x264 x86 xcb xcomposite xfs xml xorg xosd xulrunner xv xvid xvmc zlib" ALSA_CARDS="snd-hda-intel hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CAMERAS="digita ptp2 sony_dscf1 sony_dscf55 samsung" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nv nvidia vesa i810"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

-----------
# gdb clamscan

warning: Can not parse XML syscalls information; XML support was disabled at compile time.
GNU gdb (Gentoo 7.0.1 p1) 7.0.1                                                           
Copyright (C) 2009 Free Software Foundation, Inc.                                         
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>             
This is free software: you are free to change and redistribute it.                        
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"                
and "show warranty" for details.                                                          
This GDB was configured as "i686-pc-linux-gnu".                                           
For bug reporting instructions, please see:                                               
<http://bugs.gentoo.org/>...                                                              
Reading symbols from /usr/bin/clamscan...(no debugging symbols found)...done.             
(gdb) run                                                                                 
Starting program: /usr/bin/clamscan                                                       
[Thread debugging using libthread_db enabled]                                             

Program received signal SIGSEGV, Segmentation fault.
0xb784b9d1 in llvm::PMTopLevelManager::PMTopLevelManager(llvm::TopLevelManagerType) () from /usr/lib/libclamav.so.6
========
# clamconf -n
Checking configuration files in /etc

Config file: clamd.conf
-----------------------
LogFile = "/var/log/clamav/clamd.log"
LogTime = "yes"
PidFile = "/var/run/clamav/clamd.pid"
LocalSocket = "/var/run/clamav/clamd.sock"
User = "clamav"
AllowSupplementaryGroups = "yes"

Config file: freshclam.conf
---------------------------
PidFile = "/var/run/clamav/freshclam.pid"
AllowSupplementaryGroups = "yes"
UpdateLogFile = "/var/log/clamav/freshclam.log"
DatabaseMirror = "database.clamav.net"

clamav-milter.conf not found

Software settings
-----------------
Version: 0.96
Optional features supported: MEMPOOL IPv6 CLAMUKO AUTOIT_EA06 BZIP2 RAR JIT
Database directory: /var/lib/clamav
main.cvd: version 52, sigs: 704727, built on Mon Feb 15 19:54:51 2010
daily.cvd: version 10736, sigs: 51024, built on Tue Apr 13 11:23:25 2010
==================
gdb -core=core --args clamscan

warning: Can not parse XML syscalls information; XML support was disabled at compile time.
GNU gdb (Gentoo 7.0.1 p1) 7.0.1                                                           
Copyright (C) 2009 Free Software Foundation, Inc.                                         
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>             
This is free software: you are free to change and redistribute it.                        
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"                
and "show warranty" for details.                                                          
This GDB was configured as "i686-pc-linux-gnu".                                           
For bug reporting instructions, please see:                                               
<http://bugs.gentoo.org/>...                                                              
Reading symbols from /usr/bin/clamscan...(no debugging symbols found)...done.             

warning: Can't read pathname for load map: Ошибка ввода/вывода.
Reading symbols from /usr/lib/libclamav.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libclamav.so.6
Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /usr/lib/libltdl.so.7...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libltdl.so.7
Reading symbols from /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/libstdc++.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/libstdc++.so.6
Reading symbols from /lib/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /lib/libbz2.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libbz2.so.1
Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/libgcc_s.so.1
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /usr/lib/libclamunrar_iface.so.6.1.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libclamunrar_iface.so.6.1.2
Reading symbols from /usr/lib/libclamunrar.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libclamunrar.so.6
Core was generated by `clamscan'.
Program terminated with signal 11, Segmentation fault.
#0  0xb712d9d1 in llvm::PMTopLevelManager::PMTopLevelManager(llvm::TopLevelManagerType) () from /usr/lib/libclamav.so.6
(gdb) bt
#0  0xb712d9d1 in llvm::PMTopLevelManager::PMTopLevelManager(llvm::TopLevelManagerType) () from /usr/lib/libclamav.so.6
#1  0x0808b3e4 in ?? ()
#2  0xb78cd989 in ?? () from /lib/ld-linux.so.2
#3  0x097f98b7 in ?? ()
#4  0x0793a808 in ?? ()
#5  0x07958c08 in ?? ()
#6  0x241c6108 in ?? ()
#7  0x097f98b7 in ?? ()
#8  0x08d69008 in ?? ()
#9  0x0793a808 in ?? ()
#10 0x07958c08 in ?? ()
#11 0x00000008 in ?? ()
#12 0x00000200 in ?? ()
#13 0x00000000 in ?? ()
Comment 1 Tobias Scherbaum (RETIRED) gentoo-dev 2010-04-13 17:43:21 UTC
CFLAGS="-O3 -march=pentium4 -pipe -fomit-frame-pointer"

re-compile with sane CFLAGS please.
Comment 2 Quasimodo 2010-04-13 18:15:14 UTC
(In reply to comment #0)
I had the same problem here. After some testing - all of no result - I've switched back from O3 to O2 because this was one of the differences betweeen my other installation where clamd was working.

Now it's working again, so obviously -O3 is breaking clamd. Maybe the ebuild should filter the O3 compiler flag.
Comment 3 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2010-04-13 18:20:50 UTC
(In reply to comment #2)
> Now it's working again, so obviously -O3 is breaking clamd. Maybe the ebuild
> should filter the O3 compiler flag.

This would seem to be a slightly evil fix. Maybe the ebuild can ewarn users about CFLAGS=-03

Also, most people running clamd on serverish systems such as mailservers (using clamav-milter, etc.) should not be using CFLAGS=-03 ;-)
Comment 4 Tobias Scherbaum (RETIRED) gentoo-dev 2010-04-13 18:34:48 UTC
(In reply to comment #3)
> This would seem to be a slightly evil fix. Maybe the ebuild can ewarn users
> about CFLAGS=-03

-O3 is unsupported. If you like to use it, then fix the bugs caused by doing so yourself. There's nothing to fix for us here.
 
> Also, most people running clamd on serverish systems such as mailservers (using
> clamav-milter, etc.) should not be using CFLAGS=-03 ;-)
> 

It's not like they "should not", they wouldn't do so.
Comment 5 Stas 2010-04-14 02:47:27 UTC
(In reply to comment #1)
> CFLAGS="-O3 -march=pentium4 -pipe -fomit-frame-pointer"
> 
> re-compile with sane CFLAGS please.
> 

I re-compile with CFLAGS="-O3 -march=pentium4 -pipe -fomit-frame-pointer" and CFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer"
No results :-(
Comment 6 Stas 2010-04-19 16:41:59 UTC
Sorry.
Problem solved: The last time carelessly assembled.