Core bug with events. Result = Crash

Bug reports and feature requests. New features can only be added to the current development version. Bug-fixes may be back-ported.

Current release: 099 / Current development: 100
Post Reply
RusseL
Forum Regular
Posts: 375
Joined: Fri Feb 20, 2009 8:30 pm

Core bug with events. Result = Crash

Post 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
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: Core bug with events. Result = Crash

Post by Yukiko »

Sounds like it is a buffer overflow possibly due to a full event queue maybe?
RusseL
Forum Regular
Posts: 375
Joined: Fri Feb 20, 2009 8:30 pm

Re: Core bug with events. Result = Crash

Post by RusseL »

DiscardOldEvents=1 doesn't help :)
Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: Core bug with events. Result = Crash

Post by Turley »

Sounds like fun, cannot promise but I try to look into it this weekend.
Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: Core bug with events. Result = Crash

Post by Turley »

Should be fixed in Rev 573.
Was a problem with speechtokens member in the event struct.
RusseL
Forum Regular
Posts: 375
Joined: Fri Feb 20, 2009 8:30 pm

Re: Core bug with events. Result = Crash

Post 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
RusseL
Forum Regular
Posts: 375
Joined: Fri Feb 20, 2009 8:30 pm

Re: Core bug with events. Result = Crash

Post 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 ===
Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: Core bug with events. Result = Crash

Post by Turley »

mmmh damn... :)
Can you give me the source lines from the backtrace?
gdb pol and the l *0xaddresses
RusseL
Forum Regular
Posts: 375
Joined: Fri Feb 20, 2009 8:30 pm

Re: Core bug with events. Result = Crash

Post by RusseL »

my live server starts, but i can not login.
my test server doesn't start:)

here, Turley http://pastebin.com/cwQC31LP
RusseL
Forum Regular
Posts: 375
Joined: Fri Feb 20, 2009 8:30 pm

Re: Core bug with events. Result = Crash

Post by RusseL »

Update:
no it doesn't work :D
crash on startup

info here:
http://pastebin.com/qLi64jAm
Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: Core bug with events. Result = Crash

Post by Turley »

Weird I will try to analyze it tomorrow. Based on my latest changes. Maybe I have to send you a test build.
RusseL
Forum Regular
Posts: 375
Joined: Fri Feb 20, 2009 8:30 pm

Re: Core bug with events. Result = Crash

Post by RusseL »

solved.
you didn's said that i must recompile all :twisted: :twisted:
Thank you, turley :)
User avatar
AsYlum
Grandmaster Poster
Posts: 109
Joined: Sun Feb 05, 2006 5:24 am
Location: Poland

Re: Core bug with events. Result = Crash

Post by AsYlum »

RusseL wrote:solved.
you didn's said that i must recompile all :twisted: :twisted:
Thank you, turley :)
RusseL ... http://www.youtube.com/watch?v=BNsrK6P9QvI :)
RusseL
Forum Regular
Posts: 375
Joined: Fri Feb 20, 2009 8:30 pm

Re: Core bug with events. Result = Crash

Post 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 :(
RusseL
Forum Regular
Posts: 375
Joined: Fri Feb 20, 2009 8:30 pm

Re: Core bug with events. Result = Crash

Post by RusseL »

i don't know, but my server is completly unstable since last updates :(
http://pastebin.com/RpuyT1Wy
Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: Core bug with events. Result = Crash

Post by Turley »

Do you use the new item methods splitstackat or splitstackinto? They have bugs, tomi is working on a sollution.
Terciob
Master Poster
Posts: 90
Joined: Fri Nov 07, 2008 3:47 am

Re: Core bug with events. Result = Crash

Post 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.
RusseL
Forum Regular
Posts: 375
Joined: Fri Feb 20, 2009 8:30 pm

Re: Core bug with events. Result = Crash

Post 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
Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: Core bug with events. Result = Crash

Post 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 ...
RusseL
Forum Regular
Posts: 375
Joined: Fri Feb 20, 2009 8:30 pm

Re: Core bug with events. Result = Crash

Post by RusseL »

Turley wrote: As always I cannot reproduze your problem with repsys ...
Try to use distro repsys hook
Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: Core bug with events. Result = Crash

Post by Turley »

again no problem for me :)
Post Reply