Skip to content

[BUG] unloading data.table causes segmentation fault #2388

Description

@MarkusBonsch

The following piece of code causes a hard crash very often (not always):

library(data.table)

DT <- data.table(x1 = c(1,1,1,1,1,2,2,2,2,2),
                 x2 = c(1,1,2,2,2,1,1,2,2,2),
                 x3 = c(1,2,1,1,2,1,1,1,1,2),
                 y  = rnorm(10), 
                 key = c("x1", "x2", "x3"))

rm(DT)

detach("package:data.table", unload = TRUE)

I could confirm the problem for the current development version, the CRAN version, both under ubuntu 16.04 with R 3.4.1 and Windows with R 3.3.3.

While this might point to a C memory allocation problem, debugging with valgrind didn't produce any errors.
The following code doesn't cause the crash, so it's definitely the object creation that messes things:

library(data.table)

detach("package:data.table", unload = TRUE)

Maybe I am just reporting known behaviour?

Cheers,
Markus

Activity

  1. added this to the milestone on Sep 27, 2017
  2. MarkusBonsch commented on Jan 23, 2018

    @MarkusBonsch
    ContributorAuthor

    Has been found before: #990

  3. removed this from the milestone on May 10, 2018
  4. jangorecki commented on Jan 29, 2019

    @jangorecki
    Member

    closing as dup of #990

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions