Crash

  • Castillo
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
More
4 weeks 2 days ago #8480 by Castillo
Crash was created by Castillo
Hello there.

I'm playing around with the code base of TBA mud 2020.
And, found that the mud crash on shutdown. It seems if a mobile start following me. I think, because:

This test crash TBA mud 2020.

goto guard
force guard follow castillo
shutdown

Jan 18 22:54:38 2020 :: Closing link to: Castillo.
Jan 18 22:54:38 2020 :: Saving current MUD time.
Jan 18 22:54:38 2020 :: Normal termination of game.
Jan 18 22:54:38 2020 :: Clearing game world.

Program received signal SIGSEGV, Segmentation fault.
0x00000000004fc6c7 in stop_follower (ch=ch@entry=0x1b7cce0) at utils.c:549
549 for (k = ch->master->followers; k->next->follower != ch; k = k->next);
(gdb)

Bob

Please Log in or Create an account to join the conversation.

More
4 weeks 2 days ago #8481 by Krell
Replied by Krell on topic Crash
This seems eerily familiar.

Crash on Shutdown

I don't know if this was ever solved. A while back I was going to make entries to track values happening at different points at what I thought might be the affected code. But I got frustrated unraveling that knot of code after a while.

Maybe you'll be the one who solves it.

Please Log in or Create an account to join the conversation.

  • Castillo
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
More
4 weeks 2 days ago #8482 by Castillo
Replied by Castillo on topic Crash
I'll get a look at it tomorrow. It's pretty late now.
I'll have to figure out more about all the codes.

In my example
549 for (k = ch->master->followers; k->next->follower != ch; k = k->next);

Obviously, it crash because k exist, but k->next = NULL, so k->next->follower can't be
accessed and cause the SIGSEGV.

shouldn't there be atlease a security check to avoid a crash. even, if it's just a temporary fix? Something, that will check if (!k->next) whatever code is needed?

i need to understand more this code.
i'll see tomorrow.

Bob

Please Log in or Create an account to join the conversation.

More
4 weeks 2 days ago #8483 by thomas
Replied by thomas on topic Crash
This should be an easy fix. And it's reproducible.

Please Log in or Create an account to join the conversation.

More
4 weeks 1 day ago #8485 by thomas
Replied by thomas on topic Crash
The following user(s) said Thank You: Krell

Please Log in or Create an account to join the conversation.

More
4 weeks 1 day ago #8487 by Krell
Replied by Krell on topic Crash
That did it alright! Thanks Thomas, Welcor and the rest of the mud's development team.

Please Log in or Create an account to join the conversation.

  • Castillo
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
More
4 weeks 1 day ago #8488 by Castillo
Replied by Castillo on topic Crash
Great!
At first, i wasn't sure if that was a bug or an indirect bug caused by my snippet code.

I used to code under (CircleMud 3.0) 20 years ago, but i don't know this forked version of code, and i forgot a lot with the years !

I got nostalgia, and wanted to try the latest CircleMud (TBA Mud).

I used to report a lot of bugs in CircleMud 3.0. That why i investigated on a bare bone
TBA Mud 2020 to be 100% sure, to replicate the crash.

Kudos for the fix!

Please Log in or Create an account to join the conversation.

More
3 weeks 1 day ago #8510 by Salty
Replied by Salty on topic Crash
Could this be crashing earlier versions such as tbaMUD 2018 as well?

Please Log in or Create an account to join the conversation.

More
3 weeks 1 day ago #8512 by thomas
Replied by thomas on topic Crash
Yes, most definately. The fix is small - I'd apply it asap.

Please Log in or Create an account to join the conversation.

Time to create page: 0.255 seconds