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

ARROW-17252: [R] Intermittent valgrind failure #13746

Closed
wants to merge 8 commits into from

Conversation

paleolimbot
Copy link
Member

No description provided.

@paleolimbot
Copy link
Member Author

@github-actions crossbow submit test-r-linux-valgrind

@github-actions
Copy link

@github-actions
Copy link

⚠️ Ticket has not been started in JIRA, please click 'Start Progress'.

@github-actions
Copy link

Revision: cb306e6

Submitted crossbow builds: ursacomputing/crossbow @ actions-cd6a907a1c

Task Status
test-r-linux-valgrind Azure

@paleolimbot
Copy link
Member Author

@github-actions crossbow submit test-r-linux-valgrind

@github-actions
Copy link

Revision: 0e7fdbd

Submitted crossbow builds: ursacomputing/crossbow @ actions-6eeadbed1b

Task Status
test-r-linux-valgrind Azure

@paleolimbot
Copy link
Member Author

@github-actions crossbow submit test-r-linux-valgrind

@github-actions
Copy link

Revision: b72ac2c

Submitted crossbow builds: ursacomputing/crossbow @ actions-46a81cabd4

Task Status
test-r-linux-valgrind Azure

@paleolimbot
Copy link
Member Author

@github-actions crossbow submit test-r-linux-valgrind

@github-actions
Copy link

github-actions bot commented Aug 1, 2022

Revision: a5a5011

Submitted crossbow builds: ursacomputing/crossbow @ actions-d4dfafaa47

Task Status
test-r-linux-valgrind Azure

@paleolimbot
Copy link
Member Author

@github-actions crossbow submit test-r-linux-valgrind

@github-actions
Copy link

github-actions bot commented Aug 1, 2022

Revision: db12bff

Submitted crossbow builds: ursacomputing/crossbow @ actions-485782cd0a

Task Status
test-r-linux-valgrind Azure

@paleolimbot
Copy link
Member Author

@github-actions crossbow submit test-r-linux-valgrind

@github-actions
Copy link

github-actions bot commented Aug 1, 2022

Revision: 690a9a0

Submitted crossbow builds: ursacomputing/crossbow @ actions-4c128215b9

Task Status
test-r-linux-valgrind Azure

@paleolimbot paleolimbot closed this Aug 2, 2022
nealrichardson pushed a commit that referenced this pull request Aug 9, 2022
This PR fixes intermittent leaks that occur after one of the changes from ARROW-16444: when we drain the `RecordBatchReader` that is emitted from the plan too quickly, it seems, some parts of the plan can leak (I don't know why this happens).

I tried removing various pieces of the `RunWithCapturedR()` changes (see #13746) but the only thing that removes the errors completely is draining the resulting `RecordBatchReader` from R (i.e., `reader$read_table()`) instead of in C++ (i.e., `reader->ToTable()`). Unfortunately, for user-defined functions to work in a plan we need a C++ level `reader->ToTable()`. I took the approach here of disabling the C++ level read by default, requiring a user to opt in to the version of `collect()` that works with a UDF. It's not ideal, but definitely safer (and more clearly marks the user-defined function behaviour as experimental).

I was able to replicate the original leaks but they are few and far between...our tests just happen to create and destroy many, many exec plans and something about the CI environment seems to trigger these more reliably (although the errors don't always occur there, either). Most of the leaks are small but there were some instances where an entire `Table` leaked.

Authored-by: Dewey Dunnington <[email protected]>
Signed-off-by: Neal Richardson <[email protected]>
@paleolimbot paleolimbot deleted the r-valgrind branch December 9, 2022 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant