Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fread on particular file crashes R #2167

Closed
HughParsonage opened this issue May 17, 2017 · 1 comment
Closed

fread on particular file crashes R #2167

HughParsonage opened this issue May 17, 2017 · 1 comment
Milestone

Comments

@HughParsonage
Copy link
Member

@HughParsonage HughParsonage commented May 17, 2017

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)

@MichaelChirico
Copy link
Member

@MichaelChirico MichaelChirico commented Jun 3, 2017

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'

@mattdowle mattdowle added this to the v1.10.6 milestone Jun 7, 2017
mattdowle added a commit that referenced this issue Jun 7, 2017
Fix OOB array access to pow10lookup. Closes #2167
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants