8000 Spurious SSL errors with filtered bufferevent · Issue #17 · libevent/libevent · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Spurious SSL errors with filtered bufferevent #17
Closed
@diwakergupta

Description

@diwakergupta

Here's what I observe:

  • during some SSL operation, we call into conn_closed (I'll update the thread later with exactly which op, but it's likely do_read)
  • within conn_closed, errcode is SSL_ERROR_SYSCALL, ret is -1 and errno is 0

Here's what the SSL man page says about the SYSCALL error:

SSL_ERROR_SYSCALL
Some I/O error occurred.  The OpenSSL error queue may contain more
information on the error.  If the error queue is empty (i.e.
ERR_get_error() returns 0), ret can be used to find out more about the
error: If ret == 0, an EOF was observed that violates the protocol.
If ret == -1, the underlying BIO reported an I/O error (for socket I/O
on Unix systems, consult errno for details).

Since ret is -1 and errno is 0, I'm not sure where to go next. In particular, I'm not sure how to isolate this to libevent (vs. an OpenSSL issue).

Note that this happens non-deterministically a 596E nd typically under high load. I'm on Ubuntu 12.04 using libevent 2.0.19 and OpenSSL 1.0.0e

I'm not seeing any crashes due to libevent. I am seeing spurious SSL failures though -- spurious, in the
sense that I get the SYSCALL error but ret is -1 and errno returns 0. Here's a stack trace when that happens:

#0  0x00007fff8e4dace2 in __pthread_kill ()
#1  0x00007fff867957d2 in pthread_kill ()
#2  0x00007fff86786a7a in abort ()
#3  0x00000001007ca309 in conn_closed (bev_ssl=<value temporarily
unavailable, due to optimizations>, errcode=<value temporarily
unavailable, due to optimizations>, ret=<value temporarily
unavailable, due to optimizations>) at bufferevent_openssl.c:504
#4  0x00000001007ca5cf in do_read (bev_ssl=0x101d262e0, n_to_read=0)
at bufferevent_openssl.c:614
#5  0x00000001007cabec in consider_reading (bev_ssl=0x101d262e0) at
bufferevent_openssl.c:779
#6  0x00000001007c11ef in bufferevent_run_deferred_callbacks_unlocked
() at TAsyncChannel.cpp:834
#7  0x00000001007b9a75 in event_base_loop () at TAsyncChannel.cpp:834

Disregard the first 3 frames -- I added the abort as a cheap hack to get a quick stack trace.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0