valgrind on FreeBSD?
Václav Zeman
v.haisman at sh.cvut.cz
Sun Oct 9 13:25:35 UTC 2011
Bakul Shah wrote, On 6.10.2011 8:40:
> On Wed, 05 Oct 2011 23:06:04 +0200 =?UTF-8?B?VsOhY2xhdiBaZW1hbg==?= <v.haisman at sh.cvut.cz> wrote:
>> Hi.
>>
>> No matter what I try, valgrind on 7.3-STABLE is giving me this, both Valgrind
>> ports:
>>
>> valgrind: Startup or configuration error:
>> Can't establish current working directory at startup
>> valgrind: Unable to start up properly. Giving up.
>>
>> What do I need to do to make it work?
>
> Try running valgrind under ktrace (& view with kdump). That
> will tell you what directory it is trying to access or what
> syscall fails and why.
Hi.
So I have done that and more. I have first updated from 7.3 to 8.2 (RELENG_8
actually). I have not managed to recompile all of the installed Ports yet,
but I made sure to recompile valgrind and its dependencies. The same thing
has happened!
As I have said, I have done the ktrace and here is the interesting bit:
78028 valgrind NAMI "/usr/local/lib/valgrind/memcheck-amd64-freebsd"
78028 memcheck-amd64-free RET execve 0
78028 memcheck-amd64-free CALL getpid
78028 memcheck-amd64-free RET getpid 78028/0x130cc
78028 memcheck-amd64-free CALL
__sysctl(0x39a91450,0x4,0x389a3800,0x39a91468,0,0)
78028 memcheck-amd64-free SCTL "kern.proc.vmmap.78028"
78028 memcheck-amd64-free RET __sysctl 0
78028 memcheck-amd64-free CALL
mmap(0x400009000,0x400000,PROT_READ|PROT_WRITE|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_ANON,0xffffffffffffffff,0)
78028 memcheck-amd64-free RET mmap 17179906048/0x400009000
78028 memcheck-amd64-free CALL getrlimit(RLIMIT_DATA,0x39e6a780)
78028 memcheck-amd64-free RET getrlimit 0
78028 memcheck-amd64-free CALL setrlimit(RLIMIT_DATA,0x39a919e0)
78028 memcheck-amd64-free RET setrlimit 0
78028 memcheck-amd64-free CALL getrlimit(RLIMIT_STACK,0x39e6a790)
78028 memcheck-amd64-free RET getrlimit 0
78028 memcheck-amd64-free CALL __getcwd(0x3882d700,0x3ff)
78028 memcheck-amd64-free NAMI ".."
78028 memcheck-amd64-free RET __getcwd -1 errno 2 No such file or directory
78028 memcheck-amd64-free CALL write(0x2,0x3830b060,0x6c)
78028 memcheck-amd64-free GIO fd 2 wrote 108 bytes
"valgrind: Startup or configuration error:
valgrind: Can't establish current working directory at startup
"
78028 memcheck-amd64-free RET write 108/0x6c
78028 memcheck-amd64-free CALL write(0x2,0x3830b060,0x33)
78028 memcheck-amd64-free GIO fd 2 wrote 51 bytes
"valgrind: Unable to start up properly. Giving up.
"
78028 memcheck-amd64-free RET write 51/0x33
78028 memcheck-amd64-free CALL exit(0x1)
Now what? Why would the __getcwd call be failing with "No such file or
directory"?
--
VZ
More information about the freebsd-stable
mailing list