[Mono-bugs] [Bug 689976] New: Console.ReadKey() uses over 90% of CPU if stdout is redirected

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Apr 26 12:11:23 EDT 2011


https://bugzilla.novell.com/show_bug.cgi?id=689976

https://bugzilla.novell.com/show_bug.cgi?id=689976#c0


           Summary: Console.ReadKey() uses over 90% of CPU if stdout is
                    redirected
    Classification: Mono
           Product: Mono: Runtime
           Version: 1.2.0
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: simon.chisholm at linn.co.uk
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=426670)
 --> (http://bugzilla.novell.com/attachment.cgi?id=426670)
Simple test case which demonstrates the bug

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.16)
Gecko/20110319 Firefox/3.6.16

Calling Console.ReadKey() in a program which has redirected stdout results in
mono using 90% or over CPU for the duration of that program.

Reproducible: Always

Steps to Reproduce:
1. Compile attached test case:
   gmcs /t:exe /debug+ /out:ConsoleTest.exe ConsoleTest.cs
2. Run:
   mono ConsoleTest.exe > out.txt
3. Check cpu usage:
   ps -aux
Actual Results:  
The test process is shown as using 90% or higher cpu

Expected Results:  
The test is idle so should be using 0% (or close) cpu.
I've confirmed that this is the case for the same test compiled using csc on
Windows.

I've reproduced this using Debian Wheezy, both on x86 and ARM.

-- 
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