FIBS Board backgammon forum

Tourneybot Frozen

Author Topic: Tourneybot Frozen  (Read 15572 times)

Offline MadMatt

  • Moderator
  • Fibsboarder plus
  • *
  • Posts: 267
    • The FIBS TourneyBot Home Page
Tourneybot Frozen
« Reply #20 on: January 21, 2006, 01:44:41 PM »
Quote
Quote
and 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.
« Last Edit: January 21, 2006, 01:45:15 PM by MadMatt »
MadMatt
----------

TourneyBot Website

Offline burper

  • Fibsboarder ++
  • ****
  • Posts: 837
Tourneybot Frozen
« Reply #21 on: January 21, 2006, 06:21:40 PM »
Quote
Quote
Quote
and 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.

Offline webrunner

  • Fibsboard Executive VIP Donor 2014
  • Advanced Fibsboarder
  • *
  • Posts: 1,335
    • Icemail
Tourneybot Frozen
« Reply #22 on: January 23, 2006, 08:43:13 AM »
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
===================================
Sprintweb |

Offline juggler

  • Fibsboarder
  • ***
  • Posts: 22
Tourneybot Frozen
« Reply #23 on: January 23, 2006, 11:45:23 AM »
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
« Last Edit: January 23, 2006, 11:46:05 AM by juggler »

Offline diane

  • Fibsboard Executive VIP Donor 2015
  • Expert
  • *
  • Posts: 4,328
Tourneybot Frozen
« Reply #24 on: January 23, 2006, 12:14:18 PM »
Quote
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?
 
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.  :(
« Last Edit: January 23, 2006, 12:17:15 PM by diane »
Never give up on the things that make you smile

Offline juggler

  • Fibsboarder
  • ***
  • Posts: 22
Tourneybot Frozen
« Reply #25 on: January 23, 2006, 03:46:01 PM »
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


 

Offline diane

  • Fibsboard Executive VIP Donor 2015
  • Expert
  • *
  • Posts: 4,328
Tourneybot Frozen
« Reply #26 on: January 23, 2006, 03:57:03 PM »
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.
« Last Edit: January 23, 2006, 03:58:34 PM by diane »
Never give up on the things that make you smile

Offline amarganth

  • Fibsboarder +
  • ***
  • Posts: 89
    • http://www.RedAndBlue.ch.vu
Tourneybot Frozen
« Reply #27 on: January 23, 2006, 08:43:42 PM »
Juggler wrote:
Quote
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.
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

Offline webrunner

  • Fibsboard Executive VIP Donor 2014
  • Advanced Fibsboarder
  • *
  • Posts: 1,335
    • Icemail
Tourneybot Frozen
« Reply #28 on: January 24, 2006, 08:40:39 AM »
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
===================================
Sprintweb |

Offline diane

  • Fibsboard Executive VIP Donor 2015
  • Expert
  • *
  • Posts: 4,328
Tourneybot Frozen
« Reply #29 on: January 24, 2006, 11:47:20 AM »
Quote
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)

 
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

Offline amarganth

  • Fibsboarder +
  • ***
  • Posts: 89
    • http://www.RedAndBlue.ch.vu
Tourneybot Frozen
« Reply #30 on: January 24, 2006, 12:01:31 PM »
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

Offline socksey

  • Global Moderator
  • Expert
  • *
  • Posts: 2,913
Tourneybot Frozen
« Reply #31 on: January 24, 2006, 01:59:23 PM »
Quote
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.

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.
 

Offline amarganth

  • Fibsboarder +
  • ***
  • Posts: 89
    • http://www.RedAndBlue.ch.vu
Tourneybot Frozen
« Reply #32 on: January 24, 2006, 04:35:21 PM »
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

Offline diane

  • Fibsboard Executive VIP Donor 2015
  • Expert
  • *
  • Posts: 4,328
Tourneybot Frozen
« Reply #33 on: January 24, 2006, 06:45:06 PM »
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

Offline amarganth

  • Fibsboarder +
  • ***
  • Posts: 89
    • http://www.RedAndBlue.ch.vu
Tourneybot Frozen
« Reply #34 on: January 24, 2006, 06:53:05 PM »
really  :wacko:, diane?   :(  
To be is to do
          Sokrates
To do is to be
          Sartre
Do be do be do
          Sinatra

Offline socksey

  • Global Moderator
  • Expert
  • *
  • Posts: 2,913
Tourneybot Frozen
« Reply #35 on: January 24, 2006, 07:17:28 PM »
: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
 

Offline diane

  • Fibsboard Executive VIP Donor 2015
  • Expert
  • *
  • Posts: 4,328
Tourneybot Frozen
« Reply #36 on: January 24, 2006, 08:27:35 PM »
Quote
really  :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

Offline webrunner

  • Fibsboard Executive VIP Donor 2014
  • Advanced Fibsboarder
  • *
  • Posts: 1,335
    • Icemail
Tourneybot Frozen
« Reply #37 on: January 25, 2006, 07:33:02 PM »
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
===================================
Sprintweb |

Offline MadMatt

  • Moderator
  • Fibsboarder plus
  • *
  • Posts: 267
    • The FIBS TourneyBot Home Page
Tourneybot Frozen
« Reply #38 on: January 28, 2006, 11:58:09 AM »
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

Offline MadMatt

  • Moderator
  • Fibsboarder plus
  • *
  • Posts: 267
    • The FIBS TourneyBot Home Page
Tourneybot Frozen
« Reply #39 on: January 28, 2006, 12:04:04 PM »
Quote
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.

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

Tags:
 

anything