I'm trying py-spy with uwsgi which based on pyston.
But no luck yet.
$ strace py-spy dump --pid 1
execve("/usr/bin/py-spy", ["py-spy", "dump", "--pid", "1"], 0xffffe8264aa8 /* 27 vars */) = 0
mmap(NULL, 600, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xffff8f666000
set_tid_address(0x707eb8) = 131
ppoll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, {tv_sec=0, tv_nsec=0}, NULL, 8) = 0 (Timeout)
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x5f7e4c}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGSEGV, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1 RT_2], NULL, 8) = 0
rt_sigaction(SIGSEGV, {sa_handler=0x5d02ac, sa_mask=[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_SIGINFO, sa_restorer=0x5f7e4c}, NULL, 8) = 0
rt_sigaction(SIGBUS, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGBUS, {sa_handler=0x5d02ac, sa_mask=[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_SIGINFO, sa_restorer=0x5f7e4c}, NULL, 8) = 0
sigaltstack(NULL, {ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}) = 0
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0xffff8f662000
mprotect(0xffff8f662000, 4096, PROT_NONE) = 0
sigaltstack({ss_sp=0xffff8f663000, ss_flags=0, ss_size=12288}, NULL) = 0
brk(NULL) = 0x3fbb5000
brk(0x3fbb6000) = 0x3fbb6000
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1 RT_2], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
getrandom("\x94\x21\x30\xa1\x3e\xbb\x64\x7a\xb5\xba\xc9\xdf\xb3\x29\x8e\x64", 16, GRND_NONBLOCK) = 16
ioctl(2, TIOCGWINSZ, {ws_row=52, ws_col=196, ws_xpixel=0, ws_ypixel=0}) = 0
brk(0x3fbb8000) = 0x3fbb8000
brk(0x3fbbb000) = 0x3fbbb000
brk(0x3fbc1000) = 0x3fbc1000
brk(0x3fbc2000) = 0x3fbc2000
brk(0x3fbc3000) = 0x3fbc3000
brk(0x3fbc6000) = 0x3fbc6000
brk(0x3fbc8000) = 0x3fbc8000
brk(0x3fbc9000) = 0x3fbc9000
brk(0x3fbcb000) = 0x3fbcb000
readlinkat(AT_FDCWD, "/proc/1/exe", "/usr/bin/uwsgi", 256) = 14
openat(AT_FDCWD, "/proc/1/maps", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
lseek(3, 0, SEEK_CUR) = 0
read(3, "aaaad29e0000-aaaad2b10000 r-xp 0", 32) = 32
read(3, "0000000 103:00 846007 ", 32) = 32
read(3, " /usr/bin/uwsgi\naaaad2b1"..., 64) = 64
read(3, "103:00 846007 "..., 128) = 128
read(3, "n/uwsgi\naaaad2b35000-aaaad2b3c00"..., 256) = 256
read(3, "e000 rw-p 00000000 00:00 0 \nffff"..., 512) = 512
read(3, "003000 103:00 712000 "..., 1024) = 1024
read(3, "-pyston2.3/lib-dynload/_posixshm"..., 2048) = 2048
read(3, "ent_kafka/cimpl.pyston-23-aarch6"..., 4096) = 4096
read(3, "0 \nffff9920d000-ffff99221000 r-x"..., 8192) = 4056
read(3, "ffff99729000-ffff9972e000 rw-p 0"..., 4136) = 4030
read(3, "ffff9a292000-ffff9a2a1000 ---p 0"..., 106) = 106
read(3, "-packages/pandas/_libs/join.pyst"..., 16384) = 4137
read(3, "ffff9c72b000-ffff9c72e000 rw-p 0"..., 12247) = 4051
read(3, "ffff9caf6000-ffff9caf7000 r--p 0"..., 8196) = 3922
read(3, "ffff9ce09000-ffff9ce1b000 rw-p 0"..., 4274) = 3977
read(3, "ffff9d127000-ffff9d158000 r-xp 0"..., 297) = 297
brk(0x3fbdc000) = 0x3fbdc000
read(3, "das/_libs/tslibs/conversion.pyst"..., 32768) = 4079
read(3, "ffff9d4af000-ffff9d4b7000 r-xp 0"..., 28689) = 4088
read(3, "ffffa1106000-ffffa110a000 r-xp 0"..., 24601) = 3998
read(3, "ffffa13cb000-ffffa13cd000 rw-p 0"..., 20603) = 3995
read(3, "ffffa17f3000-ffffa1802000 ---p 0"..., 16608) = 4034
read(3, "ffffa1f9e000-ffffa1f9f000 rw-p 0"..., 12574) = 4012
read(3, "ffffa30ac000-ffffa30ad000 rw-p 0"..., 8562) = 4018
read(3, "ffffa3340000-ffffa3341000 r--p 0"..., 4544) = 3948
read(3, "ffffa390c000-ffffa394f000 r-xp 0"..., 596) = 596
brk(0x3fbfd000) = 0x3fbfd000
read(3, "-gnu.so\nffffa3966000-ffffa3aa700"..., 65536) = 4080
read(3, "ffffa3d75000-ffffa3d76000 r--p 0"..., 61456) = 4054
read(3, "ffffaf79a000-ffffaf933000 rw-s 0"..., 57402) = 4056
read(3, "ffffb2309000-ffffb2426000 r-xp 0"..., 53346) = 4027
read(3, "ffffb2b00000-ffffb2b01000 r--p 0"..., 49319) = 3952
read(3, "ffffb338d000-ffffb339c000 ---p 0"..., 45367) = 4088
read(3, "ffffb36d7000-ffffb36d8000 r--p 0"..., 41279) = 3986
read(3, "ffffb3a6e000-ffffb3a7e000 ---p 0"..., 37293) = 3982
read(3, "ffffb407e000-ffffb4081000 r-xp 0"..., 33311) = 4064
read(3, "ffffb4295000-ffffb42a4000 ---p 0"..., 29247) = 3960
read(3, "ffffb4444000-ffffb4445000 r--p 0"..., 25287) = 4043
read(3, "ffffb45db000-ffffb45ea000 ---p 0"..., 21244) = 3920
read(3, "ffffb46d6000-ffffb46d7000 rw-p 0"..., 17324) = 3987
read(3, "ffffb4c14000-ffffb4c1b000 r--s 0"..., 13337) = 4088
read(3, "ffffb6c3e000-ffffb6c61000 r-xp 0"..., 9249) = 4047
read(3, "ffffb798e000-ffffb7994000 r-xp 0"..., 5202) = 3900
read(3, "", 1302) = 0
brk(0x3fc18000) = 0x3fc18000
close(3) = 0
openat(AT_FDCWD, "/proc/1/exe", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=9396648, ...}) = 0
mmap(NULL, 9396648, PROT_READ, MAP_SHARED, 3, 0) = 0xffff8ed6b000
brk(0x3fc25000) = 0x3fc25000
brk(0x3fc2e000) = 0x3fc2e000
brk(0x3fc3f000) = 0x3fc3f000
brk(0x3fc40000) = 0x3fc40000
brk(0x3fc41000) = 0x3fc41000
brk(0x3fc63000) = 0x3fc63000
brk(0x3fc64000) = 0x3fc64000
brk(0x3fc65000) = 0x3fc65000
munmap(0xffff8ed6b000, 9396648) = 0
close(3) = 0
readlinkat(AT_FDCWD, "/proc/self/ns/mnt", "mnt:[4026532611]", 256) = 16
readlinkat(AT_FDCWD, "/proc/1/ns/mnt", "mnt:[4026532611]", 256) = 16
process_vm_readv(1, [{iov_base=0x3fbdd9a0, iov_len=29152}], 1, [{iov_base=0xaaaad2b348d0, iov_len=29152}], 1, 0) = -1 EPERM (Operation not permitted)
madvise(0x3fc25000, 258048, MADV_DONTNEED) = 0
geteuid() = 0
openat(AT_FDCWD, "/proc/self/cgroup", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
lseek(3, 0, SEEK_CUR) = 0
read(3, "0::/\n", 32) = 5
read(3, "", 27) = 0
close(3) = 0
write(2, "Error: ", 7Error: ) = 7
write(2, "Operation not permitted", 23Operation not permitted) = 23
write(2, " (os error ", 11 (os error ) = 11
write(2, "1", 11) = 1
write(2, ")", 1)) = 1
write(2, "\n", 1
) = 1
write(2, "Reason: ", 8Reason: ) = 8
write(2, "Operation not permitted", 23Operation not permitted) = 23
write(2, " (os error ", 11 (os error ) = 11
write(2, "1", 11) = 1
write(2, ")", 1)) = 1
write(2, "\n", 1
) = 1
sigaltstack({ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=12288}, NULL) = 0
munmap(0xffff8f662000, 16384) = 0
exit_group(1) = ?
+++ exited with 1 +++
I'm trying py-spy with uwsgi which based on pyston.
But no luck yet.
Seems it is not related to the PTRACE problem I can take strace and gdb on it
Any clue? : (
and outside of docker, I got the below error as well
No idea how the py-spy get the info,
below is the uwsgi memory map