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

World age assertion failure after aggressively calling disable_sigint #29498

Closed
tkf opened this issue Oct 3, 2018 · 7 comments
Closed

World age assertion failure after aggressively calling disable_sigint #29498

tkf opened this issue Oct 3, 2018 · 7 comments

Comments

@tkf
Copy link
Member

tkf commented Oct 3, 2018

In JuliaPy/PyCall.jl#574 I wrote a PR to wrap every ccall which invokes Python runtime with disable_sigint. It seems that this is the right thing to do considering why disable_sigint exists (and also because the main purpose of the PR was to use reenable_sigint inside a callback).

While using this branch, I encountered a bug causing segfaults when calling it from PyJulia and I couldn't fix it. It occurs when I try to evaluate:

import DiffEqBase  # not used but it was necessary somehow...
show(IOBuffer(), "text/plain", @doc Base.Enum)  # must *not* have the docstring

from PyJulia. I ran git bisect to find the change causing the segfault but the identified patch looks so harmless and identical to many others JuliaPy/PyCall.jl#574 (comment). I appreciate if core dev can have a look at it. It happens at Julia's internal and I don't know what is going on.

Here is the reproducible environment to invoke the segfault. You only need to run:

git clone https://gist.github.com/tkf/5f14bcc6957641be44f3bdba24e83a8c segfault
cd segfault
make

which is supposed to set up an isolated Julia and Python environments and run the script inside of it. It probably does not work when you use conda or Debian family to install python3. Please let me know in such case.

As a side note, I couldn't turn the MWE to a Julia script. It seems that the Julia runtime has to be started via libjulia. (So I apologize in advance that the entry point is python3...)

Here is a stacktrace:

signal (11): Segmentation fault
in expression starting at no file:0
jl_compile_linfo at /home/takafumi/repos/watch/julia/src/codegen.cpp:1173
emit_invoke at /home/takafumi/repos/watch/julia/src/codegen.cpp:3068
emit_expr at /home/takafumi/repos/watch/julia/src/codegen.cpp:3863
emit_ssaval_assign at /home/takafumi/repos/watch/julia/src/codegen.cpp:3585
emit_stmtpos at /home/takafumi/repos/watch/julia/src/codegen.cpp:3771 [inlined]
emit_function at /home/takafumi/repos/watch/julia/src/codegen.cpp:6203
jl_compile_linfo at /home/takafumi/repos/watch/julia/src/codegen.cpp:1141
emit_invoke at /home/takafumi/repos/watch/julia/src/codegen.cpp:3068
emit_expr at /home/takafumi/repos/watch/julia/src/codegen.cpp:3863
emit_ssaval_assign at /home/takafumi/repos/watch/julia/src/codegen.cpp:3585
emit_stmtpos at /home/takafumi/repos/watch/julia/src/codegen.cpp:3771 [inlined]
emit_function at /home/takafumi/repos/watch/julia/src/codegen.cpp:6203
jl_compile_linfo at /home/takafumi/repos/watch/julia/src/codegen.cpp:1141
jl_compile_method_internal at /home/takafumi/repos/watch/julia/src/gf.c:1808
jl_fptr_trampoline at /home/takafumi/repos/watch/julia/src/gf.c:1842
jl_apply_generic at /home/takafumi/repos/watch/julia/src/gf.c:2198
#with_output_color#660 at ./util.jl:366
unknown function (ip: 0x7f0e3586af27)
jl_fptr_trampoline at /home/takafumi/repos/watch/julia/src/gf.c:1843
jl_apply_generic at /home/takafumi/repos/watch/julia/src/gf.c:2198
with_output_color at ./util.jl:364 [inlined]
_term_header at /home/takafumi/repos/watch/julia/usr/share/julia/stdlib/v1.1/Markdown/src/render/terminal/render.jl:84
term at /home/takafumi/repos/watch/julia/usr/share/julia/stdlib/v1.1/Markdown/src/render/terminal/render.jl:101
unknown function (ip: 0x7f0e3586a724)
jl_fptr_trampoline at /home/takafumi/repos/watch/julia/src/gf.c:1843
jl_apply_generic at /home/takafumi/repos/watch/julia/src/gf.c:2198
term at /home/takafumi/repos/watch/julia/usr/share/julia/stdlib/v1.1/Markdown/src/render/terminal/render.jl:11
term at /home/takafumi/repos/watch/julia/usr/share/julia/stdlib/v1.1/Markdown/src/render/terminal/render.jl:17 [inlined]
term at /home/takafumi/repos/watch/julia/usr/share/julia/stdlib/v1.1/Markdown/src/render/terminal/render.jl:17 [inlined]
show at /home/takafumi/repos/watch/julia/usr/share/julia/stdlib/v1.1/Markdown/src/render/terminal/render.jl:169
jl_fptr_trampoline at /home/takafumi/repos/watch/julia/src/gf.c:1843
jl_apply_generic at /home/takafumi/repos/watch/julia/src/gf.c:2198
show at ./multimedia.jl:79
jl_fptr_trampoline at /home/takafumi/repos/watch/julia/src/gf.c:1843
jl_apply_generic at /home/takafumi/repos/watch/julia/src/gf.c:2198
do_call at /home/takafumi/repos/watch/julia/src/interpreter.c:323
eval_value at /home/takafumi/repos/watch/julia/src/interpreter.c:411
eval_stmt_value at /home/takafumi/repos/watch/julia/src/interpreter.c:362 [inlined]
eval_body at /home/takafumi/repos/watch/julia/src/interpreter.c:750
jl_interpret_toplevel_thunk_callback at /home/takafumi/repos/watch/julia/src/interpreter.c:880
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7f0e486ce26f)
unknown function (ip: 0x2)
jl_interpret_toplevel_thunk at /home/takafumi/repos/watch/julia/src/interpreter.c:889
jl_toplevel_eval_flex at /home/takafumi/repos/watch/julia/src/toplevel.c:818
jl_toplevel_eval_in at /home/takafumi/repos/watch/julia/src/builtins.c:622
jl_eval_string at /home/takafumi/repos/watch/julia/src/jlapi.c:95
ffi_call_unix64 at /usr/lib/libffi.so.6 (unknown line)
ffi_call at /usr/lib/libffi.so.6 (unknown line)
_ctypes_callproc at /usr/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so (unknown line)
unknown function (ip: 0x7f0e58e4d63f)
_PyObject_FastCallKeywords at /usr/lib/libpython3.7m.so.1.0 (unknown line)
_PyEval_EvalFrameDefault at /usr/lib/libpython3.7m.so.1.0 (unknown line)
_PyFunction_FastCallKeywords at /usr/lib/libpython3.7m.so.1.0 (unknown line)
_PyEval_EvalFrameDefault at /usr/lib/libpython3.7m.so.1.0 (unknown line)
_PyFunction_FastCallKeywords at /usr/lib/libpython3.7m.so.1.0 (unknown line)
_PyEval_EvalFrameDefault at /usr/lib/libpython3.7m.so.1.0 (unknown line)
_PyFunction_FastCallKeywords at /usr/lib/libpython3.7m.so.1.0 (unknown line)
_PyEval_EvalFrameDefault at /usr/lib/libpython3.7m.so.1.0 (unknown line)
_PyEval_EvalCodeWithName at /usr/lib/libpython3.7m.so.1.0 (unknown line)
PyEval_EvalCodeEx at /usr/lib/libpython3.7m.so.1.0 (unknown line)
PyEval_EvalCode at /usr/lib/libpython3.7m.so.1.0 (unknown line)
unknown function (ip: 0x7f0e5988c76f)
PyRun_FileExFlags at /usr/lib/libpython3.7m.so.1.0 (unknown line)
PyRun_SimpleFileExFlags at /usr/lib/libpython3.7m.so.1.0 (unknown line)
unknown function (ip: 0x7f0e59891a8e)
_Py_UnixMain at /usr/lib/libpython3.7m.so.1.0 (unknown line)
__libc_start_main at /usr/lib/libc.so.6 (unknown line)
_start at venv/bin/python (unknown line)
Allocations: 19617387 (Pool: 19613455; Big: 3932); GC: 40
@tkf
Copy link
Member Author

tkf commented Oct 5, 2018

I tried to get the backtrace using julia-debug as suggested in the manual https://docs.julialang.org/en/latest/devdocs/backtraces/#Segfaults-when-running-a-script-1. But I couldn't make it work due to #29528.

@maleadt
Copy link
Member

maleadt commented Oct 5, 2018

You can always edit the source and disable the assertion, it's probably unrelated since it triggers as part of interpretation.

@tkf
Copy link
Member Author

tkf commented Oct 5, 2018

@maleadt Thanks! (Of course!)

Here is the output of JULIA_PROJECT=$PWD gdb -ex r --args venv/bin/python pyjulia_segfault.py ~/repos/watch/julia/usr/bin/julia-debug:

GNU gdb (GDB) 8.1.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from venv/bin/python...(no debugging symbols found)...done.
Starting program: /home/takafumi/repos/scratch/gist/5f14bcc6957641be44f3bdba24e83a8c/venv/bin/python pyjulia_segfault.py /home/takafumi/repos/watch/julia/usr/bin/julia-debug
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff10bb700 (LWP 31495)]
[New Thread 0x7fffe03dc700 (LWP 31496)]
[New Thread 0x7fffdfbdb700 (LWP 31497)]
[New Thread 0x7fffdf3da700 (LWP 31498)]
[New Thread 0x7fffdebd9700 (LWP 31499)]
[New Thread 0x7fffde3d8700 (LWP 31500)]
[New Thread 0x7fffddbd7700 (LWP 31501)]
[New Thread 0x7fffdd3d6700 (LWP 31502)]
Base.active_project() = "/home/takafumi/repos/scratch/gist/5f14bcc6957641be44f3bdba24e83a8c/Project.toml"
    Status `~/repos/scratch/gist/5f14bcc6957641be44f3bdba24e83a8c/Project.toml`
  [2b5f629d] DiffEqBase v4.26.1
  [438e738f] PyCall v1.18.4+ #0b810b5 (https://github.com/JuliaPy/PyCall.jl.git)
python: /home/takafumi/repos/watch/julia/src/codegen.cpp:1091: jl_llvm_functions_t jl_compile_linfo(jl_method_instance_t**, jl_code_info_t*, size_t, const jl_cgparams_t*): Assertion `li->min_world <= world && li->max_world >= world' failed.

Thread 1 "python" received signal SIGABRT, Aborted.
0x00007ffff7dedb5f in raise () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007ffff7dedb5f in raise () from /usr/lib/libc.so.6
#1  0x00007ffff7dd8452 in abort () from /usr/lib/libc.so.6
#2  0x00007ffff7dd8328 in __assert_fail_base.cold.0 () from /usr/lib/libc.so.6
#3  0x00007ffff7de6176 in __assert_fail () from /usr/lib/libc.so.6
#4  0x00007ffff3de2585 in jl_compile_linfo (pli=0x7fffffff7540, src=0x0, world=25095,
    params=0x7ffff40eac40 <jl_default_cgparams>) at /home/takafumi/repos/watch/julia/src/codegen.cpp:1091
#5  0x00007ffff3e089bc in emit_invoke (ctx=..., ex=0x7fffe772f490, rt=0x7fffe6582230)
    at /home/takafumi/repos/watch/julia/src/codegen.cpp:3068
#6  0x00007ffff3e0e362 in emit_expr (ctx=..., expr=0x7fffe772f490, ssaval=2)
    at /home/takafumi/repos/watch/julia/src/codegen.cpp:3863
#7  0x00007ffff3e0c776 in emit_ssaval_assign (ctx=..., idx=2, r=0x7fffe772f490)
    at /home/takafumi/repos/watch/julia/src/codegen.cpp:3585
#8  0x00007ffff3e0dad6 in emit_stmtpos (ctx=..., expr=0x7fffe772f490, ssaval_result=2)
    at /home/takafumi/repos/watch/julia/src/codegen.cpp:3771
#9  0x00007ffff3e1efab in emit_function (lam=0x7fffe6592410, src=0x7fffe78dcba0, world=25095,
    declarations=0x7fffe6592470, params=0x7ffff40eac40 <jl_default_cgparams>)
    at /home/takafumi/repos/watch/julia/src/codegen.cpp:6203
#10 0x00007ffff3de28a0 in jl_compile_linfo (pli=0x7fffffff93e0, src=0x7fffe78dcba0, world=25095,
    params=0x7ffff40eac40 <jl_default_cgparams>) at /home/takafumi/repos/watch/julia/src/codegen.cpp:1141
#11 0x00007ffff3e089bc in emit_invoke (ctx=..., ex=0x7fffe772ed50, rt=0x7fffe6581f20)
    at /home/takafumi/repos/watch/julia/src/codegen.cpp:3068
#12 0x00007ffff3e0e362 in emit_expr (ctx=..., expr=0x7fffe772ed50, ssaval=102)
    at /home/takafumi/repos/watch/julia/src/codegen.cpp:3863
#13 0x00007ffff3e0c776 in emit_ssaval_assign (ctx=..., idx=102, r=0x7fffe772ed50)
    at /home/takafumi/repos/watch/julia/src/codegen.cpp:3585
#14 0x00007ffff3e0dad6 in emit_stmtpos (ctx=..., expr=0x7fffe772ed50, ssaval_result=102)
    at /home/takafumi/repos/watch/julia/src/codegen.cpp:3771
#15 0x00007ffff3e1efab in emit_function (lam=0x7fffa99a6d90, src=0x7fffe78dc830, world=25095,
    declarations=0x7fffa99a6df0, params=0x7ffff40eac40 <jl_default_cgparams>)
    at /home/takafumi/repos/watch/julia/src/codegen.cpp:6203
#16 0x00007ffff3de28a0 in jl_compile_linfo (pli=0x7fffffffb1f8, src=0x7fffe78dc830, world=25095,
    params=0x7ffff40eac40 <jl_default_cgparams>) at /home/takafumi/repos/watch/julia/src/codegen.cpp:1141
#17 0x00007ffff3d1e501 in jl_compile_method_internal (pli=0x7fffffffb1f8, world=25095)
    at /home/takafumi/repos/watch/julia/src/gf.c:1807
#18 0x00007ffff3d1e675 in jl_fptr_trampoline (m=0x7fffa99a6d90, args=0x7fffffffb2b0, nargs=2)
    at /home/takafumi/repos/watch/julia/src/gf.c:1841
#19 0x00007ffff3d1f80a in jl_apply_generic (args=0x7fffffffb2b0, nargs=2)
    at /home/takafumi/repos/watch/julia/src/gf.c:2197
#20 0x00007fffaf66737c in julia_#with_output_color#658_-374477965 (bold=<optimized out>, f=0x7fffe289a100,
    color=<optimized out>, io=..., args...=...) at util.jl:366
#21 0x00007fffaf6674c8 in jfptr_#with_output_color#658_-374477964 ()
#22 0x00007ffff3d1e68d in jl_fptr_trampoline (m=0x7fffe4ce6410, args=0x7fffffffb5c0, nargs=6)
---Type <return> to continue, or q <return> to quit---q
 at /home/takafumi/reQuit
(gdb) f 4
#4  0x00007ffff3de2585 in jl_compile_linfo (pli=0x7fffffff7540, src=0x0, world=25095,
    params=0x7ffff40eac40 <jl_default_cgparams>) at /home/takafumi/repos/watch/julia/src/codegen.cpp:1091
1091                assert(li->min_world <= world && li->max_world >= world);
(gdb) p li->min_world
$1 = 25086
(gdb) p li->max_world
$2 = 25086
(gdb) p world
$3 = 25095
(gdb) bt
#0  0x00007ffff7dedb5f in raise () from /usr/lib/libc.so.6
#1  0x00007ffff7dd8452 in abort () from /usr/lib/libc.so.6
#2  0x00007ffff7dd8328 in __assert_fail_base.cold.0 () from /usr/lib/libc.so.6
#3  0x00007ffff7de6176 in __assert_fail () from /usr/lib/libc.so.6
#4  0x00007ffff3de2585 in jl_compile_linfo (pli=0x7fffffff7540, src=0x0, world=25095,
    params=0x7ffff40eac40 <jl_default_cgparams>) at /home/takafumi/repos/watch/julia/src/codegen.cpp:1091
#5  0x00007ffff3e089bc in emit_invoke (ctx=..., ex=0x7fffe772f490, rt=0x7fffe6582230)
    at /home/takafumi/repos/watch/julia/src/codegen.cpp:3068
#6  0x00007ffff3e0e362 in emit_expr (ctx=..., expr=0x7fffe772f490, ssaval=2)
    at /home/takafumi/repos/watch/julia/src/codegen.cpp:3863
#7  0x00007ffff3e0c776 in emit_ssaval_assign (ctx=..., idx=2, r=0x7fffe772f490)
    at /home/takafumi/repos/watch/julia/src/codegen.cpp:3585
#8  0x00007ffff3e0dad6 in emit_stmtpos (ctx=..., expr=0x7fffe772f490, ssaval_result=2)
    at /home/takafumi/repos/watch/julia/src/codegen.cpp:3771
#9  0x00007ffff3e1efab in emit_function (lam=0x7fffe6592410, src=0x7fffe78dcba0, world=25095,
    declarations=0x7fffe6592470, params=0x7ffff40eac40 <jl_default_cgparams>)
    at /home/takafumi/repos/watch/julia/src/codegen.cpp:6203
#10 0x00007ffff3de28a0 in jl_compile_linfo (pli=0x7fffffff93e0, src=0x7fffe78dcba0, world=25095,
    params=0x7ffff40eac40 <jl_default_cgparams>) at /home/takafumi/repos/watch/julia/src/codegen.cpp:1141
#11 0x00007ffff3e089bc in emit_invoke (ctx=..., ex=0x7fffe772ed50, rt=0x7fffe6581f20)
    at /home/takafumi/repos/watch/julia/src/codegen.cpp:3068
#12 0x00007ffff3e0e362 in emit_expr (ctx=..., expr=0x7fffe772ed50, ssaval=102)
    at /home/takafumi/repos/watch/julia/src/codegen.cpp:3863
#13 0x00007ffff3e0c776 in emit_ssaval_assign (ctx=..., idx=102, r=0x7fffe772ed50)
    at /home/takafumi/repos/watch/julia/src/codegen.cpp:3585
#14 0x00007ffff3e0dad6 in emit_stmtpos (ctx=..., expr=0x7fffe772ed50, ssaval_result=102)
    at /home/takafumi/repos/watch/julia/src/codegen.cpp:3771
#15 0x00007ffff3e1efab in emit_function (lam=0x7fffa99a6d90, src=0x7fffe78dc830, world=25095,
    declarations=0x7fffa99a6df0, params=0x7ffff40eac40 <jl_default_cgparams>)
    at /home/takafumi/repos/watch/julia/src/codegen.cpp:6203
#16 0x00007ffff3de28a0 in jl_compile_linfo (pli=0x7fffffffb1f8, src=0x7fffe78dc830, world=25095,
    params=0x7ffff40eac40 <jl_default_cgparams>) at /home/takafumi/repos/watch/julia/src/codegen.cpp:1141
#17 0x00007ffff3d1e501 in jl_compile_method_internal (pli=0x7fffffffb1f8, world=25095)
    at /home/takafumi/repos/watch/julia/src/gf.c:1807
#18 0x00007ffff3d1e675 in jl_fptr_trampoline (m=0x7fffa99a6d90, args=0x7fffffffb2b0, nargs=2)
    at /home/takafumi/repos/watch/julia/src/gf.c:1841
#19 0x00007ffff3d1f80a in jl_apply_generic (args=0x7fffffffb2b0, nargs=2)
    at /home/takafumi/repos/watch/julia/src/gf.c:2197
#20 0x00007fffaf66737c in julia_#with_output_color#658_-374477965 (bold=<optimized out>, f=0x7fffe289a100,
    color=<optimized out>, io=..., args...=...) at util.jl:366
#21 0x00007fffaf6674c8 in jfptr_#with_output_color#658_-374477964 ()
#22 0x00007ffff3d1e68d in jl_fptr_trampoline (m=0x7fffe4ce6410, args=0x7fffffffb5c0, nargs=6)
---Type <return> to continue, or q <return> to quit---
    at /home/takafumi/repos/watch/julia/src/gf.c:1842
#23 0x00007ffff3d1f80a in jl_apply_generic (args=0x7fffffffb5c0, nargs=6)
    at /home/takafumi/repos/watch/julia/src/gf.c:2197
#24 0x00007ffff3d17c2b in jl_apply (args=0x7fffffffb5c0, nargs=6)
    at /home/takafumi/repos/watch/julia/src/julia.h:1562
#25 0x00007ffff3d1834e in jl_invoke (meth=0x7fffe4ce6410, args=0x7fffffffb5c0, nargs=6)
    at /home/takafumi/repos/watch/julia/src/gf.c:56
#26 0x00007fffaf666d4d in with_output_color () at util.jl:364
#27 julia__term_header_-374477968 (io=..., md=..., char=3800670464, columns=114)
    at /home/takafumi/repos/watch/julia/usr/share/julia/stdlib/v1.1/Markdown/src/render/terminal/render.jl:84
#28 0x00007fffaf666b62 in julia_term_-374477969 (io=..., md=..., columns=<optimized out>)
    at /home/takafumi/repos/watch/julia/usr/share/julia/stdlib/v1.1/Markdown/src/render/terminal/render.jl:101
#29 0x00007fffaf666bd5 in jfptr_term_-374477968 ()
#30 0x00007ffff3d1e68d in jl_fptr_trampoline (m=0x7fffa9980390, args=0x7fffffffb790, nargs=4)
    at /home/takafumi/repos/watch/julia/src/gf.c:1842
#31 0x00007ffff3d1f80a in jl_apply_generic (args=0x7fffffffb790, nargs=4)
    at /home/takafumi/repos/watch/julia/src/gf.c:2197
#32 0x00007fffaf663b71 in julia_term_-374477980 (io=..., content=0x7fffe76c2e00, cols=114)
    at /home/takafumi/repos/watch/julia/usr/share/julia/stdlib/v1.1/Markdown/src/render/terminal/render.jl:11
#33 0x00007fffaf66399e in term ()
    at /home/takafumi/repos/watch/julia/usr/share/julia/stdlib/v1.1/Markdown/src/render/terminal/render.jl:17
#34 term ()
    at /home/takafumi/repos/watch/julia/usr/share/julia/stdlib/v1.1/Markdown/src/render/terminal/render.jl:17
#35 japi1_show_-374477981 (io=..., md=...)
    at /home/takafumi/repos/watch/julia/usr/share/julia/stdlib/v1.1/Markdown/src/render/terminal/render.jl:169
#36 0x00007ffff3d1e729 in jl_fptr_args (m=0x7fffe4ce4890, args=0x7fffffffb990, nargs=4)
    at /home/takafumi/repos/watch/julia/src/gf.c:1852
#37 0x00007ffff3d1e68d in jl_fptr_trampoline (m=0x7fffe4ce4890, args=0x7fffffffb990, nargs=4)
    at /home/takafumi/repos/watch/julia/src/gf.c:1842
#38 0x00007ffff3d1f80a in jl_apply_generic (args=0x7fffffffb990, nargs=4)
    at /home/takafumi/repos/watch/julia/src/gf.c:2197
#39 0x00007fffaf6638d6 in japi1_show_-374477982 (io=..., m=<optimized out>, x=...) at multimedia.jl:79
#40 0x00007ffff3d1e729 in jl_fptr_args (m=0x7fffe4ce4610, args=0x7fffffffbb00, nargs=4)
    at /home/takafumi/repos/watch/julia/src/gf.c:1852
#41 0x00007ffff3d1e68d in jl_fptr_trampoline (m=0x7fffe4ce4610, args=0x7fffffffbb00, nargs=4)
    at /home/takafumi/repos/watch/julia/src/gf.c:1842
#42 0x00007ffff3d1f80a in jl_apply_generic (args=0x7fffffffbb00, nargs=4)
    at /home/takafumi/repos/watch/julia/src/gf.c:2197
#43 0x00007fffaf6571c3 in japi1_#3_-374478040 () at none:2
#44 0x00007ffff3d1e729 in jl_fptr_args (m=0x7fffa9adb110, args=0x7fffffffbca0, nargs=1)
    at /home/takafumi/repos/watch/julia/src/gf.c:1852
#45 0x00007ffff3d1e68d in jl_fptr_trampoline (m=0x7fffa9adb110, args=0x7fffffffbca0, nargs=1)
---Type <return> to continue, or q <return> to quit---
    at /home/takafumi/repos/watch/julia/src/gf.c:1842
#46 0x00007ffff3d1f80a in jl_apply_generic (args=0x7fffffffbca0, nargs=1)
    at /home/takafumi/repos/watch/julia/src/gf.c:2197
#47 0x00007ffff3d2bcde in jl_apply (args=0x7fffffffbca0, nargs=1)
    at /home/takafumi/repos/watch/julia/src/julia.h:1562
#48 0x00007ffff3d2edf3 in jl_f__apply (F=0x0, args=0x7fffffffbe20, nargs=2)
    at /home/takafumi/repos/watch/julia/src/builtins.c:556
#49 0x00007ffff3d2f026 in jl_f__apply_latest (F=0x0, args=0x7fffffffbe20, nargs=2)
    at /home/takafumi/repos/watch/julia/src/builtins.c:594
#50 0x00007fffaf656fc6 in #invokelatest#1 () at essentials.jl:697
#51 japi1_invokelatest_-374478041 (f=<optimized out>, args...=<optimized out>) at essentials.jl:696
#52 0x00007ffff3d1e729 in jl_fptr_args (m=0x7fffea62f140 <jl_system_image_data+11255872>, args=0x7fffffffbf30,
    nargs=2) at /home/takafumi/repos/watch/julia/src/gf.c:1852
#53 0x00007ffff3d1e68d in jl_fptr_trampoline (m=0x7fffea62f140 <jl_system_image_data+11255872>,
    args=0x7fffffffbf30, nargs=2) at /home/takafumi/repos/watch/julia/src/gf.c:1842
#54 0x00007ffff3d1f80a in jl_apply_generic (args=0x7fffffffbf30, nargs=2)
    at /home/takafumi/repos/watch/julia/src/gf.c:2197
#55 0x00007ffff3fc3743 in do_call (args=0x7fffe6019070, nargs=2, s=0x7fffffffc410)
    at /home/takafumi/repos/watch/julia/src/interpreter.c:323
#56 0x00007ffff3fc3f92 in eval_value (e=0x7fffe7e1ddb0, s=0x7fffffffc410)
    at /home/takafumi/repos/watch/julia/src/interpreter.c:411
#57 0x00007ffff3fc3a80 in eval_stmt_value (stmt=0x7fffe7e1ddb0, s=0x7fffffffc410)
    at /home/takafumi/repos/watch/julia/src/interpreter.c:362
#58 0x00007ffff3fc5a6c in eval_body (stmts=0x7fffaba14790, s=0x7fffffffc410, ip=8, toplevel=1)
    at /home/takafumi/repos/watch/julia/src/interpreter.c:750
#59 0x00007ffff3fc624c in jl_interpret_toplevel_thunk_callback (s=0x7fffffffc410, vargs=0x7fffffffc470)
    at /home/takafumi/repos/watch/julia/src/interpreter.c:880
#60 0x00007ffff3d372cc in Lenter_interpreter_frame_start_val ()
    at /home/takafumi/repos/watch/julia/src/julia_internal.h:348
#61 0x00007ffff3fc62d7 in jl_interpret_toplevel_thunk (m=0x7fffe9b765a0 <jl_system_image_data+13472>,
    src=0x7fffe72bbc60) at /home/takafumi/repos/watch/julia/src/interpreter.c:889
#62 0x00007ffff3d6025d in jl_toplevel_eval_flex (m=0x7fffe9b765a0 <jl_system_image_data+13472>,
    e=0x7fffe50e97f0, fast=1, expanded=0) at /home/takafumi/repos/watch/julia/src/toplevel.c:818
#63 0x00007ffff3d602d9 in jl_toplevel_eval (m=0x7fffe9b765a0 <jl_system_image_data+13472>, v=0x7fffe50e97f0)
    at /home/takafumi/repos/watch/julia/src/toplevel.c:827
#64 0x00007ffff3d2f249 in jl_toplevel_eval_in (m=0x7fffe9b765a0 <jl_system_image_data+13472>, ex=0x7fffe50e97f0)
    at /home/takafumi/repos/watch/julia/src/builtins.c:622
#65 0x00007ffff3d96375 in jl_eval_string (
    str=0x7ffff447db18 "\n    Base.invokelatest(() -> show(IOBuffer(), \"text/plain\", @doc Base.Enum))\n    ")
    at /home/takafumi/repos/watch/julia/src/jlapi.c:95
#66 0x00007ffff6df41c8 in ffi_call_unix64 () from /usr/lib/libffi.so.6
#67 0x00007ffff6df3c2a in ffi_call () from /usr/lib/libffi.so.6
---Type <return> to continue, or q <return> to quit---
#68 0x00007ffff7039f76 in _ctypes_callproc ()
   from /usr/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so
#69 0x00007ffff703a640 in ?? () from /usr/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so
#70 0x00007ffff79bf1ac in _PyObject_FastCallKeywords () from /usr/lib/libpython3.7m.so.1.0
#71 0x00007ffff7a08334 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.7m.so.1.0
#72 0x00007ffff79917db in _PyFunction_FastCallKeywords () from /usr/lib/libpython3.7m.so.1.0
#73 0x00007ffff7a03225 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.7m.so.1.0
#74 0x00007ffff79917db in _PyFunction_FastCallKeywords () from /usr/lib/libpython3.7m.so.1.0
#75 0x00007ffff7a07933 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.7m.so.1.0
#76 0x00007ffff79917db in _PyFunction_FastCallKeywords () from /usr/lib/libpython3.7m.so.1.0
#77 0x00007ffff7a033cd in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.7m.so.1.0
#78 0x00007ffff794a069 in _PyEval_EvalCodeWithName () from /usr/lib/libpython3.7m.so.1.0
#79 0x00007ffff794af34 in PyEval_EvalCodeEx () from /usr/lib/libpython3.7m.so.1.0
#80 0x00007ffff794af5c in PyEval_EvalCode () from /usr/lib/libpython3.7m.so.1.0
#81 0x00007ffff7a79770 in ?? () from /usr/lib/libpython3.7m.so.1.0
#82 0x00007ffff7a7b54a in PyRun_FileExFlags () from /usr/lib/libpython3.7m.so.1.0
#83 0x00007ffff7a7cac5 in PyRun_SimpleFileExFlags () from /usr/lib/libpython3.7m.so.1.0
#84 0x00007ffff7a7ea8f in ?? () from /usr/lib/libpython3.7m.so.1.0
#85 0x00007ffff7a7f420 in _Py_UnixMain () from /usr/lib/libpython3.7m.so.1.0
#86 0x00007ffff7dda003 in __libc_start_main () from /usr/lib/libc.so.6
#87 0x000055555555477a in _start ()
(gdb)

with:

julia> versioninfo()
Julia Version 1.1.0-DEV.399
Commit 0210b1dce2* (2018-10-05 04:32 UTC)
DEBUG build
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, skylake)

julia> run(`git -C $(dirname(Base.find_package("Pkg"))) diff`)
diff --git a/src/gf.c b/src/gf.c
index aa597ecbaa..aecc0e658b 100644
--- a/src/gf.c
+++ b/src/gf.c
@@ -1186,7 +1186,6 @@ static int check_ambiguous_visitor(jl_typemap_entry_t *oldentry, struct typemap_
         msp = 1;
     }
     else if (closure->after) {
-        assert(!jl_subtype((jl_value_t*)sig, (jl_value_t*)type));
         msp = jl_type_morespecific_no_subtype((jl_value_t*)type, (jl_value_t*)sig);
     }
     else {
Process(`git -C /home/takafumi/repos/watch/julia/usr/share/julia/stdlib/v1.1/Pkg/src diff`, ProcessExited(0))

@maleadt
Copy link
Member

maleadt commented Oct 5, 2018

Oh, another world age assertion...
Ref #29267, although the min_world == max_world might be significant here.

@tkf
Copy link
Member Author

tkf commented Oct 5, 2018

Thanks for the pointer. Another difference to #29267 is that I can get this error in 1.0.0 while it looks like #29267 appeared after releasing 1.0.0.

@tkf tkf changed the title Segmentation fault after aggressively calling disable_sigint World age assertion failure after aggressively calling disable_sigint Oct 25, 2018
@vtjnash
Copy link
Sponsor Member

vtjnash commented Aug 2, 2019

This is pretty old now, so I'm going to presume it fixed by #31191 and see if any new issues get opened as they pop up.

@vtjnash vtjnash closed this as completed Aug 2, 2019
@vtjnash
Copy link
Sponsor Member

vtjnash commented Aug 2, 2019

This is pretty old now, so I'm going to presume it fixed by #31191 and see if any new issues get opened as they pop up.

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

3 participants