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

Mock cluster's main thread does not retry when poll() returns EINTR, resulting in shutdown #4727

Open
4 of 7 tasks
terryburton opened this issue May 23, 2024 · 0 comments
Open
4 of 7 tasks

Comments

@terryburton
Copy link

Description

External events such as signals and activities performed by other threads may routinely interrupt the mock cluster thread's poll() system call.

This situation is currently treated as an error resulting in shutdown of the mock cluster. It would be better to retry if poll() returns EINTR.

There may be equivalent considerations for win32.

Context: The mock cluster has been initialised within an application that subsequently calls setresuid (which interrupts system calls).

Checklist

  • librdkafka version: Up to current HEAD 2587cac70f83fced42c51f921bed325a434f5bc7
  • Apache Kafka version: N/A
  • librdkafka client configuration: test.mock.num.brokers = N
  • Operating system: POSIX flavour
  • Provide logs (with debug=.. as necessary) from librdkafka: See below
  • Provide broker log excerpts: N/A
  • Critical issue

Producer logs

Thu May 23 16:56:57 2024 : Info: [thrd:app]: Mock cluster enabled...
...
[ Mock cluster thread's poll() system call interrupted, returning EINTR. Treated as error, rather than retried. ]
Thu May 23 16:56:58 2024 : Error: [thrd:mock]: Mock cluster failed to poll 5 fds: -1: Interrupted system call
[ Results in teardown of the mock cluster. ]
...
Thu May 23 16:56:58 2024 : Error: [thrd:127.0.0.1:34819/bootstrap]: 127.0.0.1:34819/1: Connect to ipv4#127.0.0.1:34819 failed: Connection refused (after 0ms in state CONNECT)
Thu May 23 16:56:59 2024 : Error: [thrd:127.0.0.1:43461/bootstrap]: 127.0.0.1:43461/3: Connect to ipv4#127.0.0.1:43461 failed: Connection refused (after 0ms in state CONNECT)
Thu May 23 16:56:59 2024 : Error: [thrd:127.0.0.1:43461/bootstrap]: 3/3 brokers are down
...
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

1 participant