You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# ./main
Hello
Closing
vinit_caller
vinit
vinit done
start
stop
vcleanup
vcleanup done
Segmentation fault (core dumped)
# gdb -core core ./main
GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git
Copyright (C) 2021 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 "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://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 ./main...
(No debugging symbols found in ./main)
[New LWP 1898]
[New LWP 1895]
[New LWP 1894]
[New LWP 1899]
[New LWP 1900]
[New LWP 1896]
[New LWP 1897]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
--Type <RET> for more, q to quit, c to continue without paging--
Core was generated by `./main'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0000ffffb3c229b0 in __aarch64_ldadd4_rel ()
from /lib/aarch64-linux-gnu/libpthread.so.0
[Current thread is 1 (Thread 0xffffb219b1e0 (LWP 1898))]
(gdb) bt
#0 0x0000ffffb3c229b0 in __aarch64_ldadd4_rel ()
from /lib/aarch64-linux-gnu/libpthread.so.0
#1 0x0000ffffb3c1af24 in __condvar_dec_grefs (
cond=cond@entry=0xffffb3254ea8 <mark_cv>, g=g@entry=0,
private=private@entry=0) at pthread_cond_wait.c:153
#2 0x0000ffffb3c1b428 in __pthread_cond_wait_common (abstime=0x0, clockid=0,
mutex=0xffffb3254e78 <mark_mutex>, cond=0xffffb3254ea8 <mark_cv>)
at pthread_cond_wait.c:541
#3 __pthread_cond_wait (cond=0xffffb3254ea8 <mark_cv>,
mutex=0xffffb3254e78 <mark_mutex>) at pthread_cond_wait.c:638
#4 0x0000ffffb321db84 in GC_wait_marker () from ./mod.so
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
It works fine on macOS Darwin 192.168.7.8 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:01 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T6000 arm64, since dlclose doesn't trigger _vcleanup. until the main process exit.
V version:
V 0.3.1 dd78620
OS:
Linux adf6cd4e2dff 5.10.47-linuxkit #1 SMP PREEMPT Sat Jul 3 21:50:16 UTC 2021 aarch64 GNU/Linux
What did you do?
code: https://github.com/seven1240/vcrash
a little hack to track
_vinit
andvcleanup
build
What did you expect to see?
some times it's ok as follows
What did you see instead?
sometime it crashes
It works fine on macOS
Darwin 192.168.7.8 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:01 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T6000 arm64
, sincedlclose
doesn't trigger_vcleanup
. until the main process exit.Thanks.
The text was updated successfully, but these errors were encountered: