LibCURL and FTPClient ReadOnlyMemoryError/SegFault

Today one of my modules just stopped working, for no real reason as far as I can tell since I hadn’t updated anything in a while and nothing else has changed. I’m completely at a loss for how to fix this.

I’m using FTPClient to download some files. But the FTPClient module itself just isn’t working for me anymore, not on my main Windows 10 install or an Ubuntu VM I also use:

Julia Version 0.6.2
Commit d386e40c17 (2017-12-13 18:08 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, sandybridge)
Julia Version 0.6.2                                                                                                     
Commit d386e40c17* (2017-12-13 18:08 UTC)                                                                              
Platform Info:                                                                                                            
 OS: Windows (x86_64-w64-mingw32)                                                                                        
 CPU: Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz                                                                     
 WORD_SIZE: 64                                                                                                            
 BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)                                                    
 LAPACK: libopenblas64_                                                                                                  
 LIBM: libopenlibm                                                                                                       
 LLVM: libLLVM-3.9.1 (ORCJIT, sandybridge)

On Windows I get a ReadOnlyMemoryError running my code or the package test for FTPClient:

ERROR: LoadError: LoadError: ReadOnlyMemoryError()                                                                      
Stacktrace:                                                                                                              
[1] ftp_command(::FTPClient.ConnContext, ::String) at C:\Users\RankWinner\.julia\v0.6\FTPClient\src\FTPC.jl:171             
[2] ftp_connect(::FTPClient.RequestOptions) at C:\Users\RankWinner\.julia\v0.6\FTPClient\src\FTPC.jl:494                    
[3] (::FTPClient.##call#11#12)(::String, ::Bool, ::Bool, ::Bool, ::Bool, ::String, ::String, ::Type{T} where T) at C:\Users\RankWinner\.julia\v0.6\FTPClient\src\FTPObject.jl:27                                                                    
[4] (::Core.#kw#Type)(::Array{Any,1}, ::Type{FTPClient.FTP}) at .\<missing>:0                                           
[5] include_from_node1(::String) at .\loading.jl:576                                                                    
[6] include(::String) at .\sysimg.jl:14                                                                                 
[7] macro expansion at C:\Users\RankWinner\.julia\v0.6\FTPClient\test\runtests.jl:21 [inlined]                              
[8] anonymous at .\<missing>:?                                                                                          
[9] include_from_node1(::String) at .\loading.jl:576                                                                    
[10] include(::String) at .\sysimg.jl:14                                                                                
[11] process_options(::Base.JLOptions) at .\client.jl:305                                                               
[12] _start() at .\client.jl:371                                                                                       
while loading C:\Users\RankWinner\.julia\v0.6\FTPClient\test\ftp_object.jl, in expression starting on line 40               
while loading C:\Users\RankWinner\.julia\v0.6\FTPClient\test\runtests.jl, in expression starting on line 16 
==================================================[ ERROR: FTPClient ]================================================== 
failed process: Process(`'C:\Users\RankWinner\AppData\Local\Julia-0.6.2\bin\julia.exe' -Cx86-64 '-JC:\Users\RankWinner\AppData\Local\Julia-0.6.2\lib\julia\sys.dll' --compile=yes --depwarn=yes --check-bounds=yes --code-coverage=none --color=yes --compilecache=yes 'C:\Users\RankWinner\.julia\v0.6\FTPClient\test\runtests.jl'`, ProcessExited(1)) [1]
========================================================================================================================

On Ubuntu I get either a LibCURL error #23 (a CURLE_WRITE_ERROR - An error occurred when writing received data to a local file, or an error was returned to libcurl from a write callback) when running my code:

ERROR:  :: LibCURL error #23
Stacktrace:
 [1] ftp_command(::FTPClient.ConnContext, ::String) at /home/rankwinner/.julia/v0.6/FTPClient/src/FTPC.jl:174
 [2] ftp_connect(::FTPClient.RequestOptions) at /home/rankwinner/.julia/v0.6/FTPClient/src/FTPC.jl:494
 [3] ObsLog(::String) at /home/rankwinner/.julia/v0.6/NuSTAR/src/ObsLog.jl:6
 [4] ObsLog() at /home/rankwinner/.julia/v0.6/NuSTAR/src/ObsLog.jl:2

Or I get a segfault when the ftp_connect function is called:

signal (11): Segmentation fault
while loading no file, in expression starting on line 0
_IO_fwrite at /build/glibc-bfm8X4/glibc-2.23/libio/iofwrite.c:39
unknown function (ip: 0x7fe5f832ba8c)
unknown function (ip: 0x7fe5f835d14e)
unknown function (ip: 0x7fe5f832f2b3)
unknown function (ip: 0x7fe5f832c0f9)
unknown function (ip: 0x7fe5f834b34d)
curl_multi_perform at /home/rankwinner/julia_0.6.2/bin/../lib/julia/libcurl.so.4 (unknown line)
curl_easy_perform at /home/rankwinner/julia_0.6.2/bin/../lib/julia/libcurl.so.4 (unknown line)
ftp_command at /home/rankwinner/.julia/v0.6/FTPClient/src/FTPC.jl:171
ftp_connect at /home/rankwinner/.julia/v0.6/FTPClient/src/FTPC.jl:494
unknown function (ip: 0x7fe5f253ff12)
jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:339 [inlined]
jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:358 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:1926
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:75
eval at /buildworker/worker/package_linux64/build/src/interpreter.c:242
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:543
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:692
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:592
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/builtins.c:496
eval at ./boot.jl:235
unknown function (ip: 0x7fe604c44d2f)
jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:339 [inlined]
jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:358 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:1926
eval_user_input at ./REPL.jl:66
unknown function (ip: 0x7fe604cc618f)
jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:339 [inlined]
jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:358 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:1926
macro expansion at ./REPL.jl:97 [inlined]
#1 at ./event.jl:73
unknown function (ip: 0x7fe5f25342af)
jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:339 [inlined]
jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:358 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:1926
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1424 [inlined]
start_task at /buildworker/worker/package_linux64/build/src/task.c:267
unknown function (ip: 0xffffffffffffffff)
Allocations: 1581859 (Pool: 1580656; Big: 1203); GC: 0
Segmentation fault (core dumped)

So far I’ve tried removing and re-adding all related modules, reinstalling WinRPM and the relevant libraries, deleting the .julia folder and reinstalling everything, and reinstalling Julia from scratch, but nothing’s helped.

Does anybody know what the problem might be and how I could fix it? Thanks.