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

Conversation

Projects
None yet
4 participants
@s-ludwig
Member

s-ludwig commented Jul 11, 2017

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.

s-ludwig added some commits Jul 11, 2017

Remove vibe-d:diet.
See also #1834.

@s-ludwig s-ludwig added the auto-merge label Jul 12, 2017

@wilzbach

This comment has been minimized.

Show comment
Hide comment
@wilzbach

wilzbach Jul 12, 2017

Contributor

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]
Contributor

wilzbach commented Jul 12, 2017

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

This comment has been minimized.

Show comment
Hide comment
@s-ludwig

s-ludwig Jul 12, 2017

Member

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.

Member

s-ludwig commented Jul 12, 2017

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

This comment has been minimized.

Show comment
Hide comment
@s-ludwig

s-ludwig Jul 12, 2017

Member

Also pinging @etcimon

Member

s-ludwig commented Jul 12, 2017

Also pinging @etcimon

@dlang-bot dlang-bot merged commit d2638cb into master Jul 12, 2017

4 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@etcimon

This comment has been minimized.

Show comment
Hide comment
@etcimon

etcimon Jul 12, 2017

Contributor

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

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

This comment has been minimized.

Show comment
Hide comment
@s-ludwig

s-ludwig Jul 13, 2017

Member

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.

Member

s-ludwig commented Jul 13, 2017

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

Remove explicit thread destruction code in the libasync driver.
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 Jul 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment