php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80883 Assertion failure in Zend/zend_hash.c:731
Submitted: 2021-03-18 17:43 UTC Modified: 2021-03-19 10:21 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: chaz at chaz6 dot com Assigned:
Status: Open Package: JIT
PHP Version: 8.0.3 OS: Linux x86_64
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: chaz at chaz6 dot com
New email:
PHP Version: OS:

 

 [2021-03-18 17:43 UTC] chaz at chaz6 dot com
Description:
------------
Note there is a similar bug (https://bugs.php.net/bug.php?id=79785) but this was closed as a duplicate, as was the original, but this crash occurs with the latest stable version.

The error message:-

Zend/zend_hash.c:731: zval *_zend_hash_add_or_update_i(HashTable *, zend_string *, zval *, uint32_t): Assertion `(zend_gc_refcount(&(ht)->gc) == 1) || ((ht)->u.flags & (1<<6))' failed.

gdb backtrace:-

#0  0x00007ffff58353d7 in raise () from /lib64/libc.so.6
#1  0x00007ffff5836ac8 in abort () from /lib64/libc.so.6
#2  0x00007ffff582e1a6 in __assert_fail_base () from /lib64/libc.so.6
#3  0x00007ffff582e252 in __assert_fail () from /lib64/libc.so.6
#4  0x0000000000afcc04 in _zend_hash_add_or_update_i (ht=0x1637560 <zend_empty_array>, key=0x40240578, pData=0x1a20998 <executor_globals>, flag=8) at Zend/zend_hash.c:731
#5  0x0000000000afcb1a in zend_hash_add_new (ht=0x1637560 <zend_empty_array>, key=0x40240578, pData=0x1a20998 <executor_globals>) at Zend/zend_hash.c:911
#6  0x00007ffff377fc7d in zend_jit_hash_lookup_w (ht=0x1637560 <zend_empty_array>, str=0x40240578) at ext/opcache/jit/zend_jit_helpers.c:311
#7  0x00000000494fd8cc in ?? ()
#8  0x00007fffe64cdc00 in ?? ()
#9  0x0000000041058710 in ?? ()
#10 0x00007ffff3815880 in ?? ()
#11 0x0000000000000000 in ?? ()


Steps to reproduce:-

$ composer create-project drupal-composer/drupal-project:9.x-dev drupal-project --no-interaction
$ cd drupal-project/web
$ php core/scripts/drupal quick-start
 Select an installation profile [Install with commonly used features pre-configured.]:
  [standard  ] Install with commonly used features pre-configured.
  [minimal   ] Build a custom site without pre-configured functionality. Suitable for advanced users.
  [demo_umami] Install an example site that shows off some of Drupal’s capabilities.
 > demo_umami

 6/17 [▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░]
Set up database
php: /home/build/src/php-8.0.3/Zend/zend_hash.c:731: zval *_zend_hash_add_or_update_i(HashTable *, zend_string *, zval *, uint32_t): Assertion `(zend_gc_refcount(&(ht)->gc) == 1) || ((ht)->u.flags & (1<<6))' failed.
Aborted (core dumped)





Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-03-18 17:50 UTC] cmb@php.net
-Package: hash related +Package: JIT
 [2021-03-19 10:21 UTC] nikic@php.net
Is it possible to undo the result of the quick-start command, or does one have to create a new project every time?
 [2021-07-12 14:06 UTC] hao dot sun at arm dot com
Hi.

Previously I encountered the same bug, as filed in https://gist.github.com/shqking/51d92bf8cdcdf6f3aad24632b6f906e3#opcachejit1205

I remembered Dmitry has helped to fix this bug around this patch https://github.com/php/php-src/commit/ced8e884386267e485e37cfee5393e6b3b659ba2

Could you help to re-run your test case with the latest PHP code? Thanks.
 [2021-07-20 13:17 UTC] hao dot sun at arm dot com
Hi.

Similar bug is fixed today in https://bugs.php.net/bug.php?id=81272
Could you help to re-run your test with the latest code?

In my test environment, I failed when executing this command:
$ composer create-project drupal-composer/drupal-project:9.x-dev drupal-project --no-interaction

The error message is:
Problem 1
    - drupal/core-recommended[9.1.0-beta1, ..., 9.1.0-rc1] require laminas/laminas-diactoros 2.4.1 -> satisfiable by laminas/laminas-diactoros[2.4.1].
    - drupal/core-recommended 9.1.0-alpha1 requires doctrine/reflection 1.2.1 -> satisfiable by doctrine/reflection[1.2.1].
    - drupal/core-recommended[9.1.0-rc2, ..., 9.2.0-beta3] require laminas/laminas-escaper 2.7.0 -> satisfiable by laminas/laminas-escaper[2.7.0].
    - drupal/core-recommended[9.2.0-rc1, ..., 9.3.x-dev] require laminas/laminas-diactoros 2.6.0 -> satisfiable by laminas/laminas-diactoros[2.6.0].
    - laminas/laminas-diactoros 2.4.1 requires php ^7.1 -> your php version (8.1.0-dev) does not satisfy that requirement.
    - doctrine/reflection 1.2.1 requires php ^7.1 -> your php version (8.1.0-dev) does not satisfy that requirement.
    - laminas/laminas-escaper 2.7.0 requires php ^7.3 || ~8.0.0 -> your php version (8.1.0-dev) does not satisfy that requirement.
    - laminas/laminas-diactoros 2.6.0 requires php ^7.3 || ~8.0.0 -> your php version (8.1.0-dev) does not satisfy that requirement.
    - Root composer.json requires drupal/core-recommended ^9.1 -> satisfiable by drupal/core-recommended[9.1.0-alpha1, ..., 9.3.x-dev].
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Sep 19 06:03:36 2021 UTC