[FIXED] Link from IRC crashing server

Fixed bugs, solved problems, and old reports.
Locked
Mc_MrCat
OP
Offline
Posts: 9
Joined: May 25th, 2011, 1:03 am

[FIXED] Link from IRC crashing server

Post by Mc_MrCat »

So a little bit ago someone posted a long picture link in irc, and apparently crashed the server. The link was
It was reproduced on a test server after a couple tries posting the link. I'm not sure if it was the length, or some symbols in the link or what. I'm not sure exactly how it crashed it, but I can look into more if needed or requested. (sorry for the short post but I tried to post it before I had to leave)

Jonty800
Offline
Posts: 280
Joined: August 21st, 2011, 6:31 am
Location: United Kingdom
Contact:

Re: Link from IRC crashing server

Post by Jonty800 »

I can confirm that this happens when pasting and pressing enter in the console window.
My memory went from 20mb to 1gb, server crashed and almost crashed my pc.

When pasting into IRC, it seems that the IRC thread becomes unstable; it uses 25% cpu (one core) and the relay is non-responsive (No messages being sent either way).
No bug messages are given.

I'm able to find out whats going on. The minimum amount of that string to be able to recreate the bug was

Code: Select all

http://www.google.com.au/imgres?q=derp&hl=en&client=safari&sa=X&rls=en&biw=961&bih=686&tbm=isch&prmd=imvns&tbnid=ZEoJ8CYFZhUsqM:&imgrefurl=
However, using process of elimination doesn't work. Perhaps its the vast amount of '&'?
You cannot use certain BBCodes: [img].

Jonty800
Offline
Posts: 280
Joined: August 21st, 2011, 6:31 am
Location: United Kingdom
Contact:

Re: Link from IRC crashing server

Post by Jonty800 »

The server crashes when there are 21 color changes, whether its irc or not.
However, the above link only has 10 color changes. So that confuses me.

Bug found at:

Code: Select all

13:52:47 > ERROR: IRC: System.Threading.ThreadAbortException: Thread was being aborted.
   at fCraft.LineWrapper.ProcessChar(Byte ch) in C:\Users\Administrator\fCraft\fCraft\Network\LineWrapper.cs:line 148
   at fCraft.LineWrapper.MoveNext() in C:\Users\Administrator\fCraft \fCraft\Network\LineWrapper.cs:line 129
   at fCraft.PlayerEnumerable.Message(IEnumerable`1 source, String message, Object[] formatArgs) in C:\Users\Administrator\fCraft\fCraft\Player\PlayerEnumerable.cs:line 541
   at fCraft.Server.Message(String message, Object[] formatArgs) in C:\Users\Administrator\fCraft\fCraft\System\Server.cs:line 643
   at fCraft.IRC.IRCThread.HandleMessage(String message) in C:\Users\Administrator\fCraft \fCraft\Network\IRC.cs:line 266
   at fCraft.IRC.IRCThread.IoThread() in C:\Users\Administrator\fCraft \fCraft\Network\IRC.cs:line 171
Special thanks to Salzkorn and Kev :P
You cannot use certain BBCodes: [img].

User avatar
fragmer
fCraft Developer
Offline
Posts: 1386
Joined: May 21st, 2011, 10:53 pm

Re: Link from IRC crashing server

Post by fragmer »

It's a linewrapper bug. I am investigating.

User avatar
fragmer
fCraft Developer
Offline
Posts: 1386
Joined: May 21st, 2011, 10:53 pm

Re: Link from IRC crashing server

Post by fragmer »

Line-wrapper safety is restored. I might add an option to strip colorcodes from IRC chat too, while I'm at it. Patch coming soon.
Image

User avatar
fragmer
fCraft Developer
Offline
Posts: 1386
Joined: May 21st, 2011, 10:53 pm

Re: Link from IRC crashing server

Post by fragmer »

Fixed in /branch-0.60x/ r1579. Option to strip colors from IRC messages added in /branch-0.60x/ r1580. These fixes are coming in fCraft 0.620 release, very soon.

/branch-0.70x/ has not been updated.

FemtoCraft was also affected, and fixed in r103 (release 1.03).

Locked