New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conemu64 is leaking handles #368

Closed
JAlbretsen opened this Issue Oct 14, 2015 · 17 comments

Comments

Projects
None yet
4 participants
@JAlbretsen

I really love conemu, but after a couple of days my system becomes unstable, i figured out that it is leaking handles.
The screenshot is after a couple of days running.
The version in question is ConEmu 150813b [64]

conemu

Using process explorer, i can read it uses
Handles 60000
GDI Handles 102
User Handles 61
Hope this information helps.

I have scripts running that start & stop python processes all the time, it seems to leak sometimes when a sub process exits.

Process tree looks like this

ConEmu64.exe
-ConEmuC64.exe
--cmd.exe
---python3.exe
----cmd.exe - from here the processes start and stop all the time
-----python3.exe

@SamHasler

This comment has been minimized.

Show comment
Hide comment
@SamHasler

SamHasler Oct 14, 2015

I don't think it's present in 150728 [64]. I've had it open at least a couple of days and ConEmu64.exe only has ~2900 handles.

I don't think it's present in 150728 [64]. I've had it open at least a couple of days and ConEmu64.exe only has ~2900 handles.

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Oct 14, 2015

Owner

Do you have such process at the moment?
I wish to have list of handles (ProcessExplorer, select ConEmu64.exe, show View/Lower pane/Handles, save information by File/SaveAs).
Also, it would be nice to have its full memory dump.

Owner

Maximus5 commented Oct 14, 2015

Do you have such process at the moment?
I wish to have list of handles (ProcessExplorer, select ConEmu64.exe, show View/Lower pane/Handles, save information by File/SaveAs).
Also, it would be nice to have its full memory dump.

@JAlbretsen

This comment has been minimized.

Show comment
Hide comment
@JAlbretsen

JAlbretsen Oct 14, 2015

I have a xen server with several windows 7 instances, running conemu.
All with the same issue, I will try to get you a dump file asap.

I have a xen server with several windows 7 instances, running conemu.
All with the same issue, I will try to get you a dump file asap.

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Oct 14, 2015

Owner

You need permission

Owner

Maximus5 commented Oct 14, 2015

You need permission

@JAlbretsen

This comment has been minimized.

Show comment
Hide comment
@JAlbretsen

JAlbretsen Oct 14, 2015

You should be able to access it now

You should be able to access it now

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Oct 14, 2015

Owner

There is no info from ProcessExplorer. For this dumped process.

ProcessExplorer, select ConEmu64.exe, show View/Lower pane/Handles, save information by File/SaveAs

Owner

Maximus5 commented Oct 14, 2015

There is no info from ProcessExplorer. For this dumped process.

ProcessExplorer, select ConEmu64.exe, show View/Lower pane/Handles, save information by File/SaveAs

@JAlbretsen

This comment has been minimized.

Show comment
Hide comment
@JAlbretsen

JAlbretsen Oct 14, 2015

It's a standard dmp file, rename to .mdmp and you should be able to debug in visual studio.
Our servers had a power outage just after i made the dumpfile, so it will take some time for script to build up enough leaked handles, 24 hours, so i'll make one tomorrow.
I'll see if i can make a python script that makes it leak handles fast.

It's a standard dmp file, rename to .mdmp and you should be able to debug in visual studio.
Our servers had a power outage just after i made the dumpfile, so it will take some time for script to build up enough leaked handles, 24 hours, so i'll make one tomorrow.
I'll see if i can make a python script that makes it leak handles fast.

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Oct 14, 2015

Owner

Probably you misunderstood. Yes, I need a dump, haven't checked it yes, but it would be ok. But also, I need text file from ProcessExplorer.

Owner

Maximus5 commented Oct 14, 2015

Probably you misunderstood. Yes, I need a dump, haven't checked it yes, but it would be ok. But also, I need text file from ProcessExplorer.

@michaellukashov

This comment has been minimized.

Show comment
Hide comment
@michaellukashov

michaellukashov Oct 14, 2015

Contributor

This patch might help:

--- a/src/common/PipeServer.h
+++ b/src/common/PipeServer.h
@@ -1585,6 +1585,7 @@ struct PipeServer
                if (m_Pipes[i].hEvent)
                {
                    SafeCloseHandle(m_Pipes[i].hEvent);
+                   SafeCloseHandle(m_Pipes[i].hThread);
                }

                // Release buffers memory
Contributor

michaellukashov commented Oct 14, 2015

This patch might help:

--- a/src/common/PipeServer.h
+++ b/src/common/PipeServer.h
@@ -1585,6 +1585,7 @@ struct PipeServer
                if (m_Pipes[i].hEvent)
                {
                    SafeCloseHandle(m_Pipes[i].hEvent);
+                   SafeCloseHandle(m_Pipes[i].hThread);
                }

                // Release buffers memory
@JAlbretsen

This comment has been minimized.

Show comment
Hide comment
@JAlbretsen

JAlbretsen Oct 14, 2015

processexplorer text in
https://drive.google.com/file/d/0B_nENIv5UL24NHZOMjlpOXJJLTg/view?usp=sharing
it contains lots of unclosed process handles
from a different machine so it's a new dump

processexplorer text in
https://drive.google.com/file/d/0B_nENIv5UL24NHZOMjlpOXJJLTg/view?usp=sharing
it contains lots of unclosed process handles
from a different machine so it's a new dump

@Maximus5

This comment has been minimized.

Show comment
Hide comment
Owner

Maximus5 commented Oct 15, 2015

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Oct 15, 2015

Owner

But in your last dump I see a lot of unclosed process handles too. Looking for them...

Owner

Maximus5 commented Oct 15, 2015

But in your last dump I see a lot of unclosed process handles too. Looking for them...

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Oct 15, 2015

Owner

I do not see opened process handles in current alpha, ConEmu has only "ConEmuC.exe" and "ConEmuC64.exe" handles (servers).

Owner

Maximus5 commented Oct 15, 2015

I do not see opened process handles in current alpha, ConEmu has only "ConEmuC.exe" and "ConEmuC64.exe" handles (servers).

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Oct 15, 2015

Owner

Only current preview has process leaks. But it's older than alpha.

Owner

Maximus5 commented Oct 15, 2015

Only current preview has process leaks. But it's older than alpha.

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Oct 15, 2015

Owner

Finally. 3ddbfdd

Owner

Maximus5 commented Oct 15, 2015

Finally. 3ddbfdd

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Oct 16, 2015

Owner

Build 151015

Owner

Maximus5 commented Oct 16, 2015

Build 151015

@Maximus5 Maximus5 closed this Oct 16, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment