Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

New segfaults on nightly #581

Closed
timholy opened this issue Jul 19, 2021 · 0 comments · Fixed by #600
Closed

New segfaults on nightly #581

timholy opened this issue Jul 19, 2021 · 0 comments · Fixed by #600

Comments

@timholy
Copy link
Member

timholy commented Jul 19, 2021

It doesn't happen every time (see JuliaGizmos/GtkObservables.jl#8 for full history), but it happened once on Linux and once on Mac, only on nightly. The pattern of segfaulting is the same for both:

signal (11): Segmentation fault
in expression starting at /home/runner/work/GtkObservables.jl/GtkObservables.jl/test/runtests.jl:547
type_get_qdata_L at /workspace/srcdir/glib-2.68.1/build_glib/../gobject/gtype.c:3702 [inlined]
type_check_is_value_type_U at /workspace/srcdir/glib-2.68.1/build_glib/../gobject/gtype.c:4222 [inlined]
g_type_check_value_holds at /workspace/srcdir/glib-2.68.1/build_glib/../gobject/gtype.c:4262
g_value_set_boolean at /workspace/srcdir/glib-2.68.1/build_glib/../gobject/gvaluetypes.c:745
_gtk_boolean_handled_accumulator at /workspace/srcdir/gtk+-3.24.29/build-gtk/../gtk/gtkprivate.c:139
accumulate at /workspace/srcdir/glib-2.68.1/build_glib/../gobject/gsignal.c:3241 [inlined]
signal_emit_unlocked_R at /workspace/srcdir/glib-2.68.1/build_glib/../gobject/gsignal.c:3746
g_signal_emitv at /workspace/srcdir/glib-2.68.1/build_glib/../gobject/gsignal.c:3227
signal_emit at /home/runner/.julia/packages/Gtk/P4Gsu/src/GLib/signals.jl:145
unknown function (ip: 0x7fd62410aa00)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2245 [inlined]
...

after which it has a long string of runtime (mostly interpreter).

https://github.com/JuliaGizmos/GtkObservables.jl/pull/8/checks?check_run_id=3102063969
https://github.com/JuliaGizmos/GtkObservables.jl/runs/3098639995

timholy added a commit that referenced this issue Dec 6, 2021
As a consequence of the forced specialization on the `RT` argument
of `signal_emit` in #552, the compiler now knows whether
`RT === Nothing`. In that case, it also knows that
`return_value` will not be used, so it is free to be garbage-collected.
When that happens, it triggers segfaults.

This puts both potential `GValue`-arguments inside a `GC.@preserve`
to prevent garbage collection. Fixes #581.
timholy added a commit that referenced this issue Dec 6, 2021
As a consequence of the forced specialization on the `RT` argument
of `signal_emit` in #552, the compiler now knows whether
`RT === Nothing`. In that case, it also knows that
`return_value` will not be used, so it is free to be garbage-collected.
When that happens, it triggers segfaults.

This puts both potential `GValue`-arguments inside a `GC.@preserve`
to prevent garbage collection. Fixes #581.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant