WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

GC stop-the-world callback triggered multiple times #5084

@niaow

Description

@niaow

One of the causes behind #5081 seems to be that the Boehm GC sometimes calls gcCallback multiple times in the same runtime.alloc.
The gcCallback calls internal/task.GCStopWorldAndScan which locks internal/task.activeTaskLock.
The second call tries to lock it again, which causes a deadlock.

There is a check for this but it is performed after the gcMarkReachable and thus after the deadlock:

if needsResumeWorld {
// Should never happen, check for it anyway.
runtimePanic("gc: world already stopped")
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcorenext-releaseWill be part of next release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions