[ 
https://issues.apache.org/jira/browse/ARROW-18240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17638756#comment-17638756
 ] 

Dewey Dunnington commented on ARROW-18240:
------------------------------------------

Ok, I finally have a reproducer for this. I don't think the problems is 
MacOS...I think the problem is that the MacOS runners only have 1 CPU available 
for Arrow. Setting {{set_cpu_count()}} locally to 1, I can reproduce a deadlock 
in a simple {{head()}} call after a {{filter()}}.

{code:R}
library(arrow, warn.conflicts = FALSE)
#> Some features are not enabled in this build of Arrow. Run `arrow_info()` for 
more information.

dataset_dir <- tempfile()
write_dataset(mtcars, dataset_dir, )

# change to set_cpu_count(1) to reproduce the deadlock
set_cpu_count(2)

open_dataset(dataset_dir) |> 
  dplyr::filter(mpg > 30) |> 
  head() |> 
  dplyr::collect()
#>    mpg cyl disp  hp drat    wt  qsec vs am gear carb
#> 1 32.4   4 78.7  66 4.08 2.200 19.47  1  1    4    1
#> 2 30.4   4 75.7  52 4.93 1.615 18.52  1  1    4    2
#> 3 33.9   4 71.1  65 4.22 1.835 19.90  1  1    4    1
#> 4 30.4   4 95.1 113 3.77 1.513 16.90  1  1    5    2
{code}


> [R] head() is crashing on some nightly builds
> ---------------------------------------------
>
>                 Key: ARROW-18240
>                 URL: https://issues.apache.org/jira/browse/ARROW-18240
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: R
>            Reporter: Dewey Dunnington
>            Assignee: Dewey Dunnington
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> A few examples:
> - 
> https://github.com/ursacomputing/crossbow/actions/runs/3368026889/jobs/5586109693#step:10:3813
> - 
> https://github.com/ursacomputing/crossbow/actions/runs/3368024633/jobs/5586105172#step:9:3813
> I suspect this is because the HeadRecordBatchReader is resetting the 
> shared_ptr to its parent...in ARROW-18174 we discovered that this was causing 
> crashes in some places.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to