collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Read error: EOF on whois/Buddy-Add event  (Read 11981 times)

0 Members and 2 Guests are viewing this topic.

Offline Baldrick

  • BeBot User
  • **
  • Posts: 25
  • Karma: +0/-0
Re: Read error: EOF on whois/Buddy-Add event
« Reply #15 on: November 18, 2009, 12:01:26 pm »
Hi!

I actually tried that, before I did my reinstall. It didn't resolve the issue, as it didn't clean out the "buddy-add-queue" so to speak.
The member/friends list would be nice and clean, but since this as far as I know is separate from the "friends to be added queue" it doesn't affect that. The EOF error always occurred before this person was successfully added as a friend.
I suppose it would be solved if whatever table stores the list of buddies to be added is cleaned out after x amount of time (like a few days or roster updates maybe?). Any buddy that could be added trouble free will have been added by then, and any remaining entry will most likely be a defective one that can be wiped from the queue.
Mind you, this is me speculating based on what I've seen, not on me understanding the code ;D

Offline Apollyon

  • BeBot User
  • **
  • Posts: 21
  • Karma: +0/-0
Re: Read error: EOF on whois/Buddy-Add event
« Reply #16 on: December 03, 2009, 02:48:33 am »
Still having major issues with this.  Any good solution been found?  Is there any specific table or tables I need to clear out of those who appear to be causing the issues?  Seems like I am missing something that needs to have rows deleted.

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Read error: EOF on whois/Buddy-Add event
« Reply #17 on: December 03, 2009, 03:13:13 am »
No one has yet provided me with the feedback requested at http://bebot.link/index.php/topic,2058.msg14243.html#msg14243 and thus nothing more has been done about this issue.

I have not had time to go hunting around without this feedback as I am in the middle of exams atm. So if you could provide said feedback it would provide a better starting point to resolve this issue.
BeBot Founder and Fixer Kingpin

Offline Apollyon

  • BeBot User
  • **
  • Posts: 21
  • Karma: +0/-0
Re: Read error: EOF on whois/Buddy-Add event
« Reply #18 on: December 03, 2009, 03:49:12 am »
I was logging the errors but managed to misread where to paste one of the lines.  I will try to reproduce this later after raiding.  It seems just calling a roster update should get this to happen.  I had planned on looking into this more, but not had much time with a new job and holidays and stuff.

Offline Apollyon

  • BeBot User
  • **
  • Posts: 21
  • Karma: +0/-0
Re: Read error: EOF on whois/Buddy-Add event
« Reply #19 on: December 03, 2009, 04:20:47 am »
Here is the result of the last roster update.

Code: [Select]
Guildbot [2009-12-03 03:14:13] [ROSTER] [UPDATE] Starting roster update for guild id: 1 on RKSet
Guildbot [2009-12-03 03:14:13] [GROUP] [MSG] [Pestilence] Guildbot: Roster update starting ::: System busy
Guildbot [2009-12-03 03:14:13] [BUDDY] [BUDDY-ADD] 4294967295(17262896)
Debug: buddy_add called with final UID 17262896 passed to server.
Guildbot [2009-12-03 03:14:13] [BUDDY] [BUDDY-ADD] 17262896(4294967295)
Debug: buddy_add called with final UID 4294967295 passed to server.
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF

Warning: socket_write(): unable to write to socket [32]: Broken pipe in /bebot/Sources/AOChat.php on line 480
Read error: EOF

Warning: socket_write(): unable to write to socket [32]: Broken pipe in /bebot/Sources/AOChat.php on line 480
Read error: EOF

...

Warning: socket_write(): unable to write to socket [32]: Broken pipe in /bebot/Sources/AOChat.php on line 480
Read error: EOF
Guildbot [2009-12-03 03:14:15] [SETTINGS] [SAVED] connected for module irc set to FALSE as datatype bool
Guildbot [2009-12-03 03:14:15] [CONN] [ERROR] Bot has disconnected. Reconnecting in 60 seconds.

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Read error: EOF on whois/Buddy-Add event
« Reply #20 on: December 05, 2009, 11:00:16 pm »
There is definately something odd happening here.

Thank you for the debug output. I cannot promise when i will be able to investigate further, but this gives me a fairly good idea of where to start.

Put plainly, it seems the bot does not apparently see it as a problem that someones name is an integer value.

I might need to have you run some more debug code to see the order of packets, as it offhand seems like the first buddy_add is not causing a disconnect, but the second is. And both appear to be for invalid players.
BeBot Founder and Fixer Kingpin

Offline Baldrick

  • BeBot User
  • **
  • Posts: 25
  • Karma: +0/-0
Re: Read error: EOF on whois/Buddy-Add event
« Reply #21 on: January 06, 2010, 12:24:42 pm »
Did you need any more feedback for this Khalem?
The problem is occurring more and more again now that my bot has been running for a while.

Thanks

B

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Read error: EOF on whois/Buddy-Add event
« Reply #22 on: January 06, 2010, 11:48:06 pm »
I'll try to schedule some time for this this weekend.

I do apologize for the delays. Things have been a tad too crazy for my liking over the past few months. Christmas vacation boiled down to 2 days which was pretty much spent doing as little as possible :P

(The entire dev team seem a bit swamped atm :( which has slowed things down to a crawl. We might need more manpower :P *glances in Getrix's general direction*)

I'll keep you posted in case i fail replicating the issue.
BeBot Founder and Fixer Kingpin

Offline Riccarr

  • BeBot User
  • **
  • Posts: 35
  • Karma: +0/-0
Re: Read error: EOF on whois/Buddy-Add event
« Reply #23 on: January 06, 2010, 11:51:06 pm »
Khalem ... would this possible be related to user table records not getting deleted when the buddylist is cleared?  My user table is full of crap, numerics, that never seem to go away even when I !buddtlist clear. I looked in the code but did not find where its suppose to delete records in the user table. There may be junk records there that's causing the problem for Apollyon.

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Read error: EOF on whois/Buddy-Add event
« Reply #24 on: January 11, 2010, 09:42:10 pm »
Please test the following workaround (this is not a fix, but it should stop the bot from adding invalid buddies)

in main/15_AOChatWrapper.php on line 133-134 find
Code: [Select]
if (!($this -> bot -> aoc -> buddy_exists($uid)) && $uid != 0 && $uid != -1
&& $uid != $this -> get_uid($this -> bot -> botname) && $this -> get_uname($uid) != -1)

Change this to
Code: [Select]
if (!($this -> bot -> aoc -> buddy_exists($uid)) && $uid != 0 && $uid != -1
&& $uid != $this -> get_uid($this -> bot -> botname) && $this -> get_uname($uid) != -1 && !is_numeric($this -> get_uname($uid)) )

This should stop the bot from adding anyone with a userid as username.


@Riccarr
The user table and buddylist are two separate entities. Our problem seems to relate to the fact that Funcom's chatserver handles deleted characters different from Anarchy Online.

The probable correct fix would be to change get_uname to do is_numeric checks, but we also need to clean out entries in the users table with numeric usernames.

Drowned in studies unfortunately as the last and current semesters are quite intensive.
BeBot Founder and Fixer Kingpin

Offline Baldrick

  • BeBot User
  • **
  • Posts: 25
  • Karma: +0/-0
Re: Read error: EOF on whois/Buddy-Add event
« Reply #25 on: January 24, 2010, 03:21:59 pm »
Same issue is back with a vengeance, the frequent buddy-adds of invalid characters causes EOFs constantly, which boots me from the game (as the bot runs on my account).
I know which invalid characters are the culprit, is there any way I can remove these manually?

Thanks,

B

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Read error: EOF on whois/Buddy-Add event
« Reply #26 on: January 25, 2010, 09:40:07 am »
Even with the fix in my previous post??

That seems very odd as that should prevent ANY buddy adds on the problematic buddies.

The above fix is to stop the disconnect, but will not fix the underlying problem.
BeBot Founder and Fixer Kingpin

Offline Baldrick

  • BeBot User
  • **
  • Posts: 25
  • Karma: +0/-0
Re: Read error: EOF on whois/Buddy-Add event
« Reply #27 on: January 25, 2010, 11:55:18 am »
Here's the relevant lines from my 15_AOChatWrapper.php:

Code: [Select]
/* Buddies */
        function buddy_add($user, $que = TRUE)
        {
                $add = true;
                if (empty($user) || ($uid = $this -> get_uid($user)) === false)
                {
                        return false;
                }
                else
                {
         if (!($this -> bot -> aoc -> buddy_exists($uid)) && $uid != 0 && $uid != -1
         && $uid != $this -> get_uid($this -> bot -> botname) && $this -> get_uname($uid) != -1 && !is_numeric($this -> get_uname($uid)) )
                        {
                                if (!$que || $this -> bot -> core("buddy_queue") -> check_queue())
                                {
                                        $this -> bot -> aoc -> buddy_add($uid);
                                        $this -> bot -> log("BUDDY", "BUDDY-ADD", $this -> get_uname($uid));
                                        return true;
                                }
                                else
                                {
                                        $return = $this -> bot -> core("buddy_queue") -> into_queue($uid, $add);
                                        return $return;
                                }
                        }
                        else
                                return false;

And here are two examples of the bot keeling over, both from days after the code change:

Code: [Select]
Thespeaker [BUDDY]      [LOG]   Augir changed status [1] (MEMBER)                                                                                                                                                                                                                                                         
Thespeaker [BUDDY]      [BUDDY-ADD]     Sephirioth                                                                                                                                                                                                                                                                         
Thespeaker [BUDDY]      [LOG]   Augir changed status [6] (MEMBER)                                                                                                                                                                                                                                                         
Read error: EOF                                                                                                                                                                                                                                                                                                           
Thespeaker [SETTINGS]   [SAVED] connected for module irc set to FALSE as datatype bool                                                                                                                                                                                                                                     
Thespeaker [CONN]       [ERROR] Bot has disconnected. Reconnecting in 60 seconds.                                                                                                                                                                                                                                         
The bot is restarting.                                                                                                                           

Code: [Select]
Thespeaker [BUDDY]      [LOG]   Lenybar changed status [1] (ADMIN)                                                                                                                                                                                                                                                         
Thespeaker [BUDDY]      [BUDDY-ADD]     Peternicus                                                                                                                                                                                                                                                                         
Thespeaker [BUDDY]      [LOG]   Lenybar changed status [6] (ADMIN)                                                                                                                                                                                                                                                         
Read error: EOF                                                                                                                                                                                                                                                                                                           
Thespeaker [SETTINGS]   [SAVED] connected for module irc set to FALSE as datatype bool                                                                                                                                                                                                                                     
Thespeaker [CONN]       [ERROR] Bot has disconnected. Reconnecting in 60 seconds.                                                                                                                                                                                                                                         
The bot is restarting.                                                                           


It's always the same (invalid) users causing the crash.

Any suggestions?

Thanks,

B.

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Read error: EOF on whois/Buddy-Add event
« Reply #28 on: January 25, 2010, 01:51:28 pm »
@Baldrick

Could you reproduce the error with the debugging code from http://bebot.link/aoc-0-6-support/read-error-eof-on-whoisbuddy-add-event/msg14243/#msg14243

Deleting the users from the users table should stop them from being added, but I'm starting to fear we have no way of detecting these as you seem to be having a different issue from the one outlined by Apollyon.
BeBot Founder and Fixer Kingpin

Offline Baldrick

  • BeBot User
  • **
  • Posts: 25
  • Karma: +0/-0
Re: Read error: EOF on whois/Buddy-Add event
« Reply #29 on: January 25, 2010, 10:11:01 pm »
I did the following:

* add code as you suggested
* Clear buddy lists, the "bad user IDs" didnt show up in the list of deleted buddies
* I ran a whois to force the buddy-add issue as Ive seen before this triggers it. Below what happened:

Code: [Select]
Thespeaker [TELL]       [INC]   Astreas: !whois peternicus
Thespeaker [BUDDY]      [BUDDY-ADD]     Sephirioth(4294967295)
Debug: buddy_add called with final UID 4294967295 passed to server.
Read error: EOF

I don't know if it's got all those accounts mixed up somehow...the bot crashes currently on 3 invalid IDs, Sephirioth, Peternicus and Nidlefs.

What do you think?

B

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 213
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal