Bug 30308 - Waiting on external processes broken on 4.0.1+ monos on OSX, Linux, possibly others
Summary: Waiting on external processes broken on 4.0.1+ monos on OSX, Linux, possibly ...
Status: NEW
Alias: None
Product: Runtime
Classification: Mono
Component: io-layer (show other bugs)
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Alexander Kyte
URL:
Depends on:
Blocks:
 
Reported: 2015-05-21 12:03 UTC by Alexander Kyte
Modified: 2015-05-21 12:04 UTC (History)
2 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Alexander Kyte 2015-05-21 12:03:51 UTC
The ExitedEvent test causing failures on public jenkins has exposed that the external process ExitedEvent mechanism is very broken. 

On OSX it fails to fire when a process closes most of the time. Sometimes it runs. On linux it appears to run more often.

https://github.com/mono/mono/commit/e097a98f3bd9082c7d03fa580b604c0228b4ad67

This commit hides a problem with our WaitHandle implementation for external processes. We will return WAIT_FAILURE for external processes, which triggers the callback. By having the callback reschedule itself, this busy waiting causes a lot of allocation. Sgen's efforts to handle us rapidly creating an absurd amount of garbage led to the timeouts that exposed this bug.

Busy waiting should not be calling the callback at all, it should be using a timer of some sort.

Note You need to log in before you can comment on or make changes to this bug.