After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 749355 - windows handle leak
windows handle leak
Status: RESOLVED INVALID
Product: GStreamer
Classification: Platform
Component: cerbero
git master
Other Windows
: Normal minor
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-05-14 08:34 UTC by Nicola
Modified: 2015-06-11 14:48 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nicola 2015-05-14 08:34:16 UTC
testing a gstreamer app on windows I found that every time I start/stop a pipeline the number of handles increase (based on the numbers from task manager), memory and threads seems not leaked and keep constant. 

To try to understand the problem I used windbg, using !htrace -enable and then !htrace -diff after stopping all the pipelines it show something like this

Handle = 0x00000000000003dc - OPEN
Thread ID = 0x0000000000000e14, Process ID = 0x0000000000000964

0x00000000773de63a: ntdll!ZwCreateSemaphore+0x000000000000000a
0x000007fefd51665a: KERNELBASE!CreateSemaphoreExW+0x000000000000005a
0x000000007717e09a: kernel32!CreateSemaphoreExA+0x000000000000004a
0x000000007717e039: kernel32!CreateSemaphoreA+0x0000000000000019
0x0000000064942e99: libwinpthread_1!pthread_mutex_init+0x0000000000000079
0x0000000064942f65: libwinpthread_1!pthread_mutex_init+0x0000000000000145
0x0000000064943044: libwinpthread_1!pthread_mutex_init+0x0000000000000224
0x000000006494321d: libwinpthread_1!pthread_mutex_trylock+0x000000000000000d
0x000000006494328a: libwinpthread_1!pthread_mutex_trylock+0x000000000000007a
0x000000006494333f: libwinpthread_1!pthread_mutex_destroy+0x000000000000002f
0x0000000064944c45: libwinpthread_1!_pth_gpointer_locked+0x00000000000001d5
0x00000000773f3598: ntdll!RtlFreeHeap+0x00000000000084f8
0x000000007739892f: ntdll!EtwEventActivityIdControl+0x000000000000007f
0x00000000773d36e8: ntdll!RtlExitUserThread+0x0000000000000038
--------------------------------------
Handle = 0x00000000000003c8 - OPEN
Thread ID = 0x0000000000001320, Process ID = 0x0000000000000964

0x00000000773de63a: ntdll!ZwCreateSemaphore+0x000000000000000a
0x000007fefd51665a: KERNELBASE!CreateSemaphoreExW+0x000000000000005a
0x000000007717e09a: kernel32!CreateSemaphoreExA+0x000000000000004a
0x000000007717e039: kernel32!CreateSemaphoreA+0x0000000000000019
0x0000000064942e99: libwinpthread_1!pthread_mutex_init+0x0000000000000079
0x0000000064942f65: libwinpthread_1!pthread_mutex_init+0x0000000000000145
0x0000000064943044: libwinpthread_1!pthread_mutex_init+0x0000000000000224
0x000000006494321d: libwinpthread_1!pthread_mutex_trylock+0x000000000000000d
0x000000006494328a: libwinpthread_1!pthread_mutex_trylock+0x000000000000007a
0x000000006494333f: libwinpthread_1!pthread_mutex_destroy+0x000000000000002f
0x0000000064944c45: libwinpthread_1!_pth_gpointer_locked+0x00000000000001d5
0x00000000773f3598: ntdll!RtlFreeHeap+0x00000000000084f8
0x000000007739892f: ntdll!EtwEventActivityIdControl+0x000000000000007f
0x00000000773d36e8: ntdll!RtlExitUserThread+0x0000000000000038

and so on

I don't know if this info is useful and probably the bug is not stricly gstreamer related but something platform specific. I'm reporting here since I'm using the libraries that come with cerbero.

Please feel free to ask other infos (I'm not a windows expert) and or to close the bug if you thing it has nothing to do with gstreamer.

Finally the leaked handles are not so high, so in a typical usage and app could run for weeks or even months before the handle limit is reached
Comment 1 Nicola 2015-06-11 14:48:17 UTC
the problem does not happen (or at least is greatly reduced) with 1.5.1 official prerelease build. Probably there was something wrong with my build