Memeory Leak in Windows Page file when calling a shell command - windows

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
I found somebody describing the same issue with php at
http://www.issociate.de/board/post/454835/Memory_leak_occurs_when_exec%28%29_function_is_used_on_Windows_platform.html
His solution: Firewall/Virus Scanner does not apply, neither are running on the machine.
We can also reproduce the issue on other Developer Machines running XP 64, but not on XP 32 Bit.
I also found an article describing a leak situation in page file at
http://www.programfragment.com/
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 ?

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.

Related

How to stdout/stderr for MS Office Applications?

Hey I'm working on Windows in an office environment with an uncooperative MS Access database.
We're experiencing crashes and hangs with no error messages. I am used to a *nix environment where I can launch a program from the terminal and get stdout/stderr redouts making it much easier to see what was running just before it crashed the computer...
Experimenting with launching from windows' cmd hasn't yielded anything similar (not dug too far into powershell because I'm not allowed admin privileges on this machine ¬_¬). Does anyone know a way I can dig beyond a hanging GUI and get at a readout of logs, or preferably see messages piped to the command-line as the program whurrs away?
Worth noting I'm in a restrictive IT environment where I cannot install any additional tools, so whilst I'll be interested to hear about the wonder program that will solve my problems I'll be unable to install anything that isn't built in to Windows.
There is no such thing in MS Access.
You will have to write your own error handling that will write errors to a log table or log file. Of course, this will only work until your application halts.
The behaviour you describe is not normal, so the cause for your trouble may very well be anything but MS Access itself.

New Python Install; Scripts Running very Slow

Current Python Version 2.7.10 - I have tried a straight download from python.org and the Anaconda distribution.
Previous Python Version was 2.7.x (don't remember) - I know it was an Enthought Canopy distribution.
I just 'upgraded' windows from 7 to 10pro. I reinstalled everything on my computer for a fresh start. I installed the most recent version of Python 2.7.10. I am now running a script that I was running just yesterday on my Windows 7 OS, and it is running incomprehensibly slow now, and I have no idea why. It is a script that is based on the code from a tutorial found here:
http://pythonprogramming.net/sentiment-analysis-module-nltk-tutorial/
It has a lot of data that is loaded, and it wasn't running super fast before, but now it takes so long, it looks like it's frozen. Any thoughts? I thought that it had something to do with packages that I had installed on my previous Python environment, like a C-compiler or something. The output is nothing, because it just hangs for a long time and slowly moves through the script. It isn't broken, there isn't a loop it's stuck in. If I wait long enough, it will start showing me the correct output. When I hit 'Ctrl-C' this is what I get.
python -mcProfile MAIN_Tutorial_2.py
forrtl: error (200): program aborting due to control-C event
Image PC Routine Line Source
KERNELBASE.dll 00007FFB485B5674 Unknown Unknown Unknown
KERNEL32.DLL 00007FFB49412D92 Unknown Unknown Unknown
ntdll.dll 00007FFB4B819F64 Unknown Unknown Unknown
Don't think that helps, but just in case.
I've been struggling for a while with similar topic - long start up time of python scripts.
This is what I've found on python documentation site:
Why does Python sometimes take so long to start?
The problem may be caused by a misconfiguration of virus checking software on the problem machine. Some virus scanners have been known to introduce startup overhead of two orders of magnitude when the scanner is configured to monitor all reads from the filesystem. Try checking the configuration of virus scanning software on your systems to ensure that they are indeed configured identically. McAfee, when configured to scan all file system read activity, is a particular offender.
Unfortunately, I don't have a quick way to test whether disabling file system protection will help, so I hope it will solve your problem and will be glad to hear from you.

How to detect Windows XP using Ruby?

Working on a game atm using Ruby, but due to the nature of how the game is coded Windows XP is proving to be a issue, as various tweaks can be done to make you faster than other players
so my intentions are to upon loading of the game detect if you are running windows XP, and if so fail to load any further.
This may seem harsh, but the advantages XP gives over Vista or Win7 etc is vast and is unbalanced.
Can any one help?
Here you find some solutions on how to detect the operating system:
How can I find which operating system my Ruby program is running on?
But I think, it only tells you, if it is Windows or not. So you have to do a second step:
If it is Windows, you could call the system command ver to detect the Windows Version (As you might know, system commands can be called using the `-Symbol).
`ver`
More information about this command are found here: http://www.windows-commandline.com/2009/01/find-windows-os-version-from-command.html

Win 8 ,cygwin heap failure

I get the following error compiling with make (I have cygwin.dll)
*** Couldn't reserve space for cygwin's heap (0x150000) in child, cygheap, Win32 error 0
0 [main] make 4336 sync_with_child: child 2968(0x120) died before initialization with status code 0x1
308 [main] make 4336 sync_with_child: *** child state waiting for longjmp
How could it be solved?
Thanks
I just ran into this problem and was advised to rebase the msys-1.0.dll which was causing the problem.
Specifically, I used the ReBase.exe tool:
C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\x64\ReBase.Exe
which is part of v7.1 (and perhaps other versions) of Microsoft's platform sdk available here.
take a backup of the dll, and then try this command line inside the platform sdk command prompt:
rebase -b 0x30000000 /path/to/msys-1.0.dll
this solved the issue for me.
for interest, my recommended virtual memory settings were set at around 3GB, and the actual allocated virtual memory was at 6GB.
Reboot your system:
Most users complaining about this problem reported it goes away after a reboot. If you are using Windows 7, check the message from BerndP in this thread, it has some tips related to adjusting Virtual Memory settings on Windows.
Might be some software interfering with Cygwin:
This post brings an interesting discussion of random problems with Cygwin. The BLODA list presents a list of applications that are known to cause strange failures and problems in Cygwin.
EDIT:
Windows 8 has not been officially released, so don't expect Cygwin to work on it.
Cygwin can be expected to run on all modern 32 bit versions of Windows This includes, as of the time of writing this, Windows 2000, Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7, as well as the WOW64 32 bit environment on released 64 bit versions of Windows (XP/2003/Vista/2008/7/2008 R2).
I am working with eclipse and am using MinGW + Yagarto on Windows 8. Restarting did nothing.
I solved the issue by expanding my virtual memory, which was originally set to 896Mb and is not at 3000Mb and working fine.
This problem can be resolved by changing the compatibility mode of gcc.exe (or whatever called by make) into Windows Xp (in Properties->compatibility)
However, the script must be executed as administrator to avoid multiple confirmations when calling gcc.exe

Haskell 32-bit program freezes on a 64-bit Windows

I'm using the GHC to build a haskell pogram for Windows with help of a speciefic (Haskell-)Library which is called citeproc-hs. On a 32Bit-Windows XP machine the application works just fine whereas on another Windows 7 64Bit environment (tested on 3 different PCs) a "function of that library reading a speciefic file (a "style" file) mentioned above just freezes without any error message. I use the same .exe file and nevertheless there is a different behaviour I cannot explain.
Are there maybe some known problems concerning 32Bit Haskell - compilations in an 64Bit environment or does anyone has an idea how I could solve this strange problem?
Thanks in advance!
I use GHC on 64 bit windows in production, and we don't seem to have any issues.
I would suggest upgrading. If the behavior continues, report a bug against GHC.
Can you run it interpreted mode? Probably citeproc-hs is guilty. Does it contains any C code? And of course, you may comment out line-by-line and see what goes wrong. Does "hello world" runs fine?

Resources