Panics while running Factorio (linux emulation)
Konstantin Belousov
kostikbel at gmail.com
Thu Feb 6 20:42:51 UTC 2020
On Thu, Feb 06, 2020 at 03:46:56PM +0000, Steve Roome wrote:
> I keep getting panics (short backtraces later on) while running Factorio
> for Linux.
>
> It is using a slightly newer linux glibc than the one in the linux-c7
> ports, but still, I'm running as a user, and it's causing panics. This is a
> 64bit linux program that other than these packages on top of a stock
> freebsd/x desktop:
>
> linux-c7-alsa-lib-1.1.8 =
> linux-c7-atk-2.28.1 =
> linux-c7-cairo-1.15.12_1 =
> linux-c7-dbus-libs-1.10.24_1 =
> linux-c7-devtools-7.7.1908_4 =
> linux-c7-dri-18.3.4 =
> linux-c7-elfutils-libelf-0.176 =
> linux-c7-elfutils-libs-0.176 =
> linux-c7-expat-2.1.0_2 =
> linux-c7-flac-libs-1.3.0_2 =
> linux-c7-fontconfig-2.13.0 =
> linux-c7-freetype-2.8_1 =
> linux-c7-fribidi-1.0.2_1 =
> linux-c7-gdk-pixbuf2-2.36.12 =
> linux-c7-glx-utils-8.3.0_1 =
> linux-c7-graphite2-1.3.10 =
> linux-c7-gtk2-2.24.31 =
> linux-c7-harfbuzz-1.7.5 =
> linux-c7-jasper-libs-1.900.1_5 =
> linux-c7-jbigkit-libs-2.0_2 =
> linux-c7-jpeg-1.2.90_4 =
> linux-c7-libasyncns-0.8_1 =
> linux-c7-libdrm-2.4.91 <
> linux-c7-libgcrypt-1.5.3_4 =
> linux-c7-libgfortran-4.8.5_5 =
> linux-c7-libglvnd-1.0.1 =
> linux-c7-libgpg-error-1.12_2 =
> linux-c7-libogg-1.3.0_1 =
> linux-c7-libpciaccess-0.14 =
> linux-c7-libpng-1.5.13_2 =
> linux-c7-libsndfile-1.0.25_3 =
> linux-c7-libthai-0.1.14_1 =
> linux-c7-libtiff-4.0.3_4 =
> linux-c7-libvorbis-1.3.3_2 =
> linux-c7-lz4-1.7.5_1 =
> linux-c7-pango-1.42.4_1 =
> linux-c7-pixman-0.34.0 =
> linux-c7-pulseaudio-libs-10.0_2 =
> linux-c7-systemd-libs-219_3 =
> linux-c7-tcp_wrappers-libs-7.6_2 =
> linux-c7-wayland-1.15.0 =
> linux-c7-xorg-libs-7.7_8 =
> linux-eagle5-5.12.0_6 =
> linux-nvidia-libs-440.31 =
> linux_base-c7-7.7.1908_1 =
>
> It also needed this in it's own space:
>
> gsm-1.0.13-11.el7.x86_64.rpm
>
> and a bit of patchelf magic and pointing at this glibc2.18
>
> libc6_2.18-0ubuntu4_amd64.deb
>
>
>
> This happens rather a lot and it'd be nice to stop it, imho, even a badly
> behaved user such as myself using a linux app shouldn't be able to cause a
> panic
>
> Ta .. Steve (backtraces below)
>
> ....
>
> Feb 6 01:45:55 tv kernel: cpuid = 3
> Feb 6 01:45:55 tv kernel: time = 1580953529
> Feb 6 01:45:55 tv kernel: KDB: stack backtrace:
> Feb 6 01:45:55 tv kernel: #0 0xffffffff80c1d2b7 at kdb_backtrace+0x67
> Feb 6 01:45:55 tv kernel: #1 0xffffffff80bd05ed at vpanic+0x19d
> Feb 6 01:45:55 tv kernel: #2 0xffffffff80bd0443 at panic+0x43
> Feb 6 01:45:55 tv kernel: #3 0xffffffff810a7dcc at trap_fatal+0x39c
> Feb 6 01:45:55 tv kernel: #4 0xffffffff810a7e19 at trap_pfault+0x49
> Feb 6 01:45:55 tv kernel: #5 0xffffffff810a740f at trap+0x29f
> Feb 6 01:45:55 tv kernel: #6 0xffffffff81081a2c at calltrap+0x8
> Feb 6 01:45:55 tv kernel: #7 0xffffffff80bb0389 at __mtx_unlock_sleep+0xb9
> Feb 6 01:45:55 tv kernel: #8 0xffffffff8301fd45 at futex_put+0x135
> Feb 6 01:45:55 tv kernel: #9 0xffffffff8301e869 at linux_sys_futex+0xbb9
> Feb 6 01:45:55 tv kernel: #10 0xffffffff810a8984 at amd64_syscall+0x364
> Feb 6 01:45:55 tv kernel: ---<<BOOT>>---
> Feb 6 01:45:55 tv kernel: Copyright (c) 1992-2019 The FreeBSD Project.
> Feb 6 01:45:55 tv kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988,
> 1989, 1991, 1992, 1993, 1994
> Feb 6 01:45:55 tv kernel: The Regents of the University of
> California. All rights reserved.
> --
> Feb 6 13:54:13 tv kernel: panic: page fault
> Feb 6 13:54:13 tv kernel: cpuid = 0
> Feb 6 13:54:13 tv kernel: time = 1580997227
> Feb 6 13:54:13 tv kernel: KDB: stack backtrace:
> Feb 6 13:54:13 tv kernel: #0 0xffffffff80c1d2b7 at kdb_backtrace+0x67
> Feb 6 13:54:13 tv kernel: #1 0xffffffff80bd05ed at vpanic+0x19d
> Feb 6 13:54:13 tv kernel: #2 0xffffffff80bd0443 at panic+0x43
> Feb 6 13:54:13 tv kernel: #3 0xffffffff810a7dcc at trap_fatal+0x39c
> Feb 6 13:54:13 tv kernel: #4 0xffffffff810a7e19 at trap_pfault+0x49
> Feb 6 13:54:13 tv kernel: #5 0xffffffff810a740f at trap+0x29f
> Feb 6 13:54:13 tv kernel: #6 0xffffffff81081a2c at calltrap+0x8
> Feb 6 13:54:13 tv kernel: #7 0xffffffff80bb0389 at __mtx_unlock_sleep+0xb9
> Feb 6 13:54:13 tv kernel: #8 0xffffffff8301fd45 at futex_put+0x135
> Feb 6 13:54:13 tv kernel: #9 0xffffffff8301e869 at linux_sys_futex+0xbb9
> Feb 6 13:54:13 tv kernel: #10 0xffffffff810a8984 at amd64_syscall+0x364
> Feb 6 13:54:13 tv kernel: ---<<BOOT>>---
> Feb 6 13:54:13 tv kernel: Copyright (c) 1992-2019 The FreeBSD Project.
> Feb 6 13:54:13 tv kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988,
> 1989, 1991, 1992, 1993, 1994
> Feb 6 13:54:13 tv kernel: The Regents of the University of
> California. All rights reserved.
> --
> Feb 6 15:12:10 tv kernel: panic: page fault
> Feb 6 15:12:10 tv kernel: cpuid = 3
> Feb 6 15:12:10 tv kernel: time = 1581001904
> Feb 6 15:12:10 tv kernel: KDB: stack backtrace:
> Feb 6 15:12:10 tv kernel: #0 0xffffffff80c1d2b7 at kdb_backtrace+0x67
> Feb 6 15:12:10 tv kernel: #1 0xffffffff80bd05ed at vpanic+0x19d
> Feb 6 15:12:10 tv kernel: #2 0xffffffff80bd0443 at panic+0x43
> Feb 6 15:12:10 tv kernel: #3 0xffffffff810a7dcc at trap_fatal+0x39c
> Feb 6 15:12:10 tv kernel: #4 0xffffffff810a7e19 at trap_pfault+0x49
> Feb 6 15:12:10 tv kernel: #5 0xffffffff810a740f at trap+0x29f
> Feb 6 15:12:10 tv kernel: #6 0xffffffff81081a2c at calltrap+0x8
> Feb 6 15:12:10 tv kernel: #7 0xffffffff80bb0389 at __mtx_unlock_sleep+0xb9
> Feb 6 15:12:10 tv kernel: #8 0xffffffff8301fd45 at futex_put+0x135
> Feb 6 15:12:10 tv kernel: #9 0xffffffff8301e869 at linux_sys_futex+0xbb9
> Feb 6 15:12:10 tv kernel: #10 0xffffffff810a8984 at amd64_syscall+0x364
> Feb 6 15:12:10 tv kernel: ---<<BOOT>>---
> Feb 6 15:12:10 tv kernel: Copyright (c) 1992-2019 The FreeBSD Project.
> Feb 6 15:12:10 tv kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988,
> 1989, 1991, 1992, 1993, 1994
> Feb 6 15:12:10 tv kernel: The Regents of the University of
> California. All rights reserved.
>
Would be useful to show the source line for futex_put+0x135.
What is the system version ?
Try this.
diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c
index 4f42081156b..35deca0bfdc 100644
--- a/sys/compat/linux/linux_futex.c
+++ b/sys/compat/linux/linux_futex.c
@@ -329,9 +329,9 @@ futex_put(struct futex *f, struct waiting_proc *wp)
f->f_key.shared);
LINUX_CTR3(sys_futex, "futex_put uaddr %p ref %d shared %d",
f->f_uaddr, f->f_refcount, f->f_key.shared);
- FUTEXES_UNLOCK;
if (FUTEX_LOCKED(f))
futex_unlock(f);
+ FUTEXES_UNLOCK;
LIN_SDT_PROBE0(futex, futex_put, return);
}
More information about the freebsd-emulation
mailing list