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

CSV.read memory leak #264

Closed
XilinJia opened this issue Sep 1, 2018 · 14 comments
Closed

CSV.read memory leak #264

XilinJia opened this issue Sep 1, 2018 · 14 comments

Comments

@XilinJia
Copy link

XilinJia commented Sep 1, 2018

This is extracted from issue: CPU & memory go berserk when reading a 2-row file #236, as it's pretty much a separate issue.

This is a clean test case for the memory leak.

  1. Save the following two-row file (with the title line) in a file called "testCSV.csv"
Cond,Wrapper,Shift,Seg,amin,amax,XCond,Xwrapper,Xshift,xseg,xamin,xamax,Strat,xRat,LS,Obs,WinR,Exp,STD,PF,EoSTD,MaxCRet,CRet,tCRet,PCAnRet,Slope,Quality,CLoss,PCnDD,meanDD,maxPCDD,maxDD,Z
A_BC_ONE,A_In,0,1:2,-10,10,A_BC_ONE,A_In,0,1:2,-10,10,LoopSCC_MT,0,1,61,43,28683,108330,195,26,2034854,1749662,1680096,4.22,119,6,18387186,94,218703,50,499162,207
A_BC_ONE,A_In,0,1:2,-10,10,A_BC_ONE,A_In,0,1:2,-10,10,LoopSCC_MT,0,-1,61,43,28683,108330,195,26,2034854,1749662,1680096,4.22,119,6,18387186,94,218703,50,499162,207
  1. Edit the file, copy the two-rows and paste them on to 10000 rows, to make it sufficiently large so as to more easily notice the memory leak

  2. Save the following julia script as "testCSV.jl"

# using Plots
using CSV
for i=1:1000
	println("reading loop: ", i)
	df = CSV.read("testCSV.csv")
end 

  1. At Julia REPL, do
    include("testCSV.jl")

Then check about julia's memory usage going up.

The julia version I used to test this:

julia> versioninfo()
Julia Version 1.1.0-DEV.127
Commit 3ab56f19a8 (2018-08-27 10:53 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, broadwell)

Though this test case is with the 1.1.0 nightly, I have been noticing the memory leak with many previous versions, starting perhaps with 0.6, where readtable was in place of CSV.read.

I thought package Plots has to be combined with CSV to trigger the memory leak, but it turns out not the case. With this test, I don't see a difference with or without 'using Plots'.

And it's about the same when I put the code in a function:

# using Plots
using CSV

function testCSV()
	for i=1:1000
		println("reading loop: ", i)
		df = CSV.read("testCSV.csv")
	end 
end

Putting GC.gc() in the loop makes the growth rate significantly lower, but not to 0%. With enough runs, julia's memory still goes up gradually.

#using Plots
using CSV

function testCSV()
	for i=1:1000
		println("reading loop: ", i)
		df = CSV.read("testCSV.csv")
		GC.gc()
	end 
end

@quinnj
Copy link
Member

quinnj commented Sep 1, 2018

It'd be nice to test out the new CSV.File functionality on master to see how it compares. You'll need to check out pkg> add Tables#master and pkg> add CSV#master, but then you should be able to do using CSV, Tables and then to actually read the file, do df = CSV.File("testCSV.csv") |> columntable;.

@XilinJia
Copy link
Author

XilinJia commented Sep 2, 2018

Wow, the new CSV.File with Tables is amazingly stable. No memory leaks. When will that be released? What is the thinking for creating the new Tables package with DataFrames already existing? Guess Tables is much lighter than DataFrames? Without much needs for things like sorting, I believe Tables (with the NamedTuple) would satisfy most of my needs. Should I prepare my code to use Tables now?

@nalimilan
Copy link
Member

@gdmsl
Copy link

gdmsl commented Sep 4, 2018

I think it is related. I have a file with 40 columns and 4 rows and when I try to do CSV.Source or CSV.read on it, Julia will freeze and the memory will start to grow up until killall -9 julia. I tried to wait more than 10 minute but no progress. CSV.Source was stuck on

julia> CSV.Source("results.csv")
CSV.Source: results.csv
IOBuffer(data=UInt8[...], readable=true, writable=false, seekable=true, append=false, size=1605, maxsize=Inf, ptr=259, mark=-1)

@bkamins
Copy link
Member

bkamins commented Sep 9, 2018

I confirm the problem on Linux on file 1229 rows, 194 columns, all numeric.

CSVFiles.jl reads it cleanly.

The problem is both on CSV.read and new CSV.File fetched using Tables.jl interface.

CC @pszufe

@XilinJia
Copy link
Author

XilinJia commented Sep 10, 2018

My previous test with CSV.File("file.csv") |> columntable is OK, but today when I use CSV.File("file.csv") |> rowtable, the Julia freezes with memory and CPU go way up. Have kiil it with -9.

Test code:

using CSV, Tables, DataFrames

function testCSV()
	for i=1:1000
		println("reading loop: ", i)
		df = CSV.File("testCSV.csv") |> rowtable;
	end 
end

I am using a nightly build of Julia 1.1.0

julia> versioninfo()
Julia Version 1.1.0-DEV.199
Commit 4c02077a3a (2018-09-06 01:19 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, broadwell)
Environment:
  JULIA_BINDIR = /home/user/Software/julia-4c02077a3a/bin
  JULIA_DIR = /home/user/Software/julia-4c02077a3a

EDIT: It appear with an earlier nightly build of 1.1.0, the problem doesn't exist:

julia> versioninfo()
Julia Version 1.1.0-DEV.127
Commit 3ab56f19a8 (2018-08-27 10:53 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, broadwell)
Environment:
  JULIA_BINDIR = /home/user/Software/julia-3ab56f19a8/bin
  JULIA_DIR = /home/user/Software/julia-3ab56f19a8

@quinnj
Copy link
Member

quinnj commented Sep 11, 2018

@bkamins can you share your file and other details such as julia version, CSV version, etc.? It's hard to debug without knowing exactly what you're running. Happy to privately receive a file if necessary.

@LeoK987, the new Tables.jl package is already released and registered officially. I'm hoping to do a new release of CSV soon (within the next week or two), along with DataFrames support for Tables as well.

I can't reproduce any memory leaks on CSV master using CSV.File in Julia 1.0; nor any hangs while reading or anything. I'll see if I can get a source build or nightly to do additional testing.

@XilinJia
Copy link
Author

@quinnj, that sounds good.

BTW, the tests here were with the #master versions of both CSV and Tables.

@pszufe
Copy link

pszufe commented Sep 11, 2018

Here is a test case. My experience is when you let it run on Linux more than 10 minutes you will need to reboot. I use Amazon AWS c5.xlarge, AMI: ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-20180814 (ami-9526abf1). The commands sudo apt update and sudo apt upgrade have been run. Julia installation has been downloaded from https://julialang.org/downloads/

julia> versioninfo()
Julia Version 1.0.0
Commit 5d4eaca0c9 (2018-08-08 20:58 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, skylake)

(v1.0) pkg> add Tables#master

(v1.0) pkg> add CSV#master

julia> include("load.jl")
┌ Warning: CSV.read(file) will return a CSV.File object in the future; to return a DataFrame, use `df = CSV.read(file) |> DataFrame`
│   caller = ip:0x0
└ @ Core :-1

[goes into infinite loop and freezes, crashes my Linux if run for too long (OS runs out of memory)]

The file load.jl:

using CSV
using DataFrames

function g()
    CSV.read("df_bad.csv")
end

function f()
    describe(g())
end

show(f())

The file df_bad.csv contains

"ECYT1","ECYI2","ECYH3","ECYH4","ECYT5","ECYH6","ECYI7","ECYH8","ECYH9","ECYP10","ECYH11","ECYH12","ECYT13_1","ECYT14","ECYP15","ECYP16","ECYH17","ECYH18","ECYH19","ECYH20","ECYT21","ECYI22","ECYH23","ECYV24","ECYO25","ECYT26","ECYH27","ECYI28","ECYO29","ECYH30","ECYT31","ECYH32","ECYH33","ECYH34","ECYI35","ECYH36","ECYH37","ECYH38","ECYH39","ECYH40","ECYP41","ECYP42","ECYO43","ECYH44","ECYT45","ECYB46","ECYH47","ECYP48","ECYB49","ECYH50","ECYT51","ECYH52","ECYT53","ECYH54","ECYB55","ECYV56","ECYV57","ECYH58","ECYH59","ECYH60","ECYO61","ECYH62","ECYH63","ECYH64","ECYV65","ECYH66","ECYT67","ECYH68","ECYH69","ECYI70","ECYI71","ECYH72","ECYH73","ECYI74","ECYT75","ECYH76","ECYH77","ECYH78","ECYH79","ECYH80","ECYH81","ECYT82","ECYP83","ECYH84","ECYP85","ECYM86","ECYI87","ECYH88","ECYH89","ECYI90","ECYH91","ECYO92","ECYH93","ECYP94","ECYH95","ECYH96","ECYO97","ECYH98","ECYT99","ECYH100","ECYO101","ECYH102","ECYT103","ECYT104","ECYH105","ECYC106","ECYV107","ECYC108","ECYH109","ECYB110","ECYO111","ECYC112","ECYH113","ECYH114","ECYH115","ECYH116","ECYH117","ECYH118","ECYI119","ECYH120","ECYT121","ECYT122","ECYO123","ECYO124","ECYH125","ECYH126","ECYH127","ECYH128","ECYB129","ECYV130","ECYP131","ECYT132","ECYC133","ECYH134","ECYH135","ECYH136","ECYV137","ECYH138","ECYT139","ECYT140","ECYH141","ECYH142","ECYH143","ECYH144","ECYT145","ECYH146","ECYM147","ECYV148","ECYT149","ECYH150","ECYI151","ECYV152","ECYH153","ECYI154","ECYH155","ECYI156","ECYI157","ECYC158","ECYH159","ECYH160","ECYI161","ECYH162","ECYH163","ECYH164","ECYT165","ECYI166","ECYH167","ECYH168","ECYV169","ECYP170","ECYC171","ECYV172","ECYI173","ECYO174","ECYV175","ECYV176","ECYH177","ECYT178","ECYH179","ECYH180","ECYH181","ECYV182","ECYH183","ECYI184","ECYI185","ECYI186","DD_ID","ECYI188","ECYH189","ECYB190","ECYH191","ECYH192","Hous193","SomeLastComplicatedName"                                                                                        
1,2,3,4,5,6,7,8,9,10,11,12,13.1,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194                                                                                                         
1,2,3,4,5,6,7,45020066,9,10,11,12,15.6,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194                                                                                                  

@bkamins
Copy link
Member

bkamins commented Sep 11, 2018

@quinnj this is the test case I was talking about above.

@pszufe
Copy link

pszufe commented Sep 11, 2018

Here is the df_bad.csv file that I use (I can see that when copying from the console trailing spaces have been appended in the post above) - so just download this one

df_bad.zip

@quinnj
Copy link
Member

quinnj commented Sep 13, 2018

@pszufe , thanks for the detailed repro notes. I can confirm I see the same problem using CSV.read, but changing to CSV.File("df_bad.csv") |> DataFrame solves the issue for me, so this seems the same original issue. I'm pushing to try and get a new CSV release out soon where CSV.read will default to the new CSV.File machinery and we can avoid these problems.

This was referenced Sep 20, 2018
@XilinJia
Copy link
Author

Rerun this again on a new nightly version. It still freezes with memory going way up. The only nightly version I tested that has no problem is the one on 8/27. After that up to today, it all freezes.

$ julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.1.0-DEV.304 (2018-09-21)
 _/ |\__'_|_|_|\__'_|  |  Commit 338cf0dceb (0 days old master)
|__/                   |

julia> include("testCSVTable.jl")
testCSV (generic function with 1 method)

