News:

Remember if you wish to share a pic or a story, with just a selected few, use the new extended profile with custom buddy list http://www.fibsboard.com/announcements/new-ultimate-profile-a-biopicdocumentsounds-area-that-can-only-be-seen-by-b/

Main Menu

Tourneybot Frozen

Started by amarganth, October 19, 2005, 01:04:23 PM

Previous topic - Next topic

MadMatt

#20
Quote
Quoteand it is a shame that someone deliberately knocking the bots offline

Is this an established fact or is this a supposition?  If this is the actual case, how do we go about finding out who the culprit is and neutering him/her?

I'd be interested in finding out how this works as well, so that I can plug the hole that enables this person to knock TourneyBot off. If it's true, then it's quite obviously a serious bug in TourneyBot. If you have information, please share it.
MadMatt
----------

TourneyBot Website

burper

Quote
Quote
Quoteand it is a shame that someone deliberately knocking the bots offline

Is this an established fact or is this a supposition?  If this is the actual case, how do we go about finding out who the culprit is and neutering him/her?

I'd be interested in finding out how this works as well, so that I can plug the hole that enables this person to knock TourneyBot off. If it's true, then it's quite obviously a serious bug in TourneyBot. If you have information, please share it.
Have you taken the time to look at the logs at all MM? I would think they would reveal something, wether it be external or internal.

webrunner

I never had any problems when the bot was on my server.
It never stopped as far as i know.
Maybe that is because i had a firewall installed.
Or is it knocked out thrue a glitch in the code?

[OFFTOPIC]
Hi Burper, you back again?
[/OFFTOPIC]
"There is a difference between knowing the path and walking the path."
Bruce Lee
===================================
Orion Pax |

juggler

#23
Quote
Have you taken the time to look at the logs at all MM? I would think they would reveal something, wether it be external or internal.

Hi burper, hi all,
I just have browsed through the logs and not seen anything at all. The tbot log of FIBS communication ended in mid-word, the process was still alive (that's why the shell script wrapper didn't restart it, unfortunateley), but tbot was not logged in any longer. It's conceivable that certain inputs (typically excessively long lines etc.) could make it hang, but that's just an assumption. If you have specific ideas let me know -- I may have a look as soon as I have played enough bg for the day, which may be tomorrow, next week or next year.

I have just restarted it so that it is available again. "Sorry for the inconvenience." ;-)

Regards,
Peter aka the juggler

diane

#24
QuoteI never had any problems when the bot was on my server.
It never stopped as far as i know.
Maybe that is because i had a firewall installed.
Or is it knocked out thrue a glitch in the code?
If you check the date of the first post on this thread - it is Oct 19th 2005, this post looking for a new home for TourneyBot was made in November last year - and the actual move took some time.  This means it did happen whilst webrunner hosted it - or am I missing something?  
The point I am making is that exactly the same pattern is occurring independant of where the bot is geographically, the firewall protection it has, what type of machine it is held on etc (all a bit over my head). These pieces of information should be considered in root causing the problem I think.  
The other good indication that this is a deliberate act - if you think about it, is the time the bots hang.  They can be fine for days - right up until you need them - then the problems start, often once a tournament has begun - causing much confusion and giving those ever grumbly fibsters loads more to grumble about.
I hope the issue can be resolved - but I cant help thinking we are dealing with an ongoing issue - you fix this - the person will find another hole - for what reason, well who knows?  This is why I suggested TDs have an idependant copy of the bot they can run as and when needed - but after talking to juggler - this doesnt seem particularly feasible - since it comes with a whole load of 'baggage' that I dont particularly understand.  :wacko: The other solution is that they are hosted by someone who can be there, if not 24 hours a day, then at the times of tourneys to do the restarts - this seems the least sensible solution.  :(
Never give up on the things that make you smile

juggler

Quote[...] The other good indication that this is a deliberate act - if you think about it, is the time the bots hang.  They can be fine for days - right up until you need them - then the problems start [...]

Hi Diane,

the start of a tourney coincides with the bot being used after some idle time -- now since an idling bot is unlikely to crash spontaneously, the pattern you describe is well compatible with a simple program flaw.

Kind regards,
Peter aka the juggler



diane

#26
For sure - but they dont crash in normal usage - ie running a tourney in the normal way.  They also dont go down in sponteneous tournaments - just the scheduled ones.  At first they would be fine right up until you came to use them - ie before you typed in the first commands - now it is obviously more fun if the tournament gets underway before it crashes - that way there is more confusion and misunderstandings - with matches started not counting etc.
There have been genuine reasons for the bots going down simultenously - but the symptoms are very different.
Never give up on the things that make you smile

amarganth

Juggler wrote:
QuoteThe tbot log of FIBS communication ended in mid-word, the process was still alive (that's why the shell script wrapper didn't restart it, unfortunateley), but tbot was not logged in any longer.
Do you *flush* the buffer after writing an entry to the log? If not, I would try it like that. May be the entry is written logically, but not saved to the log file.
To be is to do
          Sokrates
To do is to be
          Sartre
Do be do be do
          Sinatra

webrunner

Diane you are right, i didn't look at the date.
Still it is a new problem. The bot ran for years correctly on my server.

Maybe it is an idea to do an automated restart every 8 hours. That way it will never me down longer then 8 hours. This should me very easy to do. (using a cron job)

BTW, i still haven't found any host for the mgnu bots.  <_<  :o  
"There is a difference between knowing the path and walking the path."
Bruce Lee
===================================
Orion Pax |

diane

QuoteMaybe it is an idea to do an automated restart every 8 hours. That way it will never me down longer then 8 hours. This should me very easy to do. (using a cron job)

OOoohhhh that sounds like a plan!! Even if it came in the middle of a tourney - it would be better than losing it altogether!
Is that easy to do?
Never give up on the things that make you smile

amarganth

Sorry, if I write it that direct:

The problem lies inside the code (Ruby).

Restarting the bot is fight against symptoms, not the cause.
To be is to do
          Sokrates
To do is to be
          Sartre
Do be do be do
          Sinatra

socksey

QuoteDo you *flush* the buffer after writing an entry to the log? If not, I would try it like that. May be the entry is written logically, but not saved to the log file.

Amarganth,

What does this mean and how is it done?

socksey



"Our job is to give people not what they want, but what we decide they ought to have." - Richard Salent, Former President CBS News.

amarganth

It's for the programmer. Just an idea to find the last action before the bot freezes. I hope, MadMatt or juggler can change that in the Ruby-Code of TourneyBot or TBot.

In (nearly?) every programming language, if the program writes data to a file, the system answers with "ok", even if the system havent written the data to the file. The system usually writes data in buffers, because it is much faster, to write a full buffer to disk than every byte separately, in the worst case.

If a program interrupts (or freezes and must be cancelled manually), it is possible, that the last buffer isn't physically written to disk, only logically. And so the last data is lost. So my idea is to flush the file after every write to the log file, just for debugging. May be, the admin can find more, if the TourneyBot freezes the next time.

I don't know Ruby, but I found a description of "flush" under http://www.rubycentral.com/book/ref_c_io.html: the command exists.
To be is to do
          Sokrates
To do is to be
          Sartre
Do be do be do
          Sinatra

diane

Thanks - thats all clear now  :wacko:  Still - just so long as someone who can use it understands it  :D  
Never give up on the things that make you smile

amarganth

really  :wacko:, diane?   :(  
To be is to do
          Sokrates
To do is to be
          Sartre
Do be do be do
          Sinatra

socksey

:lol:   Thanks for responding, but I think I'm sorry I asked!   :lol:

 :rolleyes:

socksey



"Hatred is toxic waste in the river of life." - Micron

diane

Quotereally  :wacko:, diane?   :(
It is ok - I am a mere mortal - not a coder - I didnt expect to understand  :D  
Never give up on the things that make you smile

webrunner

I agree that restarting the bot is not a solutiuon for the long run.
That wasn't my intention. But it is a short-term fix.
"There is a difference between knowing the path and walking the path."
Bruce Lee
===================================
Orion Pax |

MadMatt

Quote
Quote
Have you taken the time to look at the logs at all MM? I would think they would reveal something, wether it be external or internal.

Hi burper, hi all,
I just have browsed through the logs and not seen anything at all. The tbot log of FIBS communication ended in mid-word, the process was still alive (that's why the shell script wrapper didn't restart it, unfortunateley), but tbot was not logged in any longer.
Yeah, this is exactly what I see as well. If I have the time I'm going to look into it this weekend. I'll try to improve the logging facility so that we can maybe get a better read of the situation.

Someone also sent me a command that knowingly crashes tourneybot, I'll look that up as well.
MadMatt
----------

TourneyBot Website

MadMatt

QuoteThis is why I suggested TDs have an idependant copy of the bot they can run as and when needed - but after talking to juggler - this doesnt seem particularly feasible - since it comes with a whole load of 'baggage' that I dont particularly understand.

There's no baggage involved, it's very simple to install and use it, which was one of the goals. I opted for a neat library that does permanent storage instead of perhaps something more powerful like a proper SQL database for that very reason.

All you need to do is install a ruby interpreter, which is just like installing any other application, download TourneyBot and run it. Of course, you'll prolly want to modify settings.rb to make yourself the admin and such, but since that file is heavily commented I don't see why that would be a problem.
MadMatt
----------

TourneyBot Website