Closed (fixed)
Project:
Project Issue File Review
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Nov 2011 at 17:43 UTC
Updated:
7 Mar 2012 at 04:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
jthorson commentedOnly hints I see in the testbot watchdog logs are a couple of undefined index errors, which I opened at #1347588: Undefined index watchdog thrown on testbot if test['vcs']['dependencies'] not defined. and #1347590: Undefined index: debug error in testbot watchdog logs.
Comment #2
jthorson commentedHappened on 659 tonight ...
Followed by ...
Then ...
And then ...
The last 6 logs were all on the same timestamp, which supports the suggestion that we have a race condition.
Comment #3
jthorson commentedLogs from the qa.drupal.org side show that the confirmation failed on a complete test, with 1 failure, on test 198: String translate, search and validate (LocaleTranslationFunctionalTest) [Locale] :
Logs from the qa.d.o side:
From http://qa.drupal.org/admin/reports/event/4334088:
Followed by
Looks a bit like the simpletest failure may have been related to our unnamed 'confirmation.patch' request. Will be interesting to see if future occurances are also preceeded by a failed test.
Comment #4
jthorson commentedNoted that after tonight's /tmpfs repairs, testbot 699 appeared to hang on 'install' during the reconfirmation for over an hour before I manually reset it ... may or may not be related to our other reconfirmation problems.
Comment #5
jthorson commentedOkay ... more troubleshooting, this time on qa.scratch.
Confirmation Stage 8 passes, followed by a Watchdog warning:
User warning: Duplicate entry '160024-1' for key 'PRIMARY' query: INSERT INTO pifr_environment_status (environment_id, test_id, client_id) VALUES (1, 160024, 694) in _db_query() (line 141 of /var/www/qa.scratch.drupal.org/htdocs/includes/database.mysqli.inc).followed by a 404 retrieving http://qa.scratch.drupal.org/confirmation/.patch. This is the testbot trying to download the file, but it has a bad filename.
The next log is what's returned from the testbot,
[@reason] => failed to retrieve [.patch] from [qa.scratch.drupal.org]... but contains a vital clue: we the following in the $test array:
Next steps: Determine what's writing that to the $test array, correct, and profit!
Edit: The primary key on that table is array(test_id, environment_id). The only other column is client_id.
Comment #6
jthorson commentedAnother confirmation failure:
(http://qa.drupal.org/admin/reports/event/4430523)
Comment #7
jthorson commentedMore logs (from the testbot side):
Notice: Undefined index: dependencies in pifr_client_review_pifr_simpletest->is_core_test() (line 244 of /var/lib/drupaltestbot/sites/all/modules/project_issue_file_review/review/simpletest/pifr_simpletest.client.inc).Warning: Invalid argument supplied for foreach() in pifr_client_review_pifr_simpletest->is_core_test() (line 244 of /var/lib/drupaltestbot/sites/all/modules/project_issue_file_review/review/simpletest/pifr_simpletest.client.inc).Notice: Undefined index: debug in pifr_client_review_pifr_simpletest->get_result() (line 310 of /var/lib/drupaltestbot/sites/all/modules/project_issue_file_review/review/simpletest/pifr_simpletest.client.inc).Notice: Undefined index: debug in pifr_client_review_pifr_simpletest->get_result() (line 310 of /var/lib/drupaltestbot/sites/all/modules/project_issue_file_review/review/simpletest/pifr_simpletest.client.inc).Comment #8
jthorson commentedAlso from testbot side:
When sending result, server responded: DeniedAttemt to start review while already running.Test results successfully sent: (t: 178979).Comment #9
jthorson commentedAnd just to throw a completely unrelated wrench into things:
Notice: Undefined index: in update_xml_parser->end() (line 256 of /var/lib/drupaltestbot/modules/update/update.fetch.inc).Repeated multiple times.Comment #10
jthorson commentedOkay ... as far as I can tell, this is caused by a race condition where the testbot's next() test request puts everything out of sync. I believe this may be happening due to the next() request being sent when it sends the previous test response to qa.d.o, and cron invoking a next() request within a small window of time where the 'pifr_client_test' variable is still not set ... i.e. in between the xmlrpc request being sent, and the response being received.
If this is correct, the attached patch introduces a 'pifr_client_request_next_lock' variable, which should prevent cron from invoking the xmlrpc_request_next() call a second time, while there is an existing one outstanding.
Comment #11
jthorson commented699 failed today, where it sent a next() request before actually sending the previous result.
I believe the next() was triggered by the cron run; and based on the code, that next() could potentially occur right in the middle of an existing send_result() call, if the send_result communication was somehow delayed.
To address this, I'd suggest moving the pifr_client_cron_clear_variables() call within pifr_client_review_run() so that it occurs after the send_result(), but before the request_next() ... this way, we ensure that if cron tries to runs during the xmlrpc send_result() call, pift_client_cron_is_busy() will still return true.
Comment #12
jthorson commentedPatch in 11 commited to 6.x-2.x (f6c9733).
Comment #13
jthorson commentedDeployed to testbots ... leaving in rtbc for now, to monitor for a few weeks before closing.
Comment #14
jthorson commentedThis appears to have done the trick.