Running Minecraft BDS in box64 would crash
platform: aarch64 Android (tiny-ubuntu in termux) compile host: as above
This issue is mentioned by #171, but they should not be recognized as the same issue, so I opened this issue additionally.
This is the copy of the issue description:
When I played for a while, the server suddenly crashed. This is the partial output:
Warning, call to __cxa_thread_atexit_impl(0x302b940, 0x7a18000d88, 0x5060fc8) ignored
Warning, call to __cxa_thread_atexit_impl(0x302b980, 0x7a18000db0, 0x5060fc8) ignored
terminate called after throwing an instance of 'std::system_error'
what(): Operation not permitted
Segmentation fault
root@localhost:~/bds#
I'm also running Minecraft BDS with Box64. I do get the call to __cxa_thread_atexit_impl "warning ignored" message but no errors and the server seems to run great except for one oddity - players can't see each other in the game. Whatever they are holding is visible, but not the players themselves.
OS: Ubuntu 20.04 Architecture: Oracle Cloud VM.Standard.A1.Flex (2.8 GHz Ampere Altra 80C, 4 OCPUs, 24GB RAM)
Compiling:
git clone https://github.com/ptitSeb/box64
cd box64
mkdir build; cd build; cmake .. -DARM_DYNAREC=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j$(nproc)
sudo make install
sudo systemctl restart systemd-binfmt
Run Output:
ubuntu@minecraft-server-arm:~/minecraft$ LD_LIBRARY_PATH=. ./bedrock_server
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS PageSize:4096
Box64 with Dynarec v0.1.7 5d1298e built on Dec 15 2021 06:41:02
Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/
Using default BOX64_PATH: ./:bin/
Counted 30 Env var
Looking for ./bedrock_server
Using native(wrapped) libpthread.so.0
Using native(wrapped) libz.so.1
Using native(wrapped) libnsl.so.1
Using native(wrapped) libssl.so.1
Using native(wrapped) libcrypto.so.1
Using native(wrapped) libdl.so.2
Using native(wrapped) librt.so.1
Using native(wrapped) libm.so.6
Using emulated /lib/x86_64-linux-gnu/libstdc++.so.6
Using emulated /lib/x86_64-linux-gnu/libgcc_s.so.1
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
NO LOG FILE! - [] setting up server logging...
[2021-12-19 22:11:02:274 INFO] Starting Server
[2021-12-19 22:11:02:275 INFO] Version 1.18.2.03
[2021-12-19 22:11:02:275 INFO] Session ID 81d31279-3dd1-406c-9378-a5cedacc0672
[2021-12-19 22:11:02:281 INFO] Level Name: Daddy Dave Land
[2021-12-19 22:11:02:290 INFO] Game mode: 1 Creative
[2021-12-19 22:11:02:290 INFO] Difficulty: 0 PEACEFUL
[2021-12-19 22:11:02:440 INFO] opening worlds/Daddy Dave Land/db
Warning, call to __cxa_thread_atexit_impl(0x28e5f50, 0x6ab2a4e0, 0x5185f98) ignored
[2021-12-19 22:11:07:719 INFO] IPv4 supported, port: 19132
[2021-12-19 22:11:07:719 INFO] IPv6 supported, port: 19133
[2021-12-19 22:11:07:320 INFO] Server started.
[2021-12-19 22:11:07:368 INFO] IPv4 supported, port: 33900
[2021-12-19 22:11:07:368 INFO] IPv6 supported, port: 49203
[2021-12-19 22:12:47:819 INFO] Player connected: DaddyDave7713, xuid: 2535431988354093
Warning, call to __cxa_thread_atexit_impl(0x28e5f50, 0xffff6c4b3d60, 0x5185f98) ignored
Warning, call to __cxa_thread_atexit_impl(0x32f59f0, 0xffff78000df8, 0x5185f98) ignored
Warning, call to __cxa_thread_atexit_impl(0x32f5a30, 0xffff78000e20, 0x5185f98) ignored
Warning, call to __cxa_thread_atexit_impl(0x32f59f0, 0xffff8c000df8, 0x5185f98) ignored
Warning, call to __cxa_thread_atexit_impl(0x32f5a30, 0xffff8c000e20, 0x5185f98) ignored
Warning, call to __cxa_thread_atexit_impl(0x25b5460, 0xffff8c000d10, 0x5185f98) ignored
Warning, call to __cxa_thread_atexit_impl(0x25b5fe0, 0xffff8c000d38, 0x5185f98) ignored
Warning, call to __cxa_thread_atexit_impl(0x25b7280, 0xffff8c000d60, 0x5185f98) ignored
Warning, call to __cxa_thread_atexit_impl(0x25b5460, 0xffff78000d10, 0x5185f98) ignored
Warning, call to __cxa_thread_atexit_impl(0x25b5fe0, 0xffff78000d38, 0x5185f98) ignored
Warning, call to __cxa_thread_atexit_impl(0x25b7280, 0xffff78000d60, 0x5185f98) ignored
Warning, call to __cxa_thread_atexit_impl(0x2a49ac0, 0xffff78000dc0, 0x5185f98) ignored
Warning, call to __cxa_thread_atexit_impl(0x25b5460, 0xffff84000d10, 0x5185f98) ignored
Warning, call to __cxa_thread_atexit_impl(0x25b5fe0, 0xffff84000d38, 0x5185f98) ignored
Warning, call to __cxa_thread_atexit_impl(0x25b7280, 0xffff84000d60, 0x5185f98) ignored
Warning, call to __cxa_thread_atexit_impl(0x2a49ac0, 0xffff8c000dc0, 0x5185f98) ignored
Warning, call to __cxa_thread_atexit_impl(0x32f59f0, 0xffff84000df8, 0x5185f98) ignored
Warning, call to __cxa_thread_atexit_impl(0x32f5a30, 0xffff84000e20, 0x5185f98) ignored
Warning, call to __cxa_thread_atexit_impl(0x2a49ac0, 0xffff84000dc0, 0x5185f98) ignored
Warning, call to __cxa_thread_atexit_impl(0x25b5460, 0xffff6c4b3ce0, 0x5185f98) ignored
Warning, call to __cxa_thread_atexit_impl(0x25b5fe0, 0xffff6c4b3d08, 0x5185f98) ignored
Warning, call to __cxa_thread_atexit_impl(0x25b7280, 0xffff6c4b3d30, 0x5185f98) ignored
Warning, call to __cxa_thread_atexit_impl(0x32f59f0, 0xffff6c4b3dc8, 0x5185f98) ignored
Warning, call to __cxa_thread_atexit_impl(0x32f5a30, 0xffff6c4b3df0, 0x5185f98) ignored
[2021-12-19 22:14:06:300 INFO] Player connected: MagicRainbow267, xuid: 2535437268129864
[2021-12-19 22:15:20:793 INFO] Player connected: RobotoDragon, xuid: 2535440043569734
[2021-12-19 22:15:46:321 INFO] Player disconnected: RobotoDragon, xuid: 2535440043569734
Warning, call to __cxa_thread_atexit_impl(0x32f59f0, 0xffff80000df8, 0x5185f98) ignored
Warning, call to __cxa_thread_atexit_impl(0x32f5a30, 0xffff80000e20, 0x5185f98) ignored
[2021-12-19 22:16:08:970 INFO] Player disconnected: MagicRainbow267, xuid: 2535437268129864
[2021-12-19 22:18:48:477 INFO] Running AutoCompaction...
[2021-12-19 22:25:44:735 INFO] Running AutoCompaction...
[2021-12-19 22:32:15:089 INFO] Running AutoCompaction...
[2021-12-19 22:41:15:752 INFO] Player disconnected: DaddyDave7713, xuid: 2535431988354093
[2021-12-19 22:42:16:011 INFO] Running AutoCompaction...
[2021-12-19 22:43:31:267 INFO] Player connected: DaddyDave7713, xuid: 2535431988354093
[2021-12-19 22:43:52:512 INFO] Player disconnected: DaddyDave7713, xuid: 2535431988354093
stop
[2021-12-19 22:44:10:047 INFO] Server stop requested.
[2021-12-19 22:44:10:095 INFO] Stopping server...
Quit correctly
ubuntu@minecraft-server-arm:~/minecraft$
@CouloirExtreme I'm afraid it's not box64's fault, in the previous versions of Minecraft I also used to see the same exception. But it interested me that why your bds wouldn't crash? Running bds with box64 will not crash immediately, but if you playing for a while, it does.
Please tell me if you have been playing Minecraft for a long time while box64 didn't crash.
@CouloirExtreme I'm afraid it's not box64's fault, in the previous versions of Minecraft I also used to see the same exception. But it interested me that why your bds wouldn't crash? Running bds with box64 will not crash immediately, but if you playing for a while, it does.
Please tell me if you have been playing Minecraft for a long time while box64 didn't crash.
I uesd debian run it for 2 hours didn't crash.But can't run wine,and can't see players.
Platform:aarch64 android(tmoe ubuntu in termux) Compile host:as above Guys have you been tried to lit some TNTs then Minecraft BDS popped up Segment fault ?
I found setting maximum thread that Minecraft dedicated server trying to use to 1 has effect on the segmentation fault. Combined with @cmy2008 's comment, maybe box64 has some problem on compability on thread operation for Android platform?
I found setting maximum thread that Minecraft dedicated server trying to use to 1 has effect on the segmentation fault. Combined with @cmy2008 's comment, maybe box64 has some problem on compability on thread operation for Android platform?
I reinstalled wine64 and it worked, then I installed the dependencies and ran BDS with wine64 and it worked perfectly, but with reduced performance
reduced performances compare to what?
@ptitSeb Maybe he means compare to running BDS with box64 without wine64. But in addition, it is heard that Minecraft did different optimization on BDS for Ubuntu and Windows. The latter has remarkable performance improvement than the former, even someone said "Running bds with wine64 is more faster than without" (Not on box64). Running bds with box64 on a complete Linux computer seems to be steady, but on Termux box64 seemed to have some problem with pthread. Hope this could be settled soon.
BTW, is that a tutorial about how to run wine64 on box64?
I found setting maximum thread that Minecraft dedicated server trying to use to 1 has effect on the segmentation fault. Combined with @cmy2008 's comment, maybe box64 has some problem on compability on thread operation for Android platform?
I reinstalled wine64 and it worked, then I installed the dependencies and ran BDS with wine64 and it worked perfectly, but with reduced performance
Hello, sorry if it's off topic, but I can't run Windows BDS with wine. It says "api-ms-win-core-memory-l1-1-5.dll is not found".
I guess I should update wine version, but as far as I know, there's no such library in the newest version of wine too.
How did you manage to run BDS with wine and box64?
I found setting maximum thread that Minecraft dedicated server trying to use to 1 has effect on the segmentation fault. Combined with @cmy2008 's comment, maybe box64 has some problem on compability on thread operation for Android platform?
I reinstalled wine64 and it worked, then I installed the dependencies and ran BDS with wine64 and it worked perfectly, but with reduced performance
Hello, sorry if it's off topic, but I can't run Windows BDS with wine. It says "api-ms-win-core-memory-l1-1-5.dll is not found".
I guess I should update wine version, but as far as I know, there's no such library in the newest version of wine too.
How did you manage to run BDS with wine and box64?
Put api-ms-win-core-memory-l1-1-2.dll in the program directory and rename it to api-ms-win-core-memory-l1-1-5.dll.
@cmy2008 thank you!
Well, so I launched the BDS with wine64. Performance was kinda awful, compared to BDS only with box64.
The level of performance I get with wine64 and box64 is similar to what I got just with qemu. Usually it's not even fair to compare qemu and box64, because it's obvious who will be the winner, but in this case, yeah, it's still slightly better than qemu, lol.
And in the end, it all still crashed, btw. I guess wine64 is not the way for me.
Im using Poco F3 8/256(Snapdragon 870).
Is this ticket still relevant? I'm not sure what is broken or not, and being 1yo, it seems likely to have outdated infos.
I might close the ticket soon unless someone confirm the issue is still there.
@ptitSeb Sure. One of my friends told me Minecraft server can run on box64 now. Thanks.
Glad to hear that :)