[CODE] pfile records duping bug?

From: Andrey Fidrya (andrey@alex-ua.com)
Date: 07/10/00


I have got few complains from players about characters disappearing. When
I checked pfile I noticed that few player records are duplicated.
For example: char at pfilepos 280 was duped to pfilepos 281 deleting
char at pfilepos 281 etc. This happened only on rare occasion.
I noticed that this happens only if core_dump() is called right after
writing something to playerfile (the record is written twice and overwrites
next record!)
Here's game log (translated from Russian and shortened up a bit):
===
[major lag here]
16:06:17 :: bp: save_char: Saving char Aksar
16:06:17 :: bp: save_char: Saving char Skyline
Write to socket: Broken pipe
16:06:17 :: bp: save_char: Saving char Litien
16:06:17 :: Missed 80 seconds of pulses, calling core_dump()
// ^^^ I call core_dump() if more than 80 seconds missed
16:06:17 :: SYSERR: Assertion failed at comm.c:933!
// ^^^ This is core_dump's message
Using file descriptor for logging.
16:06:19 :: WARNING: EOF in socket (connection reset by peer)
16:06:19 :: Losing descriptor without char.
[etc]
===
Character Litien (or any other char who was saved LAST just before
core_dump() is called) will be duplicated and character after him in
pfile will be overwritten.
Any ideas how to fix this?

Andrey


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT