go: runtime: arena mapping creates large core files and bad mlockall behavior
package main
var p *int
func main() {
*p = 0
}
Run with
$ ulimit -c unlimited
$ GOTRACEBACK=crash go run test.go
$ ls -l core
Go 1.11 and tip generate a ~100MB core. Go 1.10 and earlier only generate a ~2MB core. Probably related to the arena changes in 1.11.
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 1
- Comments: 16 (10 by maintainers)
Map arenas
PROT_NONEinitially and incrementally re-map themPROT_READ|PROT_WRITEas we need more space. We only need to keep track of the “current arena” and how far we’ve mapped it (any other arena can be fully mapped).I don’t think this is very hard to implement or adds much complexity, though everything in
sysAllocis a little tricky.