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

InexactError check_top_bit #316

Closed
reed-foster opened this issue Jun 29, 2024 · 1 comment
Closed

InexactError check_top_bit #316

reed-foster opened this issue Jun 29, 2024 · 1 comment

Comments

@reed-foster
Copy link

I've been occasionally running into trouble with ProgressMeter and Threads, where a call to next!(progress; ...) results in an InexactError. I'm running my code in a jupyterlab notebook with IJulia. I'm running Julia 1.10.4 with JULIA_NUM_THREADS=10 on Ubuntu 20.04.

It happens very rarely, so it's hard to pin down the cause of it. I've tried disabling the progress bar and haven't noticed the error happening.

This seems like a related issue: JuliaLang/julia#38824

Here's the stack trace:

TaskFailedException

    nested task error: InexactError: check_top_bit(UInt64, -1)
    Stacktrace:
      [1] throw_inexacterror(f::Symbol, ::Type{UInt64}, val::Int64)
        @ Core ./boot.jl:634
      [2] check_top_bit
        @ ./boot.jl:648 [inlined]
      [3] toUInt64
        @ ./boot.jl:759 [inlined]
      [4] UInt64
        @ ./boot.jl:789 [inlined]
      [5] convert
        @ ./number.jl:7 [inlined]
      [6] _promote
        @ ./promotion.jl:370 [inlined]
      [7] promote
        @ ./promotion.jl:393 [inlined]
      [8] min
        @ ./promotion.jl:472 [inlined]
      [9] unsafe_write(to::IOBuffer, p::Ptr{UInt8}, nb::UInt64)
        @ Base ./iobuffer.jl:460
     [10] unsafe_write
        @ ./io.jl:698 [inlined]
     [11] write
        @ ./io.jl:721 [inlined]
     [12] send_stream(name::String)
        @ IJulia [~/.julia/packages/IJulia/Vo51o/src/stdio.jl:150](http://localhost:8888/home/reedf/.julia/packages/IJulia/Vo51o/src/stdio.jl#line=149)
     [13] flush(io::IJulia.IJuliaStdio{Base.PipeEndpoint})
        @ IJulia [~/.julia/packages/IJulia/Vo51o/src/stdio.jl:277](http://localhost:8888/home/reedf/.julia/packages/IJulia/Vo51o/src/stdio.jl#line=276)
     [14] updateProgress!(p::Progress; showvalues::Vector{Tuple{Symbol, Any}}, truncate_lines::Bool, valuecolor::Symbol, offset::Int64, keep::Bool, desc::Nothing, ignore_predictor::Bool, color::Symbol, max_steps::Int64)
        @ ProgressMeter [~/.julia/packages/ProgressMeter/dMfiC/src/ProgressMeter.jl:250](http://localhost:8888/home/reedf/.julia/packages/ProgressMeter/dMfiC/src/ProgressMeter.jl#line=249)
     [15] (::ProgressMeter.var"#15#16"{Int64, @Kwargs{showvalues::Vector{Tuple{Symbol, Any}}}, Progress})()
        @ ProgressMeter [~/.julia/packages/ProgressMeter/dMfiC/src/ProgressMeter.jl:473](http://localhost:8888/home/reedf/.julia/packages/ProgressMeter/dMfiC/src/ProgressMeter.jl#line=472)
     [16] #12
        @ [~/.julia/packages/ProgressMeter/dMfiC/src/ProgressMeter.jl:454](http://localhost:8888/home/reedf/.julia/packages/ProgressMeter/dMfiC/src/ProgressMeter.jl#line=453) [inlined]
     [17] lock(f::ProgressMeter.var"#12#13"{ProgressMeter.var"#15#16"{Int64, @Kwargs{showvalues::Vector{Tuple{Symbol, Any}}}, Progress}}, l::ReentrantLock)
        @ Base ./lock.jl:229
     [18] lock_if_threading(f::ProgressMeter.var"#15#16"{Int64, @Kwargs{showvalues::Vector{Tuple{Symbol, Any}}}, Progress}, p::Progress)
        @ ProgressMeter [~/.julia/packages/ProgressMeter/dMfiC/src/ProgressMeter.jl:453](http://localhost:8888/home/reedf/.julia/packages/ProgressMeter/dMfiC/src/ProgressMeter.jl#line=452)
     [19] #next!#14
        @ [~/.julia/packages/ProgressMeter/dMfiC/src/ProgressMeter.jl:471](http://localhost:8888/home/reedf/.julia/packages/ProgressMeter/dMfiC/src/ProgressMeter.jl#line=470) [inlined]

Any help or suggestions on how I could troubleshoot this would be appreciated.

@MarcMush
Copy link
Collaborator

should be fixed by #322

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

2 participants