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

Race condition on shutdown can cause SEGV #2942

Closed
Geod24 opened this issue Jan 28, 2022 · 6 comments · Fixed by #3024 or #3303 · May be fixed by #3165
Closed

Race condition on shutdown can cause SEGV #2942

Geod24 opened this issue Jan 28, 2022 · 6 comments · Fixed by #3024 or #3303 · May be fixed by #3165
Assignees
Labels
type-bug Things don't work as they were intended to, or the way they were intended to work doesn't make sense

Comments

@Geod24
Copy link
Collaborator

Geod24 commented Jan 28, 2022

The small commit introduced a regression:

Unittesting agora.test.Flash#### FATAL ERROR: index [0] exceeds array of length 0
This node was started at source/agora/test/Flash.d:914
This most likely means that the node crashed due to an uncaught exception
If not, please file a bug at https://github.com/Geod24/localrest/
Full error: core.exception.ArrayIndexError@source/agora/node/FullNode.d(1159): index [0] exceeds array of length 0
----------------
core/exception.d:875 onArrayIndexError [0x11132fc6c]
core/exception.d:848 _d_arraybounds_index [0x1113301b5]
source/agora/node/FullNode.d:1159 nothrow @safe void agora.node.FullNode.FullNode.pushBlock(const(agora.consensus.data.Block.Block)).__lambda7() [0x110665b09]
core/thread/context.d:46 void core.thread.context.Callable.opCall() [0x11135c34c]
core/thread/fiber.d:1151 void core.thread.fiber.Fiber.run() [0x11135c4d8]
core/thread/fiber.d:198 fiber_entryPoint [0x11135c415]
./ci/run.sh: line 21:  3795 Abort trap: 6           ./build/agora-unittests

Originally posted by @Geod24 in #2915 (comment)

This is because the task is still running (but shouldn't).

@Geod24 Geod24 self-assigned this Jan 28, 2022
@Geod24 Geod24 added the type-bug Things don't work as they were intended to, or the way they were intended to work doesn't make sense label Jan 28, 2022
@Geod24 Geod24 added this to the 6. Stabilization milestone Jan 28, 2022
@Geod24
Copy link
Collaborator Author

Geod24 commented Jan 29, 2022

We probably need a way to shut down the task manager. We might even want to, IDK, name tasks ?

@hewison-chris hewison-chris linked a pull request Feb 22, 2022 that will close this issue
@hewison-chris
Copy link
Contributor

hewison-chris commented Feb 22, 2022

I think this was fixed by
e86c0d0
and
093103b

@hewison-chris
Copy link
Contributor

However this might still be related #3079

@linked0
Copy link
Contributor

linked0 commented Feb 25, 2022

This could be solved by PR #3109.

@linked0
Copy link
Contributor

linked0 commented Mar 3, 2022

This is probably solved by PR #3109. So closing this.

@linked0 linked0 closed this as completed Mar 3, 2022
@linked0
Copy link
Contributor

linked0 commented Mar 4, 2022

I see the issue happens again. So reopening this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug Things don't work as they were intended to, or the way they were intended to work doesn't make sense
Projects
None yet
3 participants