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

Guard against undefined pid in get partition worker #587

Conversation

zmstone
Copy link
Contributor

@zmstone zmstone commented Jun 26, 2024

No description provided.

urmastalimaa and others added 3 commits June 26, 2024 12:01
I've observed a data race when starting a consumer from within another
consumer (using co-partitioned topics), where the call to
`get_partition_worker` fails due to badarg in `is_process_alive`.

It seems that 1f2290b ("Verify partition worker process is alive.",
2022-05-19) already tried to resolve the data race, but did not consider
the possibility that the lookup returns `undefined`.

Example exit report from Elixir logger:
```
Last message: {:EXIT, #PID<0.2613.0>, {:badarg, [{:erlang, :is_process_alive, [:undefined], [error_info: %{module: :erl_erts_errors}]}, {:brod_client, :get_partition_worker, 2, [file: ~c"/app/deps/brod/src/brod_client.erl", line: 496]}, ...MyCallChain]}}
```
@zmstone zmstone force-pushed the guard_against_undefined_pid_in_get_partition_worker branch from 8626e89 to afe4dfb Compare June 26, 2024 10:07
@zmstone zmstone merged commit cef61de into kafka4beam:master Jun 26, 2024
14 checks passed
@zmstone zmstone deleted the guard_against_undefined_pid_in_get_partition_worker branch June 26, 2024 11:10
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