Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#4999 closed defect (fixed)

Assertion conn->magic == CONTROL_CONNECTION_MAGIC failed on OpenBSD 5.1

Reported by: fredzupy Owned by:
Priority: Medium Milestone:
Component: Core Tor/Tor Version: Tor: 0.2.2.35
Severity: Keywords: tor-relay
Cc: fredzupy@… Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

I can't run Tor more than a few seconds on OpenBSD 5.1 GENERIC.MP#172 i386.

Tor crash with «

Feb 1 13:52:38 ethnao Tor[4295]: Heartbeat: Tor's uptime is 0:00 hours, with 1 circuits open. I've sent 0 kB and received 1 kB.
Feb 1 13:52:38 ethnao Tor[4295]: Bootstrapped 85%: Finishing handshake with first hop.
Feb 1 13:52:39 ethnao Tor[4295]: Bootstrapped 90%: Establishing a Tor circuit.
Feb 1 13:52:50 ethnao Tor[4295]: Tor has successfully opened a circuit. Looks like client functionality is working.
Feb 1 13:52:50 ethnao Tor[4295]: Bootstrapped 100%: Done.
Feb 1 13:52:50 ethnao Tor[4295]: Now checking whether ORPort 88.168.242.87:9001 is reachable... (this may take up to 20 minutes -- look for log messages indicating success)
Feb 1 13:52:52 ethnao Tor[4295]: Self-testing indicates your ORPort is reachable from the outside. Excellent. Publishing server descriptor.
Feb 1 13:53:13 ethnao Tor[4295]: Performing bandwidth self-test...done.
Feb 1 13:55:07 ethnao Tor[4295]: assert_connection_ok(): Bug: connection.c:3966: assert_connection_ok: Assertion conn->magic == CONTROL_CONNECTION_MAGIC failed; aborting.
» in logs.

Neither tor-0.2.2.35 from ports, nor tor-0.2.2.35 compiled from sources, nor tor-2.3.11-alpha from sources works.

tor-0.2.2.35 from ports used to run pretty well on OpenBSD 5.0-current until late december.

Child Tickets

Change History (7)

comment:1 Changed 8 years ago by rransom

Status: newneeds_information

Which versions of libevent were the various Tor binaries linked to?

comment:2 Changed 8 years ago by fredzupy

Cc: fredzupy@… added

The one provided by OpenBSD base (http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libevent/).

There is warning when Tor start: [warn] It's a little hard to tell, but you seem to have Libevent 1.4.0-beta header files, whereas you have linked against Libevent 1.4.14b-stable. This will probably make Tor crash.

It was not a problem until now.

comment:3 Changed 8 years ago by ditzydoo

The trackback for this is:
(gdb) bt
#0 0x1c21d8d9 in kill ()
#1 0x1c245005 in abort () at /usr/src/lib/libc/stdlib/abort.c:68
#2 0x1c0a9f8c in assert_connection_ok ()
#3 0x1c001d74 in conn_read_callback ()
#4 0x1c137b35 in event_base_loop (base=0x8aaf3000, flags=0) at /usr/src/lib/libevent/event.c:402
#5 0x1c0045e7 in do_main_loop ()
#6 0x1c005cf7 in tor_main ()
#7 0x1c000406 in main ()
(gdb)

comment:4 in reply to:  description Changed 8 years ago by fredzupy

I've compiled Tor-0.2.3.11-alpha with libevent-2.0.17-stable (from source) and after some hours running, it seems to be stable.

comment:5 in reply to:  description Changed 8 years ago by fredzupy

Resolution: fixed
Status: needs_informationclosed

I've made an upgrade of my system with a recent snapshot of -current and now Tor works great.
Maybe the http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libevent/kqueue.c?r1=1.28#rev1.28 patch solved the issue.

comment:6 Changed 7 years ago by nickm

Keywords: tor-relay added

comment:7 Changed 7 years ago by nickm

Component: Tor RelayTor
Note: See TracTickets for help on using tickets.