https://bugs.kde.org/show_bug.cgi?id=383723

--- Comment #6 from Andy <imol00+...@gmail.com> ---
Thanks John.

I must be doing something wrong.

I can run dtruss on my example ok ("sudo dtruss -e ./valgrind-test").

I can run valgrind on the example ("valgrind --tool=none ./valgrind-test") and
it crashes (as expected).

But when I run dtruss on valgrind on the example ("sudo dtruss -e valgrind
--tool=none ./valgrind-test") it doesn't run the test executable. Here's the
output:

dtrace: system integrity protection is on, some features will not be available

 ELAPSD SYSCALL(args)            = return
     35 open("/dev/dtracehelper\0", 0x2, 0x7FFF58BBD930)                 = 3 0
    346 ioctl(0x3, 0x80086804, 0x7FFF58BBD8B8)           = 0 0
      6 close(0x3)               = 0 0
      2 thread_selfid(0x3, 0x80086804, 0x7FFF58BBD8B8)           = 2058768 0
      4 bsdthread_register(0x7FFFE336D080, 0x7FFFE336D070, 0x2000)             
 = 1073741919 0
      2 ulock_wake(0x1, 0x7FFF58BBD0EC, 0x0)             = -1 Err#2
      1 issetugid(0x1, 0x7FFF58BBD0EC, 0x0)              = 0 0
      5 mprotect(0x107049000, 0x88, 0x1)                 = 0 0
      2 mprotect(0x10704B000, 0x1000, 0x0)               = 0 0
      1 mprotect(0x107061000, 0x1000, 0x0)               = 0 0
      1 mprotect(0x107062000, 0x1000, 0x0)               = 0 0
      2 mprotect(0x107078000, 0x1000, 0x0)               = 0 0
      2 mprotect(0x107079000, 0x1000, 0x1)               = 0 0
      3 mprotect(0x107049000, 0x88, 0x3)                 = 0 0
      2 mprotect(0x107049000, 0x88, 0x1)                 = 0 0
      1 getpid(0x107049000, 0x88, 0x1)           = 58961 0
      4 stat64("/AppleInternal/XBS/.isChrooted\0", 0x7FFF58BBCFA8, 0x1)        
 = -1 Err#2
      1 stat64("/AppleInternal\0", 0x7FFF58BBD040, 0x1)          = -1 Err#2
      3 csops(0xE651, 0x7, 0x7FFF58BBCAD0)               = -1 Err#22
dtrace: error on enabled probe ID 2158 (ID 552: syscall::sysctl:return):
invalid kernel access in action #10 at DIF offset 40
      1 ulock_wake(0x1, 0x7FFF58BBD050, 0x0)             = -1 Err#2
      2 csops(0xE651, 0x7, 0x7FFF58BBC3B0)               = -1 Err#22
      6 stat64("./valgrind-test\0", 0x7FFF58BBDB40, 0x7FFF58BBC3B0)            
 = 0 0
     24
access("/Users/maloney/dev/lib/valgrind/vgpreload_core-x86-darwin.so\0", 0x5,
0x7FFF58BBC3B0)            = 0 0
     15
access("/Users/maloney/dev/lib/valgrind/vgpreload_core-amd64-darwin.so\0", 0x5,
0x7FFF58BBC3B0)          = 0 0
      3
access("/Users/maloney/dev/lib/valgrind/vgpreload_core-arm-darwin.so\0", 0x5,
0x7FFF58BBC3B0)            = -1 Err#2
      2
access("/Users/maloney/dev/lib/valgrind/vgpreload_core-ppc32-darwin.so\0", 0x5,
0x7FFF58BBC3B0)          = -1 Err#2
      2
access("/Users/maloney/dev/lib/valgrind/vgpreload_core-ppc64be-darwin.so\0",
0x5, 0x7FFF58BBC3B0)                = -1 Err#2
==58961== Nulgrind, the minimal Valgrind tool
==58961== Copyright (C) 2002-2017, and GNU GPL'd, by Nicholas Nethercote.
      3 access("/Users/maloney/brew/bin/./valgrind-test\0", 0x5,
0x7FFF58BBC3B0)                 = -1 Err#2
==58961== Using Valgrind-3.14.0.GIT and LibVEX; rerun with -h for copyright
info
      2 access("/Users/maloney/research/bin/./valgrind-test\0", 0x5,
0x7FFF58BBC3B0)             = -1 Err#2
==58961== Command: ./valgrind-test
==58961==
      2 access("/Users/maloney/dev/bin/./valgrind-test\0", 0x5, 0x7FFF58BBC3B0)
         = -1 Err#2
      3 access("/usr/local/bin/./valgrind-test\0", 0x5, 0x7FFF58BBC3B0)        
 = -1 Err#2
      2 access("/usr/bin/./valgrind-test\0", 0x5, 0x7FFF58BBC3B0)              
 = -1 Err#2
      2 access("/bin/./valgrind-test\0", 0x5, 0x7FFF58BBC3B0)            = -1
Err#2
      2 access("/usr/sbin/./valgrind-test\0", 0x5, 0x7FFF58BBC3B0)             
 = -1 Err#2
      2 access("/sbin/./valgrind-test\0", 0x5, 0x7FFF58BBC3B0)           = -1
Err#2
      7 open("./valgrind-test\0", 0x0, 0xFFFFFFFFFFFFFFFF)               = 3 0
dtrace: error on enabled probe ID 2134 (ID 154: syscall::read:return): invalid
kernel access in action #12 at DIF offset 92
      5 close(0x3)               = 0 0
      4 open_nocancel(".\0", 0x0, 0x7FB9AB800000)                = 3 0
      2 fstat64(0x3, 0x7FFF58BBD940, 0x7FB9AB800000)             = 0 0
      6 fcntl_nocancel(0x3, 0x32, 0x7FB9AB801000)                = 0 0
      2 close_nocancel(0x3)              = 0 0
      3 stat64("/Users/maloney/dev/build-valgrind-test-Qt_5_x-Profile\0",
0x7FFF58BBD8B0, 0x7FB9AB801000)                = 0 0
      1 getppid(0x7FB9AB801000, 0x7FFF58BBD8B0, 0x7FB9AB801000)          =
58958 0
     14 access("/Users/maloney/dev/lib/valgrind/none-amd64-darwin\0", 0x5,
0x7FB9AB801000)               = 0 0


It looks like it's checking each path for the executable ("access"), then tries
to open the executable and ... fails? I tried it with a full path and get the
same result.

Am I doing that correctly? (Apologies - never used dtruss before, so I'm
relying on online info and experimentation.)

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to