-
Notifications
You must be signed in to change notification settings - Fork 697
testrpc crashes after a while with "Cannot read property 'pop' of undefined" in "CheckpointTrie.Trie._updateNode" #417
Comments
@roderik I pinged you on gitter, but will chat here, too. I've seen this before myself, but never on a clean branch (aka, always when I'm in the middle of making some changes). It's very intermittent for me and has been difficult for me to track down. Does it reproduce regularly for you? If so, perhaps you could share a little more detail about your environment? Or better yet, some code which makes it reproduce regularly? |
Sorry chat app overload :) My Gitter is not sending notifications. I was typing up a lot of other stuff, but maybe you are right, and maybe it is related to the Migration behaviour. It is always after the getCode call: https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getcode So for some reason that crashes. It might indeed be because change the contract -> which means it would change the address & change the truffle json file -> but I do not deploy and just run my filter watches with the old addresses. Meaning it tries to call getCode for something that does not exist? |
Oh sorry, I don't think this is related to migration behaviour. Your comment on 414 just caught my eye, is all. You say "after" the Is this happening at a certain point during your migration? Like, the first migration always goes off successfully, but then it usually fails after the nth or the mth? Calling |
No, no interval mining for me. This is my docker image and startup command
|
I updated the docker image to the latest version, and included #425 |
No joi 😢
Same code on v5 and a recent Parity node work fine btw |
any way to workaround this? |
Sorry guys, this one is definitely on my list. Will take me a little while to circle 'round to it, however. |
@roderik one more question for you - can you please post your command line args? For instance, are you using the forking feature? |
|
Nice mnemonic ;-) |
Disclaimer: I am not a JS programmer, treat everything below with a grain of salt and with your red herring detector turned up to 11. I've taken a quick look at this (also been bitten by the "get on undefined" bug), and it seems like this is a race condition between modifying Investigating this is hopelessly painful, not only because it's a heisenbugish race (that becomes more difficult to trigger with debug log statements added) but it's also smack middle of a callback hell. |
@q3k sorry I didn't respond sooner. I totally agree w/ the sentiment on the "heisenbugish race" you mention. :-( Your thoughts on the cause echo my own, though I have a feeling that they're more developed w.r.t. the actual root cause. However I think it's telling that the issue manifests in a couple of different ways (see the traces in @roderik's initial report). |
I think this and #359 are related, but I can't be certain so I won't call this a dupe just yet. |
@q3k, @roderik, and others trying to debug this: just a heads up that we're in the process of publishing a bounty for a reliable automated repro of this over on #450. It's not live yet, but I suspect it will be later today. Wanted to notify here first given the work the people in this thread have already done to troubleshoot this! Edit: it looks like this bounty will go live sometime tomorrow, US time. |
So there's a simple fix to this issue which I've been avoiding making because it feels a little like sweeping it under the rug. That fix is to process each request serially. I've made this change in trufflesuite/ganache#53, and this seems to eliminate this problem, and various others, entirely. I've just published Closing this case for now, however I'll still keep the bounty in #453 open, as I'd much rather have an appropriate lower-level fix which doesn't require this sort of serial request processing. |
Awesome! |
which, unde certain conditions cause "Cannot read property 'pop' of undefined" Ref: * trufflesuite/ganache#417 * trufflesuite/ganache#453
which, unde certain conditions cause "Cannot read property 'pop' of undefined" Ref: * trufflesuite/ganache#417 * trufflesuite/ganache#453
which, unde certain conditions cause "Cannot read property 'pop' of undefined" Ref: * trufflesuite/ganache#417 * trufflesuite/ganache#453
which, unde certain conditions cause "Cannot read property 'pop' of undefined" Ref: * trufflesuite/ganache#417 * trufflesuite/ganache#453
which, unde certain conditions cause "Cannot read property 'pop' of undefined" Ref: * trufflesuite/ganache#417 * trufflesuite/ganache#453
Hi, for information: just released Lost a bit track how much of this bug is fixed by this and what workarounds you already implemented. Feel free to get in contact or open new PRs if there are further or still ongoing questions or issues. |
which, unde certain conditions cause "Cannot read property 'pop' of undefined" Ref: * trufflesuite/ganache#417 * trufflesuite/ganache#453
Not doing anything special, had a bunch of filters running on events, but I was not using the app.
Second time today:
Always just after "eth_getCode"
The text was updated successfully, but these errors were encountered: