Problem/Motivation

There's 1 test Drupal\Tests\file\FunctionalJavascript\MaximumFileSizeExceededUploadTest hangs using generateFile() so skipped, should wait for alpha 3

Steps to reproduce

run this tests using PHP 8.3, there's docker container image used in CI docker pull drupalci/php-8.3-apache:production

Proposed resolution

Fix upcoming test failures until 8.3 is released

List of active blockers
- #3368789: Fix MaximumFileSizeExceededUploadTest test for PHP 8.3

Already fixed
- #3366288: Add [#\ReturnTypeWillChange] attribute to TemporaryArrayObjectThrowingExceptions for PHP 8.3 compatibility

Remaining tasks

patch/review/commit

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3366843

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

andypost created an issue. See original summary.

andypost’s picture

Very probably this is a cause of CI which is unable to return results (I bet parsing fails for the same reason)

Ref https://dispatcher.drupalci.org/job/drupal_patches/187212

05:25:02 Drupal\Tests\system\FunctionalJavascript\ModuleFilterTest      1 passes                                      
05:25:11 Drupal\Tests\media\FunctionalJavascript\MediaEmbedFilterConf  22 passes                                      
05:25:32 Build timed out (after 110 minutes). Marking the build as aborted.
05:25:53 Build was aborted
06:40:22 Archiving artifacts
06:40:22 /opt/drupalci/testrunner/jenkins.sh: line 36: 32704 Terminated
andypost’s picture

Priority: Normal » Critical

I bet it's critical

andypost’s picture

New failures from https://www.drupal.org/pift-ci-job/2693255

Testing Drupal\Tests\migrate_drupal_ui\Functional\d6\Upgrade6TestWithContentModeration
E                                                                   1 / 1 (100%)

Time: 00:19.494, Memory: 4.00 MB

There was 1 error:

1) Drupal\Tests\migrate_drupal_ui\Functional\d6\Upgrade6TestWithContentModeration::testUpgradeAndIncremental
LogicException: Missing bundle entity, entity type node_type, entity id forum.

/var/www/html/core/lib/Drupal/Core/Entity/EntityType.php:877
/var/www/html/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php:241
/var/www/html/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:71
/var/www/html/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:89
/var/www/html/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:381
/var/www/html/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:321
/var/www/html/core/modules/workflows/src/Entity/Workflow.php:114
/var/www/html/core/lib/Drupal/Core/Entity/EntityStorageBase.php:528
/var/www/html/core/lib/Drupal/Core/Entity/EntityStorageBase.php:483
/var/www/html/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php:257
/var/www/html/core/lib/Drupal/Core/Entity/EntityBase.php:339
/var/www/html/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:609
/var/www/html/core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6TestWithContentModeration.php:48
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:728

ERRORS!
Tests: 1, Assertions: 8, Errors: 1.

.......

Testing Drupal\Tests\migrate_drupal_ui\Functional\d7\Upgrade7TestWithContentModeration
E                                                                   1 / 1 (100%)

Time: 00:21.898, Memory: 4.00 MB

There was 1 error:

1) Drupal\Tests\migrate_drupal_ui\Functional\d7\Upgrade7TestWithContentModeration::testUpgradeAndIncremental
LogicException: Missing bundle entity, entity type node_type, entity id forum.

/var/www/html/core/lib/Drupal/Core/Entity/EntityType.php:877
/var/www/html/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php:241
/var/www/html/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:71
/var/www/html/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:89
/var/www/html/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:381
/var/www/html/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:321
/var/www/html/core/modules/workflows/src/Entity/Workflow.php:114
/var/www/html/core/lib/Drupal/Core/Entity/EntityStorageBase.php:528
/var/www/html/core/lib/Drupal/Core/Entity/EntityStorageBase.php:483
/var/www/html/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php:257
/var/www/html/core/lib/Drupal/Core/Entity/EntityBase.php:339
/var/www/html/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:609
/var/www/html/core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7TestWithContentModeration.php:48
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:728

ERRORS!
Tests: 1, Assertions: 7, Errors: 1.
longwave’s picture

@andypost #4 was caused by #3052115: Mark an entity as 'syncing' during a migration update, this is now reverted.

andypost’s picture

Reported upstream with simplified script https://github.com/php/php-src/issues/11469

andypost’s picture

andypost’s picture

andypost’s picture

The proposed BC code is https://github.com/php/php-src/issues/11469#issuecomment-1597866217

function setNodeValue($attrNode, $value) {
    $attrNode->nodeValue = '';
    $attrNode->appendChild(new \DOMText($value));
}

tstarling made their first commit to this issue’s fork.

tstarling’s picture

I added a a more specific workaround to the issue fork.

andypost’s picture

@tstarling please create a MR from the issue fork, I did approve your account

