[Bug 37038] New: wineserver leaks memory when running my network communication program
http://bugs.winehq.org/show_bug.cgi?id=37038 Bug ID: 37038 Summary: wineserver leaks memory when running my network communication program Product: WineHQ Bugzilla Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: bugzilla-unknown Assignee: wine-bugs(a)winehq.org Reporter: zt20055453(a)163.com In 1.7.22 wine, wineserver leaks memory when running my network communication program. memory leaks 128kB at few seconds intervals. My program uses asynchronous function to receive video data. I ran wineserver -f under valgrind --leak-check=yes to get memory leaks info, but valgrind didn't catch anything useful. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=37038 Nikolay Sivov <bunglehead(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|bugzilla-unknown |-unknown Product|WineHQ Bugzilla |Wine --- Comment #1 from Nikolay Sivov <bunglehead(a)gmail.com> --- Why do you think it's a wineserver that's leaking? -- 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.
http://bugs.winehq.org/show_bug.cgi?id=37038 --- Comment #2 from zengt <zt20055453(a)163.com> --- After 12 hours to run the program, the wineserver's memory is around 500MB. Wineserver will not release its memory unless killing wineserver, or closing my program and waiting for wineserver to quit on its own. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=37038 Bruno Jesus <00cpxxx(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |1.7.22 --- Comment #3 from Bruno Jesus <00cpxxx(a)gmail.com> --- Well, a way to find the problem is to be able to reproduce it. Can you attach the program and instructions or a subset of the program or sample C source code that can reproduce the issue? What is your application doing? winsock? wininet? Is it serving data or downloading data? -- 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.
http://bugs.winehq.org/show_bug.cgi?id=37038 --- Comment #4 from zengt <zt20055453(a)163.com> --- Using the SDK of the camera device, my program downloads video data from camera(4Mb/s). It uses asynchronous function such as WSARecv() in the SDK. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=37038 --- Comment #5 from Bruno Jesus <00cpxxx(a)gmail.com> --- Please attach a +winsock log. Run the program like: WINEDEBUG=+winsock wine your_program.exe >> /tmp/output.txt 2>&1 Then compress and attach /tmp/output.txt. Naturally "your_program.exe" should be your program name =) Let it run for 2 or 3 minutes. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=37038 --- Comment #6 from zengt <zt20055453(a)163.com> --- Created attachment 49241 --> http://bugs.winehq.org/attachment.cgi?id=49241 WINEDEBUG=+winsock output -- 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.
http://bugs.winehq.org/show_bug.cgi?id=37038 --- Comment #7 from Bruno Jesus <00cpxxx(a)gmail.com> --- (In reply to zengt from comment #6)
Created attachment 49241 [details] WINEDEBUG=+winsock output
I see 3 TCP sockets, all connecting to the same address. It looks like only one of them is used most of the time, the other 2 very rarely do something. You are using overlapped structures but without callbacks so I think I should see calls to WSAGetOverlappedResult but there are none, there is probably other way to receive overlapped data that I'm not aware of. This bug may be true as long as bug 36662 still exists. That bug shows some leaks we could not find yet. You should fix your wine: err:wincodecs:PngEncoder_CreateInstance Trying to save PNG picture, but PNG support is not compiled in. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=37038 --- Comment #8 from zengt <zt20055453(a)163.com> --- I view the source code,the function ws2_async_apc() should release the memory which is allocated in WS2_recv_base(). I add some debug info and run my program. The debug info don't output. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37038 Sebastian Lackner <sebastian(a)fds-team.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian(a)fds-team.de --- Comment #9 from Sebastian Lackner <sebastian(a)fds-team.de> --- Does your program also leak memory in Windows when it runs for some time? And can you please check if adding WaitForSingleObjectEx(GetCurrentProcess(), 0, TRUE); at some places in your programs works around the issue? -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37038 --- Comment #10 from zengt <zt20055453(a)163.com> --- (In reply to Sebastian Lackner from comment #9)
Does your program also leak memory in Windows when it runs for some time?
My program doesn't leak memory in Windows when it runs for some time. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37038 --- Comment #11 from zengt <zt20055453(a)163.com> --- (In reply to Sebastian Lackner from comment #9)
And can you please check if adding
WaitForSingleObjectEx(GetCurrentProcess(), 0, TRUE);
at some places in your programs works around the issue?
Sorry, my program uses the SDK of the camera device, I can't add WaitForSingleObjectEx() in the SDK. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37038 --- Comment #12 from Sebastian Lackner <sebastian(a)fds-team.de> --- It doesn't really matter where you add it, it should be sufficient to run it from time to time (as part of a callback for example, ...). If modifying the program is not possible, then please attach a +server log, this should also allow to see this issue. WINEDEBUG=+server wine your_program.exe >> output.log 2>&1 To explain why I'm suggesting that: For bug 36662 it turned out, that the problem was, that the program never entered alertable state after adding an APC call to the queue. Only specific API commands enter alertable state, you can find more information about that on the MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/ms681951(v=vs.85).as... -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37038 --- Comment #13 from zengt <zt20055453(a)163.com> --- (In reply to Sebastian Lackner from comment #12)
It doesn't really matter where you add it, it should be sufficient to run it from time to time (as part of a callback for example, ...).
Thank you very much. In addition, my program uses WSASend() function to send data as long as bug 36662. Do you have any idea to solve this problem? -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37038 --- Comment #14 from Sebastian Lackner <sebastian(a)fds-team.de> --- Could you please check again with current wine git (or 1.7.38 as soon as it is released)? I guess that this should be fixed by http://source.winehq.org/git/wine.git/commit/4273b0d938b9ed64c0edefdeb96cda3... (similar to bug 38143) -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37038 Bruno Jesus <00cpxxx(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEEDINFO --- Comment #15 from Bruno Jesus <00cpxxx(a)gmail.com> --- Is this still an issue in wine 1.9.17 or later? -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37038 Rosanne DiMesio <dimesio(a)earthlink.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |ABANDONED Status|NEEDINFO |RESOLVED --- Comment #16 from Rosanne DiMesio <dimesio(a)earthlink.net> --- No response to request for retest in current Wine in over a year, OR hasn't been heard from in over 3 years. Marking abandoned. Reopen if this is still an issue and you are willing and able to provide requested information. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=37038 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #17 from Austin English <austinenglish(a)gmail.com> --- Closing. -- 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.
participants (1)
-
wine-bugs@winehq.org