MovingBlocks / Terasology

Terasology - open source voxel world
http://terasology.org
Apache License 2.0
3.68k stars 1.34k forks source link

Terasology cannot run if /tmp is mounted with noexec #3074

Open MarkDerosier opened 7 years ago

MarkDerosier commented 7 years ago

What you were trying to do

Run terasology

What actually happened

It crashed to the bug reporter

How to reproduce

Launch terasology on linux with /tmp mounted noexec (a default in many cases. exec has to be explicitly listed in options when remounting /tmp)

tmpfs mounted as tmpfs on /tmp type tmpfs (rw,nosuid,noexec,relatime,rootcontext=system_u:object_r:tmp_t:s0,seclabel) to mount it with exec it must be mounted with

mount -t tmpfs -o exec /tmp/

explicitly enabling the insecure exec option in mount.

Log details and game version

Logs failed to detail anything about this. Game version is terasology git as of commit c2f5157 Aug 14, 2017

Computer details

Hardened Gentoo, 4.12.4 kernel, glibc-2.25-r4, openjdk version "1.8.0_144"

Other notes

/tmp shoudlnt be mounted with exec, minecraft nor technic launcher need it.

When /tmp is mounted noexec, terasology creates a file jna7957086794845591974.tmp in folder jna-115026 int /tmp/

The file is deleted from the /tmp folder once the game is ran, if /tmp is mounted with exec.

The file appears to have debugging symbols in it. It segfauls if manually ran after moved out of the /tmp directory.

engiValk commented 6 years ago

Just out of curiosity here is there a reason you were running Terasology from within TMP? Because if memory servers that directory in most linux distros runs on RAM and not on the physical disk, meaning it isn't persistent and would explain why it is deleting itself upon crash. The OS usually cleans TMP once every few cycles.