Bug #80883 [Com]: Assertion failure in Zend/zend_hash.c:731

From: Date: Tue, 20 Jul 2021 13:17:48 +0000
Subject: Bug #80883 [Com]: Assertion failure in Zend/zend_hash.c:731
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-235213@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80883&edit=1

 ID:                 80883
 Comment by:         hao dot sun at arm dot com
 Reported by:        chaz at chaz6 dot com
 Summary:            Assertion failure in Zend/zend_hash.c:731
 Status:             Open
 Type:               Bug
 Package:            JIT
 Operating System:   Linux x86_64
 PHP Version:        8.0.3
 Block user comment: N
 Private report:     N

 New Comment:

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].


Previous Comments:
------------------------------------------------------------------------
[2021-07-12 14:06:47] 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-03-19 10:21:51] 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-03-18 17:43:01] 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)






------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=80883&edit=1


Thread (6 messages)

« previous php.bugs (#235213) next »