Skip to content
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
Closed

Conemu64 is leaking handles #368

JAlbretsen opened this issue Oct 14, 2015 · 17 comments

Comments

@JAlbretsen
Copy link

@JAlbretsen JAlbretsen commented Oct 14, 2015

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
Copy link

@SamHasler SamHasler commented 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.

@Maximus5
Copy link
Owner

@Maximus5 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
Copy link
Author

@JAlbretsen JAlbretsen commented 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.

@Maximus5
Copy link
Owner

@Maximus5 Maximus5 commented Oct 14, 2015

You need permission

@JAlbretsen
Copy link
Author

@JAlbretsen JAlbretsen commented Oct 14, 2015

You should be able to access it now

@Maximus5
Copy link
Owner

@Maximus5 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
Copy link
Author

@JAlbretsen JAlbretsen commented 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.

@Maximus5
Copy link
Owner

@Maximus5 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
Copy link
Contributor

@michaellukashov 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
Copy link
Author

@JAlbretsen JAlbretsen commented 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

@Maximus5
Copy link
Owner

@Maximus5 Maximus5 commented Oct 15, 2015

@Maximus5
Copy link
Owner

@Maximus5 Maximus5 commented Oct 15, 2015

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

@Maximus5
Copy link
Owner

@Maximus5 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
Copy link
Owner

@Maximus5 Maximus5 commented Oct 15, 2015

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

@Maximus5
Copy link
Owner

@Maximus5 Maximus5 commented Oct 15, 2015

Finally. 3ddbfdd

@Maximus5
Copy link
Owner

@Maximus5 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.