http://bugs.winehq.org/show_bug.cgi?id=12315
Summary: Shiny's Sacrifice (Demo): Too much swap / ulimit problem Product: Wine Version: 0.9.58. Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: loader AssignedTo: wine-bugs@winehq.org ReportedBy: liquid.acid@gmx.net
Hi there,
I wanted to make some D3D/DDraw tests with the demo version of Shiny's Sacrifice on a system where I don't have root access.
The problem is that the system has 512MB physical memory installed and 8GB of swap configured. This is too much for Sacrifice and seems to trigger an (32bit ?) integer overflow.
The error message from Sacrifice is: "Insufficient pagefile space. Please ensure that virtual memory is enabled and that you have more than 128MB of disk space free on your pagefile drive before running Sacrifice."
I did a search on Google for that problem and it also appears on Windows if the system has a large amount of memory (or swap) installed, that triggers the overflow.
So I was going to use ulimit -v to restrict memory usage by wine, but that does not seem to work:
user@yui09:~/.wine/drive_c/Program Files/Shiny/Sacrifice Demo$ wine "Sacrifice.exe" preloader: Warning: failed to reserve range 00000000-60000000 wine: failed to initialize: /homes/user/local//lib/wine/ntdll.dll.so: failed to map segment from shared object: Cannot allocate memory
I have tried values for ulimit -v of 64MB, 128MB, 256MB and up to 2GB. Always the same problem with the preloader and the failed initialization.
Wine doesn't seem to respect the limits set by ulimit. I would really like to make some tests on this system. Maybe someone can take a look at this ulimit problem?
Greetings from Germany, Tobias Jakobi
http://bugs.winehq.org/show_bug.cgi?id=12315
Tobias Jakobi liquid.acid@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jb.faq@gmx.de
http://bugs.winehq.org/show_bug.cgi?id=12315
Jan Buecken jb.faq@gmx.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #1 from Jan Buecken jb.faq@gmx.de 2008-03-31 17:21:02 --- *** This bug has been confirmed by popular vote. ***
http://bugs.winehq.org/show_bug.cgi?id=12315
Jeff Zaroyko jeffzaroyko@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeffzaroyko@gmail.com
--- Comment #2 from Jeff Zaroyko jeffzaroyko@gmail.com 2008-03-31 18:21:00 --- Tested demo available from here. http://cdn.gamezone.com/pub/gamezone/14/0/69/sacrificedemo.exe
This is definitely a dupe of bug 10844, I confirmed this by changing the value at 0x158 from 04 to 03 which causes wine to limit the avail pagefile value, after which the demo runs.
http://bugs.winehq.org/show_bug.cgi?id=12315
--- Comment #3 from Tobias Jakobi liquid.acid@gmx.net 2008-03-31 18:32:40 --- Which value? The value of the sacrifice executable at offset ...?
However wine should work with ulimit, right?
http://bugs.winehq.org/show_bug.cgi?id=12315
--- Comment #4 from Jeff Zaroyko jeffzaroyko@gmail.com 2008-03-31 18:52:08 --- (In reply to comment #3)
Which value? The value of the sacrifice executable at offset ...?
However wine should work with ulimit, right?
yes.
re ulimit, no, wine reads /proc/meminfo for GlobalMemoryStatus*. Please mark this as a duplicate of bug 10844.
http://bugs.winehq.org/show_bug.cgi?id=12315
Tobias Jakobi liquid.acid@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE
--- Comment #5 from Tobias Jakobi liquid.acid@gmx.net 2008-03-31 19:02:51 --- Thanks to Jeff, marking this as a duplicate.
I still think that ulimits should be respected though.
*** This bug has been marked as a duplicate of bug 10844 ***
http://bugs.winehq.org/show_bug.cgi?id=12315
--- Comment #6 from Jeff Zaroyko jeffzaroyko@gmail.com 2008-03-31 19:09:03 --- (In reply to comment #5)
Thanks to Jeff, marking this as a duplicate.
I still think that ulimits should be respected though.
*** This bug has been marked as a duplicate of bug 10844 ***
I think you might misunderstand what ulimit is. If you set certain limits, described in the setrlimit linux man page, such as the maximum size of the process's virtual memory, as would happen when using bash's builtin ulimit command, requests for allocation of memory beyond the limit will fail.
It doesn't change the reporting of available memory, it would in most cases lead to the offending process being terminated once it had requested enough memory beyond the set limit.
http://bugs.winehq.org/show_bug.cgi?id=12315
Tobias Jakobi liquid.acid@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #7 from Tobias Jakobi liquid.acid@gmx.net 2008-06-19 16:01:25 --- Forgot to close this one.
Thanks to Jeff for the ulimit explanation! :-)