From b3acf83e3383304b71dc2c8a08d7f2560a41cad9 Mon Sep 17 00:00:00 2001 From: Brion L Date: Tue, 20 Sep 2022 16:25:52 +0800 Subject: [PATCH 1/4] fix bloombits deadlock --- eth/backend.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/eth/backend.go b/eth/backend.go index 22be2ef961..b08dcea61b 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -224,9 +224,7 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { eth.blockchain.SetHead(compat.RewindTo) rawdb.WriteChainConfig(chainDb, genesisHash, chainConfig) } - if !config.AncientPrune { - eth.bloomIndexer.Start(eth.blockchain) - } + eth.bloomIndexer.Start(eth.blockchain) if config.TxPool.Journal != "" { config.TxPool.Journal = stack.ResolvePath(config.TxPool.Journal) From 9b5443e9bdc8743f3b371b54e4d7fcb69d838772 Mon Sep 17 00:00:00 2001 From: Brion L Date: Tue, 20 Sep 2022 17:13:29 +0800 Subject: [PATCH 2/4] update --- core/bloombits/matcher.go | 2 +- eth/backend.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/bloombits/matcher.go b/core/bloombits/matcher.go index f2a8bda17c..49ed8d4dfd 100644 --- a/core/bloombits/matcher.go +++ b/core/bloombits/matcher.go @@ -634,7 +634,7 @@ func (s *MatcherSession) Multiplex(batch int, wait time.Duration, mux chan chan s.errLock.Lock() s.err = result.Error s.errLock.Unlock() - s.Close() + //s.Close() } s.deliverSections(result.Bit, result.Sections, result.Bitsets) } diff --git a/eth/backend.go b/eth/backend.go index b08dcea61b..22be2ef961 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -224,7 +224,9 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { eth.blockchain.SetHead(compat.RewindTo) rawdb.WriteChainConfig(chainDb, genesisHash, chainConfig) } - eth.bloomIndexer.Start(eth.blockchain) + if !config.AncientPrune { + eth.bloomIndexer.Start(eth.blockchain) + } if config.TxPool.Journal != "" { config.TxPool.Journal = stack.ResolvePath(config.TxPool.Journal) From 55370ce8331f0611e4baa398b62e5b5ca1f317a9 Mon Sep 17 00:00:00 2001 From: Brion L Date: Tue, 20 Sep 2022 16:25:52 +0800 Subject: [PATCH 3/4] fix bloombits deadlock --- eth/backend.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/eth/backend.go b/eth/backend.go index 22be2ef961..b08dcea61b 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -224,9 +224,7 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { eth.blockchain.SetHead(compat.RewindTo) rawdb.WriteChainConfig(chainDb, genesisHash, chainConfig) } - if !config.AncientPrune { - eth.bloomIndexer.Start(eth.blockchain) - } + eth.bloomIndexer.Start(eth.blockchain) if config.TxPool.Journal != "" { config.TxPool.Journal = stack.ResolvePath(config.TxPool.Journal) From 08c60f59788b0e0aa3792b1b3c4782ca455a3f88 Mon Sep 17 00:00:00 2001 From: Brion L Date: Tue, 20 Sep 2022 17:13:29 +0800 Subject: [PATCH 4/4] update --- eth/backend.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eth/backend.go b/eth/backend.go index b08dcea61b..22be2ef961 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -224,7 +224,9 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { eth.blockchain.SetHead(compat.RewindTo) rawdb.WriteChainConfig(chainDb, genesisHash, chainConfig) } - eth.bloomIndexer.Start(eth.blockchain) + if !config.AncientPrune { + eth.bloomIndexer.Start(eth.blockchain) + } if config.TxPool.Journal != "" { config.TxPool.Journal = stack.ResolvePath(config.TxPool.Journal)