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

using DataFrames; methods(hash) crashes the repl #28983

Closed
jamii opened this issue Aug 31, 2018 · 6 comments
Closed

using DataFrames; methods(hash) crashes the repl #28983

jamii opened this issue Aug 31, 2018 · 6 comments
Assignees
Labels
domain:types and dispatch Types, subtyping and method dispatch kind:bug Indicates an unexpected problem or unintended behavior

Comments

@jamii
Copy link
Contributor

jamii commented Aug 31, 2018

jamie@machine:~/reltron/backend$ julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.0.0 (2018-08-08)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> versioninfo()
Julia Version 1.0.0
Commit 5d4eaca0c9 (2018-08-08 20:58 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E3-1505M v5 @ 2.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, skylake)

(v1.0) pkg> activate ./

(Reltron) pkg> st
Project Reltron v0.1.0
    Status `Project.toml`
  [a93c6f00] DataFrames v0.13.1
  [682c06a0] JSON v0.19.0
  [0aa819cd] SQLite v0.6.0
  [8dfed614] Test 
  [cf7118a7] UUIDs 

julia> using DataFrames

julia> methods(hash)
# 62 methods for generic function "hash":
[1] hash(::Tuple{}, h::UInt64) in Base at tuple.jl:315
[2] hash(w::WeakRef, h::UInt64) in Base at hashing.jl:19
[3] hash(x::Expr, h::UInt64) in Base at hashing.jl:72
[4] hash(x::QuoteNode, h::UInt64) in Base at hashing.jl:73
[5] hash(x::UInt64, h::UInt64) in Base at float.jl:561
[6] hash(x::Int64, h::UInt64) in Base at float.jl:562
[7] hash(x::Float64, h::UInt64) in Base at float.jl:563
[8] hash(x::Float32, h::UInt64) in Base at float.jl:566
[9] hash(x::Char, h::UInt64) in Base at char.jl:196
[10] hash(r::Regex, h::UInt64) in Base at regex.jl:435
[11] hash(x::Base.Prehashed) in Base at multidimensional.jl:1307
[12] hash(v::VersionNumber, h::UInt64) in Base at version.jl:195
[13] hash(x::Cmd, h::UInt64) in Base at process.jl:70
[14] hash(x::Base.AndCmds, h::UInt64) in Base at process.jl:92
[15] hash(s::Base.SecretBuffer, h::UInt64) in Base at secretbuffer.jl:109
[16] hash(x::Float16, h::UInt64) in Base at hashing2.jl:169
[17] hash(frame::Base.StackTraces.StackFrame, h::UInt64) in Base.StackTraces at stacktraces.jl:90
[18] hash(a::Base.SHA1, h::UInt64) in Base at loading.jl:100
[19] hash(pkg::Base.PkgId, h::UInt64) in Base at loading.jl:169
[20] hash(id::LibGit2.GitHash, h::UInt64) in LibGit2 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/LibGit2/src/oid.jl:185
[21] hash(cred::LibGit2.GitCredential, h::UInt64) in LibGit2 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/LibGit2/src/gitcredential.jl:35
[22] hash(x::Dates.Year, h::UInt64) in Dates at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Dates/src/periods.jl:455
[23] hash(x::Dates.Month, h::UInt64) in Dates at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Dates/src/periods.jl:456
[24] hash(s::Random.DSFMT.DSFMT_state, h::UInt64) in Random.DSFMT at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Random/src/DSFMT.jl:42
[25] hash(r::Random.MersenneTwister, h::UInt64) in Random at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Random/src/RNGs.jl:162
[26] hash(r::Distributed.RRID, h::UInt64) in Distributed at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Distributed/src/messages.jl:15
[27] hash(r::Pkg.Types.VersionBound, h::UInt64) in Pkg.Types at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/versions.jl:88
[28] hash(s::Pkg.Types.VersionSpec, h::UInt64) in Pkg.Types at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/versions.jl:232
[29] hash(f::Pkg.Types.Fixed, h::UInt64) in Pkg.Types at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Types.jl:85
[30] hash(i::Pkg.Pkg2.Pkg2Types.VersionInterval, h::UInt64) in Pkg.Pkg2.Pkg2Types at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Pkg2/types.jl:25
[31] hash(s::Pkg.Pkg2.Pkg2Types.VersionSet, h::UInt64) in Pkg.Pkg2.Pkg2Types at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Pkg2/types.jl:158
[32] hash(s::DataStructures.IntSet, h::UInt64) in DataStructures at /home/jamie/.julia/packages/DataStructures/CImpO/src/int_set.jl:245
[33] hash(t::Tuple{Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Any,Vararg{Any,N}} where N, h::UInt64) in Base at tuple.jl:318
[34] hash(t::Tuple, h::UInt64) in Base at tuple.jl:316
[35] hash(p::Pair, h::UInt64) in Base at pair.jl:52
[36] hash(A::AbstractArray, h::UInt64) in Base at abstractarray.jl:2072
[37] hash(a::AbstractDict, h::UInt64) in Base at abstractdict.jl:462
[38] hash(x::NamedTuple, h::UInt64) in Base at namedtuple.jl:168
[39] hash(x::Union{Bool, Int16, Int32, Int8, UInt16, UInt32, UInt8}, h::UInt64) in Base at float.jl:565
[40] hash(z::Complex, h::UInt64) in Base at complex.jl:243
[41] hash(s::AbstractSet, h::UInt64) in Base at set.jl:292
[42] hash(x::AbstractChar, h::UInt64) in Base at char.jl:202
[43] hash(g::Base.Unicode.GraphemeIterator, h::UInt64) in Base.Unicode at strings/unicode.jl:671
[44] hash(ci::CartesianIndex, h::UInt64) in Base.IteratorsMD at multidimensional.jl:134
[45] hash(x::Rational{#s549} where #s549<:Union{Int16, Int32, Int64, Int8, UInt16, UInt32, UInt64, UInt8}, h::UInt64) in Base at hashing2.jl:147
[46] hash(x::Irrational, h::UInt64) in Base at irrationals.jl:127
[47] hash(x::Real, h::UInt64) in Base at hashing2.jl:32
[48] hash(s::Union{SubString{String}, String}, h::UInt64) in Base at hashing2.jl:177
[49] hash(x::Union{CategoricalString{R}, CategoricalValue{T,R} where T} where R, h::UInt64) in CategoricalArrays at /home/jamie/.julia/packages/CategoricalArrays/04bks/src/value.jl:135
[50] Error showing value of type Base.MethodList:
ERROR: UndefVarError: T not defined
Stacktrace:
 [1] show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::Type{SYSTEM: show(lasterr) caused an error
UndefVarError(:T)

Stacktrace:
 [1] show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::Type{ERROR: UndefVarError: T not defined
Stacktrace:
 [1] show(::IOContext{REPL.Terminals.TTYTerminal}, ::Type{fatal: error thrown and no exception handler available.
UndefVarError(var=:T)
rec_backtrace at /buildworker/worker/package_linux64/build/src/stackwalk.c:94
record_backtrace at /buildworker/worker/package_linux64/build/src/task.c:246
jl_throw at /buildworker/worker/package_linux64/build/src/task.c:577
jl_undefined_var_error at /buildworker/worker/package_linux64/build/src/rtutils.c:134
show at /home/jamie/.julia/packages/WeakRefStrings/51hoN/src/WeakRefStrings.jl:56
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1829
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2182
show_datatype at ./show.jl:526
show at ./show.jl:436
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2182
print at ./strings/io.jl:31
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2182
print at ./strings/io.jl:42
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2182
show_tuple_as_call at ./show.jl:1490
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1829
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2182
show_spec_linfo at ./stacktraces.jl:261
#show#9 at ./stacktraces.jl:272
unknown function (ip: 0x7f8904210583)
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1829
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2182
#show at ./none:0 [inlined]
#show_trace_entry#631 at ./errorshow.jl:469
unknown function (ip: 0x7f890420fe4c)
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1829
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2182
#show_trace_entry at ./none:0
unknown function (ip: 0x7f890420fb48)
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1829
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2182
show_backtrace at ./errorshow.jl:572
#showerror#613 at ./errorshow.jl:79
unknown function (ip: 0x7f890420d1c7)
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1829
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2182
showerror at ./errorshow.jl:74 [inlined]
display_error at ./client.jl:99
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1829
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2182
display_error at ./client.jl:102
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1829
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2182
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1536 [inlined]
jl_f__apply at /buildworker/worker/package_linux64/build/src/builtins.c:556
jl_f__apply_latest at /buildworker/worker/package_linux64/build/src/builtins.c:594
#invokelatest#1 at ./essentials.jl:686 [inlined]
invokelatest at ./essentials.jl:685 [inlined]
_start at ./client.jl:423
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2182
unknown function (ip: 0x401ae8)
unknown function (ip: 0x401513)
__libc_start_main at /build/glibc-itYbWN/glibc-2.26/csu/../csu/libc-start.c:308
unknown function (ip: 0x4015b4)
@KristofferC KristofferC added the kind:bug Indicates an unexpected problem or unintended behavior label Sep 3, 2018
@JeffBezanson
Copy link
Sponsor Member

This is partly due to type treason in WeakRefStrings, where it defines

Base.show(io::IO, ::Type{WeakRefString{T}}) where {T} = print(io, "WeakRefString{$T}")

On our side, we need to change how we dispatch (invalid) types with free variables to help avoid this.

@quinnj
Copy link
Member

quinnj commented Sep 4, 2018

alt text

@AzamatB
Copy link
Contributor

AzamatB commented Oct 9, 2019

bump, I was hit by something like this

@quinnj
Copy link
Member

quinnj commented Oct 9, 2019

FWIW, the treasonous method has since been removed from WeakRefStrings.jl. @AzamatB, can you provide more details about your scenario? Did it involve loading DataFrames?

@KristofferC
Copy link
Sponsor Member

I think this was FluxML/Flux.jl#629 (comment).

@AzamatB
Copy link
Contributor

AzamatB commented Oct 10, 2019

Yes, seems my issue is unrelated to this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:types and dispatch Types, subtyping and method dispatch kind:bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

5 participants