Snap run --strace not working on Ubuntu Core 22

I am trying to debug a program on Ubuntu Core.

When I try to run

snap run --strace $program

I get a prompt that I should install strace-static. I installed the latest/stable version (revision 18) and when I try to rerun I get a Segmentation fault.

When I use strace-static by itself (without “snap run --strace”) I see that PTRACE_TRACEME is not allowed.

Snappy-debug output:

= Seccomp =
Time: Feb 26 21:32:57
Log: auid=1000 uid=0 gid=0 ses=1 subj=snap.strace-static.strace-static pid=2315 comm="strace" exe="/snap/strace-static/18/bin/strace" sig=0 arch=c000003e 101(ptrace) compat=0 ip=0x49537a code=0x50000
Syscall: ptrace

= Seccomp =
Time: Feb 26 21:32:57
Log: auid=1000 uid=0 gid=0 ses=1 subj=snap.strace-static.strace-static pid=2331 comm="strace" exe="/snap/strace-static/18/bin/strace" sig=0 arch=c000003e 101(ptrace) compat=0 ip=0x49537a code=0x50000
Syscall: ptrace

= Seccomp =
Time: Feb 26 21:32:57
Log: auid=1000 uid=0 gid=0 ses=1 subj=snap.strace-static.strace-static pid=2315 comm="strace" exe="/snap/strace-static/18/bin/strace" sig=0 arch=c000003e 101(ptrace) compat=0 ip=0x49537a code=0x50000
Syscall: ptrace

= Seccomp =
Time: Feb 26 21:32:57
Log: auid=1000 uid=0 gid=0 ses=1 subj=snap.strace-static.strace-static pid=2331 comm="strace" exe="/snap/strace-static/18/bin/strace" sig=0 arch=c000003e 101(ptrace) compat=0 ip=0x49537a code=0x50000
Syscall: ptrace

I decided to try out all channels and on --edge I was in luck.

snap refresh strace-static --channel=latest/edge

Made the --strace flag functional.

When will the edge channel go to stable? How should I have known to use the edge channel?

1 Like

We’ve published updated strace-static to stable earlier today. Anyone else hitting this should be fine to use strace-static without the channel override.

2 Likes