Server crush
#1
Server crashes when a player crosses a certain position (change of chunks). Below are links to the region (7zip) and the screenshot file before changing the chunk. And crushed log.
r.0.-1.mca
Screensoot

Code:
Error: [10:02:24]   D:    | MCServer has encountered an error and needs to close
Error: [10:02:24] Details | SIGSEGV: Segmentation fault
Error: [10:02:24] MCServer local build build id: Unknown
Error: [10:02:24] from commit id: approx: 4231dcf7e134a699cfdb7a88ff8116a123259480 built at: approx: 2015-08-16 10:26:59 +0200
0x4f5cf4 <_Z15PrintStackTracev+0x14> at /store1/minecraft/minecraft-010/MCServer/MCServer-010
0x4e0e88 <_Z14NonCtrlHandleri+0x58> at /store1/minecraft/minecraft-010/MCServer/MCServer-010
0x80148c47a <_swapcontext+0x15a> at /lib/libthr.so.3
0x80148c062 <sigaction+0x342> at /lib/libthr.so.3
0x7ffffffff193 <_fini+0x7fffff753cab> at ???
0x6f4d41 <_ZN5cPawn15AddEntityEffectEN13cEntityEffect5eTypeEisd+0x161> at /store1/minecraft/minecraft-010/MCServer/MCServer-010
0x702d31 <_ZN21cSplashPotionCallback4ItemEP7cEntity+0x91> at /store1/minecraft/minecraft-010/MCServer/MCServer-010
0x430e11 <_ZN6cChunk13ForEachEntityER13cItemCallbackI7cEntityE+0x21> at /store1/minecraft/minecraft-010/MCServer/MCServer-010
0x43ba2e <_ZN9cChunkMap13ForEachEntityER13cItemCallbackI7cEntityE+0x5e> at /store1/minecraft/minecraft-010/MCServer/MCServer-010
0x70272e <_ZN19cSplashPotionEntity15OnHitSolidBlockERK7Vector3IdE10eBlockFace+0x3e> at /store1/minecraft/minecraft-010/MCServer/MCServer-010
0x70251d <_ZN25cProjectileTracerCallback11OnNextBlockEiiihhc+0x2ed> at /store1/minecraft/minecraft-010/MCServer/MCServer-010
0x4847bf <_ZN16cLineBlockTracer4ItemEP6cChunk+0x2ff> at /store1/minecraft/minecraft-010/MCServer/MCServer-010
0x442a18 <_ZN9cChunkMap11DoWithChunkEiiR13cItemCallbackI6cChunkE+0xb8> at /store1/minecraft/minecraft-010/MCServer/MCServer-010
0x484eb0 <_ZN16cLineBlockTracer5TraceER6cWorldRN12cBlockTracer10cCallbacksERK7Vector3IdES8_+0x280> at /store1/minecraft/minecraft-010/MCServer/MCServer-010
0x700fc9 <_ZN17cProjectileEntity13HandlePhysicsENSt6chrono8durationIlSt5ratioILl1ELl1000EEEER6cChunk+0x139> at /store1/minecraft/minecraft-010/MCServer/MCServer-010
0x6e14e4 <_ZN7cEntity4TickENSt6chrono8durationIlSt5ratioILl1ELl1000EEEER6cChunk+0x224> at /store1/minecraft/minecraft-010/MCServer/MCServer-010
0x702059 <_ZN17cProjectileEntity4TickENSt6chrono8durationIlSt5ratioILl1ELl1000EEEER6cChunk+0x9> at /store1/minecraft/minecraft-010/MCServer/MCServer-010
0x43659b <_ZN6cChunk4TickENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE+0x11b> at /store1/minecraft/minecraft-010/MCServer/MCServer-010
0x43d0ea <_ZN9cChunkMap4TickENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE+0x6a> at /store1/minecraft/minecraft-010/MCServer/MCServer-010
0x4d73ea <_ZN6cWorld4TickENSt6chrono8durationIlSt5ratioILl1ELl1000EEEES4_+0x23a> at /store1/minecraft/minecraft-010/MCServer/MCServer-010
0x4d766d <_ZN6cWorld11cTickThread7ExecuteEv+0x7d> at /store1/minecraft/minecraft-010/MCServer/MCServer-010
0x80175daf0 <_ZNSt11this_thread11__sleep_forENSt6chrono8durationIlSt5ratioILl1ELl1EEEENS1_IlS2_ILl1ELl1000000000EEEE+0x40> at /usr/local/lib/gcc5/libstdc++.so.6
0x8014874f5 <pthread_create+0x725> at /lib/libthr.so.3
Error: [10:02:24]   D:    | MCServer has encountered an error and needs to close
Error: [10:02:24] Details | SIGABRT: Server self-terminated due to an internal fault
Error: [10:02:24] MCServer local build build id: Unknown
Error: [10:02:24] from commit id: approx: 4231dcf7e134a699cfdb7a88ff8116a123259480 built at: approx: 2015-08-16 10:26:59 +0200
0x4f5cf4 <_Z15PrintStackTracev+0x14> at /store1/minecraft/minecraft-010/MCServer/MCServer-010
0x4e0e88 <_Z14NonCtrlHandleri+0x58> at /store1/minecraft/minecraft-010/MCServer/MCServer-010
0x80148c47a <_swapcontext+0x15a> at /lib/libthr.so.3
0x80148c062 <sigaction+0x342> at /lib/libthr.so.3
0x7ffffffff193 <_fini+0x7fffff753cab> at ???
Abort trap
Reply
Thanks given by:
#2
You seem to be using an old version of Cuberite. It says
Code:
MCServer has encountered an error and needs to close
at the top
Reply
Thanks given by:
#3
(12-02-2015, 08:09 PM)SphinxC0re Wrote: You seem to be using an old version of Cuberite. It says
Code:
MCServer has encountered an error and needs to close
at the top

The build is some weeks ago. In any case I create new build now and post reply.
Reply
Thanks given by:
#4
Compile error:

Code:
[ 61%] Building CXX object src/OSSupport/CMakeFiles/OSSupport.dir/TCPLinkImpl.cpp.o
/store1/minecraft/minecraft-test/cuberite/cuberite-2015.12.02/cuberite/src/OSSupport/StackTrace.cpp:19:10: error: macro is not used [-Werror,-Wunused-macros]
        #define btsize size_t
                ^
1 error generated.
--- src/OSSupport/CMakeFiles/OSSupport.dir/StackTrace.cpp.o ---
*** [src/OSSupport/CMakeFiles/OSSupport.dir/StackTrace.cpp.o] Error code 1

make[2]: stopped in /store1/minecraft/minecraft-test/cuberite/cuberite-2015.12.02/cuberite/build-cuberite
A failure has been detected in another branch of the parallel make

make[2]: stopped in /store1/minecraft/minecraft-test/cuberite/cuberite-2015.12.02/cuberite/build-cuberite
--- src/Mobs/CMakeFiles/Mobs.dir/all ---
*** [src/Mobs/CMakeFiles/Mobs.dir/all] Error code 2

make[1]: stopped in /store1/minecraft/minecraft-test/cuberite/cuberite-2015.12.02/cuberite/build-cuberite
A failure has been detected in another branch of the parallel make

make[2]: stopped in /store1/minecraft/minecraft-test/cuberite/cuberite-2015.12.02/cuberite/build-cuberite
--- src/PolarSSL++/CMakeFiles/PolarSSL++.dir/all ---
*** [src/PolarSSL++/CMakeFiles/PolarSSL++.dir/all] Error code 2

make[1]: stopped in /store1/minecraft/minecraft-test/cuberite/cuberite-2015.12.02/cuberite/build-cuberite
1 error

make[2]: stopped in /store1/minecraft/minecraft-test/cuberite/cuberite-2015.12.02/cuberite/build-cuberite
--- src/OSSupport/CMakeFiles/OSSupport.dir/all ---
*** [src/OSSupport/CMakeFiles/OSSupport.dir/all] Error code 2

make[1]: stopped in /store1/minecraft/minecraft-test/cuberite/cuberite-2015.12.02/cuberite/build-cuberite
A failure has been detected in another branch of the parallel make

make[2]: stopped in /store1/minecraft/minecraft-test/cuberite/cuberite-2015.12.02/cuberite/build-cuberite
--- src/BlockEntities/CMakeFiles/BlockEntities.dir/all ---
*** [src/BlockEntities/CMakeFiles/BlockEntities.dir/all] Error code 2

make[1]: stopped in /store1/minecraft/minecraft-test/cuberite/cuberite-2015.12.02/cuberite/build-cuberite
A failure has been detected in another branch of the parallel make

make[2]: stopped in /store1/minecraft/minecraft-test/cuberite/cuberite-2015.12.02/cuberite/build-cuberite
--- lib/sqlite/CMakeFiles/sqlite.dir/all ---
*** [lib/sqlite/CMakeFiles/sqlite.dir/all] Error code 2

make[1]: stopped in /store1/minecraft/minecraft-test/cuberite/cuberite-2015.12.02/cuberite/build-cuberite
5 errors

make[1]: stopped in /store1/minecraft/minecraft-test/cuberite/cuberite-2015.12.02/cuberite/build-cuberite
*** [all] Error code 2

make: stopped in /store1/minecraft/minecraft-test/cuberite/cuberite-2015.12.02/cuberite/build-cuberite
1 error

make: stopped in /store1/minecraft/minecraft-test/cuberite/cuberite-2015.12.02/cuberite/build-cuberite

OS: FreeBSD 10.1-RELEASE
Reply
Thanks given by:
#5
Could you try replacing the src/OSSupport/StackTrace.cpp file with this:
// StackTrace.cpp

// Implements the functions to print current stack traces

#include "Globals.h"
#include "StackTrace.h"
#ifdef _WIN32
	#include "../StackWalker.h"
#else
	#include <execinfo.h>
	#include <unistd.h>
#endif





void PrintStackTrace(void)
{
	#ifdef _WIN32
		// Reuse the StackWalker from the LeakFinder project already bound to MCS
		// Define a subclass of the StackWalker that outputs everything to stdout
		class PrintingStackWalker :
			public StackWalker
		{
			virtual void OnOutput(LPCSTR szText) override
			{
				puts(szText);
			}
		} sw;
		sw.ShowCallstack();
	#else
		// Use the backtrace() function to get and output the stackTrace:
		// Code adapted from http://stackoverflow.com/questions/77005...pp-crashes
		void * stackTrace[30];
		auto numItems = backtrace(stackTrace, ARRAYCOUNT(stackTrace));
		backtrace_symbols_fd(stackTrace, numItems, STDERR_FILENO);
	#endif
}
Reply
Thanks given by:
#6
I'm comment out definitions and finish compile.
But I have errors and crushed server
Code:
Error: [13:46:52]   D:    | Cuberite has encountered an error and needs to close
Error: [13:46:52] Details | SIGSEGV: Segmentation fault
Error: [13:46:52] Cuberite local build build id: Unknown
Error: [13:46:52] from commit id: approx: 1a9c023d6c69d5aa37ed0d3726e0f4af77b974f9 built at: approx: 2015-11-30 08:58:02 +0200
Error: [13:46:52]   D:    | Cuberite has encountered an error and needs to close
Error: [13:46:52] Details | SIGABRT: Server self-terminated due to an internal fault
Error: [13:46:52] Cuberite local build build id: Unknown
Error: [13:46:52] from commit id: approx: 1a9c023d6c69d5aa37ed0d3726e0f4af77b974f9 built at: approx: 2015-11-30 08:58:02 +0200
Abort (core dumped)
Reply
Thanks given by:
#7
Okay, so could you try my code now?
Reply
Thanks given by:
#8
(12-02-2015, 10:50 PM)xoft Wrote: Okay, so could you try my code now?

I try it now.
Reply
Thanks given by:
#9
(12-02-2015, 10:50 PM)xoft Wrote: Okay, so could you try my code now?

Build success:
Code:
5 warnings generated.
[100%] Linking CXX executable ../../Server/Cuberite
[100%] Built target Cuberite

But has some crush error:
Code:
Error: [15:24:10]   D:    | Cuberite has encountered an error and needs to close
Error: [15:24:10] Details | SIGSEGV: Segmentation fault
Error: [15:24:10] Cuberite local build build id: Unknown
Error: [15:24:10] from commit id: approx: 1a9c023d6c69d5aa37ed0d3726e0f4af77b974f9 built at: approx: 2015-11-30 08:58:02 +0200
0x4d22f0 <_Z15PrintStackTracev+0x20> at /store1/minecraft/minecraft-010/MCServer/Cuberite
0x4bfc14 <_Z14NonCtrlHandleri+0xe4> at /store1/minecraft/minecraft-010/MCServer/Cuberite
0x80165447a <_swapcontext+0x15a> at /lib/libthr.so.3
0x801654062 <sigaction+0x342> at /lib/libthr.so.3
Error: [15:24:10]   D:    | Cuberite has encountered an error and needs to close
Error: [15:24:10] Details | SIGABRT: Server self-terminated due to an internal fault
Error: [15:24:10] Cuberite local build build id: Unknown
Error: [15:24:10] from commit id: approx: 1a9c023d6c69d5aa37ed0d3726e0f4af77b974f9 built at: approx: 2015-11-30 08:58:02 +0200
0x4d22f0 <_Z15PrintStackTracev+0x20> at /store1/minecraft/minecraft-010/MCServer/Cuberite
0x4bfc14 <_Z14NonCtrlHandleri+0xe4> at /store1/minecraft/minecraft-010/MCServer/Cuberite
0x80165447a <_swapcontext+0x15a> at /lib/libthr.so.3
0x801654062 <sigaction+0x342> at /lib/libthr.so.3
Abort
Reply
Thanks given by:
#10
Great, so at least we have a fix for the build, I'll put it in a PR.
As for the crash, try to folow the Linux guide for reporting crashes to provide more information: https://forum.cuberite.org/showthread.php?tid=631
Basically, try running the executable under GDB; assuming that you did a debug build, you should be able to get a full stacktrace of the crash.
Reply
Thanks given by:




Users browsing this thread: 2 Guest(s)