Closed Bug 1604834 Opened 4 years ago Closed 4 years ago

Have the chroot server set a process name

Categories

(Core :: Security: Process Sandboxing, enhancement, P2)

Unspecified
Linux
enhancement

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: jld, Assigned: jld)

Details

Attachments

(1 file)

Currently the chroot helper process (see SandboxFork::StartChrootServer) inherits the thread name of whatever launched the child process (usually IPC Launch #1). In typical usage this doesn't matter because the process is very short-lived, but it can be confusing when things go wrong; see bug 1604218 comment #13. It would be simple to have it prctl itself to something more useful.

Priority: -- → P2

We've had some bugs where the sandboxed child process and/or the chroot
helper process deadlocks during launch, often reported by end users,
and it's confusing to have the mysterious hanging task inherit the name
of the launching thread; this patch fixes that by giving them more
informative names.

prctl(PR_SET_NAME, ...) is used directly, instead of via one of our
wrappers for it, to avoid the possibility of async signal unsafe
operations.

This doesn't name the pre-exec child process in the cases where regular
fork() is used, but as far as I know we haven't had any bugs (yet?)
where that would matter.

Assignee: nobody → jld
Status: NEW → ASSIGNED
Pushed by jedavis@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f6281db0d732
Assign thread names during the sandbox launch process. r=gcp
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: