Linux GServer crash bug

CODE bt
#0 0x08084325 in encodeSignCode (pText=…)
at …/…/server/src/TLevelSign.cpp:32
#1 0x08084755 in encodeSign (pSignText=…)
at …/…/server/src/TLevelSign.cpp:107
#2 0x08084c55 in TLevelSign (this=0x84a5ff8, pX=25, pY=49, pSign=…,
encoded=false) at …/…/server/src/TLevelSign.cpp:120
#3 0x080c1e27 in TLevel::loadNW (this=0x84500a0, pLevelName=…)
at …/…/server/src/TLevel.cpp:884
#4 0x080c5d8c in TLevel::loadLevel (this=0x84500a0, pLevelName=…)
at …/…/server/src/TLevel.cpp:312
#5 0x080c9302 in TLevel::findLevel (pLevelName=…, server=0x86b77e8)
at …/…/server/src/TLevel.cpp:944
#6 0x0805aeb7 in updateFile (player=0x85e9010, server=0x86b77e8, dir=…,
file=…) at …/…/server/src/TPlayerRC.cpp:1868
#7 0x0805dbf5 in TPlayer::msgPLI_RC_FILEBROWSER_UP (this=0x85e9010,
pPacket=…) at …/…/server/src/TPlayerRC.cpp:1618
#8 0x08108187 in TPlayer::parsePacket (this=0x85e9010, pPacket=…)
at …/…/server/src/TPlayer.cpp:585
#9 0x0810906e in TPlayer::doMain (this=0x85e9010)
at …/…/server/src/TPlayer.cpp:438
#10 0x081093b6 in TPlayer::onRecv (this=0x85e9010)
at …/…/server/src/TPlayer.cpp:359
#11 0x080d0ce7 in CSocketManager::update (this=0x86b7bd4, sec=0, usec=5000)
—Type to continue, or q to quit—
at …/…/server/src/CSocket.cpp:131
#12 0x080b2497 in TServer::doMain (this=0x86b77e8)
at …/…/server/src/TServer.cpp:226
#13 0x080b3524 in TServer::operator() (this=0x86b77e8)
at …/…/server/src/TServer.cpp:116
#14 0x08097ff7 in boost::detail::thread_data<boost::reference_wrapper >::run (this=0x86bf998) at /usr/include/boost/thread/detail/thread.hpp:81
#15 0xb7faa808 in thread_proxy () from /usr/lib/libboost_thread.so.1.40.0
#16 0xb7cea4b5 in start_thread () from /lib/i686/cmov/libpthread.so.0
#17 0xb7ddfa5e in clone () from /lib/i686/cmov/libc.so.6[/CODE]

kalzor told me this happened when he uploaded levels and files with the RC.
I’m using the latest svn release atm. Revision: 924 to be exact.

Yeah. I uploaded a rather large amount of levels, or attempted to upload them, RC froze, and then I discovered the server had crashed.

Edit: 7140 to be exact. I tried with only 254 and still got a crash.

I think it’s a certain level that does it

___Merged doublepost__________________

no it was a different level this time.

52+ levels being uploaded at a time causes it. (tested by hand)

It is a problem with sign text encoding. Quite frankly, it is the symbol:
#.

The code value doesn’t exist in the gserver for whatever reason. Nor does it exist in the old gserver. It is an old bug. To solve it, I’ll have to make a simple .graal level with a sign that has a #. in it so I can rip the code out of it.

___Merged doublepost__________________

Okay, it was actually ## that was broken. I fixed it on the SVN repo.

Okay, now that that bug is fixed, a new one came up:

Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb52feb90 (LWP 9883)] 0xb7d76b8a in memcpy () from /lib/i686/cmov/libc.so.6 (gdb) bt #0 0xb7d76b8a in memcpy () from /lib/i686/cmov/libc.so.6 #1 0x080d26bd in CString::write (this=0xb52fc184, pSrc=0x68742079 <Address 0x68742079 out of bounds>, pSize=223) at ../../server/src/CString.cpp:204 #2 0x080d3858 in CString::subString (this=0xb5b03140, pStart=0, pLength=223) at ../../server/src/CString.cpp:342 #3 0x0810efa2 in TPlayer::getProp (this=0xb5b02d80, pPropId=0) at ../../server/src/TPlayerProps.cpp:26 #4 0x08112122 in TPlayer::getProps (this=0xb5b02d80, pProps=0x813ab20, pCount=83) at ../../server/src/TPlayerProps.cpp:927 #5 0x080fb360 in TPlayer::sendLevel (this=0xb2ebf188, pLevel=0xb5b96c98, modTime=0, fromAdjacent=false) at ../../server/src/TPlayer.cpp:1604 #6 0x080fc3d1 in TPlayer::setLevel (this=0xb2ebf188, pLevelName=..., modTime=0) at ../../server/src/TPlayer.cpp:1481 #7 0x080fcb8a in TPlayer::warp (this=0xb2ebf188, pLevelName=..., pX=30, pY=30.5, modTime=0) at ../../server/src/TPlayer.cpp:1388 #8 0x08051c8f in TPlayer::sendLoginClient (this=0xb2ebf188) at ../../server/src/TPlayerLogin.cpp:301 #9 0x080549bd in TPlayer::sendLogin (this=0xb2ebf188) at ../../server/src/TPlayerLogin.cpp:124 #10 0x0809abe5 in TServerList::msgSVI_VERIACC2 (this=0x82d3b1c, pPacket=...) at ../../server/src/TServerList.cpp:596 #11 0x0809a08e in TServerList::parsePacket (this=0x82d3b1c, pPacket=...) at ../../server/src/TServerList.cpp:355 #12 0x080a1470 in TServerList::main (this=0x82d3b1c) at ../../server/src/TServerList.cpp:141 #13 0x080a15a1 in TServerList::onRecv (this=0x82d3b1c) at ../../server/src/TServerList.cpp:85 #14 0x080d0ce7 in CSocketManager::update (this=0x82d39a4, sec=0, usec=5000) at ../../server/src/CSocket.cpp:131 #15 0x080b2497 in TServer::doMain (this=0x82d35b8) at ../../server/src/TServer.cpp:226 #16 0x080b3524 in TServer::operator() (this=0x82d35b8) at ../../server/src/TServer.cpp:116 #17 0x08097ff7 in boost::detail::thread_data<boost::reference_wrapper<TServer> >::run (this=0x85c99c0) at /usr/include/boost/thread/detail/thread.hpp:81 #18 0xb7faa808 in thread_proxy () from /usr/lib/libboost_thread.so.1.40.0 #19 0xb7cea4b5 in start_thread () from /lib/i686/cmov/libpthread.so.0 #20 0xb7ddfa5e in clone () from /lib/i686/cmov/libc.so.6

Oh ho ho~! This is why I refuse to use the RC for file uploads :smiley:

And, again.

[CODE][graal_the_adventure] :: New login: New Client (2.22+)
[graal_the_adventure] Version: GNW03014
[graal_the_adventure] Account: kalzor2

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb3afbb90 (LWP 11920)]
0xb7d76b8f in memcpy () from /lib/i686/cmov/libc.so.6
(gdb) bt
#0 0xb7d76b8f in memcpy () from /lib/i686/cmov/libc.so.6
#1 0x080d26bd in CString::write (this=0xb3af933c, pSrc=0xa <Address 0xa out of bounds>, pSize=10) at …/…/server/src/CString.cpp:204
#2 0x080d33b8 in CString::operator<< (this=0xb3af933c, pString=…) at …/…/server/src/CString.cpp:850
#3 0x0810f06c in TPlayer::getProp (this=0xa6392cb8, pPropId=0) at …/…/server/src/TPlayerProps.cpp:27
#4 0x08112122 in TPlayer::getProps (this=0xa6392cb8, pProps=0x813ab20, pCount=83) at …/…/server/src/TPlayerProps.cpp:927
#5 0x080fb360 in TPlayer::sendLevel (this=0xa6392c88, pLevel=0xa8f3c8d0, modTime=0, fromAdjacent=false) at …/…/server/src/TPlayer.cpp:1604
#6 0x080fc3d1 in TPlayer::setLevel (this=0xa6392c88, pLevelName=…, modTime=0) at …/…/server/src/TPlayer.cpp:1481
#7 0x080fcb8a in TPlayer::warp (this=0xa6392c88, pLevelName=…, pX=30, pY=30.5, modTime=0) at …/…/server/src/TPlayer.cpp:1388
#8 0x08051c8f in TPlayer::sendLoginClient (this=0xa6392c88) at …/…/server/src/TPlayerLogin.cpp:301
#9 0x080549bd in TPlayer::sendLogin (this=0xa6392c88) at …/…/server/src/TPlayerLogin.cpp:124
#10 0x0809abe5 in TServerList::msgSVI_VERIACC2 (this=0x86b80b4, pPacket=…) at …/…/server/src/TServerList.cpp:596
#11 0x0809a08e in TServerList::parsePacket (this=0x86b80b4, pPacket=…) at …/…/server/src/TServerList.cpp:355
#12 0x080a1470 in TServerList::main (this=0x86b80b4) at …/…/server/src/TServerList.cpp:141
#13 0x080a15a1 in TServerList::onRecv (this=0x86b80b4) at …/…/server/src/TServerList.cpp:85
#14 0x080d0ce7 in CSocketManager::update (this=0x86b7f3c, sec=0, usec=5000) at …/…/server/src/CSocket.cpp:131
#15 0x080b2497 in TServer::doMain (this=0x86b7b50) at …/…/server/src/TServer.cpp:226
#16 0x080b3524 in TServer::operator() (this=0x86b7b50) at …/…/server/src/TServer.cpp:116
#17 0x08097ff7 in boost::detail::thread_data<boost::reference_wrapper >::run (this=0x86dade0) at /usr/include/boost/thread/detail/thread.hpp:81
#18 0xb7faa808 in thread_proxy () from /usr/lib/libboost_thread.so.1.40.0
#19 0xb7cea4b5 in start_thread () from /lib/i686/cmov/libpthread.so.0
#20 0xb7ddfa5e in clone () from /lib/i686/cmov/libc.so.6[/CODE]

I’ll just use this same thread for another bug.

I did /restartserver and now no one can connect to it. Linux build seems pretty unstable… Like most things Linux. ]:

Most things on linux are stable E_e

Hahahaha, that was a good’in!

Can you attach the level that the player tried connecting on?

___Merged doublepost__________________

Or even the account file?

___Merged doublepost__________________

I made some changes. SVN update and try again please.

Okay, I have now recompiled the server. Now all I have to do is wait for either Kalzor to do a mass upload or Xero to do something with his server.

Nalin:
Have you made any recent changes that could be part of the last crash bug? Because it has happened more now than before. I barely had any problems with gserver hosting before.

___Merged doublepost__________________

happened again. dunno why.

CODE bt
#0 0xb7d765d3 in memmove () from /lib/i686/cmov/libc.so.6
#1 0x080ba183 in std::__copy_move<false, true, std::random_access_iterator_tag>::__copy_m<TPlayer*> (__first=0x8d55a9c, __last=0x8512dac,
__result=0x8d55a98) at /usr/include/c++/4.3/bits/stl_algobase.h:377
#2 0x080ba1bd in std::__copy_move_a<false, TPlayer**, TPlayer**> (__first=0x8d55a9c, __last=0x8512dac, __result=0x8d55a98)
at /usr/include/c++/4.3/bits/stl_algobase.h:396
#3 0x080ba309 in std::__copy_move_a2<false, __gnu_cxx::__normal_iterator<TPlayer**, std::vector<TPlayer*, std::allocator<TPlayer*> > >, __gnu_cxx::__normal_iterator<TPlayer**, std::vector<TPlayer*, std::allocator<TPlayer*> > > > (__first=…, __last=…, __result=…)
at /usr/include/c++/4.3/bits/stl_algobase.h:435
#4 0x080ba378 in std::copy<__gnu_cxx::__normal_iterator<TPlayer**, std::vector<TPlayer*, std::allocator<TPlayer*> > >, __gnu_cxx::__normal_iterator<TPlayer**, std::vector<TPlayer*, std::allocator<TPlayer*> > > > (__first=…, __last=…, __result=…) at /usr/include/c++/4.3/bits/stl_algobase.h:466
#5 0x080ba430 in std::vector<TPlayer*, std::allocator<TPlayer*> >::erase (this=0x86b85e4, __position=…) at /usr/include/c++/4.3/bits/vector.tcc:124
#6 0x080ba4c8 in vecRemove<TPlayer*> (a=…, b=0x8e34dc8) at …/…/server/include/IUtil.h:75
#7 0x080b2aab in TServer::cleanupDeletedPlayers (this=0x86b8098) at …/…/server/src/TServer.cpp:155
#8 0x080b3673 in TServer::operator() (this=0x86b8098) at …/…/server/src/TServer.cpp:119
#9 0x0809812b in boost::detail::thread_data<boost::reference_wrapper >::run (this=0x8e46d80) at /usr/include/boost/thread/detail/thread.hpp:81
#10 0xb7faa808 in thread_proxy () from /usr/lib/libboost_thread.so.1.40.0
#11 0xb7cea4b5 in start_thread () from /lib/i686/cmov/libpthread.so.0
#12 0xb7ddfa5e in clone () from /lib/i686/cmov/libc.so.6
[/CODE]

Some piece of memory is not being initialized properly. I have no clue why. I’m attempting to solve it. I committed a new change, though.

Ultimately, it would be helpful to be able to catch the crash when it happens. Can you replicate it at all?

It happens randomly, whenever someone uploads a level or doing something with RC. I don’t actually use the GServer myself at the moment since I don’t really have time. But it seems not to matter what people do on it, it just crashes. :S

It has been a while since any new reports have come up. Marking as resolved for now.