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

Allow SO_REUSEADDR on startup #19

Open
Thesola10 opened this issue Oct 23, 2024 · 1 comment
Open

Allow SO_REUSEADDR on startup #19

Thesola10 opened this issue Oct 23, 2024 · 1 comment

Comments

@Thesola10
Copy link

Currently, nixseparatedebuginfod fails when started through systemd's socket activation system, because the address was not released for long enough for a normal bind to work.

There are advantages to using socket activation for nixseparatedebuginfod, namely to avoid the indexing process until debug info is actually needed. Would it be possible to provide a configuration option that allows SO_REUSEADDR for use with socket activation?

@symphorien
Copy link
Owner

Hi

  • I don't think nixseparatedebuginfo is a good fit for socket activation. See previous discussions here Support systemd socket activation #10 I'll add that the debuginfo client from elfutils really likes to cache failures so blocking full minutes until results are available is problematic.
  • I think that to properly implement socket activation you have to inherit the socket via sd_listen_fds(3). From a cursory look, SO_REUSE_ADDR looks like a workaround.

For these reasons I don't plan work in this direction. If I wanted to dedicate time to reduce the power consumption of nixseparatedebuginfod I'd rather implement watching the nix sqlitedb with inotify, or even remove the need for indexation nixpkgs side.

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

2 participants