Skip to content

Error "redefinition of constant attr_list" from Revise.track(Base) #677

@mcabbott

Description

@mcabbott

I'm getting an error I haven't seen reported, when trying to use Revise to track changes in Julia itself:

  | | |_| | | | (_| |  |  Version 1.9.0-DEV.252 (2022-03-26)
 _/ |\__'_|_|_|\__'_|  |  Commit 9d31f6a8d9 (0 days old master)
|__/                   |

julia> versioninfo()
Julia Version 1.9.0-DEV.252
Commit 9d31f6a8d9 (2022-03-26 20:08 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.1.0)
  CPU: 8 × Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, apple-m1)
  Threads: 4 on 4 virtual cores
Environment:
  JULIA_NUM_THREADS = 4
  JULIA_PKG_USE_CLI_GIT = true
  JULIA_PKG_SERVER_REGISTRY_PREFERENCE = eager

(@v1.9) pkg> activate --temp
  Activating new project at `/var/folders/yq/4p2zwd614y59gszh7y9ypyhh0000gn/T/jl_E9glhC`

(jl_E9glhC) pkg> up
    Updating registry at `~/.julia/registries/General.toml`
  No Changes to `/private/var/folders/yq/4p2zwd614y59gszh7y9ypyhh0000gn/T/jl_E9glhC/Project.toml`
  No Changes to `/private/var/folders/yq/4p2zwd614y59gszh7y9ypyhh0000gn/T/jl_E9glhC/Manifest.toml`

(jl_E9glhC) pkg> add Revise
   Resolving package versions...
    Updating `/private/var/folders/yq/4p2zwd614y59gszh7y9ypyhh0000gn/T/jl_E9glhC/Project.toml`
  [295af30f] + Revise v3.3.3
    Updating `/private/var/folders/yq/4p2zwd614y59gszh7y9ypyhh0000gn/T/jl_E9glhC/Manifest.toml`
  [da1fd8a2] + CodeTracking v1.0.8
  [aa1ae85d] + JuliaInterpreter v0.9.11
  [6f1432cf] + LoweredCodeUtils v2.2.1
  [bac558e1] + OrderedCollections v1.4.1
  [ae029012] + Requires v1.3.0
  [295af30f] + Revise v3.3.3
  [0dad84c5] + ArgTools v1.1.1
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [8ba89e20] + Distributed
  [f43a241f] + Downloads v1.6.0
  [7b1f6079] + FileWatching
  [b77e0a4c] + InteractiveUtils
  [b27032c2] + LibCURL v0.6.3
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [ca575930] + NetworkOptions v1.2.0
  [44cfe95a] + Pkg v1.8.0
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA v0.7.0
  [9e88b42a] + Serialization
  [6462fe0b] + Sockets
  [fa267f1f] + TOML v1.0.0
  [a4e569a6] + Tar v1.10.0
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
  [deac9b47] + LibCURL_jll v7.81.0+0
  [29816b5a] + LibSSH2_jll v1.10.2+0
  [c8ffd9c3] + MbedTLS_jll v2.28.0+0
  [14a3606d] + MozillaCACerts_jll v2022.2.1
  [83775a58] + Zlib_jll v1.2.12+1
  [8e850ede] + nghttp2_jll v1.41.0+1
  [3f19e933] + p7zip_jll v16.2.1+1
Precompiling project...
  2 dependencies successfully precompiled in 1 seconds. 7 already precompiled.

julia> using Revise; Revise.track(Base)

julia> 1+1
WARNING: redefinition of constant attr_list. This may fail, cause incorrect answers, or produce other errors.

Then it hangs. Sometimes it gets to Error showing value of type ERROR: and then nothing.

For definiteness this is with JuliaLang/julia#43334, newly rebased. The PR does not change anything very deep. I don't know what attr_list is; I think I remember seeing this complaint before, but it still worked.

Edit: In fact I get the same error on master, thus no changes for Revise to handle at all:

julia> using Revise; Revise.track(Base)

