Opened 15 years ago

Last modified 8 years ago

#162 closed defect (Fixed)

"The service did not return an error." message

Reported by: bknobbs Owned by:
Priority: Low Milestone:
Component: Core Tor/Tor Version:
Severity: Keywords:
Cc: bknobbs, edmanm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


Get "The service did not return an error." message when trying to stop service in services.msc in windows (on windows XP SP2). It does close the process, and if you try and tell it to stop again, it just hangs for a while, and eventually says that it stopped. After this you can hit start process, and everything works normally.

[Automatically added by flyspray2trac: Operating System: Windows 2k/XP]

Child Tickets

Change History (3)

comment:1 Changed 15 years ago by edmanm

I was able to reproduce this running the latest cvs and libevent code and debugged it for a bit. I found
that after the nt_service_control() function gets called, notifying the Tor service to shutdown,
the call to event_dispatch() in do_main_loop() doesn't return. The error message Brian reports
is because the Tor process is actually still running, seemingly stuck in event_dispatch() for awhile.

I submit the following patch, which resolves this issue:

* main.c.orig Fri Jun 24 2005 11:41:50 PM
--- main.c Fri Jun 24 2005 11:41:50 PM
* 1447,1458
--- 1448,1463 ----

nt_service_control(DWORD request)

+ static struct timeval exit_now;
+ exit_now.tv_sec = 0;
+ exit_now.tv_usec = 0;

switch (request) {



log(LOG_ERR, "Got stop/shutdown request; shutting down cleanly.");
service_status.dwCurrentState = SERVICE_STOP_PENDING;

+ event_loopexit(&exit_now);


SetServiceStatus(hStatus, &service_status);

comment:2 Changed 15 years ago by nickm

flyspray2trac: bug closed.
patch applied; thanks!

comment:3 Changed 8 years ago by nickm

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