public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
* [Bitcoin-development] RPC and signals - processing priority
@ 2012-06-15 20:55 grarpamp
  2012-06-16  7:04 ` Wladimir
  0 siblings, 1 reply; 2+ messages in thread
From: grarpamp @ 2012-06-15 20:55 UTC (permalink / raw)
  To: bitcoin-development

While happily processing these:
received block ...
SetBestChain: new best=...  height=...  work=...
ProcessBlock: ACCEPTED

bitcoind very often refuses to answer rpc queries such as getinfo/stop,
or signals such as kill/ctrl-c. It even registers:
 ThreadRPCServer method=getinfo/stop
in the debug log. But the action doesn't happen as expected.

Shouldn't it be checking and processing all user interrupts like
once per block and doing the chain in the background?

How do busy commerce servers deal with this poor rpc handling?

Is there a way to increase the priority of user scheduled tasks?
What's going on? Thanks.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Bitcoin-development] RPC and signals - processing priority
  2012-06-15 20:55 [Bitcoin-development] RPC and signals - processing priority grarpamp
@ 2012-06-16  7:04 ` Wladimir
  0 siblings, 0 replies; 2+ messages in thread
From: Wladimir @ 2012-06-16  7:04 UTC (permalink / raw)
  To: grarpamp; +Cc: bitcoin-development

[-- Attachment #1: Type: text/plain, Size: 1073 bytes --]

On Fri, Jun 15, 2012 at 10:55 PM, grarpamp <grarpamp@gmail•com> wrote:

> While happily processing these:
> received block ...
> SetBestChain: new best=...  height=...  work=...
> ProcessBlock: ACCEPTED
>
> bitcoind very often refuses to answer rpc queries such as getinfo/stop,
> or signals such as kill/ctrl-c. It even registers:
>  ThreadRPCServer method=getinfo/stop
> in the debug log. But the action doesn't happen as expected.
>
> Shouldn't it be checking and processing all user interrupts like
> once per block and doing the chain in the background?
>


This has nothing to do with priority and "user interrupts", but with the
locks on the wallet and client. Every RPC command takes both locks, and
releases them only when finished.

Shutting down also requires both locks, so the operations will be
serialized.

This protects the database and critical data structures. Sure, there might
be some cases in which the locks are not necessary, or read/write locks
could be used instead to improve concurrency, but this has to be approached
really carefully.

Wladimir

[-- Attachment #2: Type: text/html, Size: 1529 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-16  7:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-15 20:55 [Bitcoin-development] RPC and signals - processing priority grarpamp
2012-06-16  7:04 ` Wladimir

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox