http://bugzilla.novell.com/show_bug.cgi?id=620404
http://bugzilla.novell.com/show_bug.cgi?id=620404#c0 Summary: PFX doesn't work correctly Classification: Mono Product: Mono: Class Libraries Version: 2.6.x Platform: x86-64 OS/Version: RHEL 5 Status: NEW Severity: Normal Priority: P5 - None Component: System AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- PFX still works incorrectly: when needed to launch N threads, it launches N + 1 threads. The code is: >> using System; >> using System.Threading; >> >> public class Test_PFX_For { >> public static void Main ( String[] args ) { >> int num_threads = Convert.ToInt32 ( args [ 0 ] ); >> Parallel.For ( 0, num_threads, i => >> { >> long k = 0; >> while ( true ){ >> k++; >> k--; >> } >> }); >> } >> } For example, starting the program as >> $ mono Test_PFX_For.exe 1 gives the workload >> top - 13:54:11 up 7 days, 1:00, 2 users, load average: 0.44, 0.10, 0.03 >> Tasks: 185 total, 2 running, 182 sleeping, 0 stopped, 1 zombie >> Cpu0 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, >> 0.0%si, 0.0%st >> Cpu1 : 0.0%us, 0.3%sy, 0.0%ni, 99.3%id, 0.3%wa, 0.0%hi, >> 0.0%si, 0.0%st >> Cpu2 :100.0%us, 0.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, >> 0.0%si, 0.0%st >> Cpu3 :100.0%us, 0.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, >> 0.0%si, 0.0%st >> Cpu4 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, >> 0.0%si, 0.0%st >> Cpu5 : 0.0%us, 0.0%sy, 0.0%ni, 99.3%id, 0.0%wa, 0.0%hi, >> 0.7%si, 0.0%st >> Cpu6 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, >> 0.0%si, 0.0%st >> Cpu7 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, >> 0.0%si, 0.0%st >> Mem: 8180840k total, 1957368k used, 6223472k free, 200808k buffers >> Swap: 2096472k total, 0k used, 2096472k free, 1518724k cached >> >> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND >> 28233 xxx 25 0 3457m 6644 3880 R 200.1 0.1 0:28.23 mono Starting the program as >> $ mono Test_PFX_For.exe 2 gives >> top - 13:56:23 up 7 days, 1:03, 2 users, load average: 2.19, 0.89, 0.33 >> Tasks: 185 total, 2 running, 182 sleeping, 0 stopped, 1 zombie >> Cpu0 : 0.0%us, 0.3%sy, 0.0%ni, 93.0%id, 6.7%wa, 0.0%hi, >> 0.0%si, 0.0%st >> Cpu1 :100.0%us, 0.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, >> 0.0%si, 0.0%st >> Cpu2 :100.0%us, 0.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, >> 0.0%si, 0.0%st >> Cpu3 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, >> 0.0%si, 0.0%st >> Cpu4 : 0.3%us, 0.3%sy, 0.0%ni, 99.3%id, 0.0%wa, 0.0%hi, >> 0.0%si, 0.0%st >> Cpu5 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, >> 0.0%si, 0.0%st >> Cpu6 : 0.0%us, 0.3%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, >> 0.0%si, 0.0%st >> Cpu7 :100.0%us, 0.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, >> 0.0%si, 0.0%st >> Mem: 8180840k total, 1956260k used, 6224580k free, 200808k buffers >> Swap: 2096472k total, 0k used, 2096472k free, 1518736k cached >> >> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND >> 28502 xxx 25 0 3457m 6556 3876 R 299.7 0.1 1:02.78 mono and so on. -- Configure bugmail: http://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. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
