mIRC Home    About    Download    Register    News    Help

Print Thread
Non-paged pool memory leak (?) #186361 21/09/07 03:44 PM
Joined: Dec 2002
Posts: 230
G
greeny Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Dec 2002
Posts: 230
Hi there!

I already found a thread about this problem, but didn't find a solution. mIRC's non-paged pool keeps increasing and increasing and I don't know what to do.

Here are a few examples from my machine (all done on vanilla mIRC 6.3):

Code:
//write -c test.txt blablah
This increases the non-paged pool by 2kb and doesn't go down anymore either. If I enter this command 1000 times, the pool goes up by 2000kb.

Code:
//!write -c test.mrc alias test echo test | !load -rs test.mrc | !unload -rs test.mrc
This will make the non-paged pool go up by ~50-150kb.

Same when I open the script editor and close it - it always adds ~100-150kb to the non-paged pool. I can give you more examples if needed.

After a few days of normal usage my mIRC has gone up to about 50mb of non-paged pool. Again, this was all done on vanilla mIRC 6.3, with no addons whatsoever.

No offense, but I also don't think Khaled is right in the thread I linked to above. I tried this for myself on two different machines (Windows Vista Ultimate x64 and Windows XP SP2), and it happens on both. With and without anti-virus solutions. I also asked 4 of my friends on IRC to reproduce it, and they all noticed the increase in the non-paged pool, even though the amount of increase varied from machine to machine. That of course doesn't mean it happens on every machine on earth - but it seems to be a common problem. I can only imagine most users don't even notice it since they don't run mIRC for days or they aren't running any scripts.
Also, mIRC is the only application I have ever used that has such a problem - I think if it was a driver issue, it would happen on more apps (correct me if I'm wrong).

I would be really happy if I could get more information on this subject or even help the mIRC staff to fix this (IF it is a mIRC problem). If you need more information from me, I'm glad to help, just ask.

Thanks for reading and I hope I didn't sound too rude, I just want to help you improve your great IRC client wink

Last edited by greeny; 21/09/07 03:47 PM.
Re: Non-paged pool memory leak (?) [Re: greeny] #186401 22/09/07 01:28 AM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
Unfortunately, or fortunately depending on how you look at it, I can't reproduce this and I run a LOT of scripts and let mIRC stay connected for months without restarting it.


Invision Support
#Invision on irc.irchighway.net
Re: Non-paged pool memory leak (?) [Re: greeny] #186409 22/09/07 08:23 AM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
I experience the same problems but haven't been able to find a definite way of reproducing it on every system. Even on my system, it seems to depend on the loaded scripts; the more and bigger the scripts are, the more NP pool jumps each time I open/close the Editor. I have tried creating huge fake scripts and loading them on an otherwise clean copy but I can never get the NP pool to rise as much as in my every-day copy. It seems the bug needs variety :P

Even on the test copy however, if I open/close the Editor enough times (more than 50 or so), NP pool increases enough to be noticeable in Task Manager.

I have ruled out the antivirus theory. I can't rule out things like 3rd-party drivers but I doubt it, as mirc is the only program on my system that consumes that much NP pool.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: Non-paged pool memory leak (?) [Re: greeny] #186410 22/09/07 10:40 AM
Joined: Dec 2002
Posts: 4,521
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,521
I looked into the issue fairly extensively the first time around, I'll try again but without being able to reproduce it I don't think I'll fair much better.

I have just performed tests under five different Windows installations that use XP SP2 and Vista and tested mIRC using a debugger/memory checker to catch memory leaks and was unable to reproduce or detect any issues.

mIRC itself contains no memory allocation routines that allocate non-paged pool memory, so my guess is that the issue is external to mIRC. Since this issue only seems to happen on some installs of XP and not others, it is most likely a driver issue.

I can't think of a way of pinpointing the actual cause without being able to reproduce it unfortunately.

Re: Non-paged pool memory leak (?) [Re: Khaled] #186414 22/09/07 01:33 PM
Joined: Dec 2002
Posts: 230
G
greeny Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Dec 2002
Posts: 230
Thanks for taking a look at this again Khaled, being a developer myself I can understand it is very hard to track down a problem you don't even have.

If you need any information from me that might be helpful, or if there's anything I can do on my machine to locate the problem, tell me, I'll do anything to get this fixed ;-)

Re: Non-paged pool memory leak (?) [Re: Khaled] #186417 22/09/07 01:55 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
I'm just throwing this is out of nowhere and it's probably not related, but would the installed code pages mixed with, or independent of, UTF possibly cause this? I'm sure I'm way off base here, but it came to mind and would be something you'd see a lot of people have who use code pages other than default ones and not affect people who don't.


Invision Support
#Invision on irc.irchighway.net
Re: Non-paged pool memory leak (?) [Re: Riamus2] #186658 24/09/07 03:59 PM
Joined: Feb 2003
Posts: 307
T
tontito Offline
Fjord artisan
Offline
Fjord artisan
T
Joined: Feb 2003
Posts: 307
Hi, i can talk for my self, i still have no clue what is the reason of this.
What i can say is that i have tried several different xp pro, with different graphic cards (Gforce and ATI), different Antivirus,...

Another thing i can add is that after installing a windows i always set it to maximum performance, no xp styles, no system restore.
In resume i have a windows xp looking like win 2k.

Kind regards

Re: Non-paged pool memory leak (?) [Re: tontito] #186676 24/09/07 08:35 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
You didn't mention if you have the problem or not. smile

