Skip to content

fread on particular file crashes R  #2167

Description

@HughParsonage

I have a particular file which when passed to the current fread crashes R. Not reproducible on CRAN 1.10.4 but reproducible on the version at 6019cfb . Very similar files do not have this problem.

The file is a csv (renamed to .txt to upload).

10237-ression-aborted.txt

fread('10237-rsession-aborted.txt', verbose = TRUE)

Input contains no \n. Taking this to be a filename to open
NAstrings = [<<NA>>]
None of the NAstrings are numeric (such as '-9999').
`filename` argument given, attempting to open a file with such name
File opened, size 0.000003 GB.
Memory mapping ... ok
Detected eol as \r\n (CRLF) in that order, the Windows standard.
Positioned on line 1 starting: <<row_n,lat,lon,id,place_id,refe>>
Detecting sep ...
  sep==','(ascii 44)  with 9 lines of 8 fields using quote rule 0
Detected 8 columns on line 1. This line is either column names or first data row (first 30 chars): <<row_n,lat,lon,id,place_id,refe>>
All the fields on line 1 are character fields. Treating as the column names.
Number of sampling jump points = 1 because 2757 bytes from row 1 to eof / (2 * 2757 jump0size) == 0

(crash)

Activity

  1. MichaelChirico commented on Jun 3, 2017

    @MichaelChirico
    Member

    Confirming a segfault on current dev: "built 2017-06-03 02:37:39 UTC; travis"

    Can add that this works:

    fread('head -n 1 ~/Downloads/10237-ression-aborted.txt')
    # Empty data.table (0 rows) of 8 cols: row_n,lat,lon,id,place_id,reference...
    

    But even with 2 rows same issue:

    fread('head -n 2 ~/Downloads/10237-ression-aborted.txt')
    
    #  *** caught segfault ***
    # address 0x7fe98f43fa70, cause 'memory not mapped'
    
  2. added this to the milestone on Jun 7, 2017
  3. added a commit that references this issue on Jun 7, 2017
    69ad3dc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions