JuliaLang / MbedTLS.jl

Wrapper around mbedtls
Other
42 stars 50 forks source link

Building MbedTLS hangs indefinitely during Pkg.update() on windows 7 #151

Closed crbinz closed 6 years ago

crbinz commented 6 years ago

This is with julia v0.6.3

julia> Pkg.update()                                                                          
INFO: Updating METADATA...                                                                   
INFO: Updating cache of MbedTLS...                                                           
INFO: Cloning cache of REPLTetris from https://github.com/ChristianKurz/REPLTetris.jl.git    
INFO: Updating cache of NLsolve...                                                           
INFO: Updating cache of Compat...                                                            
INFO: Updating cache of Parameters...                                                        
INFO: Updating cache of OnlineStats...                                                       
INFO: Updating SpaceTrack master...                                                          
INFO: Updating TLEAnalysis master...                                                         
INFO: Updating ReferenceFrames master...                                                     
INFO: Updating Kittens master...                                                             
INFO: Updating REPLTetris master... 8228b6e3 → 4addc826                                      
INFO: Updating UKF master...                                                                 
INFO: Updating Arc master...                                                                 
WARNING: Package Tango: skipping update (dirty)...                                           
INFO: Updating AstroImages master...                                                         
INFO: Updating KalmanFilter master...                                                        
INFO: Updating Reckon master...                                                              
INFO: Computing changes...                                                                   
INFO: Upgrading Compat: v0.65.1 => v0.66.0                                                   
INFO: Upgrading MbedTLS: v0.5.9 => v0.5.10                                                   
INFO: Upgrading OnlineStats: v0.17.3 => v0.17.4                                              
INFO: Upgrading Parameters: v0.8.1 => v0.9.0                                                 
WARNING: The following packages have been updated but were already imported:                 
- Compat                                                                                     
Restart Julia to use the updated versions.                                                   
INFO: Building MbedTLS                                                                       
helgee commented 6 years ago

Same on Windows 10. It only happens if the deps\usr folder is already there.

helgee commented 6 years ago

This seems to be a problem - some kind of race condition, maybe - with BinaryProvider. If I put a println here https://github.com/JuliaWeb/MbedTLS.jl/blob/master/deps/build.jl#L35 it works.

daschw commented 6 years ago

See also https://discourse.julialang.org/t/julia-hanging-pausing-indefinitely-on-package-build-of-mbedtls-and-others/11316.

I can confirm that removing the folder ~/.julia/v0.6/MbedTLS/deps/usr manually before the build works.

helgee commented 6 years ago

Setting isolate=true in the call to satisfied solves it (as does verbose=true).

helgee commented 6 years ago

Okay, this is a base Julia bug. Narrowed it down to this (by sprinkling Core.println calls everywhere):

out_pipe = Pipe()
err_pipe = Pipe()

cmd = pipeline(`'C:\Users\heichhorn\AppData\Local\Julia-0.6.3\bin\7z.exe' x 'C:\Users\heichhorn\.julia\v0.6\MbedTLS\deps\usr\downloads\MbedTLS.x86_64-w64-mingw32.tar.gz' -so`, stdout=`'C:\Users\heichhorn\AppData\Local\Julia-0.6.3\bin\7z.exe' l -ttar -y -si`)

if VERSION > v"0.6.3"
    run(cmd, wait=false)
else
    spawn(cmd, (DevNull, out_pipe, err_pipe))
end

# Hangs on 0.6.3
close(out_pipe.in)

It does not occur on 0.7.0-alpha.

quinnj commented 6 years ago

Anything else to do here? Please comment if there's still an MbedTLS.jl issue and I can re-open to discuss.