Opened 11 years ago

Closed 9 years ago

Last modified 7 years ago

#792 closed defect (fixed)

libevent "error" causes Tor not to start at all

Reported by: coshan Owned by: nickm
Priority: Medium Milestone: Tor: 0.2.2.x-final
Component: Core Tor/Tor Version: 0.2.0.29-rc
Severity: Keywords:
Cc: coshan, arma, nickm, phobos, Conflict, Metalfyre Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description (last modified by phobos)

This is only tested on Windows Vista with Service Pack 1 and all updates except Windows Search 4.0

Tor 0.2.0.30 stable version was released officially a few days ago, but upon upgrading or uninstalling/reinstalling, the following messages always showed up 100% of the time.

Aug 03 19:44:21.798 [Notice] Tor v0.2.0.30 (r15956). This is experimental software. Do not rely on it for strong anonymity. (Running on Windows "Longhorn" Service Pack 1 [workstation] {terminal services, single user})
Aug 03 19:44:21.936 [Error] Error from libevent: evsignal_init: socketpair: No error

First of all this should not be experimental software since it is a stable release, and how come I am unable to start Tor especially when the "error" is actually "No error"?

[Automatically added by flyspray2trac: Operating System: Windows Vista]

Child Tickets

Change History (42)

comment:1 Changed 11 years ago by arma

Sounds like this might be a bug with the libevent we shipped in the 0.2.0.30
Windows bundle.

Andrew, which libevent was that? Should we go with an older one for now?

comment:2 Changed 11 years ago by nickm

BTW, the "This is experimental software" warning has been on every version we've shipped for ages.

We should debug libevent and get it working. The 1.3 version is not maintained; if 1.4 isn't working, we should get it
working. At least, it should make a better error message in this case.

comment:3 Changed 11 years ago by phobik

I'd also like to follow this, in on a XP SP2 machine.

comment:4 Changed 11 years ago by phobos

So, we've been shipping libevent 1.4.4 with the Win32 packages since May 2008. 0.2.1.4-alpha packages include libevent 1.4.6.

comment:5 Changed 11 years ago by phobos

As for the comment "First of all this should not be experimental software since it is a stable release"

Tor itself is still an experimental low-latency anonymity network. The difference between stable and alpha is
explained here: https://www.torproject.org/download#packagediff

comment:6 Changed 11 years ago by Conflict

I can confirm this Bug with Vista SP1 and XP SP3 - all Updates applied.

Going back to 0.1.2.19 until this Bug is fixed - works fine there.

comment:7 Changed 11 years ago by phobos

Does 0.2.1.4-alpha have the same bug? It comes with libevent 1.4.6. The latest 0.2.0.30-1 win32 packages also come
with libevent 1.4.6.

comment:8 Changed 11 years ago by nickm

Is it possible that you're running a firewall that is blocking connection to localhost? That would explain why
libevent is unable to make a local socket: it assumes that your computer is allowed to talk to itself.

comment:9 Changed 11 years ago by Conflict

So, i just reinstalled my firewall (Kaspersky 2009), then updated TOR to 0.2.1.4-alpha, and now.... it works :>
seems the problem was the firewall (atleast before i reinstalled & reconfigured it, for the new TOR version)

No more errors for now and it works just fine!

Thanks :)

comment:10 Changed 11 years ago by nickm

Closing as not-a-bug; if it is a bug anywhere, it's in libevent. I already fixed the error reporting in libevent to
be better in the next major release.

comment:11 Changed 11 years ago by nickm

Reopened by user request. What's up?

comment:12 Changed 11 years ago by nickm

Hello? I reopened this bug because somebody asked me to. What s the not-fixed part?

comment:13 Changed 10 years ago by j3ff3

i have this problem also. I also have Kaspersky but have tried configuring it with no luck. Any ideas?

comment:14 Changed 10 years ago by 80063r

I've got the same problem. I use Kaspersky antivirus and firewall, and allowed all tcp and udp activity for tor, vidalia, and privoxy.

tor, versions 0.2.0.34 (r18423) and 0.2.1.14-rc (r19307), exit immediately with the message:

May 22 12:14:18.415 [err] Error from libevent: evsignal_init: socketpair: No error

I use Vista x64.

comment:15 Changed 10 years ago by 80063r

Ok, here's one that works. I went back one revision at a time until I found one that worked.

May 22 09:10:54.005 [notice] Tor v0.2.0.26-rc (r14597). This is experimental software. Do not rely on it for strong anonymity. (Running on Windows "Longhorn" Service Pack 1 [workstation] {terminal services, single user})
May 22 09:10:54.685 [notice] Initialized libevent version 1.3e using method win32. Good.
May 22 09:10:54.688 [notice] Opening Socks listener on 127.0.0.1:9050

comment:16 Changed 10 years ago by 80063r

When I start tor v0.2.0.26-rc (r14597) from the command prompt I get:

May 22 09:24:57.231 [notice] Tor v0.2.0.26-rc (r14597). This is experimental software. Do not rely on it
for strong anonymity. (Running on Windows "Longhorn" Service Pack 1 [workstation] {terminal services,
single user})
May 22 09:24:59.188 [notice] Initialized libevent version 1.3e using method win32. Good.
May 22 09:24:59.189 [notice] Opening Socks listener on 127.0.0.1:9050
May 22 09:25:03.674 [warn] Please upgrade! This version of Tor (0.2.0.26-rc) is obsolete, according to
the directory authorities. Recommended versions are: 0.2.0.33,0.2.0.34,0.2.1.11-alpha,0.2.1.12-alpha,
0.2.1.13-alpha,0.2.1.14-rc
May 22 09:25:06.211 [notice] We now have enough directory information to build circuits.
May 22 09:25:19.807 [notice] Tor has successfully opened a circuit. Looks like client functionality is
working.

But when I start it from vidalia I get:

May 22 09:21:55.015 [Notice] Tor v0.2.0.26-rc (r14597). This is experimental software. Do not rely on it for strong anonymity. (Running on Windows "Longhorn" Service Pack 1 [workstation] {terminal services, single user})
May 22 09:21:55.025 [Warning] Linelist option 'HashedControlSessionPassword' has no value. Skipping.
May 22 09:21:55.380 [Warning] ControlPort is open, but no authentication method has been configured. This means that any program on your computer can reconfigure your Tor. That's bad! You should upgrade your Tor controller as soon as possible.
May 22 09:21:55.381 [Notice] Initialized libevent version 1.3e using method win32. Good.
May 22 09:21:55.381 [Notice] Opening Socks listener on 127.0.0.1:9050
May 22 09:21:56.009 [Notice] Opening Control listener on 127.0.0.1:9050
May 22 09:21:56.009 [Warning] Could not bind to 127.0.0.1:9050: Address already in use [WSAEADDRINUSE ]. Is Tor already running?
May 22 09:21:56.010 [Notice] Closing partially-constructed listener Socks listener on 127.0.0.1:9050
May 22 09:21:56.115 [Warning] Failed to parse/validate config: Failed to bind one of the listener ports.
May 22 09:21:56.115 [Error] Reading config failed--see warnings above.

What do I need to change?

comment:17 Changed 10 years ago by 80063r

Never mind. I see what I did.... 9050, 9050 Blah!

"I see," said the blind man.

comment:18 Changed 10 years ago by 80063r

I have just confirmed that this bug exists in every revision from tor-0.2.0.27a-rc to 0.2.1.9 alpha.
I don't know of any later revisions.

comment:19 Changed 10 years ago by nickm

So, this bug only happens when you have a firewall that blocks your Tor from listening on 127.0.0.1. Versions
of Libevent later than 1.3e can't handle that on Windows: it needs to be able to open a connection to itself.

I've made a change in Libevent that should let Libevent limp along under the circumstances: signals won't work,
but that's better than nothing working.

comment:20 Changed 10 years ago by plastical

Would like to add that having disabled all firewalls in a sandbox I am still having problems in Vista X64.

comment:21 Changed 10 years ago by plastical

Apologies, fixed (vista being vista).

comment:22 Changed 10 years ago by Oddi

