I start server, load npcroom and podium (or all maps), spawn NPCs, unlocking server. Then I log in. Then I just run around npcroom, targeting NPCs, saying hello to them, going near them and then away (out of visibility range), sometimes I enter admin mode, sometimes teleport to other map and back etc, etc... I don't do any unusual things. It seems crashes happen randomly, I can't find any regularity. I use the same machine for server and client, CVS version from July the 1st.
Here are two backtraces, they differ slightly, I can't find any relations between my actions and those cases:
Case 1:
Core was generated by `./psserver'.
Program terminated with signal 11, Segmentation fault.
(...)
#0 0x08070736 in ~csSyncRefCount (this=0xb07d7aa8) at ./src/common/net/message.h:54
54 virtual ~csSyncRefCount () {}
(gdb) bt
#0 0x08070736 in ~csSyncRefCount (this=0xb07d7aa8) at ./src/common/net/message.h:54
#1 0x08070860 in ~MsgEntry (this=0xb07d7aa8) at ./src/common/net/message.h:192
#2 0x080706ec in csSyncRefCount::Delete (this=0xb07d7aa8) at ./src/common/net/message.h:51
#3 0x08053a74 in csSyncRefCount::DecRef (this=0xb07d7aa8) at ./src/common/net/message.h:76
#4 0x082c3ee1 in csRef<MsgEntry>::operator= (this=0xb4a59408, newobj=0x0)
at /mnt/lin_g/cvs_planeshift/CS/include/csutil/ref.h:235
#5 0x082c367a in EventManager::Run (this=0xb71a09a0) at src/common/util/eventmanager.cpp:193
#6 0x08169a4e in csPosixThread::ThreadRun () at ./src/common/net/sockuni.h:56
#7 0x00000000 in ?? ()
Case 2:
Program terminated with signal 11, Segmentation fault.
(...)
#0 0x08070851 in ~MsgEntry (this=0xaffc2280) at ./src/common/net/message.h:191
191 free ((void*) bytes);
(gdb) bt
#0 0x08070851 in ~MsgEntry (this=0xaffc2280) at ./src/common/net/message.h:191
#1 0x080706ec in csSyncRefCount::Delete (this=0xaffc2280) at ./src/common/net/message.h:51
#2 0x08053a74 in csSyncRefCount::DecRef (this=0xaffc2280) at ./src/common/net/message.h:76
#3 0x082c3ee1 in csRef<MsgEntry>::operator= (this=0xb4a71408, newobj=0x0)
at /mnt/lin_g/cvs_planeshift/CS/include/csutil/ref.h:235
#4 0x082c367a in EventManager::Run (this=0xb71b89a0) at src/common/util/eventmanager.cpp:193
#5 0x08169a4e in csPosixThread::ThreadRun () at ./src/common/net/sockuni.h:56
#6 0x00000000 in ?? ()
And the following is another crash, probably completely unrelated (but trace starts from sockuni.h too). It happens after I try to spawn any kind of money, other items are OK (doing /admin, then /item, then selecting coins/hexa and clcking spawn). I am adding it for you so you can compare behaviour of your installation, maybe something is wrong with mine:
Core was generated by `./psserver'.
Program terminated with signal 11, Segmentation fault.
(...)
#0 0x0805396c in csRefCount::IncRef (this=0xdddddddd) at /mnt/lin_g/cvs_planeshift/CS/include/csutil/refcount.h:66
66 csRefTrackerAccess::TrackIncRef (this, ref_count);
(gdb) bt
#0 0x0805396c in csRefCount::IncRef (this=0xdddddddd) at /mnt/lin_g/cvs_planeshift/CS/include/csutil/refcount.h:66
#1 0x080846f3 in csRef<psItemSafe>::operator= (this=0xb26b69d8, newobj=0xdddddddd)
at /mnt/lin_g/cvs_planeshift/CS/include/csutil/ref.h:234
#2 0x081e7cfb in psDelaySave (this=0xb26b6980, length=500, item=0xdddddddd) at src/server/bulkobjects/psitem.cpp:2454
#3 0x081e7da9 in psItem::Save (this=0xb26db334) at src/server/bulkobjects/psitem.cpp:440
#4 0x08118a58 in AdminManager::SpawnItemInv (this=0xb6fbe3e0, me=0xb26c8168, msg=@0xb4affd8c, client=0xb6c31298)
at src/server/adminmanager.cpp:3255
#5 0x08120084 in AdminManager::HandleMessage (this=0xb6fbe3e0, me=0xb26c8168, client=0xb6c31298)
at src/server/adminmanager.cpp:188
#6 0x082497c3 in MsgHandler::Publish (this=0xb72479a0, me=0xb26c8168) at src/common/net/msghandler.cpp:94
#7 0x082c3524 in EventManager::Run (this=0xb72479a0) at src/common/util/eventmanager.cpp:161
#8 0x08169a4e in csPosixThread::ThreadRun () at ./src/common/net/sockuni.h:56
#9 0x00000000 in ?? ()
EDIT:
-------
I have recompiled CS and CEL in debug mode to have more complete backtraces. After doing this server was crashing during any network activity, first "ping" sent from client causes this:
Core was generated by `./psserver'.
Program terminated with signal 6, Aborted.
(...)
#0 0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0 0xffffe410 in __kernel_vsyscall ()
#1 0xb7d66ef1 in raise () from /lib/tls/libc.so.6
#2 0xb7d6883b in abort () from /lib/tls/libc.so.6
#3 0xb7d9cff5 in __fsetlocking () from /lib/tls/libc.so.6
#4 0xb7da3587 in malloc_usable_size () from /lib/tls/libc.so.6
#5 0xb7da3a02 in free () from /lib/tls/libc.so.6
#6 0x08072431 in ~MsgEntry (this=0xb402c760) at ./src/common/net/message.h:191
#7 0x080722cc in csSyncRefCount::Delete (this=0xb402c760) at ./src/common/net/message.h:51
#8 0x08055654 in csSyncRefCount::DecRef (this=0xb402c760) at ./src/common/net/message.h:76
#9 0x082480f9 in ~csRef (this=0xb6b3c2d8) at /mnt/lin_g/cvs_planeshift/CS/include/csutil/ref.h:184
#10 0x08245b26 in NetBase::BuildMessage (this=0xb7024ba0, pkt=0xb40303b8, connection=@0xb6b3c34c, addr=0xb6b3c354)
at src/common/net/netbase.cpp:837
#11 0x082460c2 in NetBase::CheckIn (this=0xb7024ba0) at src/common/net/netbase.cpp:256
#12 0x082465da in NetBase::ProcessNetwork (this=0xb7024ba0, timeout=34514) at src/common/net/netbase.cpp:136
#13 0x080c298a in NetManager::Run (this=0xb7024ba0) at src/server/netmanager.cpp:295
#14 0x0816af81 in csPosixThread::ThreadRun (param=0xb724ffe0) at libs/csutil/generic/cspthrd.cpp:531
#15 0xb7fabc40 in start_thread () from /lib/tls/libpthread.so.0
#16 0xb7e0b0ee in clone () from /lib/tls/libc.so.6
Setting MALLOC_CHECK_=0 before starting server was preventing those crashes, it also seems to prevent crashes in message.h (or at least cause them to happen more rarely).
With CS/CEL built in optimized mode MALLOCK_CHECK_=0 does not help.