Anyhow, this is my system and I can't reproduce the problem:

Windows XP Pro SP2 with all updates
AMD Athlon XP 3200+
1GB RAM
256MB NVidia GeForce 7600GT AGP
McAfee 2007 (AV/Firewall/SiteAdvisor)
System Restore is enabled

For XP, it's basically default installer settings, but with the Windows Messenger service disabled, and the Win9x start menu and the silver theme instead of the default blue theme. I have no additional code pages installed.

I can't reproduce the non-paged pool issue in any mIRC version I've tried with and without scripts, including just running a trivia script, running just Invision, running Invision along with about 5 other scripts I've written and a couple I haven't, and with no scripts.


Invision Support
#Invision on irc.irchighway.net
Re: Non-paged pool memory leak (?) [Re: Riamus2] #186720 25/09/07 03:00 PM
Joined: Sep 2007
Posts: 3
M
Morg Offline
Self-satisified door
Offline
Self-satisified door
M
Joined: Sep 2007
Posts: 3
I've had this problem for many years now in all mirc versions (starting from 6.16, i didnt use mirc before that version) combined with all scripts i've been running. The biggest script used is the famous nonamescript. The other scripts are smaller ones which are also used by some other people. My box is a bare windows 2003 box certified spyware free and virus free and without antivirus or other low level software running. There also arent any weird drivers installed. The box runs two instances of mirc. Both experience this problem though one instance is experiencing it a lot worse than the other one. Its impossible for me to keep mirc running for more than 24 hours or something. After that period one of the mirc instances usually crashes (Not Responding) because the non-paged pool memory threshold gets crossed and all network connectivity is lost. The network is restored instantly when I kill both mirc instances at the console or even one (as long as the non paged pool counter gets below the threshold again). Sometimes the instances dont crash yet and are still able to report an error like: "Unable to connect to server (No buffer space available)". After the non-paged pool threshold is passed there are lots of errors in the eventlog with Event ID 2019 "The server was unable to allocate from the system nonpaged pool because the pool was empty.".
I've supplied a screenshot of my Task Manager in front of a (temporarily-because-of-high-cpu) non responding mirc window on that box so you can check out the non paged memory leak counter and also the insane high cpu load this one mirc instance is always giving me at certain times (see CPU and NP Pool column at the Task Manager window in the screenshot). Both mirc instances have the same scripts installed and nothing differs except the irc servers they connect to and the channels that have been joined. The mirc instance which is experiencing the problem a lot worse gets disconnected often of the servers it wants to connect to ((re)connecting is automated in some script) and its my belief these disconnects happen because of the almost 100% cpu load at those times. I would give my right arm to get this finally sorted cause I would very much like to connect to this windows 2003 box remotely without having to restart mirc each and every day but I must admit I dont have much faith left this will ever be solved.

Screenshot link: http://img256.imageshack.us/img256/7862/cpunpua3.jpg
Specs:
Windows 2003 Service Pack 2 with all updates
AMD Athlon XP 2000+
1.5GB RAM
256MB ATi Radeon 9200

If I can be of any assistance at all by doing some tests or providing more imformation by all means contact me or reply in this thread.

Re: Non-paged pool memory leak (?) [Re: Morg] #186733 25/09/07 04:03 PM
Joined: Feb 2003
Posts: 307
T
tontito Offline
Fjord artisan
Offline
Fjord artisan
T
Joined: Feb 2003
Posts: 307
I know this sounds stupid but, do you have system restore enable on your windows?

Kind regards

Re: Non-paged pool memory leak (?) [Re: tontito] #186757 25/09/07 11:30 PM
Joined: Sep 2007
Posts: 3
M
Morg Offline
Self-satisified door
Offline
Self-satisified door
M
Joined: Sep 2007
Posts: 3
As far as I know system restore is not available on windows 2003. I dont have it running.

Re: Non-paged pool memory leak (?) [Re: Morg] #186769 26/09/07 08:53 AM
Joined: Dec 2002
Posts: 4,521
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,521
Thanks for the information, I was finally able to reproduce this issue, it looks like it is related to the "monitor file changes" option in the Script Editor. It required a certain combination of scripts and folders in order to reproduce it, which explains why it was so intermittent. This issue should now be fixed for the next version.

Re: Non-paged pool memory leak (?) [Re: Khaled] #186798 26/09/07 05:38 PM
Joined: Feb 2003
Posts: 307
T
tontito Offline
Fjord artisan
Offline
Fjord artisan
T
Joined: Feb 2003
Posts: 307
Hi Khaled,

That makes sense, i have that option on.

Thanks for your time and patience.
Kind regards

Re: Non-paged pool memory leak (?) [Re: tontito] #187037 30/09/07 03:28 AM
Joined: Dec 2002
Posts: 230
G
greeny Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Dec 2002
Posts: 230
That's great news Khaled! Thank you very much, I can't wait for the new version :-)

Oh, yeah, I forgot to mention that disabling "monitor file changes" indeed solved the problem :-)

Last edited by greeny; 30/09/07 03:35 AM.
Re: Non-paged pool memory leak (?) [Re: greeny] #187103 30/09/07 02:23 PM
Joined: Feb 2003
Posts: 307
T
tontito Offline
Fjord artisan
Offline
Fjord artisan
T
Joined: Feb 2003
Posts: 307
Yep, same here laugh