On our hosting environment, when running this test, we get a "preg_split()" unknown error notice in the CommentToggle test:
GET http://simpletest.gardens-simpletest.acquia-sites.com/ returned 200 (7.84 KB). Browser search.test 1058 SearchCommentCountToggleTestCase->testSearchCommentCountToggle()
Valid HTML found on "http://simpletest.gardens-simpletest.acquia-sites.com/" Browser search.test 1058 SearchCommentCountToggleTestCase->testSearchCommentCountToggle()
Verbose message Debug search.test 1058 SearchCommentCountToggleTestCase->testSearchCommentCountToggle()
preg_split() [function.preg-split]: Unknown error Notice search.module 1306 search_simplify_excerpt_match()

I am unable to determine what the root cause is. it isn't a segfault so strace doesn't provide any more information. We just get Notice: preg_split(0 unknown error in the simpletest results. The tests otherwise pass, but it makes our greenboard look red :(

I did find this potentially related bug:
http://www.mail-archive.com/php-bugs@lists.php.net/msg103869.html

If I make the change in the attached path, it works fine changing the single quotes to double quotes. Not sure why there are quotes there in the first place though.

Comments

pwolanin’s picture

looks mostly harmless, but the last change doesn't follow the pattern of the changes to the other strings.

JacobSingh’s picture

Status: Active » Needs review

Yeah, since there is no space, I figured there was no point in having any quotes there.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Very odd. This PHP bug (if that's what it is) is not cropping up on the d.o test servers, but all that would mean is that they are running a different version of PHP from what you are running.

The test bot appears to be happy with the changes you have made. I can't see a reason that the tests are any less valid with single vs. double quotes in the first three cases, or why we needed quotes at all in the last case, so let's just get this in if it gets around some strange PHP issue on Jacob's test environment.

JacobSingh’s picture

Acquia hosting uses a hardened version of PHP which detects memory corruption. So sometimes bugs in PHP which go undetected in "normal" builds can throw notices or even worse segfaults there.

Thanks for the prompt review! You're a star as always.

jhodgdon’s picture

Version: 7.x-dev » 8.x-dev

Needs to go to d8 and then d7

damien tournoud’s picture

Status: Reviewed & tested by the community » Needs work

Hm. I don't see the point in hiding a real bug under the carpet? The tests do not pass on your environment, but it doesn't seem to be a bug in the tests. Fix the environment, not the tests, please.

JacobSingh’s picture

Do we explicitly state somewhere that the tests should work in "xyz" environments, but not "abc"? There should be a list of supported platforms, but I don't know where it is. What I do know is that the version of PHP Acquia Hosting uses is not from php.net, but is very widely used and comes as a .deb in Ubuntu. Whether that means that it is a "broken environment" or not is not my call (I'm not sure who's it is). At any rate, the patch fixes it for everyone and AFAICT does no harm.

I'll have Barry Jaspan (architect of Acquia Managed Cloud) comment with the specifics.

pwolanin’s picture

Status: Needs work » Needs review

@DamZ if the change *should* be a no-op for any environment, but happens to work around a bug in PHP 5.2.4 (which is supported for Drupal 7 at least, and hence all tests should pass on it), I don't understand why this is unacceptable.

damien tournoud’s picture

Status: Needs review » Needs work

It seems that the issue is inside the search module (in search_simplify_excerpt_match()), and could be triggered by an end-user in production.

Having a workaround in search_simplify_excerpt_match() for broken versions of PHP (or probably more likely broken versions of the PCRE lib) would be totally acceptable. What is not acceptable is changing the test to hide the bug under the carpet, which is what this patch does.

pwolanin’s picture

ok, thanks for clarifying.

jhodgdon’s picture

I disagree. I think this is an artifact of the SimpleTest system's form submission interacting with a strange PHP bug, and I am reasonably certain it cannot be triggered from a normal user form submission in a Drupal site. Jacob: perhaps you can verify that single and double quotes don't trigger a similar error when using the Search functionality on your test box where you get this testing error?

damien tournoud’s picture

I disagree. I think this is an artifact of the SimpleTest system's form submission interacting with a strange PHP bug, and I am reasonably certain it cannot be triggered from a normal user form submission in a Drupal site

If this is the case, we need to get to the bottom of it and understand which "strange PHP bug" this is an why this is only triggered under SimpleTest. But from the limited debug information provided in the original post, it seems that the notice is triggered in the child site, not on the parent site.

jhedstrom’s picture

Issue summary: View changes
Status: Needs work » Postponed (maintainer needs more info)

It's been quite some time here. Is this still relevant to 8.x with our updated php requirements? If not, it may still effect 7.x.

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.

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.

pameeela’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
Issue tags: +Bug Smash Initiative

Thanks for reporting this. It looks like we haven't been able to reproduce this issue since before the release of Drupal 7. It also seems to have involved:

  1. SimpleTest, which is no longer supported in Drupal 9.
  2. PHP 5.2, which even Drupal 7 no longer supports
  3. Possibly specific issues with Gardens infrastructure.

Based on that, I think it is safe to close this issue. If a similar error is encountered in the future, I would recommend filing a new issue rather than reopening this one.

Thanks!