{"action":"created","issue":{"url":"https://api.github.com/repos/vibe-d/vibe-core/issues/37","repository_url":"https://api.github.com/repos/vibe-d/vibe-core","labels_url":"https://api.github.com/repos/vibe-d/vibe-core/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/vibe-d/vibe-core/issues/37/comments","events_url":"https://api.github.com/repos/vibe-d/vibe-core/issues/37/events","html_url":"https://github.com/vibe-d/vibe-core/issues/37","id":262907689,"number":37,"title":"Assert using LocalManualEvent","user":{"login":"tchaloupka","id":5941106,"avatar_url":"https://avatars1.githubusercontent.com/u/5941106?v=4","gravatar_id":"","url":"https://api.github.com/users/tchaloupka","html_url":"https://github.com/tchaloupka","followers_url":"https://api.github.com/users/tchaloupka/followers","following_url":"https://api.github.com/users/tchaloupka/following{/other_user}","gists_url":"https://api.github.com/users/tchaloupka/gists{/gist_id}","starred_url":"https://api.github.com/users/tchaloupka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tchaloupka/subscriptions","organizations_url":"https://api.github.com/users/tchaloupka/orgs","repos_url":"https://api.github.com/users/tchaloupka/repos","events_url":"https://api.github.com/users/tchaloupka/events{/privacy}","received_events_url":"https://api.github.com/users/tchaloupka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-10-04T19:45:11Z","updated_at":"2017-10-07T21:21:08Z","closed_at":null,"author_association":"NONE","body":"I'm using the `createManualEvent` to signal waiting tasks for new data.\r\nBut with vibe-core I sometimes get:\r\n\r\n```\r\ncore.exception.AssertError@../../../../../.dub/packages/vibe-core-1.2.0/vibe-core/source/vibe/core/task.d(784): Calling task is running, but scheduled to be resumed!?\r\n----------------\r\n??:? _d_assert_msg [0x13f404e]\r\n../../../../../.dub/packages/vibe-core-1.2.0/vibe-core/source/vibe/core/task.d:784 nothrow @safe void vibe.core.task.TaskScheduler.switchTo(vibe.core.task.Task, std.typecons.Flag!(\"defer\").Flag) [0x1388a25]\r\n../../../../../.dub/packages/vibe-core-1.2.0/vibe-core/source/vibe/core/core.d:700 nothrow @safe void vibe.core.core.switchToTask(vibe.core.task.Task) [0x13a6195]\r\n../../../../../.dub/packages/vibe-core-1.2.0/vibe-core/source/vibe/internal/async.d-mixin-113:121 nothrow @safe void vibe.internal.async.asyncAwaitAny!(true, \"vibe.core.sync.ThreadLocalWaiter!false.ThreadLocalWaiter.wait!true.wait\", vibe.internal.async.Waitable!(void delegate() nothrow @safe, vibe.core.sync.ThreadLocalWaiter!(false).ThreadLocalWaiter.wait!(true).wait(core.time.Duration, eventcore.driver.__T6HandleVAyaa5_6576656e74TS9eventcore6driver28__T6HandleVAyaa2_6664TmVmN1Z6HandleVS9eventcore6driver28__T6HandleVAyaa2_6664TmVmN1Z6HandleS1N1Z.Handle, bool delegate() nothrow @safe).__lambda5, vibe.core.sync.ThreadLocalWaiter!(false).ThreadLocalWaiter.wait!(true).wait(core.time.Duration, eventcore.driver.__T6HandleVAyaa5_6576656e74TS9eventcore6driver28__T6HandleVAyaa2_6664TmVmN1Z6HandleVS9eventcore6driver28__T6HandleVAyaa2_6664TmVmN1Z6HandleS1N1Z.Handle, bool delegate() nothrow @safe).__lambda6).Waitable).asyncAwaitAny(ref vibe.internal.async.Waitable!(void delegate() nothrow @safe, vibe.core.sync.ThreadLocalWaiter!(false).ThreadLocalWaiter.wait!(true).wait(core.time.Duration, eventcore.driver.__T6HandleVAyaa5_6576656e74TS9eventcore6driver28__T6HandleVAyaa2_6664TmVmN1Z6HandleVS9eventcore6driver28__T6HandleVAyaa2_6664TmVmN1Z6HandleS1N1Z.Handle, bool delegate() nothrow @safe).__lambda5, vibe.core.sync.ThreadLocalWaiter!(false).ThreadLocalWaiter.wait!(true).wait(core.time.Duration, eventcore.driver.__T6HandleVAyaa5_6576656e74TS9eventcore6driver28__T6HandleVAyaa2_6664TmVmN1Z6HandleVS9eventcore6driver28__T6HandleV../../../../../.dub/packages/vibe-core-1.2.0/vibe-core/source/vibe/internal/async.d-mixin-113:121 /rt/backtrace\r\n../../../../../.dub/packages/vibe-core-1.2.0/vibe-core/source/vibe/core/sync.d:1376 nothrow @safe void vibe.core.sync.ThreadLocalWaiter!(false).ThreadLocalWaiter.emitWaiter(vibe.core.sync.ThreadLocalWaiter!(false).ThreadLocalWaiter.TaskWaiter*) [0x137fa10]\r\n../../../../../.dub/packages/vibe-core-1.2.0/vibe-core/source/vibe/core/sync.d:1359 nothrow @safe int vibe.core.sync.ThreadLocalWaiter!(false).ThreadLocalWaiter.emit().__foreachbody2(vibe.core.sync.ThreadLocalWaiter!(false).ThreadLocalWaiter.TaskWaiter*) [0x137f8e3]\r\n../../../../../.dub/packages/vibe-core-1.2.0/vibe-core/source/vibe/internal/list.d:53 nothrow @safe int vibe.internal.list.CircularDList!(vibe.core.sync.ThreadLocalWaiter!(false).ThreadLocalWaiter.TaskWaiter*).CircularDList.opApply(int delegate(vibe.core.sync.ThreadLocalWaiter!(false).ThreadLocalWaiter.TaskWaiter*) nothrow @safe) [0x139a755]\r\n../../../../../.dub/packages/vibe-core-1.2.0/vibe-core/source/vibe/core/sync.d:1357 nothrow @safe void vibe.core.sync.ThreadLocalWaiter!(false).ThreadLocalWaiter.emit() [0x137f86e]\r\n../../../../../.dub/packages/vibe-core-1.2.0/vibe-core/source/vibe/core/sync.d:721 nothrow @safe int vibe.core.sync.LocalManualEvent.emit() [0x1377f7e]\r\n../../../../../.dub/packages/vibe-mqtt-0.2.0-alpha.7/vibe-mqtt/source/mqttd/client.d:369 @safe ushort mqttd.client.SessionQueue!(1).SessionQueue.add(mqttd.client.MessageContext) [0x134df77]\r\n../../../../../.dub/packages/vibe-mqtt-0.2.0-alpha.7/vibe-mqtt/source/mqttd/client.d:315 @safe ushort mqttd.client.SessionQueue!(1).SessionQueue.add(mqttd.messages.Publish, mqttd.client.PacketState, mqttd.client.PacketOrigin) [0x134dcb6]\r\n../../../../../.dub/packages/vibe-mqtt-0.2.0-alpha.7/vibe-mqtt/source/mqttd/client.d:674 @safe void mqttd.client.MqttClient.publish!(immutable(ubyte)[]).publish(const(immutable(char)[]), const(immutable(ubyte)[]), mqttd.messages.QoSLevel, bool) [0x1153bbc]\r\n../common/mq.d:97 @trusted void common.mq.mqttSender() [0x11537f6]\r\n../common/mq.d:60 @safe void common.mq.initMq(immutable(char)[], void delegate(immutable(char)[], immutable(ubyte)[]) @safe, const(immutable(char)[][])...).__lambda6() [0x1153740]\r\n../../../../../.dub/packages/vibe-core-1.2.0/vibe-core/source/vibe/core/task.d:537 void vibe.core.task.TaskFuncInfo.set!(void function() @safe*).set(ref void function() @safe*).callDelegate(ref vibe.core.task.TaskFuncInfo) [0x1060b02]\r\n../../../../../.dub/packages/vibe-core-1.2.0/vibe-core/source/vibe/core/task.d:567 void vibe.core.task.TaskFuncInfo.call() [0x138814d]\r\n../../../../../.dub/packages/vibe-core-1.2.0/vibe-core/source/vibe/core/task.d:380 nothrow void vibe.core.task.TaskFiber.run() [0x1387579]\r\n??:? void core.thread.Fiber.run() [0x14511bb]\r\n??:? fiber_entryPoint [0x1451096]\r\n??:? [0xffffffff]\r\n```\r\n\r\nI don't understand the message if this can be a problem on our side or with vibe-core?"},"comment":{"url":"https://api.github.com/repos/vibe-d/vibe-core/issues/comments/334966495","html_url":"https://github.com/vibe-d/vibe-core/issues/37#issuecomment-334966495","issue_url":"https://api.github.com/repos/vibe-d/vibe-core/issues/37","id":334966495,"user":{"login":"tchaloupka","id":5941106,"avatar_url":"https://avatars1.githubusercontent.com/u/5941106?v=4","gravatar_id":"","url":"https://api.github.com/users/tchaloupka","html_url":"https://github.com/tchaloupka","followers_url":"https://api.github.com/users/tchaloupka/followers","following_url":"https://api.github.com/users/tchaloupka/following{/other_user}","gists_url":"https://api.github.com/users/tchaloupka/gists{/gist_id}","starred_url":"https://api.github.com/users/tchaloupka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tchaloupka/subscriptions","organizations_url":"https://api.github.com/users/tchaloupka/orgs","repos_url":"https://api.github.com/users/tchaloupka/repos","events_url":"https://api.github.com/users/tchaloupka/events{/privacy}","received_events_url":"https://api.github.com/users/tchaloupka/received_events","type":"User","site_admin":false},"created_at":"2017-10-07T21:21:08Z","updated_at":"2017-10-07T21:21:08Z","author_association":"NONE","body":"I tried to run it with GDB, but no success to detect anything unusual. Output is also free of some uncaught errors.\r\nUnfortunately it's seems to be not too easy to reproduce it in the simple example. I tried to write from scratch some task messaging with `LocalManualEvent` to simulate the behavior but without success.\r\nI've also tried to run just `vibe-mqtt` publisher example code to burst messages, but also without successful reproduction of the problem.\r\n\r\nI can trigger it on the service in about 20 of same REST API requests mixed with cca 2 other ones. Strangely not with the `curl` yet.\r\nIt goes like: Service A calls REST API on Service B, which then sends MQTT message to message broker."}}
{"actor":{"display_login":"tchaloupka"}}