#23885 closed defect (duplicate)

Assertion *buf_flushlen <= buf->datalen failed after circuit_handle_oom() has been called

Reported by: Jaym Owned by:
Priority: Medium Milestone:
Component: Core Tor/Tor Version: Tor: 0.3.1.7
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description (last modified by arma)

Oct 16 05:15:23.000 [notice] We're low on memory.  Killing circuits with over-long queues. (This behavior is controlled by MaxMemInQueues.)
Oct 16 05:15:23.000 [notice] Removed 16912 bytes by killing 102 circuits; 0 circuits remain alive. Also killed 2 non-linked directory connections.
Oct 16 05:19:23.000 [notice] We're low on memory.  Killing circuits with over-long queues. (This behavior is controlled by MaxMemInQueues.)
Oct 16 05:19:23.000 [notice] Removed 37392 bytes by killing 28 circuits; 0 circuits remain alive. Also killed 2 non-linked directory connections.
Oct 16 05:19:23.000 [err] tor_assertion_failed_(): Bug: ../src/or/buffers.c:801: flush_buf: Assertion *buf_flushlen <= buf->datalen failed; aborting. (on Tor 0.3.1.7 )
Oct 16 05:19:23.000 [err] Bug: Assertion *buf_flushlen <= buf->datalen failed in flush_buf at ../src/or/buffers.c:801. Stack trace: (on Tor 0.3.1.7 )
Oct 16 05:19:23.000 [err] Bug:     /usr/bin/tor(log_backtrace+0x42) [0x55e352e8bd92] (on Tor 0.3.1.7 )
Oct 16 05:19:23.000 [err] Bug:     /usr/bin/tor(tor_assertion_failed_+0x8c) [0x55e352ea4a0c] (on Tor 0.3.1.7 )
Oct 16 05:19:23.000 [err] Bug:     /usr/bin/tor(flush_buf+0x2a7) [0x55e352dddb07] (on Tor 0.3.1.7 )
Oct 16 05:19:23.000 [err] Bug:     /usr/bin/tor(+0x108b5b) [0x55e352e28b5b] (on Tor 0.3.1.7 )
Oct 16 05:19:23.000 [err] Bug:     /usr/bin/tor(connection_handle_write+0x2e) [0x55e352e2975e] (on Tor 0.3.1.7 )
Oct 16 05:19:23.000 [err] Bug:     /usr/bin/tor(+0x4e18e) [0x55e352d6e18e] (on Tor 0.3.1.7 )
Oct 16 05:19:23.000 [err] Bug:     /usr/lib/x86_64-linux-gnu/libevent-2.0.so.5(event_base_loop+0x7fc) [0x7fcce52ba3dc] (on Tor 0.3.1.7 )
Oct 16 05:19:23.000 [err] Bug:     /usr/bin/tor(do_main_loop+0x2a4) [0x55e352d6f4d4] (on Tor 0.3.1.7 )
Oct 16 05:19:23.000 [err] Bug:     /usr/bin/tor(tor_main+0x1c35) [0x55e352d72e55] (on Tor 0.3.1.7 )
Oct 16 05:19:23.000 [err] Bug:     /usr/bin/tor(main+0x19) [0x55e352d6abd9] (on Tor 0.3.1.7 )
Oct 16 05:19:23.000 [err] Bug:     /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7fcce3e44b45] (on Tor 0.3.1.7 )
Oct 16 05:19:23.000 [err] Bug:     /usr/bin/tor(+0x4ac29) [0x55e352d6ac29] (on Tor 0.3.1.7 )

It happened over a new exit relay (low consensus) with 2GB memory.

Child Tickets

Attachments (1)

valgrind.log (596.9 KB) - added by Jaym 17 months ago.

Download all attachments as: .zip

Change History (7)

Changed 17 months ago by Jaym

Attachment: valgrind.log added

comment:1 Changed 17 months ago by Jaym

The memory problem seems to be caused by openssl (see valgrind log). What should I do?

comment:2 Changed 17 months ago by arma

Description: modified (diff)

comment:3 Changed 17 months ago by arma

Looks like this is #23690?

comment:4 Changed 17 months ago by arma

Summary: Assertion crash after circuit_handle_oom() has been calledAssertion *buf_flushlen <= buf->datalen failed after circuit_handle_oom() has been called

comment:5 in reply to:  3 Changed 17 months ago by Jaym

Replying to arma:

Looks like this is #23690?

Yes, sorry for the duplication. It seems also that I am running an openssl version with ugly memory leaks. This bug keeps happening a few hours after I restart the relay.

I wanted to have some confirmation/guidance of how I could fix the openssl problem. Should I build Tor with an openssl version builds from source?

comment:6 Changed 17 months ago by nickm

Resolution: duplicate
Status: newclosed

If your openssl version is broken, then yeah--building with a better one would probably help. If you install it in a nonstandard location, then Tor's --with-openssl-dir option might help.

Note: See TracTickets for help on using tickets.