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

Calling requestHTTP from outside a task #663

Closed
SerialVelocity opened this Issue May 14, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@SerialVelocity

SerialVelocity commented May 14, 2014

When calling requestHTTP from outside a task, an assertion is sometimes hit. It's listed below:

core.exception.AssertError@../../../.dub/packages/vibe-d-master/source/vibe/core/drivers/libevent2.d(671): ManualEvent.wait works only when called from a task.
----------------
5   stream-downloader                   0x000000010c6bfcb9 _d_assert_msg + 69
6   stream-downloader                   0x000000010c63ad0d void vibe.core.drivers.libevent2.Libevent2ManualEvent.acquire() + 237
7   stream-downloader                   0x000000010c63a9be int vibe.core.drivers.libevent2.Libevent2ManualEvent.wait(int) + 134
8   stream-downloader                   0x000000010c66136d @trusted void vibe.core.sync.TaskMutex.lock() + 329
9   stream-downloader                   0x000000010c6901a3 onCryptoLock + 191
10  libcrypto.0.9.8.dylib               0x00007fff85c63435 int_thread_get_item + 165
11  libcrypto.0.9.8.dylib               0x00007fff85c62c2a ERR_get_state + 138
12  libcrypto.0.9.8.dylib               0x00007fff85c42efc ERR_clear_error + 12
13  libcrypto.0.9.8.dylib               0x00007fff85c67234 EC_GROUP_new_curve_GFp + 148
14  libcrypto.0.9.8.dylib               0x00007fff85c67afb EC_GROUP_new_by_curve_name + 347
15  libcrypto.0.9.8.dylib               0x00007fff85c6d3db EC_KEY_new_by_curve_name + 107
16  stream-downloader                   0x000000010c68eee4 void vibe.stream.ssl.SSLContext.setECDHCurve(immutable(char)[]) + 204
17  stream-downloader                   0x000000010c68e5c0 vibe.stream.ssl.SSLContext vibe.stream.ssl.SSLContext.__ctor(vibe.stream.ssl.DEPRECATION_HACK, vibe.stream.ssl.SSLContextKind, vibe.stream.ssl.SSLVersion) + 352
18  stream-downloader                   0x000000010c68d26b vibe.stream.ssl.SSLContext vibe.stream.ssl.createSSLContext(vibe.stream.ssl.SSLContextKind, vibe.stream.ssl.SSLVersion) + 51
19  stream-downloader                   0x000000010c67465a void vibe.http.client.HTTPClient.connect(immutable(char)[], ushort, bool) + 214
20  stream-downloader                   0x000000010c674532 D4vibe4http6client11connectHTTPFAyatbZS4vibe4core14connectionpool53__T16LockedConnectionTC4vibe4http6client10HTTPClientZ16LockedConnection10__lambda10MFZC4vibe4http6client10HTTPClient + 70
21  stream-downloader                   0x000000010c6776da vibe.core.connectionpool.LockedConnection!(vibe.http.client.HTTPClient).LockedConnection vibe.core.connectionpool.ConnectionPool!(vibe.http.client.HTTPClient).ConnectionPool.lockConnection() + 578
22  stream-downloader                   0x000000010c67438e vibe.core.connectionpool.LockedConnection!(vibe.http.client.HTTPClient).LockedConnection vibe.http.client.connectHTTP(immutable(char)[], ushort, bool) + 570
23  stream-downloader                   0x000000010c673dff void vibe.http.client.requestHTTP(vibe.inet.url.URL, scope void delegate(scope vibe.http.client.HTTPClientRequest), scope void delegate(scope vibe.http.client.HTTPClientResponse)) + 463
24  stream-downloader                   0x000000010c673c26 void vibe.http.client.requestHTTP(immutable(char)[], scope void delegate(scope vibe.http.client.HTTPClientRequest), scope void delegate(scope vibe.http.client.HTTPClientResponse)) + 158
25  stream-downloader                   0x000000010c5ab3cd bool app._chunkDownloader(immutable(char)[], immutable(char)[], std.concurrency.Tid, std.concurrency.Tid, ubyte*) + 185
26  stream-downloader                   0x000000010c5ab2ae void app.chunkDownloader(immutable(char)[], immutable(char)[], std.concurrency.Tid, std.concurrency.Tid, immutable(void*)) + 82
27  stream-downloader                   0x000000010c5d1df9 D3std11concurrency127__T6_spawnTPFAyaAyaS3std11concurrency3TidS3std11concurrency3TidyPvZvTAyaTAyaTS3std11concurrency3TidTS3std11concurrency3TidTPyvZ6_spawnFbPFAyaAyaS3std11concurrency3TidS3std11concurrency3TidyPvZvAyaAyaS3std11concurrency3TidS3std11concurrency3TidPyvZS3std11concurrency3Tid4execMFZv + 117
28  stream-downloader                   0x000000010c6c16a1 void core.thread.Thread.run() + 49
29  stream-downloader                   0x000000010c6c0d79 thread_entryPoint + 317
30  libsystem_pthread.dylib             0x00007fff8c598899 _pthread_body + 138
31  libsystem_pthread.dylib             0x00007fff8c59872a _pthread_struct_init + 0
32  libsystem_pthread.dylib             0x00007fff8c59cfc9 thread_start + 13
33  ???                                 0x0000000000000000 0x0 + 0
@s-ludwig

This comment has been minimized.

Show comment
Hide comment
@s-ludwig

s-ludwig May 14, 2014

Member

The above commit might have "fixed" it again, but the real fix will be to support ManualEvent.wait from outside of a task.

Member

s-ludwig commented May 14, 2014

The above commit might have "fixed" it again, but the real fix will be to support ManualEvent.wait from outside of a task.

@s-ludwig s-ludwig closed this in eccdb6d Jul 17, 2014

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