Skip to content

Conversation

@p13l13d13
Copy link
Contributor

If localhost is not configured on a system, UnusedTCPPort will loop forever without producing any errors. By checking EADDRINUSE and ENOACC and then skipping only in these cases, we'd avoid at least the mentioned deadlock.

On top of this, this change should catch other errors without locking, like other DNS errors and so on.

dvyukov
dvyukov previously approved these changes Jan 7, 2025
Copy link
Collaborator

@dvyukov dvyukov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me (but I think CI will bark on the error message capitalization).

@a-nogikh
Copy link
Collaborator

a-nogikh commented Jan 9, 2025

As Dmitry noted, CI tests have failed on this PR. Please address the reported errors (the check should be also triggerable locally via ./tools/syz-env make lint).

@a-nogikh
Copy link
Collaborator

Please drop the Merge branch 'master' into fix-unused-tcp-port-deadlock commit -- it will fail the CI again since we don't use merge commits in the project (we rebase instead).

If localhost is not configured on a system, UnusedTCPPort will loop
forever without producing any errors. By checking EADDRINUSE and ENOACC
and then skipping only in these cases, we'd avoid at least the mentioned
deadlock.

On top of this, this change should catch other errors without locking,
like other DNS errors and so on.

Signed-off-by: Ivan Gulakov <gulakov@amazon.de>
@p13l13d13 p13l13d13 force-pushed the fix-unused-tcp-port-deadlock branch from c8ac1b1 to 89be30f Compare January 13, 2025 11:37
@a-nogikh a-nogikh enabled auto-merge January 13, 2025 12:28
@a-nogikh a-nogikh added this pull request to the merge queue Jan 13, 2025
Merged via the queue into google:master with commit 3f6ed58 Jan 13, 2025
17 checks passed
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.

3 participants