Pocketmine-mp: killed for no reason

Created on 3 Jul 2017  路  20Comments  路  Source: pmmp/PocketMine-MP

Issue description

On Ubuntu, sometimes the server is Killed for no reason, it just display "Killed." In the console whithout further informations
my vps info
4GB DDR4 RAM
1 vCPU @ 3.0Ghz
50GB NVMe SSD

IMG

Steps to reproduce the issue

  1. do ./start.sh and wait

OS and versions

  • PocketMine-MP:PocketMine-MP version 1.6.2dev-251 "Unleashed" (API 3.0.0-ALPHA6)
  • PHP:7.1
  • Server OS:Ubuntu 14.04

Plugins

server is clean)

Core PHP Awaiting Response

Most helpful comment

must have clicked a wrong button last night

All 20 comments

This can be easily reproduced with number of cores set to auto in pocketmine.yml

i tried still doesnt work

no

@xxFlare can you read? He has provided a build number.

I've been having a similar issue on Windows with a frequent random segmentation fault on startup completion. I couldn't reproduce it reliably enough to be able to debug it, but as I recall the auto-updater check task played a part in the problem. Consider disabling it in pocketmine.yml.

@dktapps might be a never-ending non loop function.

public function echoKilled(){
    $this->echoKilled();
}

Calling that function will give you the same output.

@xxFlare I could swear it outputted "Killed" in one of the PHP < 7.0.20
It outputs Bus error (core dumped) as of 7.0.20

It's worth noting that this exact same issue was already discussed heavily in #90. The only reason I've left this open is because I experience this problem frequently as of more recent versions.

@Muqsit don't waste your time or mine without hard evidence.

The only reason I've left this open

Is this supposed to be open?

must have clicked a wrong button last night

You might want to read up about Linux OOM killer.

same problem in Debian

I can confirm. This problem happens constantly when I use Asynchronous Tasks. It simply throws Segmentation Fault, this is what GDB returns using the Valgrind-generated core:

GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-94.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /root/xyrius/bin/php7/bin/php...(no debugging symbols found)...done.
[New LWP 5693]
[New LWP 5729]
[New LWP 5728]
[New LWP 5727]
[New LWP 5726]
[New LWP 5725]
[New LWP 5723]
[New LWP 5722]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `'.
Program terminated with signal 11, Segmentation fault.

0 0x0000000000788532 in _emalloc ()

And, the Valgrind output exactly when the server crashes:

==5836== Thread 1:
==5836== Invalid read of size 8
==5836== at 0x788532: _emalloc (in /root/xyrius/bin/php7/bin/php)
==5836== by 0x7E8AF7: zend_objects_new (in /root/xyrius/bin/php7/bin/php)
==5836== by 0x7B3DE0: _object_and_properties_init (in /root/xyrius/bin/php7/bin/php)
==5836== by 0x42AEAA: object_common1.isra.7 (in /root/xyrius/bin/php7/bin/php)
==5836== by 0x6F2BBF: php_var_unserialize_internal (in /root/xyrius/bin/php7/bin/php)
==5836== by 0x42B05E: object_common2 (in /root/xyrius/bin/php7/bin/php)
==5836== by 0x6F249C: php_var_unserialize_internal (in /root/xyrius/bin/php7/bin/php)
==5836== by 0x42B05E: object_common2 (in /root/xyrius/bin/php7/bin/php)
==5836== by 0x6F249C: php_var_unserialize_internal (in /root/xyrius/bin/php7/bin/php)
==5836== by 0x42B05E: object_common2 (in /root/xyrius/bin/php7/bin/php)
==5836== by 0x6F249C: php_var_unserialize_internal (in /root/xyrius/bin/php7/bin/php)
==5836== by 0x6463BA: pthreads_store_convert (in /root/xyrius/bin/php7/bin/php)
==5836== Address 0xd10000001be16d1c is not stack'd, malloc'd or (recently) free'd
==5836==
==5836==
==5836== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==5836== General Protection Fault
==5836== at 0x788532: _emalloc (in /root/xyrius/bin/php7/bin/php)
==5836== by 0x7E8AF7: zend_objects_new (in /root/xyrius/bin/php7/bin/php)
==5836== by 0x7B3DE0: _object_and_properties_init (in /root/xyrius/bin/php7/bin/php)
==5836== by 0x42AEAA: object_common1.isra.7 (in /root/xyrius/bin/php7/bin/php)
==5836== by 0x6F2BBF: php_var_unserialize_internal (in /root/xyrius/bin/php7/bin/php)
==5836== by 0x42B05E: object_common2 (in /root/xyrius/bin/php7/bin/php)
==5836== by 0x6F249C: php_var_unserialize_internal (in /root/xyrius/bin/php7/bin/php)
==5836== by 0x42B05E: object_common2 (in /root/xyrius/bin/php7/bin/php)
==5836== by 0x6F249C: php_var_unserialize_internal (in /root/xyrius/bin/php7/bin/php)
==5836== by 0x42B05E: object_common2 (in /root/xyrius/bin/php7/bin/php)
==5836== by 0x6F249C: php_var_unserialize_internal (in /root/xyrius/bin/php7/bin/php)
==5836== by 0x6463BA: pthreads_store_convert (in /root/xyrius/bin/php7/bin/php)
==5836==
==5836== HEAP SUMMARY:
==5836== in use at exit: 13,666,395 bytes in 65,220 blocks
==5836== total heap usage: 100,051 allocs, 34,831 frees, 40,286,237 bytes allocated
==5836==
==5836== LEAK SUMMARY:
==5836== definitely lost: 0 bytes in 0 blocks
==5836== indirectly lost: 0 bytes in 0 blocks
==5836== possibly lost: 5,965,416 bytes in 55,954 blocks
==5836== still reachable: 7,700,979 bytes in 9,266 blocks
==5836== suppressed: 0 bytes in 0 blocks
==5836== Rerun with --leak-check=full to see details of leaked memory
==5836==
==5836== For counts of detected and suppressed errors, rerun with: -v
==5836== Use --track-origins=yes to see where uninitialised values come from
==5836== ERROR SUMMARY: 6 errors from 6 contexts (suppressed: 0 from 0)
--- ERROR EVENT FIRED -- EXECUTING COREDBG ---
[coredbg] CoreDEBUG v2.0p4-rhel, Debugger, Analyser, and lover of the Hex-Rays
[coredbg] Written by Link Usumaki for SYNICAL LTD- Built using gcc-c++ (rhel+p20n193-centos-repo:reg.kpwn.me)
[coredbg] Loading kernel events....
[coredbg] php -> SIGSEGV [127]
[coredbg] |-> C++ Thread | debug.h : Crash detected. Firing cdbg.cpp.build...
[coredbg] |----> coredbg>> #0 0x0000000000788532 in _emalloc ()
[coredbg] |----> #0 0x00000000000034f2b in pthreads_store_convert()
[coredbg] | pthread->mutex_lock -> >>> SIGSEGV>pthread_exit() ? 0x0fe1fff->end
[coredbg] Possible crash cause: pthread unexpected exit [SIGSEGV]

That log includes the program I use to debug C/C++ applications.

I hope this information is helpful.

32 bit or 64

Actually, your answer is useless. PMMP only supports 64 bits.

Would you mind recompiling PHP with xdebug and trying to reproduce? You can supply the -d flag to compile.sh (in the php-build-scripts repo).

Closing due to lack of response.

That's what happened to me my server was killed and its asking me for thread . All I know is I died from pvp and my server was closed

On ps4 and server on phone crashed

This scenario is a common symptom for a variety of OS errors or PHP/extension bugs. Please use the support channels first, since they are most likely related to plugin errors or memory issues.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Muqsit picture Muqsit  路  3Comments

Ox531 picture Ox531  路  3Comments

jasonwynn10 picture jasonwynn10  路  3Comments

dktapps picture dktapps  路  3Comments

Muqsit picture Muqsit  路  3Comments