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

InitError: ConcurrencyViolationError #190

Closed
MichaelHatherly opened this issue Oct 9, 2024 · 2 comments · Fixed by #191
Closed

InitError: ConcurrencyViolationError #190

MichaelHatherly opened this issue Oct 9, 2024 · 2 comments · Fixed by #191
Assignees
Labels
bug Something isn't working

Comments

@MichaelHatherly
Copy link
Collaborator

Julia 1.11 results in:

  Got exception outside of a @test
  Remote exception from Malt.Worker on port 9478 with PID 29478:

  InitError: ConcurrencyViolationError("deadlock detected in loading QuartoNotebookWorker -> QuartoNotebookWorker")
  Stacktrace:
    [1] start_loading(modkey::Base.PkgId, build_id::UInt128, stalecheck::Bool)
      @ Base ./loading.jl:2048
    [2] __require_prelocked(uuidkey::Base.PkgId, env::String)
      @ Base ./loading.jl:2295
    [3] #invoke_in_world#3
      @ ./essentials.jl:1088 [inlined]
    [4] invoke_in_world
      @ ./essentials.jl:1085 [inlined]
    [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
      @ Base ./loading.jl:2287
    [6] macro expansion
      @ ./loading.jl:2226 [inlined]
    [7] macro expansion
      @ ./lock.jl:273 [inlined]
    [8] __require(into::Module, mod::Symbol)
      @ Base ./loading.jl:2183
    [9] #invoke_in_world#3
      @ ./essentials.jl:1088 [inlined]
   [10] invoke_in_world
      @ ./essentials.jl:1085 [inlined]
   [11] require(into::Module, mod::Symbol)
      @ Base ./loading.jl:2176
   [12] top-level scope
      @ ~/pumas/QuartoNotebookRunner/src/QuartoNotebookWorker/src/NotebookState.jl:47
   [13] eval
      @ ./boot.jl:430 [inlined]
   [14] define_notebook_module!(root::Module)
      @ QuartoNotebookWorker.NotebookState ~/pumas/QuartoNotebookRunner/src/QuartoNotebookWorker/src/NotebookState.jl:53
   [15] define_notebook_module!
      @ ~/pumas/QuartoNotebookRunner/src/QuartoNotebookWorker/src/NotebookState.jl:25 [inlined]
   [16] __init__()
      @ QuartoNotebookWorker.NotebookState ~/pumas/QuartoNotebookRunner/src/QuartoNotebookWorker/src/NotebookState.jl:15
   [17] run_module_init(mod::Module, i::Int64)
      @ Base ./loading.jl:1336
   [18] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
      @ Base ./loading.jl:1324
   [19] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any}, ignore_native::Bool; register::Bool)
      @ Base ./loading.jl:1213
   [20] _include_from_serialized
      @ ./loading.jl:1169 [inlined]
   [21] _tryrequire_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String)
      @ Base ./loading.jl:1892
   [22] _require(pkg::Base.PkgId, env::Nothing)
      @ Base ./loading.jl:2492
   [23] __require_prelocked(uuidkey::Base.PkgId, env::Nothing)
      @ Base ./loading.jl:2300
   [24] #invoke_in_world#3
      @ ./essentials.jl:1088 [inlined]
   [25] invoke_in_world
      @ ./essentials.jl:1085 [inlined]
   [26] _require_prelocked
      @ ./loading.jl:2287 [inlined]
   [27] _require_prelocked
      @ ./loading.jl:2286 [inlined]
   [28] macro expansion
      @ ./lock.jl:273 [inlined]
   [29] require(uuidkey::Base.PkgId)
      @ Base ./loading.jl:2283
   [30] #7
      @ ~/pumas/QuartoNotebookRunner/src/worker.jl:8 [inlined]
   [31] task_local_storage(body::var"#7#9", key::Symbol, val::Dict{String, Any})
      @ Base ./task.jl:315
   [32] top-level scope
      @ ~/pumas/QuartoNotebookRunner/src/worker.jl:7
   [33] eval
      @ ./boot.jl:430 [inlined]
   [34] (::var"#1#2"{Sockets.TCPSocket, UInt64, Bool, @Kwargs{}, Tuple{Module, Expr}, typeof(Core.eval)})()
      @ Main ~/.julia/packages/Malt/YJ2Ml/src/worker.jl:120

Likely some of the notebook module init code will need to be adjusted.

First reported in quarto-dev/quarto-cli#11013.

@cscheid
Copy link

cscheid commented Oct 22, 2024

Wheee this is awesome 🎉 - Is this in a release so we can bump the dependency back on Quarto itself? If not, do you have a guess as to when that would happen? We'd love to ship 1.6 with this fix, but that's coming up soon, in two to three weeks.

@MichaelHatherly
Copy link
Collaborator Author

It is in https://github.com/PumasAI/QuartoNotebookRunner.jl/releases/tag/v0.11.5 so updating upstream to that should resolve this for users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants