Skip to content

runtime: Big slowdows with runtime.Gosched/runtime.GOMAXPROCS and scheduling(?). #5163

@gopherbot

Description

@gopherbot

by Vova616:

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
http://play.golang.org/p/pZ49yypAqM

What is the expected output?
finish in less than 1s

What do you see instead?
finishing after 10s+

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
windows 7 64bit

Which version are you using?  (run 'go version')
go version devel +5260abd6df41 Sat Mar 30 19:05:00 2013 +0800 windows/amd64

Please provide any additional information below.

Uncomment line 97 to make it run 50-500 times faster. (30ms vs 16s)
Replacing ReadAll with ReadAll2 will show the bug even with the uncommented line 97.
runtime.GOMAXPROCS(1) will fix the bug when using ReadAll or ReadAll2.
This is not happening in 1.0.3.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions