Bottles
Bottles copied to clipboard
[Bug]: Error vmtouch mlock
Describe the bug
Failed start wine apps after turn on vmtouch with "Cache work directory" in Preferences, vmtouch without "Cache work directory" works fine.
To Reproduce
- Go to Preferences
- Turn on vmtouch
- Go to vmtouch Settings
- Turn on "Cache work directory"
- Run app or any Legacy Tool
Package
Flatpak from Flathub
Distribution
Fedora Silverblue 36
Troubleshooting Logs
vmtouch: FATAL: mlock: /var/home/reticulis/.var/app/com.usebottles.bottles/data/bottles/bottles/battlefield-4/drive_c/windows/system32/spool/drivers/w32x86/3/wineps.drv (Cannot allocate memory)
Display Protocol
Wayland
Display Backend used by Bottles
Wayland
Additional context
No response
Does the application fail to launch when this error occurs?
Also can you run a program so that this error appears and then run
flatpak run --command=bash com.usebottles.bottles
vmtouch /path/to/problematic/file
and show the output
Does the application fail to launch when this error occurs?
Yes, any app won't start.
Also can you run a program so that this error appears and then run
flatpak run --command=bash com.usebottles.bottles vmtouch /path/to/problematic/file
and show the output
>> vmtouch /var/home/reticulis/.var/app/com.usebottles.bottles/data/bottles/bottles/battlefield-4/drive_c/windows/system32/spool/drivers/w32x86/3/wineps.drv
Files: 1
Directories: 0
Resident Pages: 520/520 2M/2M 100%
Elapsed: 8.8e-05 seconds
According to https://github.com/hoytech/vmtouch/issues/18 this isn't a bottles issue, but an issue in vmtouch, since Linux automatically limits the amount of memory an application can lock. For now it's probably better to not enable the work directory caching until I find a way to increase this limit.
After doing some research, I found out that vmtouch would automatically increase the limit when ran as root.
The user can also manually increase the limit by modifying the /etc/security/limits.conf
file and adding this:
<username> - memlock 10000000
this would increase the limit to 10gb.
So bottles would either have to execute vmtouch as root or somehow modify /etc/security/limits.conf to increase the limit or just completely remove the option to cache the working directory.
sounds like something we should not
Yeah, we could either completely remove that or make the user do that themselves