Help me figure out where to file this bug?

I’m summarizing some data (that I can’t show you, it’s part of a lawsuit) and I’m running the following command through Query.jl… if I leave out the part uniquen = length(unique(_.customer_id)) everything works, but if I put that in there… I get the following backtrack segfault in Julia 1.5.2

It looks like this is caused by calling “unique”, but I’m not sure where I file the bug?

julia> monthlyrev = trans |> @filter(!ismissing(_.customer_id)) |> @mutate(date=Date(_.available_on)) |> 
           @mutate(yrmon = Date(year(_.date),month(_.date),15)) |> 
           @groupby(_.yrmon) |> @map({month=key(_), uniquen = length(unique(_.customer_id)),
                                      totalgross= float(scalefactor * sum(_.gross))}) |> DataFrame

signal (11): Segmentation fault
in expression starting at REPL[18]:1
jl_egal at /buildworker/worker/package_linux64/build/src/builtins.c:171
ht_keyindex at ./dict.jl:289
haskey at ./dict.jl:535 [inlined]
in at ./set.jl:56 [inlined]
unique_from at ./set.jl:155 [inlined]
unique at ./set.jl:135
_unique_dims at ./multidimensional.jl:1474 [inlined]
#unique#450 at ./multidimensional.jl:1472 [inlined]
unique at ./multidimensional.jl:1472 [inlined]
#73 at /home/dlakelan/.julia/packages/Query/85Sw7/src/query_translation.jl:58 [inlined]
iterate at /home/dlakelan/.julia/packages/QueryOperators/gDUos/src/enumerable/enumerable_map.jl:25 [inlined]
iterate at /home/dlakelan/.julia/packages/Tables/Eti9i/src/tofromdatavalues.jl:53 [inlined]
iterate at ./iterators.jl:139 [inlined]
buildcolumns at /home/dlakelan/.julia/packages/Tables/Eti9i/src/fallbacks.jl:127 [inlined]
columns at /home/dlakelan/.julia/packages/Tables/Eti9i/src/fallbacks.jl:237 [inlined]
#DataFrame#572 at /home/dlakelan/.julia/packages/DataFrames/cdZCk/src/other/tables.jl:43
DataFrame at /home/dlakelan/.julia/packages/DataFrames/cdZCk/src/other/tables.jl:34
unknown function (ip: 0x7f3290129e67)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2231 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2398
|> at ./operators.jl:834
unknown function (ip: 0x7f3290125235)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2231 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2398
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1690 [inlined]
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:117
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:206
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:157 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:566
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:660
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:840
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:790
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/toplevel.c:883
eval at ./boot.jl:331
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2214 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2398
eval_user_input at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:134
repl_backend_loop at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:195
start_repl_backend at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:180
#run_repl#37 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:292
run_repl at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:288
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2231 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2398
#807 at ./client.jl:399
jfptr_YY.807_64838.clone_1 at /home/dlakelan/Download/julia-1.5.2/lib/julia/sys.so (unknown line)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2214 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2398
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1690 [inlined]
do_apply at /buildworker/worker/package_linux64/build/src/builtins.c:655
jl_f__apply_latest at /buildworker/worker/package_linux64/build/src/builtins.c:705
#invokelatest#1 at ./essentials.jl:710 [inlined]
invokelatest at ./essentials.jl:709 [inlined]
run_main_repl at ./client.jl:383
exec_options at ./client.jl:313
_start at ./client.jl:506
jfptr__start_60376.clone_1 at /home/dlakelan/Download/julia-1.5.2/lib/julia/sys.so (unknown line)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2214 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2398
jl_apply at /buildworker/worker/package_linux64/build/ui/../src/julia.h:1690 [inlined]
true_main at /buildworker/worker/package_linux64/build/ui/repl.c:106
main at /buildworker/worker/package_linux64/build/ui/repl.c:227
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
_start at /home/dlakelan/bin/julia (unknown line)
Allocations: 109396074 (Pool: 109358314; Big: 37760); GC: 103

Also note that if I do: uniquen = length(unique(Symbol.(_.customer_id))) so that I’m uniquing symbols instead of strings… it works fine.

Without data or a MWE (minimal working example) to reproduce this error, opening an issue is probably not very usefull.
Julia crashes are typically reported here Issues · JuliaLang/julia · GitHub

1 Like

I’m happy to try to create a MWE without the confidential data, but it would be helpful to have a better idea of what the heck is going on in this backtrace. It seems like the segfault occurs within unique, so I could maybe try to trigger it within the unique function itself without all the other junk?

wdyt?

My guess is that it is complex to build a MWE in this case. I think it would be easiest to transform your existing data into something you can share.

1 Like