mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
make newSubfetcher dump stack trace in debug log
This commit is contained in:
parent
4fc9f889ad
commit
e6ff4afa6e
1 changed files with 5 additions and 0 deletions
|
|
@ -17,6 +17,7 @@
|
||||||
package state
|
package state
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"runtime"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
@ -229,6 +230,10 @@ func newSubfetcher(db Database, state common.Hash, owner common.Hash, root commo
|
||||||
term: make(chan struct{}),
|
term: make(chan struct{}),
|
||||||
seen: make(map[string]struct{}),
|
seen: make(map[string]struct{}),
|
||||||
}
|
}
|
||||||
|
b := make([]byte, 2048) // adjust buffer size to be larger than expected stack
|
||||||
|
n := runtime.Stack(b, false)
|
||||||
|
s := string(b[:n])
|
||||||
|
log.Trace("stack", "trace", s)
|
||||||
go sf.loop()
|
go sf.loop()
|
||||||
return sf
|
return sf
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue