Skip to content
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

FEXServer: Listen on both abstract & named sockets #4159

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

asahilina
Copy link
Contributor

Abstract sockets have one limitation: they are bound to a network namespace. Chromium/CEF sandboxes using a new netns, which breaks connecting to the FEXServer.

To work around this, use and try both abstract and named sockets. As long as either the filesystem or the network is unsandboxed, things will work. If both are sandboxed, there isn't much we can do... but at that point we shouldn't be reinitializing the FEXServer connection anyway since the FS should be available on FEXInterpreter startup.

@Sonicadvance1
Copy link
Member

Looks like you got clipped by the glibc fault test path. Will need a backtrace to see where glibc is attempting to do an allocation in this mode.

@asahilina
Copy link
Contributor Author

I think I fixed it? I don't really know how to run the test, but the only code I can think of that would do allocations behind my back is std::filesystem::temp_directory_path()... (this was actually already used here in the past when the socket was not abstract, but I think that glibc test didn't exist back then).

Apparently this causes allocations which are banned in some paths?
Abstract sockets have one limitation: they are bound to a network
namespace. Chromium/CEF sandboxes using a new netns, which breaks
connecting to the FEXServer.

To work around this, use and try *both* abstract and named sockets. As
long as either the filesystem or the network is unsandboxed, things will
work. If both are sandboxed, there isn't much we can do... but at that
point we shouldn't be reinitializing the FEXServer connection anyway
since the FS should be available on FEXInterpreter startup.
@asahilina
Copy link
Contributor Author

Oookay, that's another issue, but now I don't know why it didn't fail before. Third time's the charm?

@asahilina
Copy link
Contributor Author

And now the glibc thing again... I have no idea what it could be then. How do I run those tests locally?

@Sonicadvance1
Copy link
Member

Build FEX with -DENABLE_GLIBC_ALLOCATOR_HOOK_FAULT=True -DENABLE_JEMALLOC_GLIBC_ALLOC=False to enable the glibc fault checking. and then for the gcc tests specifically that are failing would be ninja gcc_target_tests_64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants