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

Reproduce split race/crash #1395

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

ccotter
Copy link
Contributor

@ccotter ccotter commented Aug 11, 2024

https://gist.github.com/ccotter/c0504455c7d54240758a34dc99d620f0 is the ASAN report.

From

auto __old = __self->__dec_ref();
the shared state becomes a dangling pointer if if
this->__dec_ref(); // release the extra ref count, deletes this
frees the memory from another thread.

I'm not quite sure how to fix this, but this PR manages to reproduce this bug reliably with ASAN in the "split forwards results from a different thread"" test.

Copy link

copy-pr-bot bot commented Aug 11, 2024

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@ccotter
Copy link
Contributor Author

ccotter commented Aug 11, 2024

I naively tried to make a copy of the intrusive_ptr inside __detach to keep the ref count positive long enough to ensure the object is kept alive, but I wasn't able to get that to work.

@ericniebler
Copy link
Collaborator

A million thanks for this, Chris. I'll investigate as soon as I can, but probably not before next week. Big presentation coming up.

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