EBMS Tickets

Issue Number 315
Summary Internal Server Error
Created 2015-08-25 11:29:19
Issue Type Bug
Submitted By Shields, Victoria (NIH/NCI) [E]
Assigned To
Status Closed
Resolved 2019-08-28 09:35:10
Resolution Cannot Reproduce
Path /home/bkline/backups/jira/oceebms/issue.168441
Description

On Monday, Aug 24, I got an internal server error several times while working in the EBMS on PROD. The error appeared when I was trying to download the full text of a citation, when I clicked on the REPORTS menu, when I clicked on items in the ADMIN menu, when I tried to access the full citation information for a citation, and other times as well. Each time, if I used my back button and tried the link again, it worked. Later in the day, I did not get the error at all. I will try to attach a screen shot.

Comment entered 2015-08-25 14:03:40 by alan

There are some errors recorded in the Drupal error logs at 1:39, 3:48, 4:02 and 4:05. I don't know if these are the errors you (Victoria) encountered, but there is some information there that will help find problems.

I've also asked CBIIT to post copies of the web server and php error logs (WEBTEAM-6964). These may give us additional information.

I'll be going away for three weeks starting tomorrow. I don't know what I'll find before then, and there are other things I have to work on before I leave, but I will try to post something tonight about whatever I've learned.

I've added Bob as a watcher on this and the webteam issue though he'll be on vacation next week. But, hopefully, this problem is not stopping work. If it looks like it will, start shouting 🙂

Comment entered 2015-08-25 14:11:34 by Shields, Victoria (NIH/NCI) [E]

Thank you, Alan! Definitely not stopping any work. i just wanted to report it because I never know if these kinds of errors are harmless or the sign of an apocalypse.

Comment entered 2015-08-25 14:46:04 by alan

I think it was a bug, and I may have found it. In fact, there may be two of them.

I'll record what I found here in case we don't get to fix it right away and, with my precarious memory, I forget what I found.

The file /modules/custom/ebms/review.inc Includes this code in the validation routine named "pdq_ebms_edit_packet_form_validate()"

    $articles = $form_state['values']['articles'];
    foreach ($articles as $id => $val)
        if ($val)   //   BUG - What if no articles?
            $article_count++;
    $reviewers = $form_state['values']['reviewers'];
    foreach ($reviewers as $id => $val)
        if ($val)   //   BUG - What if no reviewers?
            $reviewer_count++;

I think the two lines marked with my comment "BUG - What if no ..." are where the errors are coming from. We need to test to be sure that there actually are articles or reviewers before executing the code marked BUG.

If this is right, the problem occurs when trying to get more information about a zero length list of articles or a zero length list of reviewers.

I'll set the status of this to "In Progress", but not do any more until we figure out when and how to make another EBMS release.

Comment entered 2015-08-25 14:56:49 by alan

Also for the record, the key that found the problem was in the watchdog log with a number of lines similar to what follows:

1440447567

php

%type: !message in %function (line %line of %file).

a:6:{s:5:"%type";s:7:"Warning";s:8:"!message";s:39:"Invalid argument supplied for foreach()";s:9:"%function";s:36:"pdq_ebms_edit_packet_form_validate()";s:5:"%file";s:79:"/local/content/web/appdev/sites/ebms.nci.nih.gov/modules/custom/ebms/review.inc";s:5:"%line";i:4489;s:14:"severity_level";i:4;}

I've got a copy of the log errors if ever need them in:
"/h1/alan/ebms/WatchdogLogForOCEEBMS-315.txt"

Comment entered 2015-08-25 16:11:07 by alan

Maybe I was too fast here. The errors I found are real and ought to be fixed, but they appear a lot of times in the log. It seems surprising for them not to be reported before this. So it's possible that there is something else involved.

Comment entered 2015-12-31 16:12:08 by alan

I have attached "WatchdogLogForOCEEBMS-315.txt" with the text of the log file as referenced in my comment of Tuesday, 25 Aug 2015 02:56 PM.

Comment entered 2015-12-31 16:17:43 by Kline, Bob (NIH/NCI) [C]

Siphoning off the bugs Alan found (which are not likely to be the cause of the failures Victoria encountered) to OCEEBMS-355. We won't do any further work on this original ticket (nor will we provide an LOE) unless the problems happen again. If this was not a transient problem, please note the times of the failures as closely as you can.

Comment entered 2018-02-16 08:06:54 by Kline, Bob (NIH/NCI) [C]

Should we close this ticket?

Comment entered 2019-08-28 09:34:23 by Kline, Bob (NIH/NCI) [C]

Closing ticket. Re-open if that's not right.

Attachments
File Name Posted User
internal server error.doc 2015-08-25 11:36:07 Shields, Victoria (NIH/NCI) [E]
WatchdogLogForOCEEBMS-315.txt 2015-12-31 16:12:08

Elapsed: 0:00:00.000477