Page 1 of 1
Core bug with events. Result = Crash
Posted: Thu Sep 27, 2012 1:50 am
by RusseL
We have two scripts with events listeners.
1. 1st script is for example NPC script, but could be anything -
http://pastebin.com/C0mw8k61
Create NPC with this script, and start it with "all come" command.
2. 2nd script is another listener, for example characters backpack -
http://pastebin.com/yQ0Q7gwa (that is a command)
Start your cmd with .testcycle, be sure that npc script is running (prints "NPC LOOP" in console), and start to flood with message "test" near your npc. In 5-10 seconds it'll crash.
Solution:
add wait_for_event(0); after while( me ) in NPC script
But it must be fixed in core, because this bug prints really NOTHING in pol console, nothing in dump, no backtrace, that is terrible.
And it could appear everywhere - boats, npc and another listeners.
For example today i found it in my boat script. And that was a great piece of luck, that i've found it, otherwise it's impossible to catch it...
ps: as i understand only 2 listeners and 1 cycle are necessary
Re: Core bug with events. Result = Crash
Posted: Thu Sep 27, 2012 5:22 am
by Yukiko
Sounds like it is a buffer overflow possibly due to a full event queue maybe?
Re: Core bug with events. Result = Crash
Posted: Thu Sep 27, 2012 6:03 am
by RusseL
DiscardOldEvents=1 doesn't help

Re: Core bug with events. Result = Crash
Posted: Thu Sep 27, 2012 7:47 am
by Turley
Sounds like fun, cannot promise but I try to look into it this weekend.
Re: Core bug with events. Result = Crash
Posted: Fri Sep 28, 2012 9:12 am
by Turley
Should be fixed in Rev 573.
Was a problem with speechtokens member in the event struct.
Re: Core bug with events. Result = Crash
Posted: Fri Sep 28, 2012 9:44 am
by RusseL
Turley wrote:Should be fixed in Rev 573.
Was a problem with speechtokens member in the event struct.
thanks:)
i already thought that problem was with tokens, because that was only one thing that i've found in changelog:)
thanks, i'll check it soon
Re: Core bug with events. Result = Crash
Posted: Fri Sep 28, 2012 10:02 am
by RusseL
ooops Turley, u've broken something. Segfault when i logIn..
Code: Select all
[09/29 00:52:54] Account admin selecting character Coffee Effect
Caught SIGSEGV (Segfault). Please post the following on http://forums.polserver.com/tracker.php :
=== CUT ===
Build: POL099-2011-05-02 Break Everything Even Rudder (ubuntu)
Last Script: scripts/ai/spellkillpcs.ecl PC: 965
Stack Backtrace:
[0x82b099c]
[0x110420]
[0x80dd3ac]
[0x809262e]
[0x809290c]
[0x814720a]
[0x81475aa]
[0x81484c0]
[0x814b15e]
[0x8216e5d]
[0x819ae62]
[0x82b7b32]
[0x82b845b]
[0x831b418]
[0x8364a9e]
=== CUT ===
Re: Core bug with events. Result = Crash
Posted: Fri Sep 28, 2012 11:27 am
by Turley
mmmh damn...

Can you give me the source lines from the backtrace?
gdb pol and the l *0xaddresses
Re: Core bug with events. Result = Crash
Posted: Sat Sep 29, 2012 6:45 am
by RusseL
my live server starts, but i can not login.
my test server doesn't start:)
here, Turley
http://pastebin.com/cwQC31LP
Re: Core bug with events. Result = Crash
Posted: Sat Sep 29, 2012 10:56 am
by RusseL
Update:
no it doesn't work

crash on startup
info here:
http://pastebin.com/qLi64jAm
Re: Core bug with events. Result = Crash
Posted: Sun Sep 30, 2012 9:07 am
by Turley
Weird I will try to analyze it tomorrow. Based on my latest changes. Maybe I have to send you a test build.
Re: Core bug with events. Result = Crash
Posted: Fri Oct 05, 2012 1:34 am
by RusseL
solved.
you didn's said that i must recompile all
Thank you, turley

Re: Core bug with events. Result = Crash
Posted: Fri Oct 05, 2012 4:27 am
by AsYlum
RusseL wrote:solved.
you didn's said that i must recompile all
Thank you, turley

RusseL ...
http://www.youtube.com/watch?v=BNsrK6P9QvI 
Re: Core bug with events. Result = Crash
Posted: Fri Oct 05, 2012 5:54 am
by RusseL
nope. crash again

i must update fedora on my server, because i can't start dynamic bin there to get a gdb output

Re: Core bug with events. Result = Crash
Posted: Sat Oct 06, 2012 1:17 am
by RusseL
i don't know, but my server is completly unstable since last updates
http://pastebin.com/RpuyT1Wy
Re: Core bug with events. Result = Crash
Posted: Sat Oct 06, 2012 1:57 am
by Turley
Do you use the new item methods splitstackat or splitstackinto? They have bugs, tomi is working on a sollution.
Re: Core bug with events. Result = Crash
Posted: Sat Oct 06, 2012 7:24 am
by Terciob
[10/06 14:22:02] [pkg/systems/worldSaver/worldSaver.ecl]: 06.10/14:22 Saving World State
[10/06 14:22:08] Exception during world save! (basic_ios::clear)
Crash while saving can be shadow realm issue
http://forums.polserver.com/viewtopic.php?f=20&t=3483. I had this problem months ago.
Re: Core bug with events. Result = Crash
Posted: Sun Oct 07, 2012 11:31 am
by RusseL
last rev. repsys is completely broken.
i see the innocent character, but he has a green/alliance name, and then when i try to attack him - crash
http://pastebin.com/Fk0H5dNF
as i understood something is wrong when repsys:OnAttack is called
Re: Core bug with events. Result = Crash
Posted: Mon Oct 08, 2012 9:36 pm
by Turley
The problem with shadow realm deleting and leftover storage items should be fixed in the latest revision.
As always I cannot reproduze your problem with repsys ...
Re: Core bug with events. Result = Crash
Posted: Tue Oct 09, 2012 1:27 am
by RusseL
Turley wrote:
As always I cannot reproduze your problem with repsys ...
Try to use distro repsys hook
Re: Core bug with events. Result = Crash
Posted: Tue Oct 09, 2012 8:34 am
by Turley
again no problem for me