julia> testCSV()
reading loop: 1
^C^C^C^C^C^CWARNING: Force throwing a SIGINT
Internal error: encountered unexpected error in runtime:
InterruptException()
subtype_ccheck at /buildworker/worker/package_linux64/build/src/subtype.c:451
var_gt at /buildworker/worker/package_linux64/build/src/subtype.c:556
subtype_tuple at /buildworker/worker/package_linux64/build/src/subtype.c:869 [inlined]
subtype at /buildworker/worker/package_linux64/build/src/subtype.c:1011
exists_subtype at /buildworker/worker/package_linux64/build/src/subtype.c:1092 [inlined]
forall_exists_subtype at /buildworker/worker/package_linux64/build/src/subtype.c:1120
forall_exists_equal at /buildworker/worker/package_linux64/build/src/subtype.c:1059
forall_exists_equal at /buildworker/worker/package_linux64/build/src/subtype.c:1045 [inlined]
subtype at /buildworker/worker/package_linux64/build/src/subtype.c:1031
subtype_tuple at /buildworker/worker/package_linux64/build/src/subtype.c:869 [inlined]
subtype at /buildworker/worker/package_linux64/build/src/subtype.c:1011
subtype_unionall at /buildworker/worker/package_linux64/build/src/subtype.c:650
exists_subtype at /buildworker/worker/package_linux64/build/src/subtype.c:1092 [inlined]
forall_exists_subtype at /buildworker/worker/package_linux64/build/src/subtype.c:1120
jl_subtype_env at /buildworker/worker/package_linux64/build/src/subtype.c:1180
jl_type_intersection_env_s at /buildworker/worker/package_linux64/build/src/subtype.c:2349
jl_typemap_intersection_node_visitor at /buildworker/worker/package_linux64/build/src/typemap.c:479
jl_typemap_intersection_visitor at /buildworker/worker/package_linux64/build/src/typemap.c:553
jl_typemap_intersection_visitor at /buildworker/worker/package_linux64/build/src/typemap.c:544
ml_matches at /buildworker/worker/package_linux64/build/src/gf.c:2535
jl_matching_methods at /buildworker/worker/package_linux64/build/src/gf.c:1744
_methods_by_ftype at ./reflection.jl:717 [inlined]
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:45
abstract_call at ./compiler/abstractinterpretation.jl:797
abstract_eval_call at ./compiler/abstractinterpretation.jl:826
abstract_eval at ./compiler/abstractinterpretation.jl:911
typeinf_local at ./compiler/abstractinterpretation.jl:1154
typeinf_nocycle at ./compiler/abstractinterpretation.jl:1210
typeinf at ./compiler/typeinfer.jl:15
typeinf_edge at ./compiler/typeinfer.jl:492
abstract_call_method at ./compiler/abstractinterpretation.jl:349
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:81
abstract_call at ./compiler/abstractinterpretation.jl:797
abstract_eval_call at ./compiler/abstractinterpretation.jl:826
abstract_eval at ./compiler/abstractinterpretation.jl:911
typeinf_local at ./compiler/abstractinterpretation.jl:1154
typeinf_nocycle at ./compiler/abstractinterpretation.jl:1210
typeinf at ./compiler/typeinfer.jl:15
typeinf_edge at ./compiler/typeinfer.jl:492
abstract_call_method at ./compiler/abstractinterpretation.jl:349
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:81
abstract_call at ./compiler/abstractinterpretation.jl:797
abstract_eval_call at ./compiler/abstractinterpretation.jl:826
abstract_eval at ./compiler/abstractinterpretation.jl:911
typeinf_local at ./compiler/abstractinterpretation.jl:1154
typeinf_nocycle at ./compiler/abstractinterpretation.jl:1210
typeinf at ./compiler/typeinfer.jl:15
typeinf_edge at ./compiler/typeinfer.jl:492
abstract_call_method at ./compiler/abstractinterpretation.jl:349
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:81
abstract_call at ./compiler/abstractinterpretation.jl:797
abstract_eval_call at ./compiler/abstractinterpretation.jl:826
abstract_eval at ./compiler/abstractinterpretation.jl:911
typeinf_local at ./compiler/abstractinterpretation.jl:1154
typeinf_nocycle at ./compiler/abstractinterpretation.jl:1210
typeinf at ./compiler/typeinfer.jl:15
typeinf_edge at ./compiler/typeinfer.jl:492
abstract_call_method at ./compiler/abstractinterpretation.jl:349
^Cabstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:81
abstract_call at ./compiler/abstractinterpretation.jl:797
abstract_eval_call at ./compiler/abstractinterpretation.jl:826
abstract_eval at ./compiler/abstractinterpretation.jl:911
typeinf_local at ./compiler/abstractinterpretation.jl:1154
typeinf_nocycle at ./compiler/abstractinterpretation.jl:1210
typeinf at ./compiler/typeinfer.jl:15
typeinf_edge at ./compiler/typeinfer.jl:492
abstract_call_method at ./compiler/abstractinterpretation.jl:349
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:81
abstract_call at ./compiler/abstractinterpretation.jl:797
abstract_eval_call at ./compiler/abstractinterpretation.jl:826
abstract_eval at ./compiler/abstractinterpretation.jl:911
typeinf_local at ./compiler/abstractinterpretation.jl:1154
typeinf_nocycle at ./compiler/abstractinterpretation.jl:1210
typeinf at ./compiler/typeinfer.jl:15
typeinf_ext at ./compiler/typeinfer.jl:567
typeinf_ext at ./compiler/typeinfer.jl:604
jfptr_typeinf_ext_1.clone_1 at /home/user/Software/julia-338cf0dceb/lib/julia/sys.so (unknown line)
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2198
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1559 [inlined]
jl_apply_with_saved_exception_state at /buildworker/worker/package_linux64/build/src/rtutils.c:252
jl_type_infer at /buildworker/worker/package_linux64/build/src/gf.c:275
jl_compile_method_internal at /buildworker/worker/package_linux64/build/src/gf.c:1798 [inlined]
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1842
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2198
rowtable at /home/user/.julia/packages/Tables/lIH0E/src/namedtuples.jl:54
|> at ./operators.jl:813
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1843
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2198
testCSV at /media/sf_Xubuntu/Coding/Julia/Test/testCSVTable.jl:7
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1843
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2198
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:324
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:430
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:363 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:682
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:797
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7f75cdb9a5df)
unknown function (ip: 0xffffffffffffffff)
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:806
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:818
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/builtins.c:622
eval at ./boot.jl:319
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2198
eval_user_input at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:85
run_backend at /home/user/.julia/packages/Revise/xO23U/src/Revise.jl:766
#58 at ./task.jl:259
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1843
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2198
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1559 [inlined]
start_task at /buildworker/worker/package_linux64/build/src/task.c:271
unknown function (ip: 0xffffffffffffffff)
^C^CInternal error: encountered unexpected error in runtime:
InterruptException()
jl_mutex_unlock at /buildworker/worker/package_linux64/build/src/locks.h:138 [inlined]
jl_typeinf_end at /buildworker/worker/package_linux64/build/src/gf.c:2583
typeinf_ext at ./compiler/typeinfer.jl:568
typeinf_ext at ./compiler/typeinfer.jl:604
jfptr_typeinf_ext_1.clone_1 at /home/user/Software/julia-338cf0dceb/lib/julia/sys.so (unknown line)
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2198
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1559 [inlined]
jl_apply_with_saved_exception_state at /buildworker/worker/package_linux64/build/src/rtutils.c:252
jl_type_infer at /buildworker/worker/package_linux64/build/src/gf.c:275
jl_compile_method_internal at /buildworker/worker/package_linux64/build/src/gf.c:1798 [inlined]
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1842
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2198
copyto! at ./abstractarray.jl:650
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1843
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2198
_collect at ./array.jl:563
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1843
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2198
collect at ./array.jl:557
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1843
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2198
rowtable at /home/user/.julia/packages/Tables/lIH0E/src/namedtuples.jl:54
|> at ./operators.jl:813
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1843
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2198
testCSV at /media/sf_Xubuntu/Coding/Julia/Test/testCSVTable.jl:7
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1843
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2198
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:324
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:430
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:363 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:682
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:797
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7f75cdb9a5df)
unknown function (ip: 0xffffffffffffffff)
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:806
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:818
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/builtins.c:622
eval at ./boot.jl:319
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2198
eval_user_input at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:85
run_backend at /home/user/.julia/packages/Revise/xO23U/src/Revise.jl:766
#58 at ./task.jl:259
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1843
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2198
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1559 [inlined]
start_task at /buildworker/worker/package_linux64/build/src/task.c:271
unknown function (ip: 0xffffffffffffffff)
^C^CInternal error: encountered unexpected error in runtime:
InterruptException()
jl_mutex_unlock at /buildworker/worker/package_linux64/build/src/locks.h:138 [inlined]
jl_typeinf_end at /buildworker/worker/package_linux64/build/src/gf.c:2583
typeinf_ext at ./compiler/typeinfer.jl:568
typeinf_ext at ./compiler/typeinfer.jl:604
jfptr_typeinf_ext_1.clone_1 at /home/user/Software/julia-338cf0dceb/lib/julia/sys.so (unknown line)
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2198
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1559 [inlined]
jl_apply_with_saved_exception_state at /buildworker/worker/package_linux64/build/src/rtutils.c:252
jl_type_infer at /buildworker/worker/package_linux64/build/src/gf.c:275
jl_compile_method_internal at /buildworker/worker/package_linux64/build/src/gf.c:1798 [inlined]
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1842
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2198
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1559 [inlined]
jl_f__apply at /buildworker/worker/package_linux64/build/src/builtins.c:556
jl_f__apply_latest at /buildworker/worker/package_linux64/build/src/builtins.c:594
#invokelatest#1 at ./essentials.jl:697 [inlined]
invokelatest at ./essentials.jl:696 [inlined]
print_response at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:148
unknown function (ip: 0x7f75d818a4fe)
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1843
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2198
print_response at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:139
unknown function (ip: 0x7f75d8189f4b)
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1843
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2198
do_respond at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:708
unknown function (ip: 0x7f75d817d2d4)
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1843
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2198
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1559 [inlined]
jl_f__apply at /buildworker/worker/package_linux64/build/src/builtins.c:556
jl_f__apply_latest at /buildworker/worker/package_linux64/build/src/builtins.c:594
#invokelatest#1 at ./essentials.jl:697 [inlined]
invokelatest at ./essentials.jl:696 [inlined]
run_interface at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/REPL/src/LineEdit.jl:2261
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1843
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2198
run_frontend at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:1029
run_repl at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:191
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1843
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2198
#719 at ./logging.jl:311
unknown function (ip: 0x7f75d80c6635)
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1843
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2198
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1559 [inlined]
jl_f__apply at /buildworker/worker/package_linux64/build/src/builtins.c:556
jl_f__apply_latest at /buildworker/worker/package_linux64/build/src/builtins.c:594
#invokelatest#1 at ./essentials.jl:697 [inlined]
invokelatest at ./essentials.jl:696 [inlined]
macro expansion at ./logging.jl:308 [inlined]
run_main_repl at ./client.jl:330
exec_options at ./client.jl:242
_start at ./client.jl:421
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2198
unknown function (ip: 0x401ae8)
unknown function (ip: 0x401513)
__libc_start_main at /usr/lib/libc.so.6 (unknown line)
unknown function (ip: 0x4015b4)
^CSYSTEM: show(lasterr) caused an error

@quinnj
Copy link
Member

quinnj commented Sep 22, 2018

On Julia 1.0 with current CSV/DataFrames master, I don't see any memory leaks or process hanging when doing CSV.File(file) |> columntable, CSV.File(file) |> rowtable, CSV.File(file) |> DataFrame or CSV.read(file) (note that CSV.read(file) is now equivalent to CSV.File(file) |> DataFrame on master). There are indeed a few compiler bugs on current Julia master including: JuliaLang/julia#29306, JuliaLang/julia#29107 (comment), JuliaLang/julia#29271, and JuliaLang/julia#29253, which will presumably be resolved before the next point release. In the mean time, I'd suggest using Julia 1.0. Going to close this issue for now, but feel free to continue discussing/commenting and we can certainly re-open if additional issues are discovered. The aim is to have a new CSV.jl release in the next few days.

@quinnj quinnj closed this as completed Sep 22, 2018
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

6 participants