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

Remove vibe-d:diet. #1835

Merged
merged 3 commits into from
Jul 12, 2017
Merged

Remove vibe-d:diet. #1835

merged 3 commits into from
Jul 12, 2017

Conversation

s-ludwig
Copy link
Member

Should ideally have been removed together with 0.8.0 already. There is no reason anymore to rely on the old code rather than diet-ng.

See also #1834.

@wilzbach
Copy link
Member

The same spurious failure that we could observe on the Project-Tester, seems to manifest itself here:

2017-07-12T11:42:16.157:threads.d:destroyAsyncThreads:34 Failed to terminate worker threads: core.thread.ThreadException@src/core/thread.d(773): Unable to join thread
----------------
??:? object.Throwable core.thread.Thread.join(bool) [0xc6c9f6]
??:? @trusted void std.parallelism.TaskPool.finish(bool) [0xc41abe]
../../../.dub/packages/libasync-0.8.3/libasync/source/libasync/threads.d:32 nothrow void libasync.threads.destroyAsyncThreads() [0xbc0e6b]
core/vibe/core/drivers/libasync.d:141 @trusted void vibe.core.drivers.libasync.LibasyncDriver.dispose() [0xb12e94]
core/vibe/core/driver.d:48 void vibe.core.driver.deleteEventDriver() [0xb12835]
core/vibe/core/core.d:1796 void vibe.core.core._staticDtor37() [0xafc182]
??:? void vibe.core.core.__moddtor() [0xb12650]
??:? void rt.minfo.__T17runModuleFuncsRevS482rt5minfo11ModuleGroup11runTlsDtorsMFZ9__lambda1Z.runModuleFuncsRev(const(immutable(object.ModuleInfo)*)[]) [0xc7b574]
??:? void rt.minfo.ModuleGroup.runTlsDtors() [0xc7b268]
??:? int rt.minfo.rt_moduleTlsDtor().__foreachbody1(ref rt.sections_elf_shared.DSO) [0xc247ab]
??:? int rt.sections_elf_shared.DSO.opApplyReverse(scope int delegate(ref rt.sections_elf_shared.DSO)) [0xc24b10]
??:? rt_moduleTlsDtor [0xc24794]
??:? thread_entryPoint [0xc6c81c]
??:? [0xebb9d183]
core.exception.AssertError@../../../.dub/packages/libasync-0.8.3/libasync/source/libasync/threads.d(35): Assertion failure
----------------2017-07-12T11:42:16.158:threads.d:destroyAsyncThreads:34 Failed to terminate worker threads: core.thread.ThreadException@src/core/thread.d(773): Unable to join thread
----------------
??:? object.Throwable core.thread.Thread.join(bool) [0xc6c9f6]
??:? @trusted void std.parallelism.TaskPool.finish(bool) [0xc41abe]
../../../.dub/packages/libasync-0.8.3/libasync/source/libasync/threads.d:32 nothrow void libasync.threads.destroyAsyncThreads() [0xbc0e6b]
core/vibe/core/drivers/libasync.d:141 @trusted void vibe.core.drivers.libasync.LibasyncDriver.dispose() [0xb12e94]
core/vibe/core/driver.d:48 void vibe.core.driver.deleteEventDriver() [0xb12835]
core/vibe/core/core.d:1796 void vibe.core.core._staticDtor37() [0xafc182]
??:? void vibe.core.core.__moddtor() [0xb12650]
??:? void rt.minfo.__T17runModuleFuncsRevS482rt5minfo11ModuleGroup11runTlsDtorsMFZ9__lambda1Z.runModuleFuncsRev(const(immutable(object.ModuleInfo)*)[]) [0xc7b574]
??:? void rt.minfo.ModuleGroup.runTlsDtors() [0xc7b268]
??:? int rt.minfo.rt_moduleTlsDtor().__foreachbody1(ref rt.sections_elf_shared.DSO) [0xc247ab]
??:? int rt.sections_elf_shared.DSO.opApplyReverse(scope int delegate(ref rt.sections_elf_shared.DSO)) [0xc24b10]
??:? rt_moduleTlsDtor [0xc24794]
??:? thread_entryPoint [0xc6c81c]
??:? [0xebb9d183]

@s-ludwig
Copy link
Member Author

That sometimes happens, would be nice if the error code would be accessible somehow. But looking at the documentation of pthread_join, the two likely candidates are that either another thread already waits in Thread.join for the same thread, or that two threads try to join each other.

Shot in the dark: if those libasync threads are not daemon threads, Druntime might already try to join them.

@s-ludwig
Copy link
Member Author

Also pinging @etcimon

@dlang-bot dlang-bot merged commit d2638cb into master Jul 12, 2017
@etcimon
Copy link
Contributor

etcimon commented Jul 12, 2017

Looks like a new bug, I'd have to test with the newer versions for this. Maybe destroying these threads is unnecessary now

@s-ludwig
Copy link
Member Author

AFAICS, this was a mistake in etcimon/libasync@e222235 - the default taskPool is set as a daemon and std.parallelism will shut down the threads automatically. I'll open a PR that removes the call to destroyAsyncThreads - I think that can just be deprecated and removed now.

s-ludwig added a commit that referenced this pull request Jul 13, 2017
See the discussion in #1835. Libasync now uses the default thread pool of std.parallelism, which is shut down automatically.
@s-ludwig s-ludwig deleted the remove_vibe_diet branch July 16, 2017 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants