Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 655832 - app-emulation/wine-vanilla: wineboot fails on mmap with "Cannot allocate memory"
Summary: app-emulation/wine-vanilla: wineboot fails on mmap with "Cannot allocate memory"
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Wine Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-15 20:38 UTC by Alex
Modified: 2019-06-22 21:48 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info wine (wine-emerge-info.txt,9.29 KB, text/plain)
2018-05-15 20:38 UTC, Alex
Details
strace -f wineboot (strace-wineboot.txt,37.90 KB, text/plain)
2018-05-15 20:38 UTC, Alex
Details
kconfig-4.16.8-gentoo.txt (kconfig-4.16.8-gentoo.txt,50.05 KB, text/plain)
2018-05-15 20:39 UTC, Alex
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex 2018-05-15 20:38:05 UTC
Created attachment 531670 [details]
emerge --info wine

Hi. I had this problem for a while and not sure if it's my misconfiguration or something else.

Basically when trying to start any wine program running wine preloader (even wineboot on empty prefix) it fails with error:

~% wineboot             
/usr/lib64/wine-vanilla-3.8/bin/wine: error while loading shared libraries: cannot create cache for search path: Cannot allocate memory

strace shows that last call before this error was mmap2:
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 EPERM (Operation not permitted)

I found closed upstream bug with this problem reported by arch user: https://bugs.winehq.org/show_bug.cgi?id=43963
Arch bugtracker ( https://bugs.archlinux.org/task/55954#comment164591 ) had a solution that worked for me: setting sysctl vm.mmap_min_addr to zero.

This fix was suggested for running dos applications, but my wine is built without dos flag and fails the same. Some users on other had same error message because of missing multilib binaries, but it's not the case here.

I'm making this bug so anyone having same problem will have less time searching for quick solution.
The real quiestions are: why this happens? why this started happening? (and when?). I would put this solution in gentoo wiki if I was sure that it's not my misconfiguration, after all searching shows that only some users are affected.

Attaching emerge --info wine and my kernel config.
Thank you in advance.
Comment 1 Alex 2018-05-15 20:38:40 UTC
Created attachment 531672 [details]
strace -f wineboot
Comment 2 Alex 2018-05-15 20:39:54 UTC
Created attachment 531674 [details]
kconfig-4.16.8-gentoo.txt
Comment 3 Bob Wya 2018-05-16 09:51:01 UTC
Possibly an selinux issue...?? I'd check the selinux audit log.

Perhaps try the top answer from... https://unix.stackexchange.com/questions/61032/how-to-get-wine-to-work-with-selinux
Comment 4 Alex 2018-05-16 16:24:54 UTC
Thanks for reply.

Yes, I have selinux, but this happens in permissive mode too and toggling those booleans gives nothing. No complaints in audit log too.

I also read yesterday that it might be cause by CONFIG_STRICT_DEVMEM option, going to check that later.
Comment 5 Alex 2018-05-18 00:05:59 UTC
No, turning off STRICT_DEVMEM (and STRICT_IO_DEVMEM alone too) gives same result.
Comment 6 Nick Sarnie gentoo-dev 2019-06-22 21:48:38 UTC
Wine-vanilla 3.x is no longer supported. Please let me know if you can
reproduce this on 4.x