`Couldn't re-execute SBCL with proper personality flags (/proc isn't mounted? setuid?)`

Bug #1706963 reported by Fabien Snauwaert
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

I'm trying to use SBCL for use with pgloader. This is on Ubuntu 16.04 running inside of Docker.

I was able to install SBCL however I got the following warnings during install:

 Setting up binfmt-support (2.1.6-1) ...
 mount: permission denied
 update-binfmts: warning: Couldn't mount the binfmt_misc filesystem on /proc/sys/fs/binfmt_misc.
 invoke-rc.d: could not determine current runlevel
 invoke-rc.d: policy-rc.d denied execution of start.
 Setting up sbcl (2:1.3.1-1ubuntu2) ...
 mount: permission denied
 update-binfmts: warning: Couldn't mount the binfmt_misc filesystem on /proc/sys/fs/binfmt_misc.

And whenever I try to run SBCL, I get `WARNING: Couldn't re-execute SBCL with proper personality flags (/proc isn't mounted? setuid?)`.

(Which turns out to be a blocking issue for pgloader.)

I'm including a minimal case of the issue: a minimal version of a Dockerfile used to reproduce the issue; a log of the compilation of said Dockerfile.

Tags: binfmt docker
Revision history for this message
Fabien Snauwaert (fabien-snauwaert) wrote :

I don't see my attachments. Trying to add them again.

Revision history for this message
Fabien Snauwaert (fabien-snauwaert) wrote :

Log of the build of the Dockerfile

Revision history for this message
Douglas Katzman (dougk) wrote :

So is or isn't /proc mounted? Inability to mount /proc/sys/fs/binfmt_misc suggests that it isn't.

Until or unless SBCL can deal with address space layout randomization, you're going to have to figure out how to enable its use the personality() system call, which is failing as per the WARNING about "couldn't re-execute".

(It's conceivable that we might already support randomization a little bit better now than when the code in 'src/runtime/linux-os.c' was written. But it assumes that if randomization is present, then it's not going to work at all. I suspect that might not be entirely true, as long as we can acquire memory at a few fixed locations; the dynamic-space is no longer fixed in place)

Revision history for this message
Eric Timmons (daewok) wrote :

I use SBCL in Docker extensively. I have a seccomp profile for docker in the slime-docker project that allows SBCL to disable ASLR by enabling the personality syscall [https://github.com/daewok/slime-docker/blob/master/resources/docker-sbcl-seccomp.json]. Just pass it to the `docker run` command.

However, I've used SBCL extensively both with and without this profile and I have yet to run into any issue when running with ASLR. Definitely haven't used every feature of SBCL with ASLR on, but for most things it seems to work well.

Revision history for this message
Douglas Katzman (dougk) wrote :

According to your log file, SBCL started, but just printed the warning as an advisory.
If the warning is the problem, honestly I'd suggest commenting it out as a local patch, *or* figure out what it's saying is true: is /proc mounted? If it's lying, then that's a bug. But I suspect it's not lying.
I'm going to resolve this as not a bug. Reopen if I'm mistaken.

Changed in sbcl:
status: New → Incomplete
Revision history for this message
Stas Boukarev (stassats) wrote :

In 133fb4b1ff8c9ed904de86d0db61c5df266a3690.

Changed in sbcl:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.