When starting up, the server crashes with Segmentation fault (core dumped) and exits
I'm moving my server over to Linux from Windows, and I'm aware that 64-bit PHP has this issue under Windows, and my previous workaround was to just use a 32-bit version of PHP. However, it's not possible to do this under Linux since the plain x86 version cannot run in a 64-bit environment.
It turns out I _can_ run the x86 version after enabling multilib, ok.
However, I'm still crashing quite a bit (70-80% of the time starting up) with a log I've updated below.
[02:25:22] [Server thread/INFO]: Preparing level "world"
*** Error in `PocketMine-MP 1.6.1dev': double free or corruption (fasttop): 0x09b32680 ***
*** Error in `PocketMine-MP 1.6.1dev': double free or corruption (fasttop): 0x09b32680 ***
/usr/lib32/libc.so.6(+0x6815a)[0xf743c15a]
/usr/lib32/libc.so.6(+0x6ed07)[0xf7442d07]
======= Backtrace: =========
PocketMine-MP 1.6.1dev[0x86641d6]
/usr/lib32/libc.so.6(+0x6815a)[0xf743c15a]
PocketMine-MP 1.6.1dev(zend_lookup_class_ex+0x6e7)[0x8651375]
/usr/lib32/libc.so.6(+0x6ed07)[0xf7442d07]
PocketMine-MP 1.6.1dev[0x83a322e]
/usr/lib32/libc.so.6(+0x6f4d6)[0xf74434d6]
PocketMine-MP 1.6.1dev[0x86ce382]
PocketMine-MP 1.6.1dev[0x86641d6]
PocketMine-MP 1.6.1dev(zend_call_function+0xe05)[0x8650769]
PocketMine-MP 1.6.1dev(_zval_dtor_func+0x96)[0x8664406]
Aborted (core dumped)
When I loop the start.sh, it also occasionally segfaults.
Possibly caused by opcache?
@SOF3 So what would the solution be? I actually haven't been able to reproduce on PM 1.6 (for MCPE 0.15), so it might have been introduced recently.
@SOF3 Not possibly, I think it is certain.
Adding on that we're encountering this same issue on all of our MCPE servers running PocketMine and Genisys, and have seen it in production for as long as we can remember. You can find reports of this on the old PocketMine repo issue tracker going back to 2015, but it's unclear if the root cause was ever isolated.
For reference, we use PHP7 binaries built from the PocketMine PHP build scripts.
I believe this is the same issue as the one behind #90 .
Merging into #90
Most helpful comment
Possibly caused by opcache?