julia> 1+1
WARNING: redefinition of constant attr_list. This may fail, cause incorrect answers, or produce other errors.
Error showing value of type ERROR: 
^C^C^C^C^C^C^C^C^C^C^C^C^C^CWARNING: Force throwing a SIGINT
fatal: error thrown and no exception handler available.
InterruptException()
cong at /Users/me/.julia/dev/julia/src/./julia_internal.h:1127 [inlined]
jl_rand_ptls at /Users/me/.julia/dev/julia/src/partr.c:75
cong at ./partr.jl:31 [inlined]
multiq_insert at ./partr.jl:83
enq_work at ./task.jl:746
#schedule#612 at ./task.jl:808
schedule##kw at ./task.jl:799 [inlined]
notify at ./condition.jl:148
#notify#585 at ./condition.jl:142 [inlined]
notify at ./condition.jl:142 [inlined]
notify at ./condition.jl:142 [inlined]
task_done_hook at ./task.jl:623
jfptr_task_done_hook_53858 at /Users/me/.julia/dev/julia/usr/lib/julia/sys.dylib (unknown line)
_jl_invoke at /Users/me/.julia/dev/julia/src/gf.c:0 [inlined]
ijl_apply_generic at /Users/me/.julia/dev/julia/src/gf.c:2549
jl_apply at /Users/me/.julia/dev/julia/src/./julia.h:1833 [inlined]
jl_finish_task at /Users/me/.julia/dev/julia/src/task.c:254
start_task at /Users/me/.julia/dev/julia/src/task.c:942
┌ Warning: temp cleanup
│   exception =
│    schedule: Task not runnable
│    Stacktrace:
│      [1] error(s::String)
│        @ Base ~/.julia/dev/julia/base/error.jl:35
│      [2] enq_work(t::Task)
│        @ Base ~/.julia/dev/julia/base/task.jl:726
│      [3] yield
│        @ ./task.jl:841 [inlined]
│      [4] yield
│        @ ./task.jl:839 [inlined]
│      [5] Channel{Tuple{String, Vector{String}, Vector{String}}}(func::Base.Filesystem.var"#28#31"{String}, size::Int64; taskref::Nothing, spawn::Bool)
│        @ Base ~/.julia/dev/julia/base/channels.jl:140
│      [6] Channel (repeats 2 times)
│        @ ./channels.jl:133 [inlined]
│      [7] #walkdir#27
│        @ ./file.jl:963 [inlined]
│      [8] prepare_for_deletion(path::String)
│        @ Base.Filesystem ~/.julia/dev/julia/base/file.jl:507
│      [9] temp_cleanup_purge(; force::Bool)
│        @ Base.Filesystem ~/.julia/dev/julia/base/file.jl:542
│     [10] (::Base.var"#885#886")()
│        @ Base ./initdefs.jl:351
│     [11] _atexit()
│        @ Base ~/.julia/dev/julia/base/initdefs.jl:372
└ @ Base.Filesystem file.jl:547
UndefVarError: rn1 not defined
atexit hook threw an error: UndefVarError(var=:rn1)
ijl_undefined_var_error at /Users/me/.julia/dev/julia/src/rtutils.c:132
multiq_deletemin at ./partr.jl:135
trypoptask at ./task.jl:925
poptask at ./task.jl:933
wait at ./task.jl:944
uv_write at ./stream.jl:1043
unsafe_write at ./stream.jl:1115
write at ./strings/io.jl:244 [inlined]
print at ./strings/io.jl:246 [inlined]
showerror at ./errorshow.jl:163
unknown function (ip: 0x15619813b)
_jl_invoke at /Users/me/.julia/dev/julia/src/gf.c:0 [inlined]
ijl_apply_generic at /Users/me/.julia/dev/julia/src/gf.c:2549
_atexit at ./initdefs.jl:374
jfptr__atexit_28624 at /Users/me/.julia/dev/julia/usr/lib/julia/sys.dylib (unknown line)
_jl_invoke at /Users/me/.julia/dev/julia/src/gf.c:0 [inlined]
ijl_apply_generic at /Users/me/.julia/dev/julia/src/gf.c:2549
jl_apply at /Users/me/.julia/dev/julia/src/./julia.h:1833 [inlined]
ijl_atexit_hook at /Users/me/.julia/dev/julia/src/init.c:219
ijl_exit at /Users/me/.julia/dev/julia/src/jl_uv.c:639
ijl_no_exc_handler at /Users/me/.julia/dev/julia/src/task.c:606
jl_finish_task at /Users/me/.julia/dev/julia/src/task.c:257
start_task at /Users/me/.julia/dev/julia/src/task.c:942

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions