[rc5] Bug in state saving of client

Stephen Langasek vorlon at dodds.net
Wed Jul 16 12:39:05 EDT 1997

On Thu, 17 Jul 1997, dan carter wrote:

> I  have just noticed some strange behaviour in the OS/2 client.

> If i Ctrl+C it, it saves its current position and closes down, printing
> a message to the screen that it is doing so.

> However when i shutdown my system(and say OK to close it when prompted)
> or kill it, it does not save its state.
> Now this was initially the limit of my concern, that work was not being
> saved, but was being wasted. However i have now noticed that it seems
> to lose a block when this happens.
> eg. i start it up, it says:
> [07/16/97 11:06:18 GMT] Block: 2098FD:40000000 being processed
> [07/16/97 11:06:18 GMT] 40 Blocks remain in file buff-in.rc5
> i kill it and then start it up, it says:
> [07/16/97 11:07:27 GMT] Block: 2098FD:30000000 being processed
> [07/16/97 11:07:27 GMT] 39 Blocks remain in file buff-in.rc5

> Based on the date/time of buff-out.rc5 i can say that the out buffer is
> not being written to, so at least its not spamming blocks.
> But where are these missing blocks going to?

In all flavors of the client, a block which is saved on exit is placed
back on the stack in buff-in.  It will never be written to buff-out unless
the block has actually been completely checked.

Also common to all the clients is the feature that, if killed abnormally,
the client will lose the block it's working on.  This can't be helped;
there simply is no way to trap an exception.  The exception is there so
that the computer can kill a program that refuses to respond to any other
signals.  The only way to address this issue and prevent the loss of
blocks is to make sure the computer doesn't HAVE to send the exception--by
building the client to respond correctly to the more conventional 'the
computer is shutting down now, so finish your business' signals.  The unix
clients handle a kill -HUP or kill -TERM appropriately; the windows
client, for whatever reason, does not.  This was also a problem with the
DESCHALL client, until someone helpfully built a desgui wrapper which not
only handled the system events correctly, but also replaced the ugly
window with a much more attractive icon in the system tray. :)

So--any blocks that your system is processing at the time it shuts down
are lost.  They will never get reported back to the keyservers, and if
necessary, they will be handed out again for processing at a later date.

                              -Steve Langasek

To unsubscribe, send email to majordomo at llamas.net with 'unsubscribe rc5' in the body.

More information about the rc5 mailing list