Skip to content

Conversation

@qzhuyan
Copy link

@qzhuyan qzhuyan commented Apr 11, 2024

No description provided.

@qzhuyan qzhuyan force-pushed the fix/future-cancel-segfault branch from 25cd751 to 3b10d80 Compare April 12, 2024 06:26
@jessestimpson
Copy link
Contributor

@qzhuyan Thanks for reporting this issue. It helped me debug the issue in my fork of erlfdb (linked below). A couple key differences though:

  1. I was not able to reproduce a segfault.
  2. I believe the fix for the deadlock is to move the call to fdb_future_cancel out of the mutex section. Checking the thread type in the callback seems insufficient because multiple Erlang scheduler threads could be accessing the future at the same time. In that scenario, the thread type check isn't specific enough. Instead, all the fdb_future_* functions themselves are thread-safe, so there should be no need to use the future lock when calling fdb_future_cancel.

foundationdb-beam/erlfdb#60

Is there anything more you can share about the segfault you were seeing? I wonder if I missed something.

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