Problem/Motivation
https://www.drupal.org/pift-ci-job/632446 is failing intermittently.
https://www.drupal.org/pift-ci-job/597238
https://www.drupal.org/pift-ci-job/615344
Etc.
exception: [Other] Line 0 of sites/default/files/simpletest/phpunit-6.xml:
PHPunit Test failed to complete; Error: PHPUnit 4.8.35 by Sebastian Bergmann and contributors.
E
Time: 9.83 seconds, Memory: 3.25MB
There was 1 error:
1) Drupal\Tests\inline_form_errors\FunctionalJavascript\FormErrorHandlerCKEditorTest::testFragmentLink
PHPUnit_Framework_Exception: Fatal error: Call to a member function isVisible() on null in /var/www/html/core/modules/inline_form_errors/tests/src/FunctionalJavascript/FormErrorHandlerCKEditorTest.php on line 103
Caused by
exception 'ErrorException' with message 'unserialize(): Error at offset 0 of 185 bytes' in /var/www/html/vendor/phpunit/phpunit/src/Util/PHP.php:114
Stack trace:
#0 [internal function]: PHPUnit_Util_PHP->{closure}(8, 'unserialize(): ...', '/var/www/html/v...', 114, Array)
#1 /var/www/html/vendor/phpunit/phpunit/src/Util/PHP.php(114): unserialize('\nFatal error: C...')
#2 /var/www/html/vendor/phpunit/phpunit/src/Util/PHP.php(52): PHPUnit_Util_PHP->processChildResult(Object(Drupal\Tests\inline_form_errors\FunctionalJavascript\FormErrorHandlerCKEditorTest), Object(PHPUnit_Framework_TestResult), '\nFatal error: C...', '')
#3 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestCase.php(722): PHPUnit_Util_PHP->runTestJob('
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | c20170415_125033.png | 74.13 KB | droplet |
| #18 | random_failure_in-2864177-8.patch | 1.28 KB | xjm |
| #17 | ckeditor-400-PASS.patch | 1.9 KB | xjm |
| #15 | ckeditor-400-FAIL.patch | 628 bytes | xjm |
| #14 | ckeditor-200-FAIL.patch | 628 bytes | xjm |
Comments
Comment #2
xjmLooks like this test has failed more than 10 times in HEAD over the past month in both branches, starting as far back as Feb. 12 at least:
https://www.drupal.org/pift-ci-job/597238
https://www.drupal.org/pift-ci-job/615344
etc.
Comment #3
droplet commentedQuick patch to see if it works.
Comment #5
droplet commentedComment #7
droplet commentedOuch. I made a simple stupid mistake
Comment #8
droplet commentedCool. It works. Full patch.
Comment #9
lendudeThe failure rate doesn't seem to be very high so is running this 25 times enough to make us confident we have a fix?
Fix is a little surprising, since the error link is rendered on page load, why would you ever need to wait for it? Am I missing something?
Comment #10
wim leersI've seen this random fail quite often lately.
Comment #11
droplet commented@Lendude,
this is enough. I triggered more tests.
I guess there's a hidden problem on this line.
I'd suggest to commit #8 first and do further debugging soon.
Comment #13
droplet commentedComment #14
xjmThat's not enough test runs, actually. That's only 325 test runs and this is probably on the order of 1/1000 fail. (Even if it were 1/100, 325 runs is not enough to conclusively demonstrate a fix.)
What we need to do is have a patch that has only the repeated test runs, to try to prove the number of test runs is high enough to catch the random fail when combined with the fix. I know the JS tests take a long time so there's a risk of timing out. These patches are just a starter to see if 100 or 200 test runs will complete. Based on that, we can then queue enough runs to prove it will fail for the patch that completes, and then combine that with @droplet's fix to demonstrate the fix is actually fixing.
Comment #15
xjm200 ran in 30 mins on PHP 5.6, so looks like we can dial that up. If this one completes, then we run it against PHP7/MySQL 5.5 lots of times. (Running against other DBs is not necessary here.)
Comment #16
xjmSo the fact that the 400-run test passed demonstrated that 325 runs is not enough to demonstrate a fix.
I've queued the 400-run test-only patch many times. If none of them fail, then there are other factors influencing the fail rate (i.e. it's not just random) and so having multiple runs does not demonstrate coverage by itself anyway.
Comment #17
xjmOkay, there we go. So now we combine that count with @droplet's fix to demonstrate whether it's fixing it.
Comment #18
xjmHooray, looking good so far. So here's @droplet's full patch again, and RTBC assuming none of the remaining runs in #17 show the fail.
Comment #19
droplet commentedI've checked the latest error log and I can't identify what problem that is.
Page seems loaded but there's a different log:

However, the next line is executed and no errors:
the error message HTML is rendered before title field.
and the next different part is:
I guess that the CKEDITOR is not fully initialized. It's similar to #2843693: Random test failure in CKEditor AjaxCss. But, it can't explain why it will blocking the message checking.
So far, unless there's a hidden bug. The patch provided by me still the way to fix above 2 loading issues.
Thanks All.
Comment #20
alexpottCommitted and pushed 9a63547 to 8.4.x and 7e39aca to 8.3.x. Thanks!
Comment #23
lendudeI'm happy to see this in, but I'm not happy that we haven't figured out why this is necessary. The need for waiting for a non-dynamic element to appear on page load feels weird, and I'd like to know when we would need to do this in other/future tests so we don't run into this again and again.
Or am I missing something obvious?
Comment #25
xjm@Lendude, best to file a followup issue? I know there was a discussion in Baltimore that I missed.
Moving the parent and fix issues to keep the list clean. Thanks!