I currently have a Plone 4.3.8 site where editing a portlet causes a deadlock.
I'm trying to find tools to fix this, but most deadlock tools don't work & I'm not getting good information (IMO) from those that at least run.
I've tried:
z3c.deadlockdebugger => can't get to a stacktrace
ZopeHealthWatcher => can't see the results on command line (or webpage)
Products.LongRequestLogger => perhaps the best so far, gives me some log output - but it's stack traces focus on Diazo code, but the problem still occurs when Diazo isn't in scope (running against 127.0.0.1)
gdb attach - just landed me in C code
winpdb => it can't attach to running processes in the same way that gdb can (only to processes started with the intention of attachment by winpdb)
Products.signalstack (OR Products.signalstacklogger) => USR1 signal just shuts down a zope process!
Note: z3c.deadlockdebugger (and things that depend on it) needs checked out source code to drop the threadframe dependency.
My situation seems to be linked to product upgrades - probably one or both of either plone.app.contenttypes or plone.app.multilingual, an empty site doesn't have this issue, but I obviously I need my site data!
What should I do to progress this?
EDIT:
I believe Maurits answer to be the most correct one, but it didn't work in my case. What I ended up doing was using pdb to track down the point at which the code was hanging (in plone.app.debugtoolbar as it happens)
You say that using the USR1 signal shuts down Zope when using Products.signalstack. But no special packages should be necessary, so I wonder if adding signalstack has this side effect of shutting down Zope.
At least for me, a few weeks ago, this worked fine on a Plone 4.3.something site:
kill -USR1 $(cat var/zeoclient.pid)
Although the #maurits answer is right (and the simplest ones) sometimes I had issues seeing the traceback resulting from the kill command: sometimes is found on the event log, sometimes on the shell.
I prefer the integration of the buildout with haufe.requestmonitoring, configuring also the monitor long running requests feature.
You will see the deadlocked traceback in your event log and also you activate a tool for monitoring low performance on your Plone.
Related
Not a VERY big deal, but it's still annoying. Qt Creator shows Not Responding for a few minutes upon startup, then it's OK. What could be the reason? How to fix it? I have cleared my temp files, also have given Qt Creator admin rights. It still does not help. Below is the screenshot:
Tried disabling the welcome screen as per the suggestion. Now the welcome screen does not show up, but I still have the same problem:
The culprit is likely the "welcome" screen.
Go to help - about plugins and disable welcome.
Another source of delays might be due to an internet connection being unable to go through and waiting to time out.
It is normal if the first time Creator is started to take a little longer while scanning for external tools, but after the initial run it should not be a problem.
As the comment noted, it might be the case of a recently introduced issue, in the case you are running the affectd version - 4.6.1.
For those observing instances of the problem with versions 4.8 and upwards running on Windows 10, I can confirm Windows Defender having a role in it.
Disabling the Welcome Plugin does not always solve the problem, as this is also triggered by first-open of the File menĂ¹ (which populates Recent Files/Projects submenus) or often by simply hitting Ctrl+K.
My solution consisted in adding Qt Creator to the Windows Defender exclusion list.
This is done by navigating Windows Security -> Virus & threat protection -> Virus & threat protection settings -> Exclusions.
Then add a Process exclusion entry using the path to the Qt Creator binary directory, such as C:\Qt\qtcreator-4.9.0\bin\*.
Note the presence of the final \* bit, to whitelist all binaries in that directory.
Since I started using git I've had my RPROMPT setup to show the current branch. I've recently been using some of the "fancy" scripts to show un/staged file counts and other useful at a glance things. (https://github.com/olivierverdier/zsh-git-prompt/tree/master)
After using this for a week or two, its performance started to bother me.
Are there faster ways of getting this info or are there maybe ways to asynchronously write the RPROMPT? I don't want to wait to type a command while the RPROMPT is computed and would be perfectly happy with it popping in slightly later then my main PROMPT.
No offense to the aforementioned script; it's great. I'm just impatient.
I've recently had a horrible problem with QTCreator. After the first time of running the program, ALL debugging instances segfault upon constructing the MainWindow object. Even if i make a blank QTwidget project and run in debug (without editing a single bloody thing), i get a segfault.
This persists after dozens of reinstalls. I have tried both the SDK as well as the IDE and library seperately. The version of the library is irrelevant, i always get the seg fault and its only on my tower. My laptops work just fine.
Does anyone have any possible solutions? Any help will be appreciated.
I needed to run QtCreator in admin mode in order for GDB to function properly.
Without knowing more (please answer to cbamber85's comment), such issues are known to be caused by uberprotectious anti-virus solutions or other software that hooks into places where GDB would usually hook in (Vendor OS-'enhancement' tools are infamous for doing that). This is a known Problem with GDB.
You could try to disable your virus scanner or remove/unload/remove from autostart the vendor tools and try again.
If that doesn't work, the content of the debugger output log pane (Windows > Views > Debugger Log) would be interesting.
I have an puzzling problem. I have a new ASP.NET web application in VS2005 that runs fairly well, but I am having a problem and would like to set a break point to see what is going on. I have compiled the project in Debug mode. I have debug=true set in the web.config. But it appears that the IDE is not attaching to the process at all. Have I overlooked something? I am using the development server and not IIS. This has never been a problem in the past, but is this time.
Have I overlooked anything? Thanks for any help.
Rob
I had this issue a while back with VS2005. I don't remember where I got the following instructions from (copied them to a file which I'm now copying to you) but doing the following steps worked for me. It has something to do with IE8 attaching itself to multiple processes and messing up the debugger. Word of warning, this has you editing the registry, so use at your own risk / take all your normal precautions, etc.
Open RegEdit
Go to HKEY_LOCALMACHINE -> SOFTWARE -> Microsoft -> Internet
Explorer -> Main
Add a dword under this key called TabProcGrowth
Set TabProcGrowth to 0
If you run into the same problem on
Vista or newer, you will also need to
turn off protected mode.
Please note also that I was/am running XP at the time, so I did not have to use the "Vista or newer" clause there. No idea if that has any adverse effects either.
Sorry if I am stating the obvious, but you need to Start Debugging <F5> rather than just running the executable after compiling. Are you doing this?
If you don't hit the breakpoint, you are either not debugging (F5) or your code isn't reached at all. If you want to know which of the two is happening you can throw an exception right at the code where your breakpoint is. If your application is failing at the exception, you know you are not running it with the debugger. If it doesn't fail at the exception you are simply not reaching that piece of code and you will have to look harder for which code you are actually running.
throw new Exception("if I see this exception, I am not running the debugger");
Or maybe you are running two instances of the development server. I've had that sometimes. Look in the Windows system tray for the icon. If you see two (or more) you can right click to stop them and restart debugging.
I'm trying to debug some server-side JavaScript code running in Aptana Jaxer and I'm not having any success. I haven't even been able to find any tutorials or posts about this issue. Does anyone know if it's possible and if so, what am I missing?
You can set you Jaxer.Config.DEV_MODE = true; to get some error information in your browser.
Also use the Jaxer.Log to debug.
Hope this helps a bit.
Jaxer and Aptana Studio do not yet have the ability to debug remote scripts from the client side. That is, you can't single-step into a callback and have your code window show you the first line of code in the remote method. This is on their wishlist, of course, but it'd be pretty tricky to do well.
Personally, I use logging. Jaxer has strong facilities for this, in Jaxer.Log.*.
A lot of people sneer at "printf() debugging", but the fact is, it works, and it's often less trouble to set up than an interactive debugger, especially for server applications and remote method invocation. You just sprinkle logging messages wherever you want to know the state of the system at that point, then make your app try to do the thing that's failing. Study the logs, rinse, repeat.
tail -f /opt/AptanaJaxer/logs/jaxer.log