[FIXED] Crash: Sending chunk to dangling pointer to cClientHandle - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html) +--- Forum: Development (https://forum.cuberite.org/forum-13.html) +--- Thread: [FIXED] Crash: Sending chunk to dangling pointer to cClientHandle (/thread-413.html) |
[FIXED] Crash: Sending chunk to dangling pointer to cClientHandle - FakeTruth - 03-27-2012 Woooo! Another crash The server was running rev 426 cChunkSender::SendChunk called with an invalid pointer to a cClientHandle. According to the log, the cClientHandle was deleted 1 second before the crash. I'll be uploading the dump and everything now http://dl.dropbox.com/u/27784874/MCServer_Crash.rar RE: Crash: Sending chunk to dangling pointer to cClientHandle - xoft - 03-27-2012 The log file would have been useful, too Bu at least now debugging works, the symbols matched I think I know what the issue is, just not yet sure how to fix it. cChunkSender::RemoveClient() is supposed to block until the client is really really removed, so it needs to wait for the sendthread to actually finish the current sending job. This waiting is flawed, because it uses a semaphore that is signalled everytime the sending job finishes, which makes the semaphore passable without waiting upon further queries. I'll think it over when I go home from work tonight, I guess I'll have a fix for that in the evening. RE: Crash: Sending chunk to dangling pointer to cClientHandle - FakeTruth - 03-27-2012 Glad the dump works. Anyway here's a piece of the log if you still want it http://pastebin.com/9TbHKP0d RE: Crash: Sending chunk to dangling pointer to cClientHandle - xoft - 03-28-2012 I think I fixed that in rev 438. Added a proper counting of semaphore operations. |