eagleas / clamav

ClamAV Ruby bindings
25 stars 9 forks source link

Segmentation Fault on Ubuntu 10.04 for ClamAV > 0.96.5 #6

Open ghost opened 11 years ago

ghost commented 11 years ago

I am seeing segmentation faults under Ubuntu Lucid 10.04 server when scanning with the ClamAV gem. I created a fresh virtual machine fully patched as of today, with a fresh RVM install, fresh Ruby 1.9.3 install and a fresh minimal gemset. Last known working version for me is 0.96.5+dfsg-1ubuntu1.10.04.4

Ubuntu 12.04 does not exhibit the same behavior with the same ClamAV version, but the command line executables for scanning appear to work in both instances.

Kernel Version

Linux lucid64 2.6.32-46-server #108-Ubuntu SMP Thu Apr 11 16:11:15 UTC 2013 x86_64 GNU/Linux

Package Versions

vagrant@lucid64:~$ dpkg -l | grep clamav
ii  clamav                          0.97.8+dfsg-1ubuntu1.10.04.1      anti-virus utility for Unix - command-line i
ii  clamav-base                     0.97.8+dfsg-1ubuntu1.10.04.1      anti-virus utility for Unix - base package
ii  clamav-freshclam                0.97.8+dfsg-1ubuntu1.10.04.1      anti-virus utility for Unix - virus database
ii  libclamav-dev                   0.97.8+dfsg-1ubuntu1.10.04.1      anti-virus utility for Unix - development fi
ii  libclamav6                      0.97.8+dfsg-1ubuntu1.10.04.1      anti-virus utility for Unix - library

Signature Versions

vagrant@lucid64:~$ sudo freshclam
ClamAV update process started at Fri May  3 21:01:17 2013
main.cvd is up to date (version: 54, sigs: 1044387, f-level: 60, builder: sven)
daily.cvd is up to date (version: 17137, sigs: 1208176, f-level: 63, builder: neo)
bytecode.cvd is up to date (version: 214, sigs: 41, f-level: 63, builder: neo)

Gem Versions

vagrant@lucid64:~$ gem list

*** LOCAL GEMS ***

bundler (1.3.5)
clamav (0.4.1)
rake (10.0.4)
rubygems-bundler (1.1.1)
rvm (1.11.3.7)

Executable Versions

vagrant@lucid64:~$ clamscan ~/.profile
/home/vagrant/.profile: OK

----------- SCAN SUMMARY -----------
Known viruses: 2247191
Engine version: 0.97.8
Scanned directories: 0
Scanned files: 1
Infected files: 0
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 9.299 sec (0 m 9 s)

vagrant@lucid64:~$ clamscan --version
ClamAV 0.97.8/17137/Fri May  3 18:39:10 2013

Repro Steps/Stack Trace

irb(main):008:0> scanner.scanfile('/home/vagrant/.profile', 0)
(irb):8: [BUG] Segmentation fault
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0024 p:---- s:0087 b:0087 l:000086 d:000086 CFUNC  :scanfile
c:0023 p:0015 s:0082 b:0082 l:000238 d:000081 EVAL   (irb):8
c:0022 p:---- s:0080 b:0080 l:000079 d:000079 FINISH
c:0021 p:---- s:0078 b:0078 l:000077 d:000077 CFUNC  :eval
c:0020 p:0028 s:0071 b:0071 l:000070 d:000070 METHOD /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/workspace.rb:80
c:0019 p:0033 s:0064 b:0063 l:000062 d:000062 METHOD /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/context.rb:254
c:0018 p:0031 s:0058 b:0058 l:000998 d:000057 BLOCK  /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:159
c:0017 p:0042 s:0050 b:0050 l:000049 d:000049 METHOD /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:273
c:0016 p:0011 s:0045 b:0045 l:000998 d:000044 BLOCK  /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:156
c:0015 p:0144 s:0041 b:0041 l:000024 d:000040 BLOCK  /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:243
c:0014 p:---- s:0038 b:0038 l:000037 d:000037 FINISH
c:0013 p:---- s:0036 b:0036 l:000035 d:000035 CFUNC  :loop
c:0012 p:0009 s:0033 b:0033 l:000024 d:000032 BLOCK  /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:229
c:0011 p:---- s:0031 b:0031 l:000030 d:000030 FINISH
c:0010 p:---- s:0029 b:0029 l:000028 d:000028 CFUNC  :catch
c:0009 p:0023 s:0025 b:0025 l:000024 d:000024 METHOD /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:228
c:0008 p:0046 s:0022 b:0022 l:000998 d:000998 METHOD /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:155
c:0007 p:0011 s:0019 b:0019 l:001df8 d:000018 BLOCK  /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:70
c:0006 p:---- s:0017 b:0017 l:000016 d:000016 FINISH
c:0005 p:---- s:0015 b:0015 l:000014 d:000014 CFUNC  :catch
c:0004 p:0183 s:0011 b:0011 l:001df8 d:001df8 METHOD /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:69
c:0003 p:0039 s:0006 b:0006 l:002258 d:001158 EVAL   /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/bin/irb:13
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:002258 d:002258 TOP

