-
-
Notifications
You must be signed in to change notification settings - Fork 710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mount a tmpfs at /dev/shm in the sandbox. #3263
Conversation
Looks like it's failing the same way in CI as it s on my machine: |
According to the man page for |
I added |
Oh woops, I thought I looked to see if you had added it and didn't see it, but given it's the very first thing in the diff I don't know how I could have missed it. But... I dunno then. |
As a note, this will also help get .NET Core working on Sandstorm: dotnet/runtime#2534 (comment) |
...To get shm_open() and friends working. Fixes sandstorm-io#3196.
Fixed. Just had a bogus leading slash in front of |
@ocdtrekkie, feel free to tag this one ready-for-review. |
// so we don't have to strictly separate their storage capacity. We could mount | ||
// a single tmpfs somewhere invisible, create subdirectories, and then bind-mount | ||
// them to their final destinations. | ||
KJ_SYSCALL(mkdir("dev/shm", 0700)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the /dev
filesystem itself is created with 0755
permission, any particular reason to use 0700
here? I guess it ultimately doesn't mater since there's only one user in the sandbox and they own everything?
Quoting Kenton Varda (2020-04-05 18:55:11)
It looks like the /dev filesystem itself is created with 0755
permission, any particular reason to use 0700 here? I guess it
ultimately doesn't mater since there's only one user in the sandbox and
they own everything?
I tend to default to being conservative with permissions, but yeah it
probably doesn't matter.
|
...To get shm_open() and friends working.
Fixes #3196.
Note that the tests are currently not passing on my machine -- for some reason
shm_open
is returningENOSYS
. Based on the links @abliss posted at:#3196 (comment)
and the fact that there are two alternate implementations of
shm_open
, depending on build flags:https://sourceware.org/git/?p=glibc.git;a=blob;f=rt/shm_open.c;h=b4623d3cdaf5a26e4fd795a866c12aa1b29eaa9a;hb=HEAD
...one possible explanation is that my system's glibc is built without support for this. So I'd be curious as to whether the tests pass for others. Grepping through the postgres source suggests it has some fallbacks if shm_open is not available, so another possibility is that the errors @orblivion saw re:
/dev/shm
weren't actually going throughshm_open
.We should investigate and work out what's going on there before merging this.