Ref https://git.drupalcode.org/issue/drupal-3366843/-/commit/236f508df0de7f4...

andypost’s picture

Status: Active » Needs review
andypost’s picture

andypost’s picture

Tests are passed now but parsing artifacts fails, so this fix is not enough to allow CI to complete

03:09:24 Drupal\Tests\media\FunctionalJavascript\MediaEmbedFilterConf  22 passes                                      
03:10:06 Build timed out (after 110 minutes). Marking the build as aborted.
03:10:09 Build was aborted
04:26:16 Archiving artifacts
04:26:16 /opt/drupalci/testrunner/jenkins.sh: line 36:  3720 Terminated              ./drupalci run /var/lib/drupalci/workspace/builds/build.yml

This log means tests are stuck on parsing results

smustgrave’s picture

Status: Needs review » Needs work

Since the tests are still failing.

andypost’s picture

Looking at logs I see that parser fails on new tests that were not executed, ref #3346765: Add PerformanceTestBase for allowing browser performance assertions within FunctionalJavaScriptTests

PHP Notice: Undefined index: Drupal\Tests\system\FunctionalJavaScript\NoJavaScriptAnonymousTest in /opt/drupalci/testrunner/src/DrupalCI/Build/Artifact/Junit/JunitXmlBuilder.php on line 82

andypost’s picture

StatusFileSize
new611 bytes

Composer namespaces are case sensitive

andypost’s picture

Locally unable to reproduce but on runner it hangs finishing simpletest_script_execute_batch() probably some process hangs

andypost’s picture

andypost’s picture

StatusFileSize
new1.08 KB
new1.1 KB
andypost’s picture

StatusFileSize
new1.36 KB
andypost’s picture

StatusFileSize
new1.72 KB
andypost’s picture

StatusFileSize
new2.32 KB
05:25:59 sudo -u www-data php /var/www/html/core/scripts/run-tests.sh --list > /var/lib/drupalci/workdir/run_tests.javascript/testgroups.txt
05:26:00 PHP Notice:  Undefined variable: composer_root in /opt/drupalci/testrunner/src/DrupalCI/Plugin/BuildTask/BuildStep/Testing/RunTests.php on line 162

which mean the first condition fails

     if (($this->codebase->getProjectType() == 'core') && (!empty($this->codebase->getProjectTargetBranch()))) {
      $composer_root = "COMPOSER_ROOT_VERSION={$this->codebase->getProjectTargetBranch()}.dev ";
    }

    $environment_variables = $composer_root . 'MINK_DRIVER_ARGS_WEBDRIVER=\'["chrome", {"browserName":"chrome","chromeOptions":{"args":["--disable-gpu","--headless"]}}, "http://' . $this->environment->getChromeContainerHostname() . ':9515"]\'';
andypost’s picture

StatusFileSize
new2.35 KB

still hangs, probably some test result parsing stucks

andypost’s picture

StatusFileSize
new2.3 KB

The test Drupal\Tests\file\FunctionalJavascript\MaximumFileSizeExceededUploadTest is missing in ci-run

andypost’s picture

StatusFileSize
new781 bytes

skip it now

andypost’s picture

Issue summary: View changes

updated IS

joseph.olstad’s picture

@andypost, have you been able to run these tests locally with PHP 8.3-alpha2 and compared the results vs the d.o ci ?

andypost’s picture

@joseph.olstad yes, the same test hangs even after replacing Apache with nginx-unit

andypost’s picture

Issue summary: View changes
StatusFileSize
new260.18 KB

strace shows something strange to me

andypost’s picture

Issue summary: View changes

reverted IS fix

longwave’s picture

@andypost does that trace happen before or during the file upload, ie. in

    $page->attachFileToField("files[field_file_0]", $this->fileSystem->realpath($invalid_file));

Maybe there is a new bug in PHP 8.3 when post_max_size is exceeded? There are some changes around stack overflow handling and perhaps some changes around out of memory conditions as well: https://stitcher.io/blog/new-in-php-83#stack-overflow-detection-pr

andypost’s picture

It's caused by generateFile() which is very slow with each iteration but no before https://3v4l.org/WciJK#v8.2.7

andypost’s picture

andypost’s picture

andypost’s picture

Issue summary: View changes

updated IS

andypost’s picture

andypost’s picture

@shiv_tech chatgpt is not helpful here yet

gisle’s picture

As site moderator, I've deleted comment #40 by user shiv_tech.

It was obviously AI generated content and served no useful purpose.

andypost’s picture

andypost’s picture

andypost’s picture

andypost’s picture

Status: Needs work » Closed (cannot reproduce)

As #3375693: Fix deprecated assert_options() function usage for PHP 8.3 commited, all tests are pass, any new regressions could use new issues with PHP 8.3 tag