Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 443020

Summary: net-misc/tor-0.2.4.5_alpha USE=bufferevents [err] channel_closed(): Bug: src/or/channel.c:1315: channel_closed: Assertion chan->state == CHANNEL_STATE_CLOSING || chan->state == CHANNEL_STATE_CLOSED || chan->state == CHANNEL_STATE_ERROR failed; aborting.
Product: Gentoo Linux Reporter: Dennis Nezic <dennisn>
Component: Current packagesAssignee: Anthony Basile <blueness>
Status: RESOLVED FIXED    
Severity: normal CC: bugzie, candrews, ftobin, larstobi
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Dennis Nezic 2012-11-13 20:28:02 UTC
After about 77% of the bootstrapping process, I consistently get an error/bug report in my tor.log, and my tor doesn't startup...

[err] channel_closed(): Bug: src/or/channel.c:1315: channel_closed: Assertion chan->state == CHANNEL_STATE_CLOSING || chan->state == CHANNEL_STATE_CLOSED   || chan->state == CHANNEL_STATE_ERROR failed; aborting.

I compiled it with "bufferevents" and "threads" only.

Reproducible: Always
Comment 1 Dennis Nezic 2012-11-13 20:47:31 UTC
Upgrading my dev-libs/libevent (from 2.0.14) to 2.0.20 makes my tor bootstrapping freeze consistently at 45%, consuming all of my cpu. No error messages get outputted to tor.log, just a cpu-hang.
Comment 2 Dennis Nezic 2012-11-13 21:03:31 UTC
It seems to work without bufferevents compiled in. (export USE=-bufferevents)
Comment 3 Anthony Basile gentoo-dev 2012-11-13 23:45:25 UTC
Thanks for the report.  This is definitely an upstream issue (and one of the reasons I put the alphas in the tree, so we can help them debug).

If its not too much of a pain, can you post an strace of tor up to when it hangs.

   strace -f -o tor.log /usr/bin/tor -f /etc/tor/torrc

Also, can you post your torrc.  Just scrub anything that is private.
Comment 4 Dennis Nezic 2012-11-14 12:57:03 UTC
The only obvious problem I can see from the strace is 8400+ calls to "time(NULL)", within 3 seconds. The last messages in tor.log vary: "Bootstrapped 90%: Establishing a Tor circuit" "Bootstrapped 85%: Finishing handshake with first hop". I am forced to pkill -9 it.
Comment 5 Craig Andrews gentoo-dev 2012-11-28 22:07:26 UTC
I believe this may be the upstream bug report: https://trac.torproject.org/projects/tor/ticket/4588
Comment 6 Anthony Basile gentoo-dev 2014-01-26 21:17:15 UTC
(In reply to candrews from comment #5)
> I believe this may be the upstream bug report:
> https://trac.torproject.org/projects/tor/ticket/4588

Its fixed in the latest 0.2.4 which have now gone stable upstream.