pmmp / PocketMine-MP

A server software for Minecraft: Bedrock Edition in PHP
https://pmmp.io
GNU Lesser General Public License v3.0
3.28k stars 1.55k forks source link

Segmentation fault after 'opcache.so' load failure during PocketMine installation #5876

Closed markeev closed 1 year ago

markeev commented 1 year ago

I'm trying to set up PocketMine, but regardless of whether I use the command from pmmp.io or download everything from GitHub and compile the PHP binaries, I encounter the same issue.

Upon starting the server, I get this warning message: Warning: Failed loading Zend extension 'opcache.so' (tried: /home/runner/work/PHP-Binaries/PHP-Binaries/bin/php7/lib/php/extensions/no-debug-zts-20210902/opcache.so (/home/runner/work/PHP-Binaries/PHP-Binaries/bin/php7/lib/php/extensions/no-debug-zts-20210902/opcache.so: cannot open shared object file: No such file or directory), /home/runner/work/PHP-Binaries/PHP-Binaries/bin/php7/lib/php/extensions/no-debug-zts-20210902/opcache.so.so (/home/runner/work/PHP-Binaries/PHP-Binaries/bin/php7/lib/php/extensions/no-debug-zts-20210902/opcache.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Subsequently, when a player connects or when the map is being generated, I get a Segmentation fault (core dumped) error and the server crashes.

The system is running on Ubuntu with PHP 8.2/8.1. I have ten other servers running on version 1.1.x on the same machine without any issues.

I have never dealt with a Segmentation fault before. Could you please advise what additional information I could provide to help solve this problem?

Additional comments (optional)

Environment:

OS: Ubuntu PHP version: 8.2/8.1 PocketMine version: (please provide if applicable) Installation method: both from the command on pmmp.io and from GitHub with compiled PHP binaries

Steps to Reproduce:

  1. Install PocketMine using either method.
  2. Start the server.
  3. Observe the 'opcache.so' warning.
  4. Attempt to connect a player or generate a map.
  5. Observe the Segmentation fault (core dumped) error.
markeev commented 1 year ago

[!] Be sure to check it, if you have to forward and you skip that, no external players will be able to join. [Press Enter]

[08:25:00.426] [Server thread/INFO]: Loading server configuration [08:25:00.432] [Server thread/INFO]: Selected English (eng) as the base language [08:25:00.434] [Server thread/INFO]: Starting Minecraft: Bedrock Edition server version v1.20.0 [08:25:00.457] [Server thread/INFO]: Online mode is enabled. The server will verify that players are authenticated to Xbox Live. [08:25:00.482] [Server thread/INFO]: This server is running PocketMine-MP version 5.2.0 [08:25:00.482] [Server thread/INFO]: PocketMine-MP is distributed under the LGPL License [08:25:00.654] [Server thread/INFO]: Loading resource packs... [08:25:00.720] [Server thread/INFO]: Preparing world "world" [08:25:00.730] [Server thread/NOTICE]: Spawn terrain for world "world" is being generated in the background Segmentation fault (core dumped)

dktapps commented 1 year ago

The opcache.so error is unrelated. See FAQ: https://doc.pmmp.io/en/rtfd/faq/installation/opcache.so.html

markeev commented 1 year ago

ok, it fixed opcache.so error, but still crush

dktapps commented 1 year ago

I'm not able to reproduce this. I need more information.

markeev commented 1 year ago

Could you please guide me to resources or provide links that will help me better understand how to handle issues such as a Segmentation Fault? This information would be incredibly useful not only for resolving the current issue, but also for future troubleshooting. I appreciate your time and assistance in this matter.

dktapps commented 1 year ago

Do ulimit -c unlimited. When the segfault occurs, it will generate a file called core (or something similar) which can be used to debug the problem. Zip the file up and send it to dktapps@pmmp.io.

markeev commented 1 year ago

I have sent the dump that I obtained. I also want to mention that when I changed the value of "async-workers:" in pocketmine.yml to 0, the program started working correctly.

dktapps commented 1 year ago

Which PM version did you use?

markeev commented 1 year ago

PM 5

dktapps commented 1 year ago

Exact version. "5" could be any version released in the last 6 weeks.

dktapps commented 1 year ago

How often does this error occur? The crash trace is pretty obscure (it winds up somewhere in zend_execute_ex which is nearly impossible to track down due to lack of debugging symbols)

markeev commented 1 year ago

Exact version. "5" could be any version released in the last 6 weeks.

PM - https://github.com/pmmp/PocketMine-MP/releases/tag/5.2.0 PHP - https://github.com/pmmp/PHP-Binaries/releases/tag/php-8.1-latest

markeev commented 1 year ago

How often does this error occur? The crash trace is pretty obscure (it winds up somewhere in zend_execute_ex which is nearly impossible to track down due to lack of debugging symbols)

Anytime when a player joins or a card is generated.

dktapps commented 1 year ago

I don't know what "a card is generated" means.

markeev commented 1 year ago

map, sorry :0 When map is being generated.

dktapps commented 1 year ago

Please try it again with this binary: https://github.com/pmmp/PHP-Binaries/suites/14139010382/artifacts/791841875

When you get another core file with this binary, please send it to me.

dktapps commented 1 year ago

Bump. Is this still an issue?

dktapps commented 1 year ago

Closing due to lack of response.