forked from tarantool/tarantool
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We may need to cancel fiber that waits for cord to finish. For this purpose let's cancel fiber started by cord_costart inside the cord. Note that there is a race between stopping cancel_event in cord and triggering it using ev_async_send in joining thread. AFAIU it is safe. We also need to fix stopping wal cord to address stack-use-after-return issue shown below. Is arises because we did not stop async which resides in wal endpoint and endpoint resides on stack. Later when we stop the introduced cancel_event we access not stopped async which at this moment gone out of scope. It is simple, we only need to destroy wal endpoint. But then we got assertion on deleting endpoint as endpoints in other cords are not destroyed and when we delete wal endpoint we access rlist links which reside in freed memory of other endpoints. So if we want to cleanup cleanly we need to stop vinyl loop properly which is reverting the commit e463128 ("vinyl: cancel reader and writer threads on shutdown"). So this issue needs more attention. Let's postpone it by temporary suppressing ASAN issue. ``` ==3224698==ERROR: AddressSanitizer: stack-use-after-return on address 0x7f654b3b0170 at pc 0x555a2817c282 bp 0x7f654ca55b30 sp 0x7f654ca55b28 WRITE of size 4 at 0x7f654b3b0170 thread T3 #0 0x555a2817c281 in ev_async_stop /home/shiny/dev/tarantool/third_party/libev/ev.c:5492:37 tarantool#1 0x555a27827738 in cord_thread_func /home/shiny/dev/tarantool/src/lib/core/fiber.c:1990:2 tarantool#2 0x7f65574aa9ea in start_thread /usr/src/debug/glibc/glibc/nptl/pthread_create.c:444:8 tarantool#3 0x7f655752e7cb in clone3 /usr/src/debug/glibc/glibc/misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 ``` Part of tarantool#8423 NO_DOC=internal NO_CHANGELOG=internal
- Loading branch information
Showing
5 changed files
with
80 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,5 @@ | |
# File format: | ||
#fun:* | ||
#src:* | ||
# TODO(gh-8423) expected to be removed when the issue is solved | ||
fun:ev_async_stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters