Comment 0 for bug 1852761

Paweł Stołowski (stolowski) wrote :

snap run --strace appears to be broken on Fedora 31:

[pawel@localhost ~]$ snap run --strace=-f hello-world
[sudo] password for pawel:
/var/lib/snapd/snap/strace-static/current/bin/strace: Unexpected wait status 0x8b
error: exit status 1

journalctl reports:

Nov 15 16:16:36 localhost.localdomain sudo[11290]: pawel : TTY=pts/0 ; PWD=/home/pawel ; USER=root ; COMMAND=/var/lib/snapd/snap/strace-static/current/bin/strace -u pawel -f -e !select,pselect6,_newselect,clock_gettime,sigaltstack,gettid,gettimeofday,nanosleep -f /usr/libexec/snapd/snap-confine snap.hello-world.hello-world /usr/lib/snapd/snap-exec hello-world
Nov 15 16:16:36 localhost.localdomain audit[11290]: USER_CMD pid=11290 uid=1000 auid=1000 ses=8 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='cwd="/home/pawel" cmd=2F7661722F6C69622F736E6170642F736E61702F7374726163652D7374617469632F63757272656E742F62696E2F737472616365202D7520706177656C202D66202D65202173656C6563742C7073656C656374362C5F6E657773656C6563742C636C6F636B5F67657474696D652C736967616C74737461636B2C6765747469642C67657474696D656F666461792C6E616E6F736C656570202D66202F7573722F6C6962657865632F736E6170642F736E61702D636F6E66696E6520736E61702E68656C6C6F2D776F726C642E68656C6C6F2D776F726C64202F7573722F6C69622F736E6170642F736E61702D657865632068656C6C6F2D776F726C64 exe="/usr/bin/sudo" terminal=pts/0 res=success'
Nov 15 16:16:36 localhost.localdomain audit[11290]: CRED_REFR pid=11290 uid=0 auid=1000 ses=8 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_fprintd acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Nov 15 16:16:36 localhost.localdomain sudo[11290]: pam_unix(sudo:session): session opened for user root by (uid=0)
Nov 15 16:16:36 localhost.localdomain audit[11290]: USER_START pid=11290 uid=0 auid=1000 ses=8 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Nov 15 16:16:36 localhost.localdomain kernel: strace[11294]: segfault at 24 ip 00007f1d211bf796 sp 00007ffd96755440 error 4 in libnss_systemd.so.2[7f1d211bd000+35000]
Nov 15 16:16:36 localhost.localdomain kernel: Code: 01 eb a2 90 c7 05 ca 98 04 00 00 00 00 00 eb 9b 0f 1f 40 00 f3 0f 1e fa 55 53 48 83 ec 08 48 8d 3d 1f 88 04 00 e8 da dc ff ff <8b> 90 24 00 00 00 85 d2 74 10 0f 9f c0 48 83 c4 08 5b 5d c3 66 0f
Nov 15 16:16:36 localhost.localdomain audit[11294]: ANOM_ABEND auid=1000 uid=0 gid=0 ses=8 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=11294 comm="strace" exe="/var/lib/snapd/snap/strace-static/18/bin/strace" sig=11 res=1
Nov 15 16:16:36 localhost.localdomain audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-coredump@7-11295-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Nov 15 16:16:36 localhost.localdomain systemd[1]: Started Process Core Dump (PID 11295/UID 0).
Nov 15 16:16:36 localhost.localdomain sudo[11290]: pam_unix(sudo:session): session closed for user root
Nov 15 16:16:36 localhost.localdomain audit[11290]: USER_END pid=11290 uid=0 auid=1000 ses=8 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Nov 15 16:16:36 localhost.localdomain audit[11290]: CRED_DISP pid=11290 uid=0 auid=1000 ses=8 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_fprintd acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Nov 15 16:16:36 localhost.localdomain systemd-coredump[11296]: Process 11294 (strace) of user 0 dumped core.

                                                               Stack trace of thread 11294:
                                                               #0 0x00007f1d211bf796 is_main_thread (/usr/lib64/libnss_systemd.so.2)
                                                               #1 0x00007f1d211cc572 hashmap_base_new.lto_priv.0 (/usr/lib64/libnss_systemd.so.2)
                                                               #2 0x00007f1d211e09e1 sd_bus_call_async (/usr/lib64/libnss_systemd.so.2)
                                                               #3 0x00007f1d211e0e08 sd_bus_start (/usr/lib64/libnss_systemd.so.2)
                                                               #4 0x00007f1d211e1661 sd_bus_open_system_with_description (/usr/lib64/libnss_systemd.so.2)
                                                               #5 0x00007f1d211eca7b systemd_setent (/usr/lib64/libnss_systemd.so.2)
                                                               #6 0x000000000047e8d3 compat_call.constprop.0 (/var/lib/snapd/snap/strace-static/18/bin/strace)
                                                               #7 0x000000000047ec98 internal_getgrouplist (/var/lib/snapd/snap/strace-static/18/bin/strace)
                                                               #8 0x000000000047eecd initgroups (/var/lib/snapd/snap/strace-static/18/bin/strace)
                                                               #9 0x00000000004004d9 exec_or_die (/var/lib/snapd/snap/strace-static/18/bin/strace)
                                                               #10 0x000000000042567d startup_child (/var/lib/snapd/snap/strace-static/18/bin/strace)
                                                               #11 0x0000000000425f5d init (/var/lib/snapd/snap/strace-static/18/bin/strace)
                                                               #12 0x0000000000400f99 main (/var/lib/snapd/snap/strace-static/18/bin/strace)
                                                               #13 0x0000000000430006 generic_start_main (/var/lib/snapd/snap/strace-static/18/bin/strace)
                                                               #14 0x00000000004301fa __libc_start_main (/var/lib/snapd/snap/strace-static/18/bin/strace)
                                                               #15 0x0000000000401df9 _start (/var/lib/snapd/snap/strace-static/18/bin/strace)