Skip to content

Segmentation fault when reading CSV #2238

Description

@pelotom

This looks like it might be a duplicate of #2167, but I want to verify that the fix for that also applies here. This file intermittently crashes R when attempting to fread it:

» Rscript -e "library(data.table); fread('bad.txt')"

 *** caught segfault ***
address 0x104463000, cause 'memory not mapped'

Traceback:
 1: fread("bad.txt")
An irrecoverable exception occurred. R is aborting now ...
Segmentation fault: 11

Interestingly, the size of the file seems to be related; it is 5 * 2^12 = 20480 characters in size, and if any characters are added or removed the error doesn't occur, but if characters are merely changed while keeping the total count the same, it still occurs.

Activity

  1. st-pasha commented on Jul 4, 2017

    @st-pasha
    Contributor

    This appears to be an instance of #2194
    I verified that the crash occurs with fread from master branch, but doesn't occur with fread from branch "4kcrash".

  2. added this to the milestone on Aug 4, 2017
  3. mattdowle commented on Aug 4, 2017

    @mattdowle
    Member

    Thanks Tom for reporting and for the file. Your bad.txt now added to the test suite.

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions