joe7575 / signs_bot

A Minetest robot controlled by signs
GNU General Public License v3.0
5 stars 7 forks source link

Latest update causes SIGIOT errors #20

Closed Brackston closed 2 years ago

Brackston commented 2 years ago

Not sure what happened but the last update leaves bots in map after a server crash, removing the artifacts (leftover bots from previous crash) while bots are running crashed our server. Not sure of the problem. our Server had plenty of ram (32Gig) so a SIGIOT is strange, Leap frog

nixnoxus commented 2 years ago

.. leaves bots in map after a server crash

This this problem has existed for some time.

See https://github.com/joe7575/signs_bot/pull/21

so it must not necessarily be related to the last update

nixnoxus commented 2 years ago

.. removing the artifacts (leftover bots from previous crash) while bots are running crashed our server.

this problem I did not know until now and could actually be related to the last update

debagos commented 2 years ago

Yes, we must distinguish here between two things. 1) Fatal crash. 2) The leftover bots after a fatal error.

Number 2 happens when the server dies without shutting down gracefully. @nixnoxus explained the problem very detailed in #21 But number 1, the fatal crashes, I can't really explain them. All information I have is that a sub process of Minetest dies and then the main process panics and kills itself instantly with a SIGIOT, which is basically a abort signal (MT returns that when a sub process dies). So no shutdown is executed, the whole server is instantly death.

I am not too sure if this really is a problem with this mod, because a mod should never be able to crash the Lua process and furthermore there are signs that using nested interrupts in Mesecons Lua Controller crash the server the same way.

joe7575 commented 2 years ago

It's very unlikely that the bugfix is the cause of your SIGIOT. The bug fix only handles the case, when a bot places a bot box. Check the diff

debagos commented 2 years ago

Here are two crash logs. But most times I don't get any log message at all...

2022-03-26 21:43:11: ERROR[Server]: An unhandled exception occurred: std::bad_alloc
2022-03-26 21:43:11: ERROR[Server]: In thread 7fa18ef38700:
2022-03-26 21:43:11: ERROR[Server]: /home/juri/github/minetest-5.5.0/src/server.cpp:86: virtual void* ServerThread::run(): A fatal error occurred: std::bad_alloc
2022-03-25 21:07:57: ERROR[Server]: An unhandled exception occurred: basic_string::_M_construct null not valid
2022-03-25 21:07:57: ERROR[Server]: In thread 7fa2198c5700:
2022-03-25 21:07:57: ERROR[Server]: /home/juri/github/minetest-5.5.0/src/server.cpp:86: virtual void* ServerThread::run(): A fatal error occurred: basic_string::_M_construct null not valid
joe7575 commented 2 years ago

A std::bad_alloc is something you should report in the minetest repo or in the forum.

debagos commented 2 years ago

Hence this seems like an engine problem, we should close this issue. I created an issue in the Minetest repo: https://github.com/minetest/minetest/issues/12163

joe7575 commented 2 years ago

Thanks for the info