New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: fatal error: span has no free stacks #22412

Closed
carlory opened this Issue Oct 24, 2017 · 6 comments

Comments

Projects
None yet
4 participants
@carlory
Copy link

carlory commented Oct 24, 2017

docker daemon process crashed when creating a new goroutine.

  • kernel: mm/memory.c:409: bad pmd ffff881055775210(80000006ad4008e7)
  • dockerd: fatal error: span has no free stacks
  • systemd: docker.service: main process exited, code=exited, status=2/INVALIDARGUMENT

What version of Go are you using (go version)?

1.7.5

What did you see instead?

realted moby issue

@carlory

This comment has been minimized.

Copy link

carlory commented Oct 24, 2017

I don't know the reason why x.ptr is an empty pointer. Maybe this a hardware fault or other?

// Allocates a stack from the free pool. Must be called with
// stackpoolmu held.
func stackpoolalloc(order uint8) gclinkptr {
	list := &stackpool[order]
	s := list.first
	if s == nil {
		// no free stacks. Allocate another span worth.
		s = mheap_.allocManual(_StackCacheSize>>_PageShift, &memstats.stacks_inuse)
		if s == nil {
			throw("out of memory")
		}
		if s.allocCount != 0 {
			throw("bad allocCount")
		}
		if s.manualFreeList.ptr() != nil {
			throw("bad manualFreeList")
		}
		s.elemsize = _FixedStack << order
		for i := uintptr(0); i < _StackCacheSize; i += s.elemsize {
			x := gclinkptr(s.base() + i)
			x.ptr().next = s.manualFreeList
			s.manualFreeList = x
		}
		list.insert(s)
	}
	x := s.manualFreeList
	if x.ptr() == nil {
		throw("span has no free stacks")
	}
	s.manualFreeList = x.ptr().next
	s.allocCount++
	if s.manualFreeList.ptr() == nil {
		// all stacks in s are allocated.
		list.remove(s)
	}
	return x
}

@ianlancetaylor ianlancetaylor changed the title fatal error: span has no free stacks runtime: fatal error: span has no free stacks Oct 24, 2017

@ianlancetaylor ianlancetaylor added this to the Go1.10 milestone Oct 24, 2017

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

ianlancetaylor commented Oct 24, 2017

Is this reproducible?

Is it possible to try the 1.9.1 release?

@carlory

This comment has been minimized.

Copy link

carlory commented Oct 24, 2017

Sorry, this issue happens only occasionally, so it's hard for me to reproduce.

Tomorrow, I will check if the system RAM is faulty.

@carlory

This comment has been minimized.

Copy link

carlory commented Oct 24, 2017

About kernel: mm/memory.c:409: bad pmd ffff881055775210(80000006ad4008e7)

@ianlancetaylor I found a similar unsolved issue in the bugs list

@aclements

This comment has been minimized.

Copy link
Member

aclements commented Nov 8, 2017

@carlory, this sounds like a kernel or hardware issue.

You gave several errors in your original report, and I'm not sure how to interpret that. Did these all happen at once? Or are these multiple failures that happened at different times?

What exact kernel version were you running?

@gopherbot

This comment has been minimized.

Copy link

gopherbot commented Dec 8, 2017

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@gopherbot gopherbot closed this Dec 8, 2017

@golang golang locked and limited conversation to collaborators Dec 8, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.