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

ssl errors #1124

Closed
yannick opened this Issue Jun 2, 2015 · 3 comments

Comments

Projects
None yet
3 participants
@yannick
Contributor

yannick commented Jun 2, 2015

not sure if this is a bug:

when i do lots of requests to aws endpoints, from time to i get an

SSL_read was unsuccessful with ret 0

if i retry, it all works fine.

to handly this nicely in higher level libraries it would be nice if
https://github.com/rejectedsoftware/vibe.d/blob/master/source/vibe/stream/openssl.d#L257
would throw something more specific.

@etcimon

This comment has been minimized.

Show comment
Hide comment
@etcimon

etcimon Jun 2, 2015

Contributor

This is a high-level protocol issue, the reader is failing to call leastSize or waitForData before reading. Unless the connection is closed with incomplete data? Are you using the AWS library when getting this error? Can you post a stack trace?

Contributor

etcimon commented Jun 2, 2015

This is a high-level protocol issue, the reader is failing to call leastSize or waitForData before reading. Unless the connection is closed with incomplete data? Are you using the AWS library when getting this error? Can you post a stack trace?

@yannick

This comment has been minimized.

Show comment
Hide comment
@yannick

yannick Jun 2, 2015

Contributor

usage here: https://github.com/yannick/vibe-aws/blob/master/source/vibe/aws/aws.d#L117

trace:

../vibe/source/vibe/stream/openssl.d: could not upload logs. SSL_read was unsuccessful with ret 0
5   plog   0x000000010783c0fb pure @safe bool std.exception.enforce!(Exception, bool).enforce(bool, lazy const(char)[], immutable(char)[], ulong) + 107
6   plog   0x000000010796eafe int vibe.stream.openssl.OpenSSLStream.checkSSLRet(immutable(char)[], int) + 346
7   plog   0x000000010796e741 void vibe.stream.openssl.OpenSSLStream.read(ubyte[]) + 141
8   plog   0x0000000107858f82 void vibe.stream.operations.readUntil!(vibe.stream.wrapper.StreamOutputRange).readUntil(vibe.core.stream.InputStream, ref vibe.stream.wrapper.StreamOutputRange, const(ubyte[]), ulong) + 1034
9   plog   0x0000000107858afa void vibe.stream.operations.readUntil!().readUntil(vibe.core.stream.InputStream, vibe.core.stream.OutputStream, const(ubyte[]), ulong) + 106
10  plog   0x000000010785875e ubyte[] vibe.stream.operations.readUntil!().readUntil(vibe.core.stream.InputStream, const(ubyte[]), ulong, vibe.utils.memory.Allocator) + 182
11  plog   0x00000001078586a0 ubyte[] vibe.stream.operations.readLine!().readLine(vibe.core.stream.InputStream, ulong, immutable(char)[], vibe.utils.memory.Allocator) + 56
12  plog   0x0000000107939472 vibe.http.client.HTTPClientResponse vibe.http.client.HTTPClientResponse.__ctor(vibe.http.client.HTTPClient, bool, bool, vibe.utils.memory.Allocator, std.datetime.SysTime) + 154
13  plog   0x0000000107937ff1 vibe.http.client.HTTPClientResponse vibe.http.client.HTTPClient.request(scope void delegate(vibe.http.client.HTTPClientRequest)) + 185
14  plog   0x0000000107936ebc vibe.http.client.HTTPClientResponse vibe.http.client.requestHTTP(vibe.inet.url.URL, scope void delegate(scope vibe.http.client.HTTPClientRequest), vibe.http.client.HTTPClientSettings) + 676
15  plog   0x0000000107936c0d vibe.http.client.HTTPClientResponse vibe.http.client.requestHTTP(immutable(char)[], scope void delegate(scope vibe.http.client.HTTPClientRequest), vibe.http.client.HTTPClientSettings) + 105
16  plog   0x000000010786ff5b vibe.aws.aws.AWSResponse vibe.aws.aws.AWSClient.doRequest(immutable(char)[], vibe.data.json.Json) + 423
17  plog   0x0000000107882055 vibe.data.json.Json vibe.aws.kinesis.Kinesis.putRecords(vibe.aws.kinesis.Record[]) + 261
18  plog   0x000000010786c2ec void uploader.Uploader.upload(tlog.TLog[]) + 316
19  plog   0x000000010786bbf6 void logtask.logtask() + 246
20  plog   0x0000000107834e12 void std.functional.DelegateFaker!(void function()*).DelegateFaker.doIt() + 42
21  plog   0x0000000107836390 void vibe.core.core.makeTaskFuncInfo!(void delegate()).makeTaskFuncInfo(ref void delegate()).callDelegate(vibe.core.core.TaskFuncInfo*) + 120
22  plog   0x00000001078d270b void vibe.core.core.CoreTask.run() + 299
23  plog   0x000000010799ad45 void core.thread.Fiber.run() + 49
24  plog   0x000000010799a93a fiber_entryPoint + 98
25  ???    0x0000000000000000 0x0 + 0
Contributor

