Skip to content

fix(core/bloombits): use single channel for shutdown #20878#2492

Open
gzliudan wants to merge 1 commit into
XinFinOrg:dev-upgradefrom
gzliudan:fix-bloombits-shutdown
Open

fix(core/bloombits): use single channel for shutdown #20878#2492
gzliudan wants to merge 1 commit into
XinFinOrg:dev-upgradefrom
gzliudan:fix-bloombits-shutdown

Conversation

@gzliudan

@gzliudan gzliudan commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Proposed changes

This replaces the two-stage shutdown scheme with the one we use almost everywhere else: a single quit channel signalling termination.

fix flaky test:

panic: test timed out after 45m0s
	running tests:
		TestMatcherIntermittent (45m0s)

goroutine 107075 [running]:
testing.(*M).startAlarm.func1()
	/opt/hostedtoolcache/go/1.25.12/x64/src/testing/testing.go:2682 +0x359
created by time.goFunc
	/opt/hostedtoolcache/go/1.25.12/x64/src/time/sleep.go:215 +0x2d

goroutine 1 [chan receive, 44 minutes]:
testing.(*T).Run(0xc0001121c0, {0x66d016?, 0x0?}, 0x67ac60)
	/opt/hostedtoolcache/go/1.25.12/x64/src/testing/testing.go:2005 +0x485
testing.runTests.func1(0xc0001121c0)
	/opt/hostedtoolcache/go/1.25.12/x64/src/testing/testing.go:2477 +0x3e
testing.tRunner(0xc0001121c0, 0xc000151c70)
	/opt/hostedtoolcache/go/1.25.12/x64/src/testing/testing.go:1934 +0xea
testing.runTests(0xc000012138, {0x91d7e0, 0xb, 0xb}, {0x7?, 0xc000174780?, 0x952b40?})
	/opt/hostedtoolcache/go/1.25.12/x64/src/testing/testing.go:2475 +0x4b4
testing.(*M).Run(0xc000108e60)
	/opt/hostedtoolcache/go/1.25.12/x64/src/testing/testing.go:2337 +0x63a
main.main()
	_testmain.go:75 +0x9b

goroutine 81 [chan receive, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.testMatcher(0xc00023ee00, {0xc0003fa810, 0x2, 0x2}, 0x0, 0x186a0, 0x1, 0x51, 0x1)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:197 +0x52f
github.com/XinFinOrg/XDPoSChain/core/bloombits.testMatcherDiffBatches(0xc00023ee00, {0xc0003fa810, 0x2, 0x2}, 0x0, 0x186a0, 0x1, 0x51)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:123 +0x65
github.com/XinFinOrg/XDPoSChain/core/bloombits.TestMatcherIntermittent(0xc00023ee00)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:68 +0x18a
testing.tRunner(0xc00023ee00, 0x67ac60)
	/opt/hostedtoolcache/go/1.25.12/x64/src/testing/testing.go:1934 +0xea
created by testing.(*T).Run in goroutine 1
	/opt/hostedtoolcache/go/1.25.12/x64/src/testing/testing.go:1997 +0x465

goroutine 103816 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*MatcherSession).AllocateRetrieval(...)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:551
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*MatcherSession).Multiplex(0xc00021f380, 0x1, 0xc00021e888?, 0xc0002e24d0)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:614 +0x18b
created by github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers in goroutine 81
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:218 +0xc6

goroutine 103804 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*MatcherSession).AllocateRetrieval(...)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:551
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*MatcherSession).Multiplex(0xc00021f380, 0x1, 0xc0001d27b0?, 0xc0002e24d0)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:614 +0x18b
created by github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers in goroutine 81
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:218 +0xc6

goroutine 103815 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers.func1()
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:224 +0xba
created by github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers in goroutine 81
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:221 +0x4e

goroutine 103198 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*scheduler).scheduleRequests(0xc00056ec48, 0xc0002f10e0, 0xc00041bd50, 0xc0002f11d0, 0xc0002e23f0)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/scheduler.go:92 +0x145
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*scheduler).run.func1()
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/scheduler.go:65 +0x38
sync.(*WaitGroup).Go.func1()
	/opt/hostedtoolcache/go/1.25.12/x64/src/sync/waitgroup.go:239 +0x4a
created by sync.(*WaitGroup).Go in goroutine 81
	/opt/hostedtoolcache/go/1.25.12/x64/src/sync/waitgroup.go:237 +0x73

goroutine 103806 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*MatcherSession).AllocateRetrieval(...)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:551
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*MatcherSession).Multiplex(0xc00021f380, 0x1, 0xc00021e708?, 0xc0002e24d0)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:614 +0x18b
created by github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers in goroutine 81
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:218 +0xc6

goroutine 103796 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*Matcher).distributor(0xc0000c8050, 0xc00041bd50, 0xc00021f380)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:410 +0x345
created by github.com/XinFinOrg/XDPoSChain/core/bloombits.(*Matcher).run in goroutine 81
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:251 +0x276

goroutine 103814 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*MatcherSession).AllocateRetrieval(...)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:551
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*MatcherSession).Multiplex(0xc00021f380, 0x1, 0xc000584770?, 0xc0002e24d0)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:614 +0x18b
created by github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers in goroutine 81
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:218 +0xc6

goroutine 103808 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*MatcherSession).AllocateRetrieval(...)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:551
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*MatcherSession).Multiplex(0xc00021f380, 0x1, 0xc00051a150?, 0xc0002e24d0)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:614 +0x18b
created by github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers in goroutine 81
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:218 +0xc6

goroutine 103807 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers.func1()
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:224 +0xba
created by github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers in goroutine 81
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:221 +0x4e

goroutine 103798 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*MatcherSession).AllocateRetrieval(...)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:551
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*MatcherSession).Multiplex(0xc00021f380, 0x1, 0xc0000f7770?, 0xc0002e24d0)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:614 +0x18b
created by github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers in goroutine 81
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:218 +0xc6

goroutine 103801 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers.func1()
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:224 +0xba
created by github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers in goroutine 81
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:221 +0x4e

goroutine 103197 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*scheduler).scheduleDeliveries(0xc00056ec30, 0xc0002f0ff0, 0xc0002844d0, 0xc0002e23f0)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/scheduler.go:138 +0x13b
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*scheduler).run.func2()
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/scheduler.go:66 +0x33
sync.(*WaitGroup).Go.func1()
	/opt/hostedtoolcache/go/1.25.12/x64/src/sync/waitgroup.go:239 +0x4a
created by sync.(*WaitGroup).Go in goroutine 81
	/opt/hostedtoolcache/go/1.25.12/x64/src/sync/waitgroup.go:237 +0x73

goroutine 103800 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*MatcherSession).AllocateRetrieval(...)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:551
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*MatcherSession).Multiplex(0xc00021f380, 0x1, 0xc0000f3770?, 0xc0002e24d0)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:614 +0x18b
created by github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers in goroutine 81
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:218 +0xc6

goroutine 103817 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers.func1()
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:224 +0xba
created by github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers in goroutine 81
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:221 +0x4e

goroutine 103805 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers.func1()
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:224 +0xba
created by github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers in goroutine 81
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:221 +0x4e

goroutine 103794 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*Matcher).subMatch.func1()
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:291 +0x1d5
created by github.com/XinFinOrg/XDPoSChain/core/bloombits.(*Matcher).subMatch in goroutine 81
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:277 +0x239

goroutine 103802 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*MatcherSession).AllocateRetrieval(...)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:551
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*MatcherSession).Multiplex(0xc00021f380, 0x1, 0xc00021e708?, 0xc0002e24d0)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:614 +0x18b
created by github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers in goroutine 81
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:218 +0xc6

goroutine 103193 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*scheduler).scheduleDeliveries(0xc00056ec18, 0xc0002f0e10, 0xc000284000, 0xc0002e23f0)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/scheduler.go:152 +0x246
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*scheduler).run.func2()
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/scheduler.go:66 +0x33
sync.(*WaitGroup).Go.func1()
	/opt/hostedtoolcache/go/1.25.12/x64/src/sync/waitgroup.go:239 +0x4a
created by sync.(*WaitGroup).Go in goroutine 81
	/opt/hostedtoolcache/go/1.25.12/x64/src/sync/waitgroup.go:237 +0x73

goroutine 103812 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*MatcherSession).AllocateRetrieval(...)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:551
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*MatcherSession).Multiplex(0xc00021f380, 0x1, 0xc000354ee8?, 0xc0002e24d0)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:614 +0x18b
created by github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers in goroutine 81
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:218 +0xc6

goroutine 103797 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*Matcher).Start.func1()
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:173 +0x15f
created by github.com/XinFinOrg/XDPoSChain/core/bloombits.(*Matcher).Start in goroutine 81
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:168 +0x373

goroutine 103803 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers.func1()
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:224 +0xba
created by github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers in goroutine 81
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:221 +0x4e

goroutine 103809 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers.func1()
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:224 +0xba
created by github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers in goroutine 81
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:221 +0x4e

goroutine 103811 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers.func1()
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:224 +0xba
created by github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers in goroutine 81
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:221 +0x4e

goroutine 103795 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*Matcher).subMatch.func2()
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:327 +0x165
created by github.com/XinFinOrg/XDPoSChain/core/bloombits.(*Matcher).subMatch in goroutine 81
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:320 +0x2fb

goroutine 103813 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers.func1()
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:224 +0xba
created by github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers in goroutine 81
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:221 +0x4e

goroutine 103200 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*scheduler).scheduleRequests(0xc00056ec60, 0xc0002f12c0, 0xc00041bd50, 0xc0002f13b0, 0xc0002e23f0)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/scheduler.go:92 +0x145
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*scheduler).run.func1()
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/scheduler.go:65 +0x38
sync.(*WaitGroup).Go.func1()
	/opt/hostedtoolcache/go/1.25.12/x64/src/sync/waitgroup.go:239 +0x4a
created by sync.(*WaitGroup).Go in goroutine 81
	/opt/hostedtoolcache/go/1.25.12/x64/src/sync/waitgroup.go:237 +0x73

