The entire site became inaccessible after enabling XHProf because of an incorrect entry in the "xhprof directory:" field. What appeared instead was an error display indicating the file was not found on line 487 in devel.module. To recover I had to disable XHProf from phpMyAdmin (devel_xhprof_enabled in the variable table). Upon disabling I found the "White Screen of Death" on every page of my site. This is because most of the entries in the theme registry had been wiped out. To get the site back up I had to get the theme registry rebuilt by executing "drush cache-clear" from site root and select every cache to be cleared.
The devel module needs to check for the presence of the file when the path is entered in the "xhprof directory:" field. If not present it should warn the user and disable XHProf. If the program does branch to the vicinity of line 487 in devel.module while the entry at "xhprof directory:" is incorrect devel needs to recover gracefully from this error so the site will remain accessible.
Also, the example paths below the "xhprof directory:" field which are now:
Location of the xhprof source code on your system, usually somewhere in /usr/local/share or /usr/share, include the leading forward slash.
need to be changed to:
Location of the xhprof source code on your system, usually somewhere in /usr/local/share/xhprof or /usr/share/xhprof, include the leading forward slash.
to alert the user that the "xhprof" directory needs to be included at the end of the path.
Comment | File | Size | Author |
---|---|---|---|
#9 | devel_validate_xhprof.1192362.7.patch | 1.4 KB | salvis |
Comments
Comment #1
salvisDoes this happen on D7, too? If so, then please upload a patch for 7.x-1.x-dev first, otherwise for 6.x-1.x-dev.
Comment #2
spflanze CreditAttribution: spflanze commentedI do not know about D7. I have not upgraded to it because there still aren't D7 versions of many of the modules I use.
I have the path correct now and so have no reason to patch. It will be enough for me to get the fix in a stable version.
Comment #3
salvisThis is not how it works here. It's unlikely that you "get the fix" unless you provide it.
Comment #4
spflanze CreditAttribution: spflanze commentedIf I were to do this it will be a while before I can. My priority now is to get the websites I am working ready for production. If no one else gets to it before my sites are in production I will do it.
This is a very serious bug because an incorrect entry in that field causes the entire website to go down. Getting it back up requires some degree of skill.
Comment #5
deanflory CreditAttribution: deanflory commentedYeah, finding this out the hard way. Any hints on how I can uninstall devel or what tables in the database will remove the fatal error? I'm not finding any way of doing this and I'm a noob so not sure where to look beyond tables with "devel" in the name.
Comment #6
salvisFrom the OP:
Set its value to 0 in the database to disable XHProf. Then go to the Modules page (admin/build/modules) to clear the caches if necessary.
Comment #7
deanflory CreditAttribution: deanflory commentedSo, I'm having to completely drop all tables in my database because of one mistyped character in the XHProf directory field. ARGH! There goes days of effort.
Comment #8
salvisIs that how you interpret #6? Maybe you want to read it again...
Comment #9
salvisAccording to #1278858-9: xhprof outputted file has the wrong format for latest version, we don't need to fix XHProf in D7+ anymore.
Here's a patch for D6.
Will we find any XHProf users to review this? and #1345240: Patch not to break xhprof reporting when site name contains spaces?
Comment #11
salvisHmm — from the testbot's log:
Comment #12
salvis#9: devel_validate_xhprof.1192362.7.patch queued for re-testing.
Comment #13
deanflory CreditAttribution: deanflory commentedSalvis, thanks for the info, didn't see your post (#6) before my next post due to not reloading the page.
Comment #14
moshe weitzman CreditAttribution: moshe weitzman commentedThis looks good to me.
Comment #15
salvis#9: devel_validate_xhprof.1192362.7.patch queued for re-testing.
EDIT: no point in requeueing...
Comment #17
salvisActually, I've applied and pushed this patch 6 days ago, I just forgot to mark this fixed...