~/talk

Using strace to troubleshoot issues

links:none on file
slides:none on file

Strace is used with -f -tt -T -v -s1k to record syscall arguments and timings, but ptrace serializes threads and can slow a program by ~10x. Concrete case studies: df shows 440 ms stalls reading a custom LD_LIBRARY_PATH; ssh delays by 25 seconds because sshd blocks on a systemd-logind dbus call; sudo tracing requires attaching as root (use echo $$ to find pid and attach); cron failure is due to wrong SELinux file context; boot tracing uses a systemd unit with enforcing=0; a patch adds SELinux context output.

AI-written summary · about

  1. 0:00Introduction to strace
  2. 1:24Understanding system calls
  3. 3:06How strace works internally
  4. 4:27When to use strace
  5. 6:59Recommended usage tips
  6. 7:59Analyzing strace output
  7. 12:07Common error patterns
  8. 15:03Practical troubleshooting examples
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.