async-profiler 容器使用常见问题
Failed to inject profiler
- log
Failed to inject profiler into 1830
linux-vdso.so.1 => (0x00007ffdf25de000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f1fcba93000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f1fcb877000)
librt.so.1 => /lib64/librt.so.1 (0x00007f1fcb66f000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f1fcb368000)
libm.so.6 => /lib64/libm.so.6 (0x00007f1fcb066000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f1fcae50000)
libc.so.6 => /lib64/libc.so.6 (0x00007f1fcaa82000)
/lib64/ld-linux-x86-64.so.2 (0x00007f1fcc2c6000)
- strace 信息
execve("./profiler.sh", ["./profiler.sh", "-d", "30", "1830"], [/* 35 vars */]) = 0
brk(NULL) = 0x196a000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff8cb6f3000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=50075,
mmap(NULL, 50075, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ff8cb6e6000
close(3) = 0
open("/lib64/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\316\0\0\0\0\0\0"
fstat(3, {st_mode=S_IFREG|0755, st_size=174576,
mmap(NULL, 2268928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff8cb2a9000
mprotect(0x7ff8cb2ce000, 2097152, PROT_NONE) = 0
mmap(0x7ff8cb4ce000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x25000) = 0x7ff8cb4ce000
close(3) = 0
open("/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\r\0\0\0\0\0\0"
fstat(3, {st_mode=S_IFREG|0755, st_size=19288,
mmap(NULL, 2109712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff8cb0a5000
mprotect(0x7ff8cb0a7000, 2097152, PROT_NONE) = 0
mmap(0x7ff8cb2a7000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7ff8cb2a7000
close(3) = 0
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20&\2\0\0\0\0\0"
fstat(3, {st_mode=S_IFREG|0755, st_size=2156160,
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff8cb6e5000
mmap(NULL, 3985888, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff8cacd7000
mprotect(0x7ff8cae9a000, 2097152, PROT_NONE) = 0
mmap(0x7ff8cb09a000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c3000) = 0x7ff8cb09a000
mmap(0x7ff8cb0a0000, 16864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ff8cb0a0000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff8cb6e3000
arch_prctl(ARCH_SET_FS, 0x7ff8cb6e3740) = 0
mprotect(0x7ff8cb09a000, 16384, PROT_READ) = 0
mprotect(0x7ff8cb2a7000, 4096, PROT_READ) = 0
mprotect(0x7ff8cb4ce000, 16384, PROT_READ) = 0
mprotect(0x6dd000, 4096, PROT_READ) = 0
mprotect(0x7ff8cb6f4000, 4096, PROT_READ) = 0
munmap(0x7ff8cb6e6000, 50075) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
open("/dev/tty", O_RDWR|O_NONBLOCK) = 3
close(3) = 0
brk(NULL) = 0x196a000
brk(0x198b000) = 0x198b000
brk(NULL) = 0x198b000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=106075056,
mmap(NULL, 106075056, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ff8c47ad000
close(3) = 0
brk(NULL) = 0x198b000
getuid() = 0
getgid() = 0
geteuid() = 0
getegid() = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
open("/proc/meminfo", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=0,
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff8cb6f2000
read(3, "MemTotal: 3880264 kB\nMemF"
close(3) = 0
munmap(0x7ff8cb6f2000, 4096) = 0
rt_sigaction(SIGCHLD, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7ff8cad0d3b0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGCHLD, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7ff8cad0d3b0}, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7ff8cad0d3b0}, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7ff8cad0d3b0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7ff8cad0d3b0}, {SIG_DFL, [], SA_RESTORER, 0x7ff8cad0d3b0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL, [], SA_RESTORER, 0x7ff8cad0d3b0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL, [], SA_RESTORER, 0x7ff8cad0d3b0}, {SIG_DFL, [], SA_RESTORER, 0x7ff8cad0d3b0}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN, [], SA_RESTORER, 0x7ff8cad0d3b0}, {SIG_DFL, [], SA_RESTORER, 0x7ff8cad0d3b0}, 8) = 0
uname({sysname="Linux", nodename="iZ2zecw7m6bmthkpmft9d8Z",
stat("/opt/java-perf-tools", {st_mode=S_IFDIR|0755, st_size=4096,
stat(".", {st_mode=S_IFDIR|0755, st_size=4096,
getpid() = 2021
open("/usr/lib64/gconv/gconv-modules.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=26254,
mmap(NULL, 26254, PROT_READ, MAP_SHARED, 3, 0) = 0x7ff8cb6ec000
close(3) = 0
getppid() = 2019
getpgrp() = 2019
rt_sigaction(SIGCHLD, {0x4413f0, [], SA_RESTORER|SA_RESTART, 0x7ff8cad0d3b0}, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7ff8cad0d3b0}, 8) = 0
getrlimit(RLIMIT_NPROC, {rlim_cur=15076, rlim_max=15076}) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
open("./profiler.sh", O_RDONLY) = 3
ioctl(3, TCGETS, 0x7ffff7093d20) = -1 ENOTTY (Inappropriate ioctl for device)
lseek(3, 0, SEEK_CUR) = 0
read(3, "#!/bin/bash\n\nusage() {\n echo "
lseek(3, 0, SEEK_SET) = 0
getrlimit(RLIMIT_NOFILE, {rlim_cur=65535, rlim_max=65535}) = 0
fcntl(255, F_GETFD) = -1 EBADF (Bad file descriptor)
dup2(3, 255) = 255
close(3) = 0
fcntl(255, F_SETFD, FD_CLOEXEC) = 0
fcntl(255, F_GETFL) = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fstat(255, {st_mode=S_IFREG|0755, st_size=6588,
lseek(255, 0, SEEK_CUR) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
read(255, "#!/bin/bash\n\nusage() {\n echo "
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
pipe([3, 4]) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0
lseek(255, -3578, SEEK_CUR) = 3010
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7ff8cb6e3a10) = 2022
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGCHLD, {0x4413f0, [], SA_RESTORER|SA_RESTART, 0x7ff8cad0d3b0}, {0x4413f0, [], SA_RESTORER|SA_RESTART, 0x7ff8cad0d3b0}, 8) = 0
close(4) = 0
read(3, "Linux\n", 128) = 6
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2022, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG, NULL) = 2022
wait4(-1, 0x7ffff7093090, WNOHANG, NULL) = -1 ECHILD (No child processes)
rt_sigreturn({mask=[]}) = 0
close(3) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGINT, {0x43e860, [], SA_RESTORER, 0x7ff8cad0d3b0}, {SIG_DFL, [], SA_RESTORER, 0x7ff8cad0d3b0}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7ff8cad0d3b0}, {0x43e860, [], SA_RESTORER, 0x7ff8cad0d3b0}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
read(255, "SCRIPT_DIR=$(dirname \"$(abspath "
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
pipe([3, 4]) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0
lseek(255, -3538, SEEK_CUR) = 3050
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7ff8cb6e3a10) = 2023
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGCHLD, {0x4413f0, [], SA_RESTORER|SA_RESTART, 0x7ff8cad0d3b0}, {0x4413f0, [], SA_RESTORER|SA_RESTART, 0x7ff8cad0d3b0}, 8) = 0
close(4) = 0
read(3, "/opt/java-perf-tools\n", 128) = 21
read(3, "", 128) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2023, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG, NULL) = 2023
wait4(-1, 0x7ffff7093090, WNOHANG, NULL) = -1 ECHILD (No child processes)
rt_sigreturn({mask=[]}) = 0
close(3) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGINT, {0x43e860, [], SA_RESTORER, 0x7ff8cad0d3b0}, {SIG_DFL, [], SA_RESTORER, 0x7ff8cad0d3b0}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7ff8cad0d3b0}, {0x43e860, [], SA_RESTORER, 0x7ff8cad0d3b0}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
read(255, "JATTACH=$SCRIPT_DIR/build/jattac"
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [INT CHLD], 8) = 0
rt_sigprocmask(SIG_SETMASK, [INT CHLD], NULL, 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7ff8cb6e3a10) = 2026
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGINT, {0x43e860, [], SA_RESTORER, 0x7ff8cad0d3b0}, {SIG_DFL, [], SA_RESTORER, 0x7ff8cad0d3b0}, 8) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 255}], 0, NULL) = 2026
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2026, si_uid=0, si_status=255, si_utime=0, si_stime=0} ---
wait4(-1, 0x7ffff7092a90, WNOHANG, NULL) = -1 ECHILD (No child processes)
rt_sigreturn({mask=[]}) = 0
rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7ff8cad0d3b0}, {0x43e860, [], SA_RESTORER, 0x7ff8cad0d3b0}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0),
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff8cb6eb000
write(1, "Failed to inject profiler into 1"
) = 36
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
stat(".", {st_mode=S_IFDIR|0755, st_size=4096,
stat("/root/.sdkman/candidates/maven/current/bin/ldd", 0x7ffff7092af0) = -1 ENOENT (No such file or directory)
stat("/root/.sdkman/candidates/java/current/bin/ldd", 0x7ffff7092af0) = -1 ENOENT (No such file or directory)
stat("/usr/local/sbin/ldd", 0x7ffff7092af0) = -1 ENOENT (No such file or directory)
stat("/usr/local/bin/ldd", 0x7ffff7092af0) = -1 ENOENT (No such file or directory)
stat("/usr/sbin/ldd", 0x7ffff7092af0) = -1 ENOENT (No such file or directory)
stat("/usr/bin/ldd", {st_mode=S_IFREG|0755, st_size=5302,
stat("/usr/bin/ldd", {st_mode=S_IFREG|0755, st_size=5302,
geteuid() = 0
getegid() = 0
getuid() = 0
getgid() = 0
access("/usr/bin/ldd", X_OK) = 0
stat("/usr/bin/ldd", {st_mode=S_IFREG|0755, st_size=5302,
geteuid() = 0
getegid() = 0
getuid() = 0
getgid() = 0
access("/usr/bin/ldd", R_OK) = 0
stat("/usr/bin/ldd", {st_mode=S_IFREG|0755, st_size=5302,
stat("/usr/bin/ldd", {st_mode=S_IFREG|0755, st_size=5302,
geteuid() = 0
getegid() = 0
getuid() = 0
getgid() = 0
access("/usr/bin/ldd", X_OK) = 0
stat("/usr/bin/ldd", {st_mode=S_IFREG|0755, st_size=5302,
geteuid() = 0
getegid() = 0
getuid() = 0
getgid() = 0
access("/usr/bin/ldd", R_OK) = 0
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7ff8cb6e3a10) = 2027
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGINT, {0x43e860, [], SA_RESTORER, 0x7ff8cad0d3b0}, {SIG_DFL, [], SA_RESTORER, 0x7ff8cad0d3b0}, 8) = 0
wait4(-1, linux-vdso.so.1 => (0x00007ffdf4943000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007ff40d462000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff40d246000)
librt.so.1 => /lib64/librt.so.1 (0x00007ff40d03e000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007ff40cd37000)
libm.so.6 => /lib64/libm.so.6 (0x00007ff40ca35000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007ff40c81f000)
libc.so.6 => /lib64/libc.so.6 (0x00007ff40c451000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff40dc95000)
[{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 2027
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2027, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
wait4(-1, 0x7ffff7092610, WNOHANG, NULL) = -1 ECHILD (No child processes)
rt_sigreturn({mask=[]}) = 0
rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7ff8cad0d3b0}, {0x43e860, [], SA_RESTORER, 0x7ff8cad0d3b0}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
exit_group(255) = ?
+++ exited with 255 +++
- 解决方法
容器需要挂载相同的关于async-profiler信息,可以参考https://github.com/jvm-profiling-tools/async-profiler#troubleshooting
Perf events unavailble. See stderr of the target process.
这个问题官方也有介绍,有几种解决方法,如果都不好修改的话,可以使用-e itimer
模式的,一个参考命令,当然kernel的调用
栈无法处理
./profiler.sh -d 30 -e itimer `pid of java`
- 修改内核参数的方式
echo 1 > /proc/sys/kernel/perf_event_paranoid
echo 0 > /proc/sys/kernel/kptr_restrict
- 添加容器的cap
参考如下,但是不安去(不建议使用,除非特殊情况)
version: "3"
services:
perf:
build: ./
privileged: true
pid: host
cap_add:
- SYS_ADMIN
volumes:
- "/tmp:/tmp"
tomcat:
image: tomcat
ports:
- "8080:8080"
cap_add:
- ALL
volumes:
- "/tmp:/tmp"
- "./build:/opt/java-perf-tools/build"
- 官方提供几个可能的原因
- /proc/sys/kernel/perf_event_paranoid is set to restricted mode (>=2).
- seccomp disables perf_event_open API in a container.
- OS runs under a hypervisor that does not virtualize performance counters.
- perf_event_open API is not supported on this system, e.g. WSL
参考资料
https://github.com/jvm-profiling-tools/async-profiler#troubleshooting