Well, this is frustrating. The last time I tried this server code, it crashed within hours on a double-free bug. Now I've been running for three days with ASan and it hasn't showed up.
I really doubt it, but perhaps some of the other fixes along the way permuted the bug away or something. I'm going to try to run it without ASan again and see what happens. I really doubt ASan could "mask" the real bug here, but I'm kind of running out of other ideas.
-
loftar
- Posts: 9096
- Joined: Fri Apr 03, 2009 7:05 am
- Location: Your character database
Re: Debugging woes: Small rollback
"Object-oriented design is the roman numerals of computing." -- Rob Pike
-
loftar
- Posts: 9096
- Joined: Fri Apr 03, 2009 7:05 am
- Location: Your character database
Re: Debugging woes: Small rollback
Lol, turns out there was a bug in the termination code also. Doesn't really matter since it just sends corrupted shutdown-timer information to clients the last thing that happens before they're disconnected, but still. :)
"Object-oriented design is the roman numerals of computing." -- Rob Pike
-
Vladichka
- Posts: 116
- Joined: Tue Jul 18, 2023 8:26 pm
Re: Debugging woes: Small rollback
Well, looks like it didn't take longloftar wrote:Well, this is frustrating. The last time I tried this server code, it crashed within hours on a double-free bug. Now I've been running for three days with ASan and it hasn't showed up.
I really doubt it, but perhaps some of the other fixes along the way permuted the bug away or something. I'm going to try to run it without ASan again and see what happens. I really doubt ASan could "mask" the real bug here, but I'm kind of running out of other ideas.
-
loftar
- Posts: 9096
- Joined: Fri Apr 03, 2009 7:05 am
- Location: Your character database
Re: Debugging woes: Small rollback
Nah, as I mentioned, that was a bug when shutting down the still ASan'd server.Vladichka wrote:Well, looks like it didn't take long
"Object-oriented design is the roman numerals of computing." -- Rob Pike
-
xyzzy57
- Posts: 200
- Joined: Thu Aug 19, 2021 9:41 pm
Re: Debugging woes: Small rollback
Dynamic memory abuse bugs are a real b*tch. You have my sympathy. Good luck.loftar wrote:Well, this is frustrating. The last time I tried this server code, it crashed within hours on a double-free bug. Now I've been running for three days with ASan and it hasn't showed up.
I really doubt it, but perhaps some of the other fixes along the way permuted the bug away or something. I'm going to try to run it without ASan again and see what happens. I really doubt ASan could "mask" the real bug here, but I'm kind of running out of other ideas.
-
MightySheep
- Posts: 2534
- Joined: Fri Jul 22, 2011 1:18 pm
Re: Debugging woes: Small rollback
Fixing bugs is boring why don't u add some new bugs to the game instead
-
Robben_DuMarsch
- Posts: 2646
- Joined: Wed Sep 28, 2011 2:58 am
Re: Debugging woes: Small rollback
Gigantic underground beetle that is like bear sized and very scary/stronk.
Tell Jorb we want bugs/beetles instead of birbs.
Tell Jorb we want bugs/beetles instead of birbs.
-
vatas
- Posts: 5255
- Joined: Fri Apr 05, 2013 8:34 am
- Location: Suomi Finland Perkele
Re: Debugging woes: Small rollback
Robben_DuMarsch wrote:Gigantic underground beetle that is like bear sized and very scary/stronk.
Tell Jorb we want bugs/beetles instead of birbs.

Haven and Hearth Wiki (Maintained by volunteers - test/verify when practical. Forum thread
Basic Claim Safety (And what you’re doing wrong
TL:;DR: Build a Palisade with only Visitor gates.)
Combat Guide (Overview, PVE, PVP) (Includes how to escape/minimize risk of getting killed.)
Basic Claim Safety (And what you’re doing wrong
TL:;DR: Build a Palisade with only Visitor gates.)
Combat Guide (Overview, PVE, PVP) (Includes how to escape/minimize risk of getting killed.)
-
xyzzy57
- Posts: 200
- Joined: Thu Aug 19, 2021 9:41 pm
Re: Debugging woes: Small rollback
So was this latest crash the one you'd been waiting for? Inquiring minds really want to know.
-
loftar
- Posts: 9096
- Joined: Fri Apr 03, 2009 7:05 am
- Location: Your character database
Re: Debugging woes: Small rollback
It was indeed. I had been cleaning up parts of the connection code a while ago, and accidentally left a line that transmitted the error message for old clients twice, but using the same message buffer, leading to it getting freed twice. The first time it happened, I thought it looked like the double-free was a random dangling pointer getting freed in completely unrelated code (which is why I was running with ASan), but it turned out to be significantly simpler than that now that I got to examine it again.
"Object-oriented design is the roman numerals of computing." -- Rob Pike