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

[BUG][JNI] Trigger MemoryBuffer.onClosed after memory is freed #15351

Merged
merged 3 commits into from
Mar 20, 2024

Conversation

abellina
Copy link
Contributor

@abellina abellina commented Mar 20, 2024

Description

Closes #15350. This PR changes the order of the callback MemoryBuffer.onClosed to happen after our MemoryCleaner finishes. This is done so that we can accurately, and safely, reflect the state of the memory resource (be it device or host). This PR is needed to address a bug found in spark-rapids here: NVIDIA/spark-rapids#10585.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@abellina abellina added bug Something isn't working Spark Functionality that helps Spark RAPIDS non-breaking Non-breaking change labels Mar 20, 2024
@abellina abellina requested a review from a team as a code owner March 20, 2024 17:12
@abellina abellina changed the title Trigger onClosed later in MemoryBuffer [BUG][JNI] Trigger onClosed later in MemoryBuffer Mar 20, 2024
@github-actions github-actions bot added the Java Affects Java cuDF API. label Mar 20, 2024
Copy link

copy-pr-bot bot commented Mar 20, 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.

@abellina abellina changed the title [BUG][JNI] Trigger onClosed later in MemoryBuffer [BUG][JNI] Trigger MemoryBuffer.onClosed after memory is freed Mar 20, 2024
@abellina
Copy link
Contributor Author

/ok to test

@abellina
Copy link
Contributor Author

/ok to test

@abellina
Copy link
Contributor Author

/ok to test

Copy link
Contributor

@gerashegalov gerashegalov left a comment

Choose a reason for hiding this comment

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

LGTM

@abellina
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 79d2dba into rapidsai:branch-24.04 Mar 20, 2024
75 checks passed
@abellina abellina deleted the fix_onClosed_order branch March 20, 2024 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Java Affects Java cuDF API. non-breaking Non-breaking change Spark Functionality that helps Spark RAPIDS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG][JNI] MemoryBuffer.onClosed needs to be called after the buffer is deallocated
3 participants