Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an issue on our Windows 2003 x64 Build Server when invoking shell commands from a script. Each call causes a "memory leak" in the page file so it grows quite rapidly until it reaches the maximum and the machine stops working.

I can reproduce the problem very nicely by running a Perl script like

for ($count=1; $count<5000; $count++) { system "echo huhu"; }

It is independent of the scripting language as the same happens with Lua:

for i=1,5000 do os.execute("echo huhu") end

It's also an issue when using PHP. (Their solution (uninstalling a secondary firewall) doesn't apply since neither a firewall or virus Scanner are running on the machine.)

We can also reproduce the issue on other developer machines running Windows XP 64, but not on XP 32 Bit.

The guilty guy for the allocation is C:\WINDOWS\System32\svchost.exe -k netsvcs which runs all the basic Windows services.

Does anybody know the issue and how to resolve it?

share|improve this question

2 Answers 2

To get a better idea about which process, assuming you know the PID, run tasklist /svc and see if you can better determine which service this is happening with. If, as I'm guessing, this is running under IIS, then it will probably show as W3SVC

Does this happen to you when running the Perl script from a command line, or triggered by IIS? If it's the former, I'm not sure how that makes sense, because there shouldn't be any services involved with that. If it's the latter, can you describe your setup more fully?

Have you tried running anything like ProcessExplorer or Process Monitor, from the SysInternals team at MS? Very useful tools.

share|improve this answer
    
Unfortunately it is not IIS. The leaking process is C:\WINDOWS\System32\svchost.exe -k netsvcs I found this with Sysexternal ProcessExplorer. However this is a very generix wondows service running all kinds of basic services. –  Arno May 18 '10 at 13:08
    
Please review my quesions and suggestions again 1. To get a better idea about which process, assuming you know the PID, run tasklist /svc and see if you can better determine which service this is happening with. 2. Does this happen to you when running the Perl script from a command line? –  mfinni May 18 '10 at 13:55
    
Still, thanks a lot for your answer and your support ! –  Arno May 19 '10 at 10:12
    
I 'll try the tasklist /svc ! yes it happens when running the script from within notepad++ and from the commandline. It also happens with a plain .bat file that opens command line interpreters. –  Arno May 19 '10 at 10:13
    
We found the issue by reinstalling a similar step by step. It seemed to be caused by a bug in a hardlock driver. After instaling a newer version of the driber the issue disappered. –  Arno May 19 '10 at 12:31
up vote 0 down vote accepted

We found the issue by reinstalling a similar step by step. It seemed to be caused by a bug in a hardlock driver. After installing a newer version of the driver the issue disappeared.

A hardlock is a dongle to provide copy protection for software products, typically a small USB plug. The trouble was caused by the device driver software for this dongle that came with the copy protected software.

share|improve this answer
    
What the hell is a "hardlock driver", if you don't mind me asking? That would help fully explain this issue for anyone searching for it. –  mfinni May 19 '10 at 14:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.