Skip to content
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.

IJulia - SystemError: dup: Bad file descriptor #60

Open
JobJob opened this issue Mar 21, 2018 · 1 comment
Open

IJulia - SystemError: dup: Bad file descriptor #60

JobJob opened this issue Mar 21, 2018 · 1 comment

Comments

@JobJob
Copy link

JobJob commented Mar 21, 2018

Great package!

This is just an FYI for others. This package doesn't work in IJulia, but will if JuliaLang/IJulia.jl#641 gets merged.

The call that triggers the error is in ClobberingReload but I thought it's better posted here, since
I'm guessing more people will encounter it from here as a starting point (like I did).

using TraceCalls, Calculus
@traceable f(x) = sin(x) + sqrt(x)
trace_derivative = @trace Calculus second_derivative(f, 1.0)
SystemError: dup: Bad file descriptor

Stacktrace:
 [1] #systemerror#44 at ./error.jl:64 [inlined]
 [2] systemerror(::String, ::Bool) at ./error.jl:64
 [3] dup(::RawFD, ::RawFD) at ./libc.jl:27
 [4] _redirect_stderr(::IOStream) at ./stream.jl:1023
 [5] _redirect_stderr at ~/.julia/v0.6/Compat/src/Compat.jl:18 [inlined]
 [6] redirect_stderr(::IOStream) at ./stream.jl:1028
 [7] (::ClobberingReload.##2#3{ClobberingReload.##4#5{TraceCalls.##68#69{TraceCalls.CodeUpdate}},NTuple{5,Regex}})(::String, ::IOStream) at ~/.julia/v0.6/ClobberingReload/src/scrub_stderr.jl:35
 [8] mktemp(::ClobberingReload.##2#3{ClobberingReload.##4#5{TraceCalls.##68#69{TraceCalls.CodeUpdate}},NTuple{5,Regex}}, ::String) at ./file.jl:376
 [9] scrub_stderr(::ClobberingReload.##4#5{TraceCalls.##68#69{TraceCalls.CodeUpdate}}, ::Regex, ::Vararg{Regex,N} where N) at ~/.julia/v0.6/ClobberingReload/src/scrub_stderr.jl:21
 [10] (::TraceCalls.RevertibleCodeUpdate)(::Function) at ~/.julia/v0.6/TraceCalls/src/code_update.jl:129
 [11] with_tracing_definitions(::TraceCalls.##113#114{##5#6}, ::Module) at ~/.julia/v0.6/TraceCalls/src/tracing.jl:188
 [12] trace(::Function, ::Module) at ~/.julia/v0.6/TraceCalls/src/tracing.jl:224
 [13] include_string(::String, ::String) at ./loading.jl:515
@cstjean
Copy link
Owner

cstjean commented Mar 21, 2018

Thank you for looking into it. I thought that I had gotten rid of the ClobberingReload dependency, but it looks like it's still around...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants