[Bug 44375] Some 32-bit games crash when they exhaust their VM addressing space ( Path of Exile, Dragon Age: Origins, NecroVisioN)

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Jan 6 06:39:34 CST 2019


https://bugs.winehq.org/show_bug.cgi?id=44375

Kai Krakow <kai at kaishome.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kai at kaishome.de

--- Comment #8 from Kai Krakow <kai at kaishome.de> ---
I think this a combination of different problems and depends a lot of external
libraries used. I do not have the references but from memory let's summarize:

1. The nvidia driver and its interaction with glibc makes this problem worse
because it needs to map driver address space into the process. With some driver
update this problem has been addressed but it didn't fix it, it only reduced
the impact. Other drivers may show similar behavior. You can probably only
reduce graphics details to work around this but you cannot completely eliminate
the problem. That's not a wine bug.

2. The pulseaudio driver may allocate multiple shared memory segments and map
them into the address space of the application. This is especially apparent if
the application opens multiple audio channels. By default, each shared memory
segment is 64 MB in most pulseaudio/distribution defaults. This will exhaust
32-bit address space very fast. You can reduce the impact of this by lowering
the pulseaudio shm size in `/etc/pulse/daemon.conf` to 1M or 2M:
`shm-size-bytes = 2097152`. This should have no negative impact on audio
playback. OTOH, you could try disabling pulseaudio usage altogether but this
has other negative consequences because applications can no longer share the
audio device properly (depending on your sound card driver). So, that's also
not a wine bug.

3. If using DXVK, you may end up with early address space exhaustion because
DXVK allocates memory using a chunk allocator (chunks of at least 16 MB).
Application that only do small allocations but require a lot of different chunk
types may end up with a lot of wasted space. There's not much to do about this
because it is a requirement of Vulkan and for performance to do it this way.
Maybe DXVK could reduce the minimum chunk size in 32-bit address space but I
don't think this will help a lot, it may only fragment allocations more and
introduce even more wasted space. I could imagine that the nvidia driver has
some similar issues regarding memory management (see point 1). DXVK is not part
of wine, so that's not a wine bug.

In conclusion, this is probably not a wine bug. And when I followed the
discussions about this, the devs pointed out that there's not much that can be
done about it with wine being a low-level API layer between Windows and Linux.
Windows puts some constraints on how address space layout has to be which is
mostly incompatible with how Linux handles layout. So memory allocations on
both sides work against each other, resulting in non-optimal address space
usage.

That being said, most of those applications failing in wine with allocation
errors can be forced into failing in Windows, too. It just fails in Wine much
more early. Skyrim and The Witcher 2 come to mind here. In the end, that's
application bugs because those apps don't expect memory allocations to fail and
as a result they crash.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list