-- Ruby level backtrace information ----------------------------------------
/home/vagrant/.rvm/rubies/ruby-1.9.3-p392/bin/irb:13:in `<main>'
/home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:69:in `start'
/home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:69:in `catch'
/home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:70:in `block in start'
/home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:155:in `eval_input'
/home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in `each_top_level_statement'
/home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in `catch'
/home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `block in each_top_level_statement'
/home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `loop'
/home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:243:in `block (2 levels) in each_top_level_statement'
/home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:156:in `block in eval_input'
/home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:273:in `signal_status'
/home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:159:in `block (2 levels) in eval_input'
/home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/context.rb:254:in `evaluate'
/home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/workspace.rb:80:in `evaluate'
/home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/workspace.rb:80:in `eval'
(irb):8:in `irb_binding'
(irb):8:in `scanfile'

-- C level backtrace information -------------------------------------------
/home/vagrant/.rvm/rubies/ruby-1.9.3-p392/bin/../lib/libruby.so.1.9(+0x182fe8) [0x7fb66f71afe8] vm_dump.c:796
/home/vagrant/.rvm/rubies/ruby-1.9.3-p392/bin/../lib/libruby.so.1.9(+0x623b6) [0x7fb66f5fa3b6] error.c:258
/home/vagrant/.rvm/rubies/ruby-1.9.3-p392/bin/../lib/libruby.so.1.9(rb_bug+0xb8) [0x7fb66f5fa558] error.c:277
/home/vagrant/.rvm/rubies/ruby-1.9.3-p392/bin/../lib/libruby.so.1.9(+0x112355) [0x7fb66f6aa355] signal.c:609
/lib/libpthread.so.0(+0xf8f0) [0x7fb66f38a8f0]
/lib/libreadline.so.6(funmap+0) [0x7fb66df1b9d8]

-- Other runtime information -----------------------------------------------

* Loaded script: irb

* Loaded features:

    0 enumerator.so
    1 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/enc/encdb.so
    2 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/enc/iso_8859_1.so
    3 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/enc/trans/transdb.so
    4 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/defaults.rb
    5 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/rbconfig.rb
    6 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/deprecate.rb
    7 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/exceptions.rb
    8 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb
    9 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems.rb
   10 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/e2mmap.rb
   11 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/init.rb
   12 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/workspace.rb
   13 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/inspector.rb
   14 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/context.rb
   15 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/extend-command.rb
   16 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/output-method.rb
   17 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/notifier.rb
   18 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/slex.rb
   19 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-token.rb
   20 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb
   21 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/src_encoding.rb
   22 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/magic-file.rb
   23 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/readline.so
   24 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/input-method.rb
   25 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/locale.rb
   26 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb
   27 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/version.rb
   28 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/requirement.rb
   29 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/platform.rb
   30 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb
   31 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/path_support.rb
   32 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb
   33 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/thread.rb
   34 /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/singleton.rb
   35 /home/vagrant/.rvm/gems/ruby-1.9.3-p392@clamav/gems/clamav-0.4.1/lib/clamav.so