I have the same trouble.think it`s cos of Kasperski Internet Security 2009.
I`ve made this: open control of applications->find tor,vidalia and give a permission in OS,in Rights,Networks ( in all coloumns should be green mark!!) then pick out them one by one and edit options doing the following - mark as exeption (last tab)
4 vidalia i`ve made a rule- permission| add new |name| incoming/outcoming|TCP|9050
thats all...may be the rule ive made is not correct and useless...but everything is ok now...so test.

comment:23 Changed 10 years ago by nickm

Libevent 1.4.12, when it comes out, should have a fix for this to allow Libevent to keep working it can't
listen on localhost.

comment:24 Changed 10 years ago by Metalfyre

Getting the same error with latest Vidalia (full) install. Tried to give an exception in Comodo Firewall, no effect. Tried starting up in Safe Mode, still same error.
Dunno what version of libevent is in the current build of Vidalia.
Running Windows XP SP3

comment:25 Changed 10 years ago by Metalfyre

Tried starting Tor from a command prompt and this is what I got:

C:\Program Files\Vidalia Bundle\Tor>tor.exe
Sep 23 18:46:50.031 [notice] Tor v0.2.1.19. This is experimental software. Do no
t rely on it for strong anonymity. (Running on Windows XP Service Pack 3 [workst
ation] {terminal services, single user})
Sep 23 18:46:50.078 [notice] Configuration file "C:\Documents and Settings\Rene\
Application Data\tor\torrc" not present, using reasonable defaults.
Sep 23 18:46:50.078 [err] Error from libevent: evsignal_init: socketpair: No suc
h file or directory

comment:26 Changed 10 years ago by nickm

What version of vidalia (full) exactly did you download? I need a version number for _something_ to track down
what Libevent you've got.

comment:27 Changed 10 years ago by Metalfyre

Just added it.. lol :P

Tor 2.1.19

comment:28 Changed 10 years ago by Metalfyre

Sorry for da spam.. but this is the exact Vidalia package: vidalia-bundle-0.2.1.19-0.1.15.exe ^^

comment:29 Changed 10 years ago by nickm

Okay, that version is known to be built with Libevent 1.4.11, which doesn't have the bugfix. :(

I'll poke Andrew about building one with 1.4.12 to see if it fixes stuff.

comment:30 Changed 10 years ago by nickm

(Oh, in the meantime: I'm told the alpha releases are built with Libevent 1.4.12, so you might want to try
the latest one of those to see if we're on the right track. [The version is 0.2.2.3-alpha.])

comment:31 Changed 10 years ago by Metalfyre

Installed vidalia-bundle-0.2.2.2-alpha-0.2.4.exe

Not the error anymore, but it keeps trying to connect.
In a cmd prompt I see:

DNS: couldn't open /etc/resolv.conf: No such file or directory
Disabling disk cache: No such file or directory
Disabling local tree: No such file or directory
Established listening socket on port 8123.

Eventually the connection in the Vidalia Control Panel times out after a while.

comment:32 Changed 10 years ago by Metalfyre

Alas, the problem reoccurred. Here's what the errorlog says:

sep 25 07:46:34.812 [Notice] Tor v0.2.2.2-alpha (git-54ba86d9d0cff2ce). This is experimental software. Do not rely on it for strong anonymity. (Running on Windows XP Service Pack 3 [workstation] {terminal services, single user})
sep 25 07:46:34.921 [Warning] Warning from libevent: evsignal_init: socketpair: No error
sep 25 07:46:34.921 [Notice] Initialized libevent version 1.4.12-stable using method win32. Good.
sep 25 07:46:34.921 [Notice] Opening Socks listener on 127.0.0.1:9050
sep 25 07:46:34.921 [Notice] Opening Control listener on 127.0.0.1:9051
sep 25 07:46:35.140 [Notice] Parsing GEOIP file.
sep 25 07:46:36.453 [Notice] I learned some more directory information, but not enough to build a circuit: We have no recent network-status consensus.
sep 25 07:46:36.453 [Notice] Bootstrapped 5%: Connecting to directory server.
sep 25 07:46:36.562 [Notice] Bootstrapped 10%: Finishing handshake with directory server.
sep 25 07:46:36.890 [Notice] Bootstrapped 15%: Establishing an encrypted directory connection.
sep 25 07:46:36.890 [Notice] Bootstrapped 20%: Asking for networkstatus consensus.
sep 25 07:46:37.000 [Notice] Bootstrapped 25%: Loading networkstatus consensus.
sep 25 07:46:37.328 [Notice] Bootstrapped 45%: Asking for relay descriptors.
sep 25 07:46:37.328 [Notice] I learned some more directory information, but not enough to build a circuit: We have only 0/1507 usable descriptors.
sep 25 07:46:37.765 [Notice] Bootstrapped 50%: Loading relay descriptors.
sep 25 07:46:37.984 [Notice] Bootstrapped 57%: Loading relay descriptors.
sep 25 07:46:37.984 [Notice] I learned some more directory information, but not enough to build a circuit: We have only 96/1507 usable descriptors.
sep 25 07:46:38.203 [Notice] Bootstrapped 64%: Loading relay descriptors.
sep 25 07:46:38.203 [Notice] I learned some more directory information, but not enough to build a circuit: We have only 192/1507 usable descriptors.
sep 25 07:46:38.203 [Notice] Bootstrapped 72%: Loading relay descriptors.
sep 25 07:46:38.203 [Notice] I learned some more directory information, but not enough to build a circuit: We have only 287/1507 usable descriptors.
sep 25 07:46:38.312 [Notice] We now have enough directory information to build circuits.
sep 25 07:46:38.312 [Notice] Bootstrapped 80%: Connecting to the Tor network.
sep 25 07:46:38.640 [Notice] Bootstrapped 85%: Finishing handshake with first hop.
sep 25 07:46:39.843 [Notice] Bootstrapped 90%: Establishing a Tor circuit.
sep 25 07:46:41.046 [Notice] Tor has successfully opened a circuit. Looks like client functionality is working.
sep 25 07:46:41.046 [Notice] Bootstrapped 100%: Done.

It finished however with the error:
Vidalia detected that the Tor software exited unexpectedly.
Please check the message log for recent warning or error messages.

comment:33 Changed 10 years ago by arma

So, based on the recent comments, it looks like libevent 1.4.12 has this
particular problem fixed?

(and in the last comment, there's some other sort of bug, probably unrelated,
but not enough info provided for us to have any idea what it is?)

comment:34 Changed 10 years ago by Metalfyre

That's all the info I could give. This is what was stated in the log and I still get the "Vidalia detected that the Tor software exited unexpectedly." error
It does so in safe mode as well so it cannot be my firewall, as that's not loaded in safe mode. ^^

comment:35 Changed 10 years ago by arma

Ok. It's possible you're running into other bugs in 0.2.2.2-alpha. There are
some known crash bugs in that version.

I'm going to close this bug, since the actual bug here with libevent looks like
it's been fixed.

Please open a new bug if you find other crash problems with your Tor (and you're
running either the latest stable or the latest development version).

comment:36 Changed 10 years ago by tedted

I think I have also a libevent problem here on my sp3 xp pro : I can't launch on relay mode it crashes everytime only on client it works:

déc. 02 19:20:13.594 [Notice] Tor v0.2.1.20. This is experimental software. Do not rely on it for strong anonymity. (Running on Windows XP Service Pack 3 [workstation] {terminal services, single user})

déc. 02 19:20:15.454 [Notice] Initialized libevent version 1.4.12-stable using method win32. Good.
[...]
déc. 02 19:20:28.766 [Error] libevent call with win32 failed: Socket operation on nonsocket [WSAENOTSOCK ] [10038]

comment:37 Changed 10 years ago by phobos

Does your anti-virus or local firewall block localhost?

comment:38 Changed 9 years ago by phobos

Description: modified (diff)
Resolution: Noneworksforme
Status: newclosed

can't replicate, user disappeared. closing.

comment:39 Changed 9 years ago by nickm

Milestone: Tor: 0.2.2.x-final
Priority: majornormal
Resolution: worksforme
Status: closedreopened

The libevent bug may not be as fixed as we thought: reopening this bug and closing #1812 and #1973 as duplicates.

comment:40 Changed 9 years ago by nickm

Owner: set to nickm
Status: reopenedaccepted

comment:41 Changed 9 years ago by nickm

Resolution: fixed
Status: acceptedclosed

Actually, no, darnit. #1812 is not QUITE the same. Leaving that one open, closing this.

comment:42 Changed 7 years ago by nickm

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