Spin off from #2849674: Complex job in ViewExecutable::unserialize() causes data corruption and #2701829: Extension objects should not implement \Serializable, original test by @andypost

When adding a test for batched bulk updates using a View, seg faults occurred on the test bot when this got committed, see #2898721: Random segfault currently in FileFieldWidgetTest::testMultiValuedWidget()

The offending test was removed from the original issue since there was sufficient test coverage via a Kerneltest, but it would be worthwhile to add this coverage and discover why this would cause a seg fault on the test bot.

Extensive testing was done in #2879048: Ignore: patch testing issue for #2919863 from #57 onwards.

The right fix is probably being worked on in #2842393: Discover why gc_disable() improves update.php stability. Once that gets fixed we should work on getting the full batch test in.

CommentFileSizeAuthor
#5 interdiff-2-5.txt2.04 KBAnonymous (not verified)
#5 2900399-5.patch5.69 KBAnonymous (not verified)
#2 x20_2900399-2.patch6.16 KBAnonymous (not verified)
#2 2900399-2.patch5.67 KBAnonymous (not verified)

Comments

Lendude created an issue. See original summary.

Anonymous’s picture

Status: Postponed » Needs review
StatusFileSize
new5.67 KB
new6.16 KB

Unfortunately, we lost this random fail. So, reroll #2849674-76: Complex job in ViewExecutable::unserialize() causes data corruption interdiff-2849674-64-76.txt from Lendude.

Anonymous’s picture

Title: Adding test coverage for batch bulk updates triggers a seg fault on the testbot » Adding test coverage for batch bulk updates
Priority: Major » Normal

Don't credit me here. This is patch from @Lendude.

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.

Anonymous’s picture

Version: 8.5.x-dev » 8.6.x-dev
StatusFileSize
new5.69 KB
new2.04 KB

CS fix + replace deprecated code + update batch after #2401797: Introduce a batch builder class to make the batch API easier to use. One diff is remove checking about empty operations:
- if ($operations) {
Because it seems this extra checking. But if I'm wrong, it can be returned like:

$batch = $batch_builder->toArray();
if ($batch['operations']) {
  batch_set($batch);
}

See also #2921862-33: Segfault on PHP5.5 and PostgreSQL where it is further confirmed that this test action is not the cause of random fails.

Status: Needs review » Needs work

The last submitted patch, 5: 2900399-5.patch, failed testing. View results

Anonymous’s picture

Status: Needs work » Needs review

BatchBuilder only for 8.6.x :(

borisson_’s picture

Status: Needs review » Needs work

I found a really small nitpick, otherwise this patch looks great!

+++ b/core/modules/views/tests/src/Functional/UserBatchActionTest.php
@@ -0,0 +1,45 @@
+      $this->drupalPostForm(NULL, $edit, t('Apply to selected items'));

The t here is not needed, this test doesn't use translations.

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

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now 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.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.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.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

manuel garcia’s picture

Status: Needs work » Closed (outdated)

I believe this was already done as part of #2701829: Extension objects should not implement \Serializable no?