Skip to content

runtime: failed MSpanList_Remove #28425

@tmm1

Description

@tmm1

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

go version go1.11.1 linux/amd64

Does this issue reproduce with the latest release?

yes.

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/vagrant/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GOPROXY=""
GORACE=""
GOROOT="/home/vagrant/go"
GOTMPDIR=""
GOTOOLDIR="/home/vagrant/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build402549573=/tmp/go-build -gno-record-gcc-switches"

What did you do?

I'm cross-compiling a windows binary with cgo enabled (using mingw64), which uses the lxn/win and lxn/walk libraries for UI.

What did you expect to see?

No crashes.

What did you see instead?

Random crashes:

runtime: failed MSpanList_Remove span.npages=2 span=0x69e88c0 prev=0x0 span.list=0x1aadc30 list=0x1aacc30
fatal error: MSpanList_Remove

runtime stack:
runtime.throw(0x1218a10, 0x10)
        /home/vagrant/go/src/runtime/panic.go:608 +0x79
runtime.(*mSpanList).remove(0x1aacc30, 0x69e88c0)
        /home/vagrant/go/src/runtime/mheap.go:1214 +0x18d
runtime.(*mcentral).freeSpan(0x1aacc10, 0x69e88c0, 0x430100, 0x1aa2c10)
        /home/vagrant/go/src/runtime/mcentral.go:205 +0x12d
runtime.(*mspan).sweep(0x69e88c0, 0x0, 0xc000002a00)
        /home/vagrant/go/src/runtime/mgcsweep.go:336 +0x59a
runtime.sweepone(0x4381ae)
        /home/vagrant/go/src/runtime/mgcsweep.go:113 +0x11d
runtime.gosweepone.func1()
        /home/vagrant/go/src/runtime/mgcsweep.go:137 +0x32
runtime.systemstack(0x0)
        /home/vagrant/go/src/runtime/asm_amd64.s:351 +0x6b
runtime.mstart()
        /home/vagrant/go/src/runtime/proc.go:1229

goroutine 3 [running]:
runtime.systemstack_switch()
        /home/vagrant/go/src/runtime/asm_amd64.s:311 fp=0xc000049f80 sp=0xc000049f78 pc=0x45c190
runtime.gosweepone(0x0)
        /home/vagrant/go/src/runtime/mgcsweep.go:136 +0x59 fp=0xc000049fb0 sp=0xc000049f80 pc=0x422989
runtime.bgsweep(0xc000036070)
        /home/vagrant/go/src/runtime/mgcsweep.go:55 +0xaf fp=0xc000049fd8 sp=0xc000049fb0 pc=0x4224ef
runtime.goexit()
        /home/vagrant/go/src/runtime/asm_amd64.s:1333 +0x1 fp=0xc000049fe0 sp=0xc000049fd8 pc=0x45e351
created by runtime.gcenable
        /home/vagrant/go/src/runtime/mgc.go:216 +0x5f

goroutine 1 [syscall, 407 minutes, locked to thread]:
syscall.Syscall6(0x7ff8b0cd1ae0, 0x4, 0xc00057bd60, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /home/vagrant/go/src/runtime/syscall_windows.go:185 +0xfc
github.com/lxn/win.GetMessage(0xc00057bd60, 0x0, 0x0, 0xc000000001)
        /home/vagrant/channels-server-win64/.go/src/github.com/lxn/win/user32.go:2202 +0x7b
github.com/lxn/walk.(*FormBase).Run(0xc000312380, 0x125b168)
        /home/vagrant/channels-server-win64/.go/src/github.com/lxn/walk/form.go:368 +0xcf
main.runMenu(0x0, 0x0)
        /home/vagrant/channels-server-win64/menu_windows.go:134 +0x14d
main.StartMenu()
        /home/vagrant/channels-server-win64/menu_windows.go:102 +0x39
main.run()
        /home/vagrant/channels-server-win64/main.go:197 +0x27b
main.SetupMenu(0x125de08)
        /home/vagrant/channels-server-win64/menu_windows.go:94 +0x247
main.main()
        /home/vagrant/channels-server-win64/main.go:134 +0x19e

goroutine 78 [runnable]:
github.com/jmhodges/levigo._Cfunc_leveldb_writebatch_put(0x842b4f0, 0xc0052ef560, 0x9, 0xc0002ee010, 0x1)
        _cgo_gotypes.go:943 +0x4c
github.com/jmhodges/levigo.(*WriteBatch).Put.func1(0x842b4f0, 0xc0052ef560, 0x9, 0xc0002ee010, 0x1)
        /home/vagrant/channels-server-win64/.go/src/github.com/jmhodges/levigo/batch.go:51 +0x85
github.com/jmhodges/levigo.(*WriteBatch).Put(0xc0042dee88, 0xc0052ef560, 0x9, 0x10, 0xc0002ee010, 0x1, 0xa)
        /home/vagrant/channels-server-win64/.go/src/github.com/jmhodges/levigo/batch.go:51 +0x67
github.com/tmm1/blevex/leveldb.(*Batch).Set(0xc0017b84e0, 0xc0052ef560, 0x9, 0x10, 0xc0002ee010, 0x1, 0xa)
        /home/vagrant/channels-server-win64/.go/src/github.com/tmm1/blevex/leveldb/batch.go:24 +0x72
github.com/tmm1/blevex/leveldb.(*Writer).ExecuteBatch(0xc00242b270, 0x1348c00, 0xc0017b84e0, 0x0, 0x0)
        /home/vagrant/channels-server-win64/.go/src/github.com/tmm1/blevex/leveldb/writer.go:71 +0x43e
github.com/blevesearch/bleve/index/upsidedown.(*UpsideDownCouch).batchRows(0xc00000a380, 0x1346a00, 0xc00242b270, 0xc000692780, 0x8, 0x8, 0xc000619800, 0x2, 0x2, 0x0, ...)
        /home/vagrant/channels-server-win64/.go/src/github.com/blevesearch/bleve/index/upsidedown/upsidedown.go:292 +0x795
github.com/blevesearch/bleve/index/upsidedown.(*UpsideDownCouch).Batch(0xc00000a380, 0xc003d40000, 0xc0002718c8, 0x0)
        /home/vagrant/channels-server-win64/.go/src/github.com/blevesearch/bleve/index/upsidedown/upsidedown.go:938 +0x1267
github.com/blevesearch/bleve.(*indexImpl).Batch(0xc000271880, 0xc003e0b280, 0x0, 0x0)
        /home/vagrant/channels-server-win64/.go/src/github.com/blevesearch/bleve/index_impl.go:304 +0x9d
_/home/vagrant/channels-server-win64/dvr.(*Recorder).indexAirings(0xc00033c000, 0xc0002c3880, 0xc, 0xc000393cb0, 0x0, 0xed37e2160, 0x1aa2820, 0x13a52453c000, 0x0, 0x0)
        /home/vagrant/channels-server-win64/dvr/indexer.go:382 +0x1379
_/home/vagrant/channels-server-win64/dvr.(*Recorder).RunIndexer(0xc00033c000)
        /home/vagrant/channels-server-win64/dvr/indexer.go:202 +0x156a
created by _/home/vagrant/channels-server-win64/dvr.(*Recorder).Run
        /home/vagrant/channels-server-win64/dvr/recorder.go:146 +0x4a

cc #20975
cc #21382
cc @alexbrainman

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.WaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions