Author Topic: server not obeying kill signal?  (Read 2383 times)

0 Members and 1 Guest are viewing this topic.

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6142
    • Ultimate 13 Soldat
server not obeying kill signal?
« on: July 07, 2006, 07:40:29 am »
I've noticed that as of 2.5.1 (maybe 2.5.0 too, but I wouldn't know, I skipped 2.4.9 --> 2.5.1) that my servers can no longer be killed with the normal `kill` signal, but the -9/TERM signal needs to be sent in order for it to end.  It was never like this before version 2.5.1 (or 2.5.0)

Any insight?

Offline frogboy

  • Soldier
  • **
  • Posts: 107
Re: server not obeying kill signal?
« Reply #1 on: July 07, 2006, 09:37:27 am »
Could be this, from 2.5.0 changelog:
- Added Linux Servers will clean up properly when terminated with TERM(15) or QUIT(3) signals.

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6142
    • Ultimate 13 Soldat
Re: server not obeying kill signal?
« Reply #2 on: July 07, 2006, 11:13:09 am »
yeah, thats the only change that I can imagine would cause it to act oddly like this

Offline jrgp

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 5025
Re: server not obeying kill signal?
« Reply #3 on: July 07, 2006, 12:52:49 pm »
Oh, your having that problem to aye?

Yeah, I was going to shut down the server so I could disable the m79 so I hit:
top
u jrgp
Saw the pid (it was like 3863, can't really remember) and hit k 3863.

But nothing happened. So I rebooted the pc tweaked the soldat.ini and started it like I usually do: nohup ./soldatserver > /dev/null &

But how exactly do I kill the process now?
Careful with that axe, Eugene.

Offline mar77a

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1295
  • mad
    • random stuffs
Re: server not obeying kill signal?
« Reply #4 on: July 07, 2006, 01:48:23 pm »
kill [pid] -9
killall soldatserver

Offline chrisgbk

  • Inactive Staff
  • Veteran
  • *****
  • Posts: 1739
Re: server not obeying kill signal?
« Reply #5 on: July 08, 2006, 02:03:00 am »
By default, kill sends signal 15 doesn't it? That would mean that the server is catching the kill signal, but not properly exiting.

kill -9 would be the best bet until it gets fixed then, because 9 is the only signal that an application can't catch. The downside is that the dedicated server is unable to clean up after itself (write logs, etc). Of course, this would be the same as it USED to be, when it never caught these signals.

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6142
    • Ultimate 13 Soldat
Re: server not obeying kill signal?
« Reply #6 on: July 08, 2006, 02:04:37 am »
I'm glad to see that this has been confirmed.

The thing is (and this is especially important because of my stats apps) that I really need it to clean up properly, so -9 isn't a preferable option.

Offline chrisgbk

  • Inactive Staff
  • Veteran
  • *****
  • Posts: 1739
Re: server not obeying kill signal?
« Reply #7 on: July 08, 2006, 02:39:14 am »
I'm glad to see that this has been confirmed.

The thing is (and this is especially important because of my stats apps) that I really need it to clean up properly, so -9 isn't a preferable option.

I can understand that, BUT: until 2.5.0 the server didn't clean up itself AT ALL: 2.4.9 and below treated TERM/15 as KILL/9 (speaking of which, you mixed up the name and the number in your original post :P TERM isn't 9, check 'kill -l'), so they would implicitly lose data due to them never ever writing log files at that point. Hence why this new functionality was added.

However, after talking with EnEsCe, and some testing, we may have found the cause.

Now, for the workaround: sending kill -15 will cause the server to save all its data, it just won't properly shutdown. So if you want to save data, send kill -15, wait a few seconds to give it time, then send kill -9. Easy enough to do in code.
« Last Edit: July 08, 2006, 02:41:11 am by chrisgbk »

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6142
    • Ultimate 13 Soldat
Re: server not obeying kill signal?
« Reply #8 on: July 08, 2006, 03:44:06 am »
Thanks for clearing that up, at least my point was clear enough to present the problem
« Last Edit: July 08, 2006, 03:47:40 am by FliesLikeABrick »

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: server not obeying kill signal?
« Reply #9 on: July 08, 2006, 05:08:38 am »
The bug has now been fixed, and also made the server more stable in the process.
Credit to Chrisgbk for fixing this one.

Offline Leo

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1011
Re: server not obeying kill signal?
« Reply #10 on: July 08, 2006, 06:56:27 am »
I know this doesn't belong to this topic but I have to ask. When can we expect 2.5.2 ? EnEsCe, I hope you made it so that tkills reset at the end of every map :)

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: server not obeying kill signal?
« Reply #11 on: July 08, 2006, 07:02:46 am »
Yeah I have changed it to reset the TKills, and I cant say when 2.5.2 comes out. Theres alot of scrap metal in there that needs to be recyled.

Offline Leo

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1011
Re: server not obeying kill signal?
« Reply #12 on: July 08, 2006, 07:42:15 am »
I could beta test new version in one of my servers if you have anything ready ;)

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6142
    • Ultimate 13 Soldat
Re: server not obeying kill signal?
« Reply #13 on: July 08, 2006, 02:27:57 pm »
I want to sincerely thank EnEsCe for taking over the server development, the dedicated server has come a very far way since EnEsCe first got involved, back before he took over the entire development.  We all remember back when the dedicated server was unstable, crashed with custom maps .... yeah.

Thanks.