Some RPC's hang during activation of best chain #340

Open
opened 7 months ago by duke · 2 comments
duke commented 7 months ago
Owner

When starting a node and it is running ActivateBestChain() in main.cpp, some RPCs hang. Currently I am seeing z_listaddresses hang but other RPC's give an error :

Why the different behavior? These are all read-only RPCs, ideally they should all be able to be run during best chain activation.

$ ./src/hush-cli getinfo
error code: -28
error message:
Activating best chain...
$ ./src/hush-cli z_listaddresses
^C
$ ./src/hush-cli z_getoperationstatus
error code: -28
error message:
Activating best chain...

When starting a node and it is running `ActivateBestChain()` in main.cpp, some RPCs hang. Currently I am seeing `z_listaddresses` hang but other RPC's give an error : Why the different behavior? These are all read-only RPCs, ideally they should all be able to be run during best chain activation. ``` $ ./src/hush-cli getinfo error code: -28 error message: Activating best chain... $ ./src/hush-cli z_listaddresses ^C $ ./src/hush-cli z_getoperationstatus error code: -28 error message: Activating best chain... ```
duke added the
bug
label 7 months ago
Poster
Owner

The RPC help is the only non-zaddr RPC I have seen hang so far, and z_getoperationstatus is the only zaddr RPC I have seen NOT hang. I have not tried them all but these clues might be enough to discover why the RPCs have different behavior.

The RPC `help` is the only non-zaddr RPC I have seen hang so far, and z_getoperationstatus is the only zaddr RPC I have seen NOT hang. I have not tried them all but these clues might be enough to discover why the RPCs have different behavior.
Poster
Owner

One difference I can see is that help uses no LOCKs while z_getoperationstatus does a LOCK on cs_main and cs_wallet . z_listaddresses uses the same LOCKs, so it's not yet clear why z_getoperationstatus and z_listaddresses behave differently.

One difference I can see is that `help` uses no LOCKs while `z_getoperationstatus` does a LOCK on `cs_main` and `cs_wallet` . `z_listaddresses` uses the same LOCKs, so it's not yet clear why `z_getoperationstatus` and `z_listaddresses` behave differently.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.