My PC has been randomly locking up lately, and while debugging I found an issue with my Ruby/Watir project. Each time the browser.close function is called, the following occurs in dmesg (slightly different each time):
[12614.684243] Chrome_~dThread[29941]: segfault at 0 ip 00007f17889b3992 sp 00007f1786aa0b00 error 6 in libxul.so[7f1787b6a000+519c000]
I'm not sure if this is causing my PC to lock up, however it still needs resolving. I've done some searching but I can't find anyone else with this issue. The issue also appears if I ctrl + c the script.
Error 6 is: The cause was a user-mode write resulting in no page being found., which makes sense if I've closed the browser.
I've read the answer on this page, but as libxul.so is a library it didn't help much (although offered me a better understanding of debugging segfaults!).
For those looking due to the linux/segfault tag rather than ruby/watir, browser.close is a builtin function in the Watir package.
Edit:
Although it says 'Chrome', the issue actually comes from FireFox
I don't get the issue in any other browser
libxul.so is found in /usr/lib/firefox/
This was actually the result of a PC hardware issue that wasn't apparent till much later.
Related
I recently switched to Ocaml 4.03.0 (installed using Opam) and started seeing erratic behaviors from ocamldebug on examples that previously went through without any problem.
In specific, I load up the byte code into ocamldebug, set arguments and run it. I don't set any breakpoints, I just want the debugger to hit an assert failure that both byte code (outside the debugger) and native code hit. Instead of reaching the assert, ocamldebug stops after running for a while saying
Lost connection to process 1234 (active process)
between time x and y.
Segmentation fault (core dumped).
Restart from time z to get closer of the problem? (y or n)".
If I try to get closer the problem by saying "n" then running again, this problem keeps repeating.
Apart from minor changes to my code (like additional print statements) nothing has changed in my set up except the Ocaml version. A collaborator of mine also has this problem, both with Ocaml 3.12.0 (installed from sources) and 4.03.0 (installed from Opam).
Why is this happening? And is there fix to this? Any insight into this is much appreciated. Thanks!
I've developed a software using National Instruments LabWindows/CVI and installed the .exe in a Windows 7 32 bit PC with 4GB RAM.
When I run my software, sometimes I get the following error.
"A program caused the program to stop working correctly. Windows will close the program and notify you if a solution is available"
This is very random and sometimes this error never comes.
Can anyone help me to understand this issue please. I've reviewed my software code many times and I am sure that I am not doing anything wrong in the software which causes this error to come up.
Is this anything related to windows and how can I resolve this? Help is much appreciated.
Thanks
Sujith Rajan
I have encountered similar problems several times.
This may happen even with simple programs like a console application used to get input from user and display some data on screen after processing it.
Usually, this is an indication that your computer is unable to provide enough resources to this program or that there is a bug in your code.
It might be random due to the following reasons:
The Processor might already be busy with several demanding tasks and your program needs to be closed due to this. At other times, when it works well, the resources might be available.
Your program might have a certain logical error that appears at runtime only when certain conditions are fulfilled. (such as an erroneous conditional statement)
Your program might have an infinite loop.
Windows suspects your file to be harmful to the system (for some reason).
There are youtube videos that tell you to go set DATA EXECUTION PROTECTION to resolve. This is a red herring. Its also potentially harmful, especially if you are running old dos apps (because you have to for some reason).
If the program throws a unhandled exception , of any sort , you will get this error message.
If you launched it with this code paragraph...
Dim psi As New ProcessStartInfo(pathToTarget)
Dim p As Process = Process.Start(psi)
Dim bIfinished As Boolean = p.WaitForExit(itimeout)
If bIfinished = False Then
p.Kill()
End If
iretVal = p.ExitCode
pathToTarget is the full path to your target exe/bat (TARGET) file
timeout is an integer that represents milliseconds. 2 minutes would be 2*60*1000
bfinished will be true if the program ended by itself. NOTE- this is not the return code. If it failed to finish in (2 minutes in this example) bFinished will be false.
p.ExitCode can be checked to see what the TARGET returned. Typically a 0 is success and anything else is an error code.
This is the message box mentioned by OP, (autoAging happens to be the exe I used to demonstrate this) . It also says 'XYZ has stopped working'. Google needs to know that!
Note that code will continue running in YOUR app so you can do clean up if you like. Clicking or not clicking "Close Program" has no effect on HOST that I have been able to tell.
If you own the code to the TARGET, make sure you handle all errors and return an appropriate code. That way your calling app (HOST) can know how to react.
You also avoid this msgbox.
If you don't own the code to TARGET, you just have to do the best you can. If there is some output you can readily check, do that. Otherwise I'd assume failure and proceed on that assumption.
This message box does consume resources. Although its not a huge issue, enough of them will run your box out of memory.
We've been plagued for several years by occasional reports from customers about a non-descript error message "Cannot set allocations" that appears on startup of our app. We have never been able to reproduce the problem in our own test environments so far. I have now run out of ideas for attempting to track this down. Here's a collection of observations that have accumulated over time:
Error message text reads "Cannot set allocations" (note absence of punctuation).
The window title simply reads "Error" (or the localized equivalent).
The "Cannot set allocations" text is always in English regardless of OS locale.
I have so far not been able to locate the DLL or EXE containing the message text.
Google is chock full of reports of this error for a variety of different products - but no solutions.
The only unifying aspect between the affected products I could make out so far was that they all appear to come in the form of DLLs that load into third-party processes (such as addins for Visual Studio or Windows Explorer shell extensions).
Our app is actually a shareware COM-addin for MS Outlook, written in Delphi (i.e. native code - no .NET).
The prime suspect in our case is the third-party licensing wrapper that we're using which decrypts and uncompresses our DLL into memory on the fly. Obviously I couldn't simply give an unprotected version of our app to the affected customers to verify this suspicion. Maybe the other vendors that this has been reported against are using similar products.
Debug versions of the protection wrapper supplied to us by the licensing vendor yielded no results: The log files looked exactly the same as from sessions where the error did not occur. Apparently the "inner" DLL gets decrypted and uncompressed all right but for some reason still fails to get loaded by the host process.
By creating an unprotected "loader" DLL we have been able to pinpoint the occurrence of the error somewhere behind the LoadLibrary call that is supposed to load our DLL into memory.
Extensive logging and global exception hooks in our own code (both the unprotected loader and the protected "core"-DLL) yielded no results at all. The error is obviously raised somewhere else.
The problem described in this earlier question of mine was very probably prompted by the same issue. This was before we created the unprotected loader stub.
The error only occurs at about 1-2% of our customers - whereas typically all installations at any affected customer's site are affected the same.
Sometimes the error goes away after we release a new version but often it will come back again after a couple of weeks or months.
Once the error has started to occur on a machine it does so consistently.
The error never occurs while connected to the affected machine via remote access (e.g. VNC, RDP, TeamViewer, etc.) and none of the affected customers are within travel distance from us so all we have to go by is log files and "eye-witness reports".
One customer reported that the error message dialog apparently was non-modal, i.e. he was able to simply move the dialog box to the side and continue working with the application (minus the functionality that our DLL would have provided). Not sure whether this is universally true in all other occurrences, too.
In some cases customers have been able to permanently rid themselves of the error by disabling or uninstalling other addins from other vendors that were sharing the host application with our own product.
The error has so far been observed on Windows XP, Vista and 7.
During the last few weeks we had a surge of reports from Outlook 2003 / Windows 7 users. Could the situation have been made worse by a recent Windows/Office-update?
Does anyone have any experience with this error at all?
Or any more ideas for investigating this?
I have only recently had this happen, which prompted my search and I ended up here. I can tell you that with me for sure it is in windows 7 home premium BUT ONLY WITH IE9 (which I hate by the way) it reduces the user back to the dummy stage and assumes that we have to be repeated flagged about everything.It will keep asking you if you want to disable add ons to speed up load times but usually on things that aren't really the things slowing the browser down in the first place,it is there is too much garbage loading in the first place.But back to the "Cannot set allocations", I for one have never expirianced it in any other browser which is not to say it doesn't happen with them.
This is going to be pure guess-work, but it sounds like maybe your third-party licensing software is trying to load your DLL at a particular location in memory, which - on these failing systems - happens to already be occupied by something else, perhaps a global hook DLL.
If you have a customer who is willing to work with you a bit, it might shed some light on the situation to get a crash dump (e.g., with ADPlus or maybe simpler with Sysinternals' ProcDump) when the error message is showing. That would show what modules are loaded and possibly the callstack (if it is from a message box at the time of the error as opposed to one that is catching an exception after the problem).
I also have experienced the "Cannot set allocations" issue. Royal pain. I had disabled Java, since I did not seem to need it, I used add/remove programs to remove Java from my system. Then I stated to get those errors. I have reinstalled, but disabled Java in IE explorer. Now I do not get the error anymore. Not a programmer, don't know why this happened. Maybe a clue for someone.
Win 7 - 64bit OS IE Explorer 10. Hope this helps someone figure this out. John
I've seen this happen. In my case a global hook dll created a large memory file mapping, perhaps to the memory the licensing dll was counting on.
I see "Cannot set Allocations" when I open google chrome only. Also after that, chrome closes with a msg saying "Whoa chrome has crashed..."
Still no solution :(
Also not a programmer, but it always happens when I open Chrome. It opens second window with error message 'cannot set allocation'. I usually close it and go on my way. if i don't it usually causes a crash. doesnt happen on any other browsers.
I have a web application, which in the course of a normal interaction, hangs IE. By "IE being hung", I mean that IE doesn't respond anymore and using 100% of the CPU. The only to get out of this state is to kill the IE process. About the app:
It loads only one page in the browser, communicates with a server with Ajax queries, and updates the DOM.
I can reproduce this with both IE6 and IE7, but not Firefox or Safari.
I am wondering if anyone has seen this already, and if there are a few known cases that can get IE into this hung / using 100% of the CPU state.
Use WinDbg, http://www.microsoft.com/whdc/devtools/debugging/
Attach it to the IE process that has the problem.
The .symfix+ command will set your symbol path to point to the Microsoft symbol server and cache the debug symbols locally.
The !runaway command will enumerate all the stacks in the process and tell you which one is going berserk.
If you're lucky, you may see something recognizable, such as a regex replacement at the top of the stack. Or perhaps the layout engine has gone into an infinite loop. Both of these have happened to me in the past.
If the callstack doesn't make sense, use 'g' to make the process go, wait a few seconds, hit Ctrl+Break, then try !runaway again.
Once you've got the symbols locally, you can also use SysInternals' Process Explorer to look at a process's stacks. Configure the Symbols option in Process Explorer to point to your local symbol cache, something like c:\Program Files\Debugging Tools for Windows\sym.
Try attaching the script debugger (via Visual Studio, in my case), and see what is causing it.
Most likely it's a javascript running an infinite loop, or just looping too fast for what needs to be done per ajax request.
Have you tried tracing the problem? If the problem also happens in IE8 you could use console.log commands and their awesome new debugger/dev tool that's built in. Otherwise use the old dev toolbar for IE or alerts. Try to reduce the problem and then file a bug (and paste the code here please).
Related to this question. Any advice on fixing the problem below?
After a lot of experimentation with the program, I have discovered several things.
It crashes relatively consistently (90% of the time or so) upon running the line of code, Set Message = New CAPICOM.EncryptedData. Note that the line above this is merely Dim Message As CAPICOM.EncryptedData.
The function that makes that call does not crash when called earlier in the program's execution. Binary search for error does not work to find the problem, since calling the function in some places mysteriously, unreliably prevents the bug from happening. Sometimes rebuilding the program seems to impact if the bug shows up. Yes, it is a heisenbug. The same issues apply with temporal binary search for error. Spending 5 hours comparing two versions of the program only to discover that both versions have the bug even though only one of them is currently showing the symptoms is not very productive.
The crash is due to an access violation 0xC00000005
Running WinDbg (the windows debugger) shows that there is only one line of code which reads this memory location, LoadPicture(szTmpBMP). It is called at the end of a scary function which grabs the picture out of a resource and sticks it in a temp file. I was scared enough of this function that, for the sake of testing, I replaced it with a call to LoadPicture("testcra.bmp"), then didn't call the scary resource function for that bitmap. This did not help. Removing this call to loadpicture entirely also did not help, though the debugger could no longer find any points where the affected memory was being read, and the affected memory was no longer at the same location. This testing was done on a VM, so some memory reads are not necessarily going to be visible to the debugger.
Everything works perfectly on Vista (both my local machine and a Vista VM). The access violation only occurs on XP.
I'm using VB6 Version 8176, 6.0.8169
My current solution, which works, is to create all my capicom objects early, and never to create new instances of capicom.encrypteddata beyond the first. This works, but it is unlikely that the underlying problem was actually fixed.