We've enabled testing of Drupal 8.0.x with SQLite 3.8.x in the DrupalCI interface. We're getting a small number of inconsistent failures exceptions that may benefit from extra eyes on the issue -- particularly eyes that helped reduce exceptions/failures @ http://d8sqlitebot.erwanderbar.de
Here are 3 SQLite DrupalCI runs which have failures associated:
https://dispatcher.drupalci.org/job/DCI_Run/17/
https://dispatcher.drupalci.org/job/DCI_Run/15/
https://dispatcher.drupalci.org/job/DCI_Run/14/
Job 17:
Drupal\views_ui\Tests\XssTest.testViewsUi()
Drupal\views_ui\Tests\XssTest.install_verify_database_ready()
Job 15:
Drupal\migrate_drupal\Tests\d6\MigrateUploadInstanceTest.testUploadFieldInstance()
Drupal\migrate_drupal\Tests\d6\MigrateUploadInstanceTest.Drupal\Core\Config\Testing\ConfigSchemaChecker->onConfigSave()
Drupal\search\Tests\SearchNodeUpdateAndDeletionTest.testSearchIndexUpdateOnNodeDeletion()
Drupal\search\Tests\SearchNodeUpdateAndDeletionTest.Drupal\Core\Config\PreExistingConfigException::create()
Drupal\system\Tests\Form\FormTest.testDisabledMarkup()
Drupal\system\Tests\Form\FormTest.install_verify_database_ready()
Drupal\system\Tests\Theme\ThemeSuggestionsAlterTest.testTemplateSuggestions()
Drupal\system\Tests\Theme\ThemeSuggestionsAlterTest.install_verify_database_ready()
Drupal\views\Tests\ViewExecutableTest.testGetHandlerTypes()
Drupal\views\Tests\ViewExecutableTest.Drupal\Core\Database\Schema->createTable()
Job 14:
Drupal\image\Tests\ImageEffectsTest.testResizeEffect()
Drupal\image\Tests\ImageEffectsTest.Drupal\Core\Database\Connection->handleQueryException()
Drupal\simpletest\Tests\SimpleTestBrowserTest.testTestingThroughUI()
Drupal\system\Tests\Installer\InstallerExistingSettingsNoProfileTest.testInstaller()
Drupal\system\Tests\Installer\InstallerExistingSettingsNoProfileTest.setUpLanguage()
Drupal\system\Tests\Installer\InstallerExistingSettingsNoProfileTest.setUpLanguage()
Drupal\system\Tests\Installer\InstallerExistingSettingsNoProfileTest.setUpLanguage()
Drupal\system\Tests\Installer\InstallerExistingSettingsNoProfileTest.setUpProfile()
Drupal\system\Tests\Installer\InstallerExistingSettingsNoProfileTest.setUpProfile()
Drupal\system\Tests\Installer\InstallerExistingSettingsNoProfileTest.setUpProfile()
Drupal\system\Tests\Installer\InstallerExistingSettingsNoProfileTest.setUpSite()
Drupal\system\Tests\Installer\InstallerExistingSettingsNoProfileTest.setUpSite()
Drupal\system\Tests\Installer\InstallerExistingSettingsNoProfileTest.setUpSite()
Drupal\system\Tests\Installer\InstallerExistingSettingsNoProfileTest.setUpSite()
Drupal\system\Tests\Installer\InstallerExistingSettingsNoProfileTest.setUpSite()
Drupal\system\Tests\Installer\InstallerExistingSettingsNoProfileTest.setUpSite()
Drupal\system\Tests\Installer\InstallerExistingSettingsNoProfileTest.setUpSite()
Drupal\system\Tests\Installer\InstallerExistingSettingsNoProfileTest.setUpSite()
Drupal\system\Tests\Installer\InstallerExistingSettingsNoProfileTest.Drupal\Core\Database\Connection->handleQueryException()
Drupal\update\Tests\UpdateDeleteFileIfStaleTest.testUpdateDeleteFileIfStale()
Drupal\update\Tests\UpdateDeleteFileIfStaleTest.install_verify_database_ready()
The full console text of Job 17 is available from https://dispatcher.drupalci.org/job/DCI_Run/17/consoleText and contains the environment variables and the resulting run-tests.sh command:
cd /var/www/html && sudo -u www-data php /var/www/html/core/scripts/run-tests.sh --xml /var/www/html/sites/simpletest/xml/17 --color --sqlite /var/www/html/results/simpletest.sqlite --concurrency 27 --php /opt/phpenv/shims/php --dburl sqlite://localhost/sites/default/files/db.sqlite --all
Comparing this with the output from http://d8sqlitebot.erwanderbar.de/archive/results_2015_06_18.txt it seems that sqlite is also consistently changing its number of exceptions.
Jenkins junit parsing treats exceptions as "failures" because the tests are not passing, the consoleText output from Jenkins appears to align closely with the console output I see from http://d8sqlitebot.erwanderbar.de/archive/results_2015_06_18.txt. This may mean there are issues with some of the tests and SQLite, or issues with order of operations.
Comment | File | Size | Author |
---|---|---|---|
#16 | drupalci-sqlite-test-run.txt | 374.16 KB | amateescu |
Comments
Comment #1
basic CreditAttribution: basic at Drupal Association commentedComment #2
basic CreditAttribution: basic at Drupal Association commentedComment #3
basic CreditAttribution: basic at Drupal Association commentedComment #4
bzrudi71 CreditAttribution: bzrudi71 commented@basic nice to see improvements in drupalCI testing :) I'm currently maintaining the bots at *.erwanderbar.de and yes the exceptions happen all over. I see the random exceptions also on PostgreSQL and MySQL too. So I think the problem here is that the exceptions may be caused by SQLite as results storage backend?
I think this is at least major, if not critical because of broken testing, so changing priority.
Comment #5
dawehnerAdding a tag.
Its great to have those problems uncovered as early as possible.
Comment #6
daffie CreditAttribution: daffie commentedI would really to like to help to fix this problem. The problem is that there is very little debug information to really know what is going wrong. Is there any way to get more debug information when there is an exception?
Comment #7
bzrudi71 CreditAttribution: bzrudi71 commented@daffie for the bots set the DCI_Verbose='true' variable. But that isn't very helpful because the output is always cut off :(
Comment #8
bzrudi71 CreditAttribution: bzrudi71 commentedI notice also random fails (not exceptions) in the Installer test group (happens every 2 or 3 days or so). Very bad and hard to debug :(
Comment #9
bzrudi71 CreditAttribution: bzrudi71 commentedNice! I finally managed to capture one random exception message. This is with SQLite as DB backend, here's what I got:
So the randoms seem to be cause by already existing table exceptions...
EDIT: I remember that we had to work around the exactly same problem in one of the failing PostgreSQL tests. Wish we had more progress within #2371709: Move the on-demand-table creation into the database API ;)
Related to #1551132: When trying to create a table that already exists but is empty, recreate the table rather than throwing a DatabaseSchemaObjectExistsException?
Comment #10
bzrudi71 CreditAttribution: bzrudi71 commented@basic now that XML output seems to work, can you please verify the random exceptions and see if they all fail for the same reason, e.g. schemaObjectExistsException?
Comment #11
bzrudi71 CreditAttribution: bzrudi71 commentedAnd another one, this is with PostgreSQL as database backed:
Comment #12
amateescu CreditAttribution: amateescu as a volunteer commentedI just posted a patch in #1120020-48: SQLite database locking errors cause fatal errors that I hope will help with these random fails on DrupalCI. @basic or @bzrudi71, do you think we can try a DrupalCI test run with that patch applied? I would do it locally but it takes around ~2h :/
Comment #13
bzrudi71 CreditAttribution: bzrudi71 commented@amateescu, PostgreSQL bot just finished and there are still random exceptions around :( Also a complete new fatal shows up:
Unfortunately I don't have more time to start an SQLite run today, sorry ;)
Comment #14
bzrudi71 CreditAttribution: bzrudi71 commentedSQLite bot is running but I already seen an exception :( I had a look at the latest runs on dispatcher.drupalci.org and there are many more exceptions than on my bot. I think the higher the concurrency, the higher the number of exceptions. DrupalCI runs with a concurrency of 27 while my bot runs with a concurrency of 6. What we learned so far is that all exceptions are caused by: already installed, already exist problems...
EDIT: Bot completed and here are the two exceptions:
and
Comment #15
amateescu CreditAttribution: amateescu as a volunteer commentedI posted another patch at #1713332-40: The SQLite database driver fails to drop simpletest tables which should fix the fails from #14. @bzrudi71, would you mind giving it another try with both patches applied? :)
Comment #16
amateescu CreditAttribution: amateescu for Pfizer, Inc. commentedHURRAY! I just finished a full test run on DrupalCI locally (PHP 5.5 + SQLite) with 100% pass rate!
Marking as 'needs review' for the two patches that were applied for the test run:
#1120020-48: SQLite database locking errors cause fatal errors
#1713332-40: The SQLite database driver fails to drop simpletest tables
Comment #17
bzrudi71 CreditAttribution: bzrudi71 commentedGREAT! Nice work @amateescu, especially #1713332: The SQLite database driver fails to drop simpletest tables makes totally sense! Bot is running with both patches applied. I'm out for a beer now and will report later or tomorrow :)
Comment #18
bzrudi71 CreditAttribution: bzrudi71 commentedWell, bot finished and there is not a single exception :) However, there seems to be a performance problem with the patches, as the test runtime doubled from 1h to 2h. Maybe my box was busy with some background work but we should at least do another run to make sure. Will do that later on today and report. @amateescu can start a run with just a single test group and check if the runtime differs as well for you?
Comment #19
bzrudi71 CreditAttribution: bzrudi71 commentedI was going to create a sister issue for PostgreSQL, but @isntall already opened #2524426: [meta] DrupalCI pgsql Random exceptions, fails, testbot issues.
Comment #20
amateescu CreditAttribution: amateescu for Pfizer, Inc. commentedThe runtime was the same for both runs I did locally, one with the patch from #1120020-48: SQLite database locking errors cause fatal errors and the second with both patches applied: 2h 50m :)
Comment #21
bzrudi71 CreditAttribution: bzrudi71 commentedYup, I just think you missed to test against HEAD without any patch applied :) To quickly confirm, I just ran the node test group and here are the results:
HEAD no patch:
HEAD with patch #1120020: SQLite database locking errors cause fatal errors applied:
So #1120020: SQLite database locking errors cause fatal errors seems to be problematic. Can you confirm :)
Comment #22
amateescu CreditAttribution: amateescu for Pfizer, Inc. commentedHm, I can't reproduce that performance problem..
HEAD no patch:
HEAD with #1120020-48: SQLite database locking errors cause fatal errors:
There is a slight increase but this is on my local and I was also doing other things while running the tests.
Can you also do a bot run with just #1713332-40: The SQLite database driver fails to drop simpletest tables applied and see if that one is enough to fix the random exceptions?
Comment #23
xjmComment #24
bzrudi71 CreditAttribution: bzrudi71 commentedBot just finished with patch #1713332: The SQLite database driver fails to drop simpletest tables applied only (seems we need both):
I really like to investigate the problem with #1120020: SQLite database locking errors cause fatal errors but sadly I don't have much time. So if it works for you let's get both in and see I think :)
Comment #25
bzrudi71 CreditAttribution: bzrudi71 commentedAs a last action for today I looked at the build stats of drupalCI and the UncaughtExceptionTest() seems to fail completely on drupalCI (Introduced by #2509898: Additional uncaught exception thrown while handling exception after service changes). So it seems we should only get #1713332: The SQLite database driver fails to drop simpletest tables in as a first step?
BTW @basic/@isntall it seems drupalCI does not catch/count exceptions, all/most builds are listed with 'SUCCESS' status even if there are exceptions around.
Comment #26
amateescu CreditAttribution: amateescu for Pfizer, Inc. commented@bzrudi71, that sounds like a good plan, get #1713332: The SQLite database driver fails to drop simpletest tables in and then do more benchmarks with the other one and see if it's really needed or not :) Of course.. someone still needs to review/RTBC it though :P
Comment #27
basic CreditAttribution: basic at Drupal Association commented@bzrudi71 DrupalCI / Jenkins JUnit parser should catch exceptions and failures but will mark them both as "fails" because it is not a pass.
@Mixologic and @isntall can expand, this looks like great work and something we should be able to test on the DrupalCI bots relatively easily.
Comment #28
isntall CreditAttribution: isntall at Drupal Association commentedI ran the patch from #1120020-48: SQLite database locking errors cause fatal errors twice on a DCI testrunner and it took about 3 hours each time.
Here are the
https://dispatcher.drupalci.org/job/php5.5_sqlite3.8/16/
https://dispatcher.drupalci.org/job/php5.5_sqlite3.8/17/
Run 17 says that there were no failures, but there was a failure at the 17:43:10 time marker
https://dispatcher.drupalci.org/job/php5.5_sqlite3.8/17/consoleFull
Comment #29
amateescu CreditAttribution: amateescu for Pfizer, Inc. commented@isntall, yeah, 3h is a long time given that a recent DrupalCI run finished in 32 minutes for MySQL (https://dispatcher.drupalci.org/job/php5.5_mysql5.5/20/console).
Anyway, the patch that is supposed to fix the random exceptions is #1713332-40: The SQLite database driver fails to drop simpletest tables, could you run that one as well a couple of times?
Comment #30
isntall CreditAttribution: isntall at Drupal Association commented@amateescu that patch, #1713332-40: The SQLite database driver fails to drop simpletest tables, seemed to work well.
36 minutes is a much better time.
Comment #31
xjm@catch suggested we might be able to work around this and #2524426: [meta] DrupalCI pgsql Random exceptions, fails, testbot issues by at least temporarily using single concurrency for the SQLite and Postgres builds, which could be acceptable since these test suites mostly only run nightly. Is that an option to get more reliable results from DrupalCI until any other issues are resolved?
Comment #32
webchickTagging.
Comment #33
Mixologic@xjm I can dial both of the daily branch test jenkins jobs' concurrency down to 1, however patches will still run against the multi concurrent bots as those are not separated out by environment. So if a regression *does* happen, it'll be difficult to fix that regression as the random failures will return.
Comment #34
amateescu CreditAttribution: amateescu for Pfizer, Inc. commentedConcurrency is not the problem for SQLite, the issue is poor randomness of simpletest test ids, as proven by #1713332: The SQLite database driver fails to drop simpletest tables.
In fact, since we already know what the problem is and we have a patch that works but needs a bit more work, I think we can just postpone this issue on the one mentioned above.
Comment #35
webchickThat one got committed, but looks like we still have SQLite fails: https://www.drupal.org/pift-ci-job/19661 (Not sure if they're random or not.)
Comment #36
amateescu CreditAttribution: amateescu for Pfizer, Inc. commentedThat's because the patch was committed *after* the daily branch test run on sqlite. I'm pretty sure I'm going to lose my mind if the test results from today are not fully green :)
Comment #37
amateescu CreditAttribution: amateescu for Pfizer, Inc. commentedThere we go, first green result!! https://www.drupal.org/pift-ci-job/20095
Comment #38
webchickAWESOME! Thanks, amateescu!