https://bugs.winehq.org/show_bug.cgi?id=54953
Bug ID: 54953 Summary: Dotnet472: Memory growth and slowdown in working with synchronization objects when starting and stopping multiple threads Product: Wine Version: 7.15 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: ykurin@gmail.com Distribution: ---
An issue has been discovered when long-running a multi-threaded application written in .NET Framework 4.7.2 and 4.8.
With a large number of frequent re-creations of threads, the following was noticed: 1) Memory begins to leak constantly, and the more frequent re-creation of threads, the sooner memory begins to leak. 2) When working with synchronization primitives over time, with the constant re-creation of threads, the time of capturing and releasing the synchronization object increases (for example, when using Mutex). 3) When working for a long time.NET of the application that recreates the streams, the application is closed. The greater the number of recreated threads, the faster the drop occurs.
1) Lack of memory allocation according to wine logs (although there is still RAM and hard disk memory) 290755.553:0f44:err:virtual:try_map_free_area mmap() error Unable to allocate memory, range 0xf1530000-0xf2530000, unix_prot 0. 2) Also, errors in the logs of our application indicate a lack of memory "System.Runtime.InteropServices.COMException Not enough memory to execute the command. (Exception from HRESULT: 0x80070008 3) AccessViolationException errors in random parts of the code. Windows doesn't have this kind of error. 4) Synchronization errors 0e60:err:sync:RtlpWaitForCriticalSection section 07B7628C "?" wait timed out in thread 0e60, blocked by 0e5c, retrying (60 sec)
.NET Framework thread pool issue under wine. The issue is reproducible even if you create threads via Thread without using ThreadPool.
There is a test application that allows you to reproduce the problem. The sources are here: https://github.com/Drentmort/ThreadPoolTest
The problem was found in WINE 7.15, but we tried WINE 8.6 and WINE-staging.
https://bugs.winehq.org/show_bug.cgi?id=54953
YUKU ykurin@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ykurin@gmail.com URL| |https://github.com/Drentmor | |t/ThreadPoolTest Distribution|--- |Debian Keywords| |dotnet
https://bugs.winehq.org/show_bug.cgi?id=54953
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, testcase
https://bugs.winehq.org/show_bug.cgi?id=54953
Konstantin Kondratyuk kondratyuk@etersoft.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |kondratyuk@etersoft.ru
https://bugs.winehq.org/show_bug.cgi?id=54953
David Kahurani k.kahurani@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |k.kahurani@gmail.com
--- Comment #1 from David Kahurani k.kahurani@gmail.com --- The only issue I witness with your test program on upstream wine is this:
4) Synchronization errors 0e60:err:sync:RtlpWaitForCriticalSection section 07B7628C "?" wait timed out in thread 0e60, blocked by 0e5c, retrying (60 sec)
All the other issues I don't seem to reproduce but well, it seems that your test program could be started in multiple ways so maybe you can be more specific on the options that reproduce the issue(s)?