It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Anyone get Dungeon 2 working on Debian 12 bookworm? The game installs just fine, but when it runs 'dungeon 2' executable I get a segmentation fault error at line 16 of the start.sh script.

Any games able to run on Debian 12?
avatar
bassplayer69: Anyone get Dungeon 2 working on Debian 12 bookworm? The game installs just fine, but when it runs 'dungeon 2' executable I get a segmentation fault error at line 16 of the start.sh script.
Is that the one? Dungeons 2
I see I own it on GOG, so I can give it a try.
avatar
bassplayer69: Any games able to run on Debian 12?
Sure, I tested ~1 000 games on Debian, including several hundreds during the Debian 12 testing phase.
I do get a crash on launch too, with the following trace:
#0 __futex_abstimed_wait_common64 (private=<optimized out>, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7ffff6eac070) at ./nptl/futex-internal.c:57
#1 __futex_abstimed_wait_common (futex_word=futex_word@entry=0x7ffff6eac070, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=<optimized out>, cancel=cancel@entry=true) at ./nptl/futex-internal.c:87
#2 0x00007ffff78a4d9b in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7ffff6eac070, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=<optimized out>) at ./nptl/futex-internal.c:139
#3 0x00007ffff78afadf in do_futex_wait (sem=sem@entry=0x7ffff6eac070, abstime=0x0, clockid=0) at ./nptl/sem_waitcommon.c:111
#4 0x00007ffff78afb70 in __new_sem_wait_slow64 (sem=0x7ffff6eac070, abstime=0x0, clockid=0) at ./nptl/sem_waitcommon.c:183
#5 0x00007ffff6b8bafb in mono_sem_wait () from (…)/Dungeons2_Data/Mono/x86_64/libmono.so
#6 0x00007ffff6af65e1 in ?? () from (…)/Dungeons2_Data/Mono/x86_64/libmono.so
#7 0x00007ffff6b5deaa in ?? () from (…)/Dungeons2_Data/Mono/x86_64/libmono.so
#8 0x00007ffff6b83a13 in ?? () from (…)/Dungeons2_Data/Mono/x86_64/libmono.so
#9 0x00007ffff6ba4562 in ?? () from (…)/Dungeons2_Data/Mono/x86_64/libmono.so
#10 0x00007ffff78a7fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#11 0x00007ffff79285bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
Yesterday I got something similar with the 64-bit build of Tyranny, the workaround was to use the 32-bit build instead. But since there is no 32-bit build for Dungeons 2, it would need to be investigated further.

Is suspect many other Unity3D games might be affected.
I'm seeing this when running a Unity3D game (Anima: Gate of Memories) under strace, and this is a crash that only started a couple of weeks ago.

mmap(NULL, 4096, PROT_READ, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f54c437f000
mmap(NULL, 4096, PROT_READ, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f54c437e000
mprotect(0x7f54c437e000, 4096, PROT_NONE) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS|MAP_32BIT, -1, 0) = -1 ENOMEM (Cannot allocate memory)
openat(AT_FDCWD, "/dev/zero", O_RDONLY) = 4
mmap(NULL, 65536, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS|MAP_32BIT, 4, 0) = -1 ENOMEM (Cannot allocate memory)
close(4) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x5} ---
There's a regression reported on the LKML "mmap with MAP_32BIT randomly fails since 6.1", which had fixes in Debian's linux-image-6.1.0-9-amd64 (based on Linux 6.1.27). I'm running linux-image-6.1.0-9-amd64, and wondering if the fix added new regressions. Planning to test next time it's a good time to reboot.

Edit: I downgraded, and can't reproduce when using 6.1.0-8-amd64 (based on 6.1.25).

Debian already has a fix that'll be in the first point release of Bookworm, but so far they only knew of "a handful of edge-cases", which only affected developers, not the general use case of games. https://bugs.debian.org/1036755
Post edited June 13, 2023 by octalot
I don't have Dungeon 2, but there is the same problem with Tyranny and I managed to do a workaround, by LD-preloading a shim that removes the MAP_32BIT flag. That flag is really useless in most cases, except for very early 64-bits hardware, or if you need to interact with legacy 32-bits hardware.

You can download the source code from https://kilobug.net/tyranny_no32.c, then compile it with « gcc -Wall -shared tyranny_no32.c -o tyranny_no32.so » and then run the game with « LD_PRELOAD=/path/to/tyranny_no32.so ./start.sh » instead of just « ./start.sh »

Feel free to rename it without the Tyranny name in it ;)
We have been working to include the workaround written by kilobug into ./play.it support for Unity3D 64-bit games.

I will report here again once I am done running some tests and including this workaround in a new ./play.it release. Dungeons 2 will be included in the games I am going to test it with.
Post edited June 18, 2023 by vv221
The workaround proposed by kilobug is now included in ./play.it current release candidate: 2.23.3 bugfix release.

To avoid issues with games actually requiring the MAP_32BIT flag, the shim is only included and preloaded for games:
- providing a 64-bit build
- built on top of Unity3D 4.x or 5.x
./play.it 2.23.3 just got released, including kilobug's workaround to avoid Unity3D crashes when using Linux 6.1.

Playing Dungeons 2 on top of a Debian 12 (Bookworm) was part of the tests, it worked fine here.
Post edited June 19, 2023 by vv221