-
Notifications
You must be signed in to change notification settings - Fork 991
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
caugth segfault with fread() and tables(), memory not mapped (with TRY plant trait database) #3369
Comments
Thank you for the report. Confirmed for Windows too. |
The
|
Dear HughParsonage, So, I can not work with the database and just a few months ago it works perfectly. |
Hi gorne, No sorry I don't know how to fix. It's definitely a bug so thank you for reporting. Hopefully someone with better experience with the fread C code can fix. Once the maintainers have the time to put their mind to it, a fix will be applied. You may wish to consider the following temporary fix (noting the warning about the blank penultimate line). fread("4636.txt",
sep = "\t",
colClasses = list("integer" = c("RelUncertaintyPercent", "Replicates")),
quote = "") |
Thank you very much, it seems to work. |
@HughParsonage For me your command emits the following warning:
even though that last line is not a "single-line footer" but a real data record. As much as I can see it's valid too, it even has same 28 fields as the rest of the file. That line can be read separately via
and then |
The following code samples seem to show that subset is also vulnerable to this segfault bug. Toggle code params accordingly. Rolling back to version 1.11.8 fixes this particular problem under a few environments tested. |
PR #3469 (v1.12.2) catches the malformed data.table and avoid the segfaults. PR #3471 (v1.12.4) unpacks the data.frame column that is a data.frame to solve the malformed data.table which causes the problem @drewabbot reported just above. I reproduced and traced the |
@gorne This doesn't reproduce for me on 1.14.5 dev. Can you please verify that it is fixed? |
###########################The problem
I can not provide a reduced example because I do not know where the problem is. So I give you the entire database and e few lines where the problem appears. Few months ago I worked perfectly with the same database.
The database have 1.3 GB (1,345,078,529 bytes)
The file database is "4636.txt" or "here"
library(data.table)
data <- fread("4636.txt", header = T, sep = "\t", dec = ".", quote = "", data.table = T)
tables()
It produces the following message:
###########################Output of sessionInfo()
sessionInfo()
###########################But I also try with:
###########################
When I ran the same script on valgrind I obtain:
library(data.table)
data <- fread("4636.txt", header = T, sep = "\t", dec = ".", quote = "", data.table = T)
tables()
The text was updated successfully, but these errors were encountered: