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

Netlink socket bind error when starting qutebrowser with flatpak run #19

Closed
tinywrkb opened this issue Mar 20, 2021 · 5 comments
Closed

Comments

@tinywrkb
Copy link
Collaborator

tinywrkb commented Mar 20, 2021

edit: This seems to be a generic issue with Chromium-based browsers

When starting the app from the command-line like this

flatpak run org.qutebrowser.qutebrowser

or

flatpak run  --command=sh org.qutebrowser.qutebrowser -c /app/bin/qutebrowser

I'm getting the following error message

[2:25:0320/192253.351158:ERROR:address_tracker_linux.cc(201)] Could not bind NETLINK socket: Address already in use (98)

Here's the relevant strace output

[pid 40150] bind(58, {sa_family=AF_NETLINK, nl_pid=2, nl_groups=0x000113}, 12 <unfinished ...>
...
[pid 40150] <... bind resumed>)         = -1 EADDRINUSE (Address already in use)
...
[pid 40150] write(2, "[2:21:0320/182848.620724:ERROR:a"..., 121 <unfinished ...>
[2:21:0320/182848.620724:ERROR:address_tracker_linux.cc(201)] Could not bind NETLINK socket: Address already in use (98)

Full strace output: strace_flatpak_run_exec.log

But if I start qutebrowser from the sandbox like this

# enter the sandbox
flatpak run  --command=sh org.qutebrowser.qutebrowser
# run the app
/app/bin/qutebrowser

then I don't have such an error.
And the strace output

[pid    30] bind(62, {sa_family=AF_NETLINK, nl_pid=6, nl_groups=0x000113}, 12 <unfinished ...>
...
[pid    30] <... bind resumed>)         = 0

Full strace output: strace_inside_sandbox_exec.log

In both cases, this is the first bind call for a netlink socket.

@danieldg
Copy link

from man 7 netlink: "If the application sets nl_pid before calling bind(2), then it is up to the application to make sure that nl_pid is unique." At a guess, 2 is not unique but 6 is. This likely needs to be changed in chromium; using 0 for nl_pid (requesting the kernel assign it) would suffice.

@tinywrkb
Copy link
Collaborator Author

If this doesn't have ill effects then we can close this issue.

@tinywrkb
Copy link
Collaborator Author

This is an upstream bug.

@dmcardle
Copy link

FYI, the upstream bug should be fixed now. See https://crbug.com/1224428.

@tinywrkb
Copy link
Collaborator Author

@dmcardle thanks for the update.

I'm guessing that it might take a while for the fix to reach this app. The latest version of QtWebEngine 5.xx.x is 5.15.5, and it's using Chromium 87.0.4280.144.
Maybe we would even need to wait for qutebrowser to switch to PyQt 6.

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

No branches or pull requests

3 participants