|
From: Nigel H. <nj...@ba...> - 2005-05-28 08:39:50
|
How do I cope with this error? [root@bandsman njh]# valgrind --tool=memcheck --num-callers=20 /usr/local/sbin/clamav-milter -lo -m2 local:/var/run/clamav/clamav.sock --debug ==5573== Memcheck, a memory error detector for x86-linux. ==5573== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al. ==5573== Using valgrind-2.4.0, a program supervision framework for x86-linux. ==5573== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al. ==5573== For more details, rerun with: -v ==5573== LibClamAV debug: Running as user clamav (UID 503, GID 503) LibClamAV debug: loadDatabase: check /usr/local/share/clamav/daily.cvd for updates LibClamAV debug: Loading databases from /usr/local/share/clamav LibClamAV debug: Loading /usr/local/share/clamav/main.cvd LibClamAV debug: in cli_cvdload() LibClamAV debug: MD5(.tar.gz) = 97483b1d8189548e820e8a3f4bef787b LibClamAV debug: Decoded signature: 97483b1d8189548e820e8a3f4bef787b LibClamAV debug: Digital signature is correct. ==5573== FATAL: can't open /proc/self/maps [root@bandsman njh]# ls -l /proc/self/maps -r-------- 1 root root 0 May 28 09:37 /proc/self/maps [root@bandsman njh]# cat /proc/self/maps 00969000-00a8c000 r-xp 00000000 03:03 340037 /lib/tls/libc-2.3.5.so 00a8c000-00a8d000 --xp 00123000 03:03 340037 /lib/tls/libc-2.3.5.so 00a8d000-00a8f000 r-xp 00123000 03:03 340037 /lib/tls/libc-2.3.5.so 00a8f000-00a91000 rwxp 00125000 03:03 340037 /lib/tls/libc-2.3.5.so 00a91000-00a93000 rwxp 00a91000 00:00 0 00d5e000-00d73000 r-xp 00000000 03:03 17631 /lib/ld-2.3.5.so 00d74000-00d75000 r-xp 00015000 03:03 17631 /lib/ld-2.3.5.so 00d75000-00d76000 rwxp 00016000 03:03 17631 /lib/ld-2.3.5.so 08048000-0804c000 r-xp 00000000 03:03 129802 /bin/cat 0804c000-0804d000 rw-p 00003000 03:03 129802 /bin/cat 08fca000-08feb000 rw-p 08fca000 00:00 0 b7d3a000-b7d3b000 r--p 009e2000 03:03 472725 /usr/lib/locale/locale-archive b7d3b000-b7d6d000 r--p 009a7000 03:03 472725 /usr/lib/locale/locale-archive b7d6d000-b7f6d000 r--p 00000000 03:03 472725 /usr/lib/locale/locale-archive b7f6d000-b7f6e000 rw-p b7f6d000 00:00 0 bfe6a000-c0000000 rw-p bfe6a000 00:00 0 ffffe000-fffff000 ---p 00000000 00:00 0 [root@bandsman njh]# |
|
From: Jeroen N. W. <jn...@xs...> - 2005-05-28 09:54:53
|
> LibClamAV debug: Running as user clamav (UID 503, GID 503) > [root@bandsman njh]# ls -l /proc/self/maps > -r-------- 1 root root 0 May 28 09:37 /proc/self/maps Your program is running as user clamav, therefore valgrind also is. For reasons that are beyond me, you are running as root, and your /proc/self/maps is readable only by root, and not by user clamav. I assume the /proc/self/maps for the process running valgrind will also be readable only by root, and not by user clamav, henve the fatal error. You must either log in as user clamav to start valgrinding your program or cause the /proc/self/maps to be universally readable. You might also change the options for LibClamAV (if possible) to run as root, but I do not advise that. Jeroen. |