Open Bug 1791428 Opened 2 years ago Updated 8 months ago

[snap] ptrace not authorized prevents crash reporter

Categories

(Thunderbird :: OS Integration, defect)

Thunderbird 102
x86_64
Linux
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: simon.deziel, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: snap)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0

Steps to reproduce:

Something caused Thunderbird to crash triggering the crash reporter.

Additional information:

$ snap list thunderbird
Name Version Rev Tracking Publisher Notes
thunderbird 102.2.2-1 251 latest/stable canonical✓ -

This is very similar to a problem affecting Firefox's snap: bug 1791427

Actual results:

The crash reporter couldn't do its job due to the snap confinement preventing the use of ptrace. Here is is what's in the journal around the time of the crash:

Sep 16 11:59:47 sdeziel-lemur thunderbird_thunderbird.desktop[272030]: RunWatchdog: Mainthread nested event loops during hang:
Sep 16 11:59:47 sdeziel-lemur thunderbird_thunderbird.desktop[272030]:  --- nsThread::Shutdown: IMAP
Sep 16 11:59:47 sdeziel-lemur thunderbird_thunderbird.desktop[272030]: ExceptionHandler::GenerateDump cloned child 294207
Sep 16 11:59:47 sdeziel-lemur thunderbird_thunderbird.desktop[272030]: ExceptionHandler::SendContinueSignalToChild sent continue signal to child
Sep 16 11:59:47 sdeziel-lemur thunderbird_thunderbird.desktop[294207]: ExceptionHandler::WaitForContinueSignal waiting for continue signal...
Sep 16 11:59:47 sdeziel-lemur kernel: ptrace attach of "/snap/thunderbird/251/thunderbird-bin"[272030] was attempted by "/snap/thunderbird/251/thunderbird-bin"[294207]
Sep 16 11:59:47 sdeziel-lemur kernel: ptrace attach of "/snap/thunderbird/251/thunderbird-bin"[272180] was attempted by "/snap/thunderbird/251/thunderbird-bin"[294207]
Sep 16 11:59:47 sdeziel-lemur kernel: ptrace attach of "/snap/thunderbird/251/thunderbird-bin"[272186] was attempted by "/snap/thunderbird/251/thunderbird-bin"[294207]
Sep 16 11:59:47 sdeziel-lemur kernel: ptrace attach of "/snap/thunderbird/251/thunderbird-bin"[272192] was attempted by "/snap/thunderbird/251/thunderbird-bin"[294207]
Sep 16 11:59:47 sdeziel-lemur kernel: ptrace attach of "/snap/thunderbird/251/thunderbird-bin"[272193] was attempted by "/snap/thunderbird/251/thunderbird-bin"[294207]
Sep 16 11:59:47 sdeziel-lemur kernel: ptrace attach of "/snap/thunderbird/251/thunderbird-bin"[272194] was attempted by "/snap/thunderbird/251/thunderbird-bin"[294207]
Sep 16 11:59:47 sdeziel-lemur kernel: ptrace attach of "/snap/thunderbird/251/thunderbird-bin"[272195] was attempted by "/snap/thunderbird/251/thunderbird-bin"[294207]
Sep 16 11:59:47 sdeziel-lemur kernel: ptrace attach of "/snap/thunderbird/251/thunderbird-bin"[272196] was attempted by "/snap/thunderbird/251/thunderbird-bin"[294207]
Sep 16 11:59:47 sdeziel-lemur kernel: ptrace attach of "/snap/thunderbird/251/thunderbird-bin"[272207] was attempted by "/snap/thunderbird/251/thunderbird-bin"[294207]
Sep 16 11:59:47 sdeziel-lemur kernel: ptrace attach of "/snap/thunderbird/251/thunderbird-bin"[272208] was attempted by "/snap/thunderbird/251/thunderbird-bin"[294207]
Sep 16 11:59:47 sdeziel-lemur crashreporter[294208]: Failed to load module "canberra-gtk-module"
Sep 16 11:59:47 sdeziel-lemur crashreporter[294208]: Failed to load module "canberra-gtk-module"
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
See Also: → 1791427
See Also: → tb-NoCrashReport
Component: Untriaged → OS Integration

Simon, can you still reproduce this issue?

Flags: needinfo?(simon.deziel)
See Also: tb-NoCrashReport

@wsmwk, I am still using Thunderbird (now snap 115.9.0-1, rev 460) and I cannot see any kernel: ptrace attach of "/snap/thunderbird/ in my logs. It's hard to tell if it's because TB no longer crashes (nothing new/recent in about:crashes) or if the missing permission is granted now. This seems to suggest that ptrace is now allowed:

$ grep ^ptrace /var/lib/snapd/seccomp/bpf/snap.thunderbird.thunderbird.src
ptrace PTRACE_ATTACH
ptrace PTRACE_DETACH
ptrace PTRACE_GETREGS
ptrace PTRACE_GETFPREGS
ptrace PTRACE_GETFPXREGS
ptrace PTRACE_GETREGSET
ptrace PTRACE_PEEKDATA
ptrace PTRACE_PEEKUSER
ptrace PTRACE_CONT
Flags: needinfo?(simon.deziel)
Keywords: snap
You need to log in before you can comment on or make changes to this bug.