tidyverse / vroom

Fast reading of delimited files
https://vroom.r-lib.org
Other
620 stars 60 forks source link

Segfault is appearing in vroom in other package's revdep checks #510

Closed jennybc closed 1 year ago

jennybc commented 1 year ago

... and in vroom's CI 😬

jeroen commented 1 year ago

The problem disappears when we downgrade cpp11: https://github.com/tidyverse/vroom/pull/511

This might indicate one of two problems: either a bug in cpp11, or an abi change in cpp11 has caused a conflict that appears when multiple R packages are loaded which are built against different, incompatible versions of cpp11.

The latter can be ruled out by checking on Linux when building all packages from source (i.e. disable p3m).

DavisVaughan commented 1 year ago

I would guess we can rule out an ABI change because ubuntu-release (devel) builds all packages from source and still fails https://github.com/tidyverse/vroom/actions/runs/6214248706/job/16866006817

Haven't been able to reproduce on mac though

DavisVaughan commented 1 year ago

I am fairly certain i have tracked it down to https://github.com/r-lib/cpp11/commit/fe152114c01a4478e9dbd46c962c086c688ee45e, but i still don't know exactly what is wrong

I can reproduce a hang on my mac with that commit installed and running

for (i in 1:10000) {
  out_file <- tempfile(fileext = "csv")
  vroom::vroom_write(mtcars, out_file, ",")
  unlink(out_file)
  print(i)
}

but not with

for (i in 1:10000) {
  vroom::vroom(I("x,y\n1,2\n3,4\n"), show_col_types = F)
  print(i)
}
jeroen commented 1 year ago

Thanks for fixing this @jennybc @DavisVaughan !

jennybc commented 1 year ago

It’s all @DavisVaughan! I’ll do a release soon.