http://bugs.winehq.org/show_bug.cgi?id=26231
Summary: File IO memory consumption Product: Wine Version: unspecified Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: ntdll AssignedTo: wine-bugs@winehq.org ReportedBy: manjak4s@ukr.net
Tested on: Ubuntu ( Linux version 2.6.31-20-generic. VMWare vm ) CentOS ( Linux version 2.6.18-164.15.1.el5. VMWare vm ) Gentoo ( Linux version 2.6.34-gentoo-r6. VMWare vm, physical machine ) File Systems: ext2, ext3. Reprodused: always.
Function: WriteFile(any params). Haven't tested ReadFile yet.
WriteFile causes FS buffer grows equal to amount of data written (after writing threshold amount of data, kernel kills process with "out of memory" message). Memory freed only after buffer become invalid (for example, echo > <filename>. FS keeps memory even after wine process and wine server finished execution).
Simple program:
BYTE pBuffer[1024]; DWORD dwWritten = 0;
memset(pBuffer, 0xCE, sizeof(pBuffer));
HANDLE hFile = CreateFile(_T("C:\test.img"), GENERIC_ALL, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
for (int i = 0; i < 256 * 1024; ++i) { WriteFile(hFile, pBuffer, sizeof(pBuffer), &dwWritten, NULL); }
CloseHandle(hFile);
Output: 256Mb memory leak.
Temporary I have added O_DIRECT option support to wine server and switched to ext2 FS(works fine for me).
http://bugs.winehq.org/show_bug.cgi?id=26231
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, testcase
http://bugs.winehq.org/show_bug.cgi?id=26231
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|download, testcase | Status|UNCONFIRMED |RESOLVED Component|ntdll |-unknown Resolution| |INVALID Severity|major |normal
--- Comment #1 from Dmitry Timoshkov dmitry@codeweavers.com 2011-02-25 02:46:26 CST --- Please always specify Wine version you are using (in the Version field above).
This looks like a kernel bug.
http://bugs.winehq.org/show_bug.cgi?id=26231
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #2 from Dmitry Timoshkov dmitry@codeweavers.com 2011-02-25 02:46:43 CST --- Closing.
http://bugs.winehq.org/show_bug.cgi?id=26231
--- Comment #3 from manjak4s@ukr.net 2011-02-25 03:20:33 CST --- Tested on: wine 1.0.1; wine 1.3.3; wine builded from HEAD rev.
Tested with C/C++ native apps (using C f-functions, posix functions, C++ streams). Can't reproduce such bug.