You are not logged in.

#1 2006-05-14 18:05:51

raskolnikov
Member
From: France
Registered: 2006-01-08
Posts: 100

Valgrind problem

Not sure where to post this so it goes here...

I am running with the latest updates available and I need to use valgrind to check a program I wrote. But valgrind is killed at each run, like this :

$ valgrind
Killed

Searching why, I found that it seems related with the last execve call :

$ strace valgrind 
execve("/usr/bin/valgrind", ["valgrind"], [/* 54 vars */]) = 0
uname({sys="Linux", node="acer", ...})  = 0
brk(0)                                  = 0x804d000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=82858, ...}) = 0
mmap2(NULL, 82858, PROT_READ, MAP_PRIVATE, 3, 0) = 0xa7fa1000
close(3)                                = 0
open("/lib/tls/libc.so.6", O_RDONLY)    = 3
read(3, "177ELF111331O100"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1358055, ...}) = 0
mmap2(NULL, 1154012, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xa7e87000
mmap2(0xa7f9b000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x114) = 0xa7f9b000
mmap2(0xa7f9f000, 7132, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xa7f9f000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xa7e86000
mprotect(0xa7f9b000, 4096, PROT_READ)   = 0
set_thread_area({entry_number:-1 -> 6, base_addr:0xa7e86aa0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
munmap(0xa7fa1000, 82858)               = 0
readlink("/proc/self/exe", "/usr/bin/valgrind", 4096) = 17
brk(0)                                  = 0x804d000
brk(0x806e000)                          = 0x806e000
execve("/usr/lib/valgrind/x86-linux/memcheck", ["valgrind"], [/* 55 vars */]) = 0
+++ killed by SIGKILL +++
Process 22135 detached

More in gdb :

$ gdb -quiet valgrind
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) break launcher.c:273
Breakpoint 1 at 0x80490ab: file launcher.c, line 273.
(gdb) set args --help
(gdb) run
Starting program: /root/valgrind-3.1.1/coregrind/valgrind --help

Breakpoint 1, main (argc=2, argv=0xafce47e4, envp=0xafce47f0) at launcher.c:273
273        execve(toolfile, argv, new_env);
(gdb) print toolfile
$10 = 0x804d100 "/usr/lib/valgrind/x86-linux/memcheck"
(gdb) print argv[0]
$11 = 0xaff99b30 "/root/valgrind-3.1.1/coregrind/valgrind"
(gdb) print argv[1]
$12 = 0xaff99b58 "--help"
(gdb) print argv[2]
$13 = 0x0
(gdb) print new_env[0]
$14 = 0xaff99b5f "MANPATH=/usr/man:/usr/X11R6/man:/opt/gnome/man:/opt/java/jre/man:/opt/java/man"
(gdb) next

Program terminated with signal SIGKILL, Killed.
The program no longer exists.

I don't know why it's killed. Any idea ?


Excessive showering, grooming, and toothbrushing is not only vain, it wastes valuable coding time.

Offline

Board footer

Powered by FluxBB