[Mono-bugs] [Bug 682256] When i run my service using mono-service2 and after i stop the service cpu usage is increased to > 100

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Jun 4 10:23:15 EDT 2011



Vyacheslav Gerasymenko <vyacheslav.com at gmail.com> changed:

           What    |Removed                     |Added
                 CC|                            |vyacheslav.com at gmail.com

--- Comment #2 from Vyacheslav Gerasymenko <vyacheslav.com at gmail.com> 2011-06-04 14:23:13 UTC ---
This bug is reproducible on Mac OS X 10.6 with latest Mono 2.10.2. After
executing next command:

launchctl stop your.deamon.id.string

CPU usage of daemon process rises to 100% and after 20 seconds (default
timeout) it is killed by launchd. This bug is mentioned on several forums, for


For now I use next workaround:

protected override void OnStop()
  Thread thread = new Thread(CheckExit);
  thread.IsBackground = true;

private static void CheckExit()
  Process process = Process.GetCurrentProcess();

Which simply waits for 1 second after finishing processing of stop signal and
kills itself - very bad workaround, but it avoids 20 seconds wasting of 100%
CPU resources.

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list