yannick commented Jun 2, 2015

usage here: https://github.com/yannick/vibe-aws/blob/master/source/vibe/aws/aws.d#L117

trace:

../vibe/source/vibe/stream/openssl.d: could not upload logs. SSL_read was unsuccessful with ret 0
5   plog   0x000000010783c0fb pure @safe bool std.exception.enforce!(Exception, bool).enforce(bool, lazy const(char)[], immutable(char)[], ulong) + 107
6   plog   0x000000010796eafe int vibe.stream.openssl.OpenSSLStream.checkSSLRet(immutable(char)[], int) + 346
7   plog   0x000000010796e741 void vibe.stream.openssl.OpenSSLStream.read(ubyte[]) + 141
8   plog   0x0000000107858f82 void vibe.stream.operations.readUntil!(vibe.stream.wrapper.StreamOutputRange).readUntil(vibe.core.stream.InputStream, ref vibe.stream.wrapper.StreamOutputRange, const(ubyte[]), ulong) + 1034
9   plog   0x0000000107858afa void vibe.stream.operations.readUntil!().readUntil(vibe.core.stream.InputStream, vibe.core.stream.OutputStream, const(ubyte[]), ulong) + 106
10  plog   0x000000010785875e ubyte[] vibe.stream.operations.readUntil!().readUntil(vibe.core.stream.InputStream, const(ubyte[]), ulong, vibe.utils.memory.Allocator) + 182
11  plog   0x00000001078586a0 ubyte[] vibe.stream.operations.readLine!().readLine(vibe.core.stream.InputStream, ulong, immutable(char)[], vibe.utils.memory.Allocator) + 56
12  plog   0x0000000107939472 vibe.http.client.HTTPClientResponse vibe.http.client.HTTPClientResponse.__ctor(vibe.http.client.HTTPClient, bool, bool, vibe.utils.memory.Allocator, std.datetime.SysTime) + 154
13  plog   0x0000000107937ff1 vibe.http.client.HTTPClientResponse vibe.http.client.HTTPClient.request(scope void delegate(vibe.http.client.HTTPClientRequest)) + 185
14  plog   0x0000000107936ebc vibe.http.client.HTTPClientResponse vibe.http.client.requestHTTP(vibe.inet.url.URL, scope void delegate(scope vibe.http.client.HTTPClientRequest), vibe.http.client.HTTPClientSettings) + 676
15  plog   0x0000000107936c0d vibe.http.client.HTTPClientResponse vibe.http.client.requestHTTP(immutable(char)[], scope void delegate(scope vibe.http.client.HTTPClientRequest), vibe.http.client.HTTPClientSettings) + 105
16  plog   0x000000010786ff5b vibe.aws.aws.AWSResponse vibe.aws.aws.AWSClient.doRequest(immutable(char)[], vibe.data.json.Json) + 423
17  plog   0x0000000107882055 vibe.data.json.Json vibe.aws.kinesis.Kinesis.putRecords(vibe.aws.kinesis.Record[]) + 261
18  plog   0x000000010786c2ec void uploader.Uploader.upload(tlog.TLog[]) + 316
19  plog   0x000000010786bbf6 void logtask.logtask() + 246
20  plog   0x0000000107834e12 void std.functional.DelegateFaker!(void function()*).DelegateFaker.doIt() + 42
21  plog   0x0000000107836390 void vibe.core.core.makeTaskFuncInfo!(void delegate()).makeTaskFuncInfo(ref void delegate()).callDelegate(vibe.core.core.TaskFuncInfo*) + 120
22  plog   0x00000001078d270b void vibe.core.core.CoreTask.run() + 299
23  plog   0x000000010799ad45 void core.thread.Fiber.run() + 49
24  plog   0x000000010799a93a fiber_entryPoint + 98
25  ???    0x0000000000000000 0x0 + 0
@s-ludwig

This comment has been minimized.

Show comment
Hide comment
@s-ludwig

s-ludwig Jul 7, 2017

Member

Fixed by ee35d73 (#1395).

Member

s-ludwig commented Jul 7, 2017

Fixed by ee35d73 (#1395).

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