goroutine 103199 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*scheduler).scheduleDeliveries(0xc00056ec48, 0xc0002f11d0, 0xc000284620, 0xc0002e23f0)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/scheduler.go:138 +0x13b
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*scheduler).run.func2()
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/scheduler.go:66 +0x33
sync.(*WaitGroup).Go.func1()
	/opt/hostedtoolcache/go/1.25.12/x64/src/sync/waitgroup.go:239 +0x4a
created by sync.(*WaitGroup).Go in goroutine 81
	/opt/hostedtoolcache/go/1.25.12/x64/src/sync/waitgroup.go:237 +0x73

goroutine 103799 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers.func1()
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:224 +0xba
created by github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers in goroutine 81
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:221 +0x4e

goroutine 103196 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*scheduler).scheduleRequests(0xc00056ec30, 0xc0002f0f00, 0xc00041bd50, 0xc0002f0ff0, 0xc0002e23f0)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/scheduler.go:92 +0x145
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*scheduler).run.func1()
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/scheduler.go:65 +0x38
sync.(*WaitGroup).Go.func1()
	/opt/hostedtoolcache/go/1.25.12/x64/src/sync/waitgroup.go:239 +0x4a
created by sync.(*WaitGroup).Go in goroutine 81
	/opt/hostedtoolcache/go/1.25.12/x64/src/sync/waitgroup.go:237 +0x73

goroutine 103195 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*Matcher).subMatch.func2()
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:342 +0x737
created by github.com/XinFinOrg/XDPoSChain/core/bloombits.(*Matcher).subMatch in goroutine 81
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:320 +0x2fb

goroutine 103201 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*scheduler).scheduleDeliveries(0xc00056ec60, 0xc0002f13b0, 0xc0002849a0, 0xc0002e23f0)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/scheduler.go:138 +0x13b
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*scheduler).run.func2()
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/scheduler.go:66 +0x33
sync.(*WaitGroup).Go.func1()
	/opt/hostedtoolcache/go/1.25.12/x64/src/sync/waitgroup.go:239 +0x4a
created by sync.(*WaitGroup).Go in goroutine 81
	/opt/hostedtoolcache/go/1.25.12/x64/src/sync/waitgroup.go:237 +0x73

goroutine 103191 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*scheduler).scheduleDeliveries(0xc00056ec00, 0xc0002f0c30, 0xc00041bf10, 0xc0002e23f0)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/scheduler.go:152 +0x246
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*scheduler).run.func2()
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/scheduler.go:66 +0x33
sync.(*WaitGroup).Go.func1()
	/opt/hostedtoolcache/go/1.25.12/x64/src/sync/waitgroup.go:239 +0x4a
created by sync.(*WaitGroup).Go in goroutine 81
	/opt/hostedtoolcache/go/1.25.12/x64/src/sync/waitgroup.go:237 +0x73

goroutine 103810 [select, 44 minutes]:
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*MatcherSession).AllocateRetrieval(...)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:551
github.com/XinFinOrg/XDPoSChain/core/bloombits.(*MatcherSession).Multiplex(0xc00021f380, 0x1, 0xc000354ee8?, 0xc0002e24d0)
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher.go:614 +0x18b
created by github.com/XinFinOrg/XDPoSChain/core/bloombits.startRetrievers in goroutine 81
	/home/runner/work/XDPoSChain/XDPoSChain/src/XDPoSChain/core/bloombits/matcher_test.go:218 +0xc6
FAIL	github.com/XinFinOrg/XDPoSChain/core/bloombits	2700.008s

Ref: ethereum#20878

Types of changes

What types of changes does your code introduce to XDC network?
Put an in the boxes that apply

  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Changes that don't change source code or tests
  • docs: Documentation only changes
  • feat: A new feature
  • fix: A bug fix
  • perf: A code change that improves performance
  • refactor: A code change that neither fixes a bug nor adds a feature
  • revert: Revert something
  • style: Changes that do not affect the meaning of the code
  • test: Adding missing tests or correcting existing tests

Impacted Components

Which parts of the codebase does this PR touch?
Put an in the boxes that apply

  • Consensus
  • Account
  • Network
  • Geth
  • Smart Contract
  • External components
  • Not sure (Please specify below)

Checklist

Put an in the boxes once you have confirmed below actions (or provide reasons on not doing so) that

  • This PR has sufficient test coverage (unit/integration test) OR I have provided reason in the PR description for not having test coverage
  • Tested on a private network from the genesis block and monitored the chain operating correctly for multiple epochs.
  • Provide an end-to-end test plan in the PR description on how to manually test it on the devnet/testnet.
  • Tested the backwards compatibility.
  • Tested with XDC nodes running this version co-exist with those running the previous version.
  • Relevant documentation has been updated as part of this PR
  • N/A

This replaces the two-stage shutdown scheme with the one we
use almost everywhere else: a single quit channel signalling
termination.

Co-authored-by: Felix Lange <fjl@twurst.com>
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: bc0e0119-21df-48c9-ab8e-46263b1db99b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants