The Path Alias Functionality test fails with php-fpm. I see 2 fails running with run-tests.sh and just one running using the web UI.

"Value NULL is TRUE."

There aren't any easy clues to what's going on here in the web UI or run-tests.sh so somebody will have to step through to understand it.

I do have a php-fpm testbot that can be used for debugging.

This blocks progress on php-fpm testbot #2135199: Provide php 5.4 testing on testbots for D8 code without breaking everything else

Comments

dawehner’s picture

In general this seems to be a problem with fpm/fastcgi_finish_request() and code running after that call.
This has been introduced in https://github.com/symfony/symfony/pull/1262 and reported as problem on http://stackoverflow.com/questions/14191947/php-fpm-fastcgi-finish-reque... and more important on https://github.com/symfony/symfony/issues/6417

rfay’s picture

That would seem to make it the exact same class of problem as the other D8 issue, #2157053: Ensure register_shutdown_function() works with php-fpm (blocks testbot php-fpm)

catch’s picture

Priority: Normal » Critical

Since this blocks PHP 5.4 testing, and I don't really want to release without 8.x automatically tested on 5.4, bumping to critical.

dawehner’s picture

alexpott’s picture

Status: Closed (duplicate) » Active

#2157053: Ensure register_shutdown_function() works with php-fpm (blocks testbot php-fpm) was about the way we were testing shutdown functions. I'm pretty sure this will still be a problem. Reading https://github.com/symfony/symfony/issues/6417

Not sure what we can do here :( Perhaps a very high priority terminate event listener to write the session?

sun’s picture

I'm pretty sure this will still be a problem.

D8 is green on PHP 5.4 now:

https://qa.drupal.org/pifr/test/600303#tabset-tab-4

So unless that test result is not using php-fpm, we should be fine?

alexpott’s picture

Just building a php-fpm environment... but I see no reason why our solution to #2157053: Ensure register_shutdown_function() works with php-fpm (blocks testbot php-fpm) would have solved this issue.

DeFr’s picture

StatusFileSize
new622 bytes

Pretty sure the patch in #2157053: Ensure register_shutdown_function() works with php-fpm (blocks testbot php-fpm) changed nothing for this issue. I don't think they're directly related to session handling either ; more probably they're related to a few race conditions just like the one that needed to be dealt with in #2157053: Ensure register_shutdown_function() works with php-fpm (blocks testbot php-fpm), checking the state of the system right after the request handed when there's still some processing going on ; that would explain why the test sometimes pass, sometimes doesn't pass. I can get the "Value NULL is TRUE" fail to reliably disappear using the attached test patch.

Locally, the test trying to use the full range of alias character is failing, and it does fail when using the UI too… Not completely sure what to do about that, I think it's related to server configuration. The unicode characters work fine, the special ASCII characters and the characters looking like a percent-espaced string don't.

DeFr’s picture

Let's add another datapoint that makes me thinks there might in fact something really strange with our url generation handling:

- Install a standard D8 site
- Create a new node, enter a?b as a url path alias
- You're redirect to a?b, which tries to load page a giving it query string b on FPM, which means you get a page not found. I guess it somehow works in mod_apache due to the two rewrite

And then for the really weird part
- Go to admin/config/search/path
- Click on the a?b alias
- At that point you're *correctly* redirected to a%3Fb, and you can thus access the node.

DeFr’s picture

Another update that will hopefully save some time for others looking into this ; alias with a ? in them are correctly dealt with when the url is generated through UrlGenerator::generateFromPath, but fails when it's generated through UrlGenerator::generateFromRoute. That's why the test and pretty much every thing linking to the node (like the homepage teaser list) is failing, but the path admin overview work.

berdir’s picture

D8 is green on PHP 5.4 now:

https://qa.drupal.org/pifr/test/600303#tabset-tab-4

So unless that test result is not using php-fpm, we should be fine?

It does not. We have reserved test servers for 5.4 and 5.5 tests right now, see the testbot list.

DeFr’s picture

Wondering how those aliases could work with PHP working as a module, I've made a few more investigations leading to... interesting findings. I would be grateful if anyone could confirm. In short: even though the Path alias functionnality is passing, in fact, trying to use either "a?b" or "- ._~!$'\"()*@[]?&+%#,;=:%23%25%26%2B%2F%3Féøïвβ中國書۞" in fact make the links not working, everything leading to page not found errors (The requested page "/a" could not be found)

Not sure why the test is passing ; I suspect Simpletest is somehow rewriting / encoding the URL, leading to a falsely passing test. Not sure either why this is not falsely passing in FPM yet.

sun’s picture

@DeFr: I'm able to confirm your observations regarding PathAliasTest — those assertions also do not pass for me when I run that test locally. I always assumed that it might be an issue with Apache 2.4, PHP 5.4, or something else in my local (Windows) environment... We should fix that test in a separate issue.

     $this->drupalPostForm('admin/config/search/path/add', $edit, t('Save'));
+    sleep(1);

So this is essentially the same fix as in #2194357: CacheArray::__destruct() invoked after test tables have been removed — the only difference is that it is applied after an (arbitrary) POST request.

I really wonder whether we shouldn't move the fix from #2194357 into the central HTTP request handling method WebTestBase::curlExec()?

50ms extra on every HTTP request to ensure that shutdown functions have run isn't the end of the world? You need to perform 20 requests to get a delay of 1s.

xjm’s picture

Title: Path Alias test fails on php-fpm (blocks testbot) » Path Alias test fails on php-fpm
Priority: Critical » Major

Discussed with @catch, @alexpott, @webchick, and @Dries. As far as we know this no longer is a blocker for testbot (which is already testing on 5.4), but would impact sites using php-fpm. Downgrading to major.

cilefen’s picture

Can someone familiar with php-fpm check whether this issue still exists now that we are on 5.5?

jhedstrom’s picture

I checked this on 5.6 with fpm, and it still fails.

catch’s picture

cilefen’s picture

@jhedstrom Thank you for testing.

valthebald’s picture

I am not sure how run-tests.sh is related to php-fpm? This script runs PHP in CLI mode, not in FPM mode.

To test is the issue exists, I have set up 2 web servers (using Debian 8.1 as a base system):

Apache 2.4 + PHP 5.6 built as a module (runs on port 80)
nginx 1.6.2 using PHP 5.6 as FPM gateway (runs on port 8080, FPM service uses unix socket)

Apache and nginx share exactly the same Drupal installation, all Path tests pass

as an additional check, I've run
php core/scripts/run-tests.sh Path
this one passes too

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

valthebald’s picture

Status: Active » Postponed (maintainer needs more info)

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

larowlan’s picture

Issue tags: +Bug Smash Initiative

As part of the Bug Smash Initiative I triaged this issue that hasn't been updated in 4 years.

Our testing infrastructure has changed dramatically since then.

I've pinged @xjm and @catch as to whether we can close this now.

larowlan’s picture

@xjm mentioned discussing with @mixologic, I will endeavour to do so.

larowlan’s picture

Title: Path Alias test fails on php-fpm » Run tests on php-fpm
Version: 8.9.x-dev » 9.1.x-dev
Component: path.module » phpunit
Category: Bug report » Task
Status: Postponed (maintainer needs more info) » Postponed

Discussed with @mixologic and he agreed that this is postponed on having fpm testing, which is #2949210: Drupalci Roadmap

So postponing on that and repurposing as a task to add fpm testing.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

kristen pol’s picture

Status: Postponed » Postponed (maintainer needs more info)

Triaging for Bug Smash Initiative.

Switching to PMNMI as I don't see fpm mentioned in #2949210: Drupalci Roadmap.

kristen pol’s picture

Status: Postponed (maintainer needs more info) » Postponed

Discussed with @mixologic in Slack and this is still postponed but on the GitLab Acceleration project:

https://www.drupal.org/drupalorg/roadmap/gitlab-acceleration

#3227737: [Meta] GitLab Acceleration Initiative

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.