[Bug 2127] WriteFile fails on threaded applications

Wine Bugs wine-bugs at winehq.org
Tue Oct 4 16:36:39 CDT 2005


http://bugs.winehq.org/show_bug.cgi?id=2127





------- Additional Comments From david.guembel at gmx.de  2005-04-10 16:36 -------
Ok, first of all I realized I made a mistake: My GENRIC_READ | GENERIC_WRITE
workaround (see comment 8) only works if I open the file with these flags both
times, i.e. in step 1 and 4. If I do GENERIC_READ | GENERIC_WRITE in 1. but
GENERIC_WRITE in 4., I get INVALID_HANDLE errors after some time when reading
the file. I missed that because a of a bug in my program - sorry, shame on me.

Now, using always GENERIC_READ | GENERIC_WRITE, I no longer get the
INVALID_HANDLE problem (not on uniprocessor, not on SMP, all with 20050930).
However, I noticed that the wine eats memory fast when doing this. After running
about 450000 1-2-3-4-5-6 cycles, top shows something like 

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
17869 guembel    1   0 1725m 113m 5264 S 22.9 11.2   2:43.44 wine-preloader
..compared to..
29829 guembel    1   0 1594m 7748 5220 S  0.0  0.7   0:00.39 wine-preloader
..after starting the app, but before doing the reading and writing (i.e.
creating the threads that do 1-6 and waiting a few minutes).

Using latest CVS, on SMP, I get read and write errors with INVALID_HANDLE almost
immediately. On a uniprocessor machine, I get reading and writing errors with
INVALID_HANDLE after some time (2-3 min). Before that, memory is running full, too.

If there's anything else I can do to help narrow this down, please just say so.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the wine-bugs mailing list