* Process memory map:

00400000-00401000 r-xp 00000000 fb:00 1181088                            /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/bin/ruby
00600000-00601000 r--p 00000000 fb:00 1181088                            /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/bin/ruby
00601000-00602000 rw-p 00001000 fb:00 1181088                            /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/bin/ruby
02528000-03082000 rw-p 00000000 00:00 0                                  [heap]
7fb65f837000-7fb65f839000 r-xp 00000000 fb:00 2624264                    /usr/lib/gconv/ISO8859-1.so
7fb65f839000-7fb65fa38000 ---p 00002000 fb:00 2624264                    /usr/lib/gconv/ISO8859-1.so
7fb65fa38000-7fb65fa39000 r--p 00001000 fb:00 2624264                    /usr/lib/gconv/ISO8859-1.so
7fb65fa39000-7fb65fa3a000 rw-p 00002000 fb:00 2624264                    /usr/lib/gconv/ISO8859-1.so
7fb65fa3a000-7fb65fa41000 r--s 00000000 fb:00 2632603                    /usr/lib/gconv/gconv-modules.cache
7fb65fa41000-7fb65fa51000 rwxp 00000000 00:00 0
7fb65fa51000-7fb65fa92000 rw-p 00000000 00:00 0
7fb65fa92000-7fb65fb12000 rwxp 00000000 00:00 0
7fb65fb12000-7fb65fb42000 rw-p 00000000 00:00 0
7fb65fb52000-7fb66bb8c000 rw-p 00000000 00:00 0
7fb66bb8c000-7fb66bba2000 r-xp 00000000 fb:00 2359308                    /lib/libgcc_s.so.1
7fb66bba2000-7fb66bda1000 ---p 00016000 fb:00 2359308                    /lib/libgcc_s.so.1
7fb66bda1000-7fb66bda2000 r--p 00015000 fb:00 2359308                    /lib/libgcc_s.so.1
7fb66bda2000-7fb66bda3000 rw-p 00016000 fb:00 2359308                    /lib/libgcc_s.so.1
7fb66bda3000-7fb66bdbd000 r-xp 00000000 fb:00 2640304                    /usr/lib/libtommath.so.0.0.39
7fb66bdbd000-7fb66bfbd000 ---p 0001a000 fb:00 2640304                    /usr/lib/libtommath.so.0.0.39
7fb66bfbd000-7fb66bfbe000 r--p 0001a000 fb:00 2640304                    /usr/lib/libtommath.so.0.0.39
7fb66bfbe000-7fb66bfbf000 rw-p 0001b000 fb:00 2640304                    /usr/lib/libtommath.so.0.0.39
7fb66bfbf000-7fb66bfcf000 r-xp 00000000 fb:00 2359545                    /lib/libbz2.so.1.0.4
7fb66bfcf000-7fb66c1ce000 ---p 00010000 fb:00 2359545                    /lib/libbz2.so.1.0.4
7fb66c1ce000-7fb66c1cf000 r--p 0000f000 fb:00 2359545                    /lib/libbz2.so.1.0.4
7fb66c1cf000-7fb66c1d0000 rw-p 00010000 fb:00 2359545                    /lib/libbz2.so.1.0.4
7fb66c1d0000-7fb66c1e6000 r-xp 00000000 fb:00 2359532                    /lib/libz.so.1.2.3.3
7fb66c1e6000-7fb66c3e5000 ---p 00016000 fb:00 2359532                    /lib/libz.so.1.2.3.3
7fb66c3e5000-7fb66c3e6000 r--p 00015000 fb:00 2359532                    /lib/libz.so.1.2.3.3
7fb66c3e6000-7fb66c3e7000 rw-p 00016000 fb:00 2359532                    /lib/libz.so.1.2.3.3
7fb66c3e7000-7fb66c4dd000 r-xp 00000000 fb:00 2622371                    /usr/lib/libstdc++.so.6.0.13
7fb66c4dd000-7fb66c6dd000 ---p 000f6000 fb:00 2622371                    /usr/lib/libstdc++.so.6.0.13
7fb66c6dd000-7fb66c6e4000 r--p 000f6000 fb:00 2622371                    /usr/lib/libstdc++.so.6.0.13
7fb66c6e4000-7fb66c6e6000 rw-p 000fd000 fb:00 2622371                    /usr/lib/libstdc++.so.6.0.13
7fb66c6e6000-7fb66c6fb000 rw-p 00000000 00:00 0
7fb66c6fb000-7fb66c703000 r-xp 00000000 fb:00 2640302                    /usr/lib/libltdl.so.7.2.1
7fb66c703000-7fb66c903000 ---p 00008000 fb:00 2640302                    /usr/lib/libltdl.so.7.2.1
7fb66c903000-7fb66c904000 r--p 00008000 fb:00 2640302                    /usr/lib/libltdl.so.7.2.1
7fb66c904000-7fb66c905000 rw-p 00009000 fb:00 2640302                    /usr/lib/libltdl.so.7.2.1
7fb66c905000-7fb66d61a000 r-xp 00000000 fb:00 2640306                    /usr/lib/libclamav.so.6.1.17
7fb66d61a000-7fb66d81a000 ---p 00d15000 fb:00 2640306                    /usr/lib/libclamav.so.6.1.17
7fb66d81a000-7fb66d878000 r--p 00d15000 fb:00 2640306                    /usr/lib/libclamav.so.6.1.17
7fb66d878000-7fb66d88a000 rw-p 00d73000 fb:00 2640306                    /usr/lib/libclamav.so.6.1.17
7fb66d88a000-7fb66d893000 rw-p 00000000 00:00 0
7fb66d893000-7fb66d896000 r-xp 00000000 fb:00 1184578                    /home/vagrant/.rvm/gems/ruby-1.9.3-p392@clamav/gems/clamav-0.4.1/lib/clamav.so
7fb66d896000-7fb66da96000 ---p 00003000 fb:00 1184578                    /home/vagrant/.rvm/gems/ruby-1.9.3-p392@clamav/gems/clamav-0.4.1/lib/clamav.so
7fb66da96000-7fb66da97000 r--p 00003000 fb:00 1184578                    /home/vagrant/.rvm/gems/ruby-1.9.3-p392@clamav/gems/clamav-0.4.1/lib/clamav.so
7fb66da97000-7fb66da98000 rw-p 00004000 fb:00 1184578                    /home/vagrant/.rvm/gems/ruby-1.9.3-p392@clamav/gems/clamav-0.4.1/lib/clamav.so
7fb66da98000-7fb66dad6000 r-xp 00000000 fb:00 2359367                    /lib/libncurses.so.5.7
7fb66dad6000-7fb66dcd6000 ---p 0003e000 fb:00 2359367                    /lib/libncurses.so.5.7
7fb66dcd6000-7fb66dcda000 r--p 0003e000 fb:00 2359367                    /lib/libncurses.so.5.7
7fb66dcda000-7fb66dcdb000 rw-p 00042000 fb:00 2359367                    /lib/libncurses.so.5.7
7fb66dcdb000-7fb66dd14000 r-xp 00000000 fb:00 2359571                    /lib/libreadline.so.6.1
7fb66dd14000-7fb66df13000 ---p 00039000 fb:00 2359571                    /lib/libreadline.so.6.1
7fb66df13000-7fb66df15000 r--p 00038000 fb:00 2359571                    /lib/libreadline.so.6.1
7fb66df15000-7fb66df1b000 rw-p 0003a000 fb:00 2359571                    /lib/libreadline.so.6.1
7fb66df1b000-7fb66df1c000 rw-p 00000000 00:00 0
7fb66df1c000-7fb66df22000 r-xp 00000000 fb:00 1181661                    /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/readline.so
7fb66df22000-7fb66e121000 ---p 00006000 fb:00 1181661                    /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/readline.so
7fb66e121000-7fb66e122000 r--p 00005000 fb:00 1181661                    /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/readline.so
7fb66e122000-7fb66e123000 rw-p 00006000 fb:00 1181661                    /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/readline.so
7fb66e123000-7fb66e125000 r-xp 00000000 fb:00 1181606                    /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/enc/trans/transdb.so
7fb66e125000-7fb66e325000 ---p 00002000 fb:00 1181606                    /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/enc/trans/transdb.so
7fb66e325000-7fb66e326000 r--p 00002000 fb:00 1181606                    /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/enc/trans/transdb.so
7fb66e326000-7fb66e327000 rw-p 00003000 fb:00 1181606                    /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/enc/trans/transdb.so
7fb66e327000-7fb66e329000 r-xp 00000000 fb:00 1181569                    /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/enc/iso_8859_1.so
7fb66e329000-7fb66e528000 ---p 00002000 fb:00 1181569                    /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/enc/iso_8859_1.so
7fb66e528000-7fb66e529000 r--p 00001000 fb:00 1181569                    /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/enc/iso_8859_1.so
7fb66e529000-7fb66e52a000 rw-p 00002000 fb:00 1181569                    /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/enc/iso_8859_1.so
7fb66e52a000-7fb66e52c000 r-xp 00000000 fb:00 1181618                    /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/enc/encdb.so
7fb66e52c000-7fb66e72b000 ---p 00002000 fb:00 1181618                    /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/enc/encdb.so
7fb66e72b000-7fb66e72c000 r--p 00001000 fb:00 1181618                    /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/enc/encdb.so
7fb66e72c000-7fb66e72d000 rw-p 00002000 fb:00 1181618                    /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-linux/enc/encdb.so
7fb66e72d000-7fb66e8aa000 r-xp 00000000 fb:00 2362943                    /lib/libc-2.11.1.so
7fb66e8aa000-7fb66eaa9000 ---p 0017d000 fb:00 2362943                    /lib/libc-2.11.1.so
7fb66eaa9000-7fb66eaad000 r--p 0017c000 fb:00 2362943                    /lib/libc-2.11.1.so
7fb66eaad000-7fb66eaae000 rw-p 00180000 fb:00 2362943                    /lib/libc-2.11.1.so
7fb66eaae000-7fb66eab3000 rw-p 00000000 00:00 0
7fb66eab3000-7fb66eb35000 r-xp 00000000 fb:00 2359592                    /lib/libm-2.11.1.so
7fb66eb35000-7fb66ed34000 ---p 00082000 fb:00 2359592                    /lib/libm-2.11.1.so
7fb66ed34000-7fb66ed35000 r--p 00081000 fb:00 2359592                    /lib/libm-2.11.1.so
7fb66ed35000-7fb66ed36000 rw-p 00082000 fb:00 2359592                    /lib/libm-2.11.1.so
7fb66ed36000-7fb66ed3f000 r-xp 00000000 fb:00 2362792                    /lib/libcrypt-2.11.1.so
7fb66ed3f000-7fb66ef3f000 ---p 00009000 fb:00 2362792                    /lib/libcrypt-2.11.1.so
7fb66ef3f000-7fb66ef40000 r--p 00009000 fb:00 2362792                    /lib/libcrypt-2.11.1.so
7fb66ef40000-7fb66ef41000 rw-p 0000a000 fb:00 2362792                    /lib/libcrypt-2.11.1.so
7fb66ef41000-7fb66ef6f000 rw-p 00000000 00:00 0
7fb66ef6f000-7fb66ef71000 r-xp 00000000 fb:00 2362941                    /lib/libdl-2.11.1.so
7fb66ef71000-7fb66f171000 ---p 00002000 fb:00 2362941                    /lib/libdl-2.11.1.so
7fb66f171000-7fb66f172000 r--p 00002000 fb:00 2362941                    /lib/libdl-2.11.1.so
7fb66f172000-7fb66f173000 rw-p 00003000 fb:00 2362941                    /lib/libdl-2.11.1.so
7fb66f173000-7fb66f17a000 r-xp 00000000 fb:00 2359597                    /lib/librt-2.11.1.so
7fb66f17a000-7fb66f379000 ---p 00007000 fb:00 2359597                    /lib/librt-2.11.1.so
7fb66f379000-7fb66f37a000 r--p 00006000 fb:00 2359597                    /lib/librt-2.11.1.so
7fb66f37a000-7fb66f37b000 rw-p 00007000 fb:00 2359597                    /lib/librt-2.11.1.so
7fb66f37b000-7fb66f393000 r-xp 00000000 fb:00 2362790                    /lib/libpthread-2.11.1.so
7fb66f393000-7fb66f592000 ---p 00018000 fb:00 2362790                    /lib/libpthread-2.11.1.so
7fb66f592000-7fb66f593000 r--p 00017000 fb:00 2362790                    /lib/libpthread-2.11.1.so
7fb66f593000-7fb66f594000 rw-p 00018000 fb:00 2362790                    /lib/libpthread-2.11.1.so
7fb66f594000-7fb66f598000 rw-p 00000000 00:00 0
7fb66f598000-7fb66f7ae000 r-xp 00000000 fb:00 1182054                    /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9.1
7fb66f7ae000-7fb66f9ad000 ---p 00216000 fb:00 1182054                    /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9.1
7fb66f9ad000-7fb66f9b2000 r--p 00215000 fb:00 1182054                    /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9.1
7fb66f9b2000-7fb66f9b6000 rw-p 0021a000 fb:00 1182054                    /home/vagrant/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.so.1.9.1
7fb66f9b6000-7fb66f9d2000 rw-p 00000000 00:00 0
7fb66f9d2000-7fb66f9f2000 r-xp 00000000 fb:00 2362786                    /lib/ld-2.11.1.so
7fb66fa1a000-7fb66fa1d000 rw-p 00000000 00:00 0
7fb66fa1d000-7fb66fa2d000 rwxp 00000000 00:00 0
7fb66fa2d000-7fb66fbaf000 rw-p 00000000 00:00 0
7fb66fbaf000-7fb66fbe6000 r--p 00000000 fb:00 2628740                    /usr/lib/locale/en_US/LC_CTYPE
7fb66fbe6000-7fb66fbeb000 rw-p 00000000 00:00 0
7fb66fbeb000-7fb66fbec000 ---p 00000000 00:00 0
7fb66fbec000-7fb66fbef000 rw-p 00000000 00:00 0
7fb66fbef000-7fb66fbf1000 rw-p 00000000 00:00 0
7fb66fbf1000-7fb66fbf2000 r--p 0001f000 fb:00 2362786                    /lib/ld-2.11.1.so
7fb66fbf2000-7fb66fbf3000 rw-p 00020000 fb:00 2362786                    /lib/ld-2.11.1.so
7fb66fbf3000-7fb66fbf4000 rw-p 00000000 00:00 0
7fffb494f000-7fffb4964000 rw-p 00000000 00:00 0                          [stack]
7fffb49a7000-7fffb49a8000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

I'm happy to provide any other information needed to debug. Just let me know what you need. I've seen this on a an interim release too (ClamAV 0.97.5) and across a couple other environments as well (VMWare and AWS).

JeffreyRoberson commented 9 years ago

I was having trouble with segfaults in clamsmtpd. What I discovered is that calmd was running under the user clamav and clamsmtpd was running under a different user. Make sure that they are both running under the same account. In addition, the ctl file is critical, make sure that it matches in both clamd and clamsmtp's configuration.

clamd.conf: LocalSocket /var/run/clamav/clamd.ctl

clamsmtpd.conf PidFile: /var/run/clamsmtpd.pid User: clamav

One might need to alter the ownership for the logs if it fails to start. I hope that this helps someone else out.