Skip to content

Loading…

DDC-3251: Segmentation fault in ClassMetadataInfo.php #4040

Open
doctrinebot opened this Issue · 5 comments

2 participants

@doctrinebot

Jira issue originally created by user kparaju:

I'm seeing a segfault when doing a EntityManager->merge(). Specifically, when on this line in ClassmetadataInfo.php. Details below.

$value = $this->reflFields[$this->identifier[0]]->getValue($entity);

/var/log/messages

Aug 12 08:39:01 dev1 kernel: [62152.629221] php[3539]: segfault at f434172bd1 ip 00007ff432c3aae9 sp 00007fffa060b1b0 error 4 in php[7ff4329e7000<ins>38c000]

strace

--- SIGSEGV {si*signo=SIGSEGV, si_code=SEGV_MAPERR, si*addr=0xc4f1053d11} ---
</ins><ins></ins> killed by SIGSEGV <ins></ins>

gdb backtrace:

(gdb) bt
#0  0x00007f8c8f5ceae9 in zend*std_read*property ()
#1  0x00007f8c8f5b61d7 in zend*read*property ()
#2  0x00007f8c8f4ab66e in zim*reflection_property*getValue ()
#3  0x00007f8c8f59a4ab in dtrace*execute*internal ()
#4  0x00007f8c8abb9a46 in xdebug*execute*internal () from /usr/lib64/php/modules/xdebug.so
#5  0x00007f8c8f65a895 in zend*do_fcall_common_helper*SPEC ()
#6  0x00007f8c8f5d45c8 in execute_ex ()
#7  0x00007f8c8f59a3a9 in dtrace*execute*ex ()
#8  0x00007f8c8abb8fcc in xdebug*execute*ex () from /usr/lib64/php/modules/xdebug.so
#9  0x00007f8c8f65aee0 in zend*do_fcall_common_helper*SPEC ()
#10 0x00007f8c8f5d45c8 in execute_ex ()
#11 0x00007f8c8f59a3a9 in dtrace*execute*ex ()
#12 0x00007f8c8abb8fcc in xdebug*execute*ex () from /usr/lib64/php/modules/xdebug.so
#13 0x00007f8c8f65aee0 in zend*do_fcall_common_helper*SPEC ()
#14 0x00007f8c8f5d45c8 in execute_ex ()
#15 0x00007f8c8f59a3a9 in dtrace*execute*ex ()
#16 0x00007f8c8abb8fcc in xdebug*execute*ex () from /usr/lib64/php/modules/xdebug.so
#17 0x00007f8c8f65aee0 in zend*do_fcall_common_helper*SPEC ()
#18 0x00007f8c8f5d45c8 in execute_ex ()
#19 0x00007f8c8f59a3a9 in dtrace*execute*ex ()
#20 0x00007f8c8abb8fcc in xdebug*execute*ex () from /usr/lib64/php/modules/xdebug.so
#21 0x00007f8c8f65aee0 in zend*do_fcall_common_helper*SPEC ()
#22 0x00007f8c8f5d45c8 in execute_ex ()
#23 0x00007f8c8f59a3a9 in dtrace*execute*ex ()
#24 0x00007f8c8abb8fcc in xdebug*execute*ex () from /usr/lib64/php/modules/xdebug.so
#25 0x00007f8c8f65aee0 in zend*do_fcall_common_helper*SPEC ()
#26 0x00007f8c8f5d45c8 in execute_ex ()
#27 0x00007f8c8f59a3a9 in dtrace*execute*ex ()
#28 0x00007f8c8abb8fcc in xdebug*execute*ex () from /usr/lib64/php/modules/xdebug.so
#29 0x00007f8c8f65aee0 in zend*do_fcall_common_helper*SPEC ()
#30 0x00007f8c8f5d45c8 in execute_ex ()
#31 0x00007f8c8f59a3a9 in dtrace*execute*ex ()
#32 0x00007f8c8abb8fcc in xdebug*execute*ex () from /usr/lib64/php/modules/xdebug.so
#33 0x00007f8c8f65aee0 in zend*do_fcall_common_helper*SPEC ()
#34 0x00007f8c8f5d45c8 in execute_ex ()
#35 0x00007f8c8f59a3a9 in dtrace*execute*ex ()
#36 0x00007f8c8abb8fcc in xdebug*execute*ex () from /usr/lib64/php/modules/xdebug.so
#37 0x00007f8c8f65aee0 in zend*do_fcall_common_helper*SPEC ()
#38 0x00007f8c8f5d45c8 in execute_ex ()
#39 0x00007f8c8f59a3a9 in dtrace*execute*ex ()
#40 0x00007f8c8abb8fcc in xdebug*execute*ex () from /usr/lib64/php/modules/xdebug.so
#41 0x00007f8c8f659852 in ZEND*INCLUDE_OR_EVAL_SPEC_VAR*HANDLER ()
#42 0x00007f8c8f5d45c8 in execute_ex ()
#43 0x00007f8c8f59a3a9 in dtrace*execute*ex ()
#44 0x00007f8c8abb8fcc in xdebug*execute*ex () from /usr/lib64/php/modules/xdebug.so
#45 0x00007f8c8f65aee0 in zend*do_fcall_common_helper*SPEC ()
#46 0x00007f8c8f5d45c8 in execute_ex ()
#47 0x00007f8c8f59a3a9 in dtrace*execute*ex ()
#48 0x00007f8c8abb8fcc in xdebug*execute*ex () from /usr/lib64/php/modules/xdebug.so
#49 0x00007f8c8f65aee0 in zend*do_fcall_common_helper*SPEC ()
#50 0x00007f8c8f5d45c8 in execute_ex ()
#51 0x00007f8c8f59a3a9 in dtrace*execute*ex ()
#52 0x00007f8c8abb8fcc in xdebug*execute*ex () from /usr/lib64/php/modules/xdebug.so
---Type <return> to continue, or q <return> to quit---
#53 0x00007f8c8f65aee0 in zend*do_fcall_common_helper*SPEC ()
#54 0x00007f8c8f5d45c8 in execute_ex ()
#55 0x00007f8c8f59a3a9 in dtrace*execute*ex ()
#56 0x00007f8c8abb8fcc in xdebug*execute*ex () from /usr/lib64/php/modules/xdebug.so
#57 0x00007f8c8f659852 in ZEND*INCLUDE_OR_EVAL_SPEC_VAR*HANDLER ()
#58 0x00007f8c8f5d45c8 in execute_ex ()
#59 0x00007f8c8f59a3a9 in dtrace*execute*ex ()
#60 0x00007f8c8abb8fcc in xdebug*execute*ex () from /usr/lib64/php/modules/xdebug.so
#61 0x00007f8c8f65aee0 in zend*do_fcall_common_helper*SPEC ()
#62 0x00007f8c8f5d45c8 in execute_ex ()
#63 0x00007f8c8f59a3a9 in dtrace*execute*ex ()
#64 0x00007f8c8abb8fcc in xdebug*execute*ex () from /usr/lib64/php/modules/xdebug.so
#65 0x00007f8c8f65aee0 in zend*do_fcall_common_helper*SPEC ()
#66 0x00007f8c8f5d45c8 in execute_ex ()
#67 0x00007f8c8f59a3a9 in dtrace*execute*ex ()
#68 0x00007f8c8abb8fcc in xdebug*execute*ex () from /usr/lib64/php/modules/xdebug.so
#69 0x00007f8c8f65aee0 in zend*do_fcall_common_helper*SPEC ()
#70 0x00007f8c8f5d45c8 in execute_ex ()
#71 0x00007f8c8f59a3a9 in dtrace*execute*ex ()
#72 0x00007f8c8abb8fcc in xdebug*execute*ex () from /usr/lib64/php/modules/xdebug.so
#73 0x00007f8c8f659852 in ZEND*INCLUDE_OR_EVAL_SPEC_VAR*HANDLER ()
#74 0x00007f8c8f5d45c8 in execute_ex ()
#75 0x00007f8c8f59a3a9 in dtrace*execute*ex ()
#76 0x00007f8c8abb8fcc in xdebug*execute*ex () from /usr/lib64/php/modules/xdebug.so
#77 0x00007f8c8f65aee0 in zend*do_fcall_common_helper*SPEC ()
#78 0x00007f8c8f5d45c8 in execute_ex ()
#79 0x00007f8c8f59a3a9 in dtrace*execute*ex ()
#80 0x00007f8c8abb8fcc in xdebug*execute*ex () from /usr/lib64/php/modules/xdebug.so
#81 0x00007f8c8f65aee0 in zend*do_fcall_common_helper*SPEC ()
#82 0x00007f8c8f5d45c8 in execute_ex ()
#83 0x00007f8c8f59a3a9 in dtrace*execute*ex ()
#84 0x00007f8c8abb8fcc in xdebug*execute*ex () from /usr/lib64/php/modules/xdebug.so
#85 0x00007f8c8f65aee0 in zend*do_fcall_common_helper*SPEC ()
#86 0x00007f8c8f5d45c8 in execute_ex ()
#87 0x00007f8c8f59a3a9 in dtrace*execute*ex ()
#88 0x00007f8c8abb8fcc in xdebug*execute*ex () from /usr/lib64/php/modules/xdebug.so
#89 0x00007f8c8f659852 in ZEND*INCLUDE_OR_EVAL_SPEC_VAR*HANDLER ()
#90 0x00007f8c8f5d45c8 in execute_ex ()
#91 0x00007f8c8f59a3a9 in dtrace*execute*ex ()
#92 0x00007f8c8abb8fcc in xdebug*execute*ex () from /usr/lib64/php/modules/xdebug.so
#93 0x00007f8c8f65aee0 in zend*do_fcall_common_helper*SPEC ()
#94 0x00007f8c8f5d45c8 in execute_ex ()
#95 0x00007f8c8f59a3a9 in dtrace*execute*ex ()
#96 0x00007f8c8abb8fcc in xdebug*execute*ex () from /usr/lib64/php/modules/xdebug.so
#97 0x00007f8c8f65aee0 in zend*do_fcall_common_helper*SPEC ()
#98 0x00007f8c8f5d45c8 in execute_ex ()
#99 0x00007f8c8f59a3a9 in dtrace*execute*ex ()
#100 0x00007f8c8abb8fcc in xdebug*execute*ex () from /usr/lib64/php/modules/xdebug.so
#101 0x00007f8c8f65aee0 in zend*do_fcall_common_helper*SPEC ()
#102 0x00007f8c8f5d45c8 in execute_ex ()
#103 0x00007f8c8f59a3a9 in dtrace*execute*ex ()
#104 0x00007f8c8abb8fcc in xdebug*execute*ex () from /usr/lib64/php/modules/xdebug.so
#105 0x00007f8c8f5abed0 in zend*execute*scripts ()
---Type <return> to continue, or q <return> to quit---
#106 0x00007f8c8f54bc65 in php*execute*script ()
#107 0x00007f8c8f65c8a8 in do_cli ()
#108 0x00007f8c8f436420 in main ()

xdebug trace:

   54.4457   16731856                                           -> Tekelec\DVAT\Service\TagService->createTag() /home/vagrant/dvat/library/Tekelec/DVAT/Service/TagService.php:51
   54.4457   16731856                                             -> Doctrine\ORM\EntityManager->merge() /home/vagrant/dvat/library/Tekelec/DVAT/Service/TagService.php:28
   54.4457   16731904                                               -> is_object() /home/vagrant/dvat/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:632
   54.4457   16731856                                               -> Doctrine\ORM\EntityManager->errorIfClosed() /home/vagrant/dvat/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:636
   54.4457   16731856                                               -> Doctrine\ORM\UnitOfWork->merge() /home/vagrant/dvat/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:638
   54.4458   16731992                                                 -> Doctrine\ORM\UnitOfWork->doMerge() /home/vagrant/dvat/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:1701
   54.4458   16732136                                                   -> spl*object*hash() /home/vagrant/dvat/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:1744
   54.4458   16732448                                                   -> get_class() /home/vagrant/dvat/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:1752
   54.4458   16732496                                                   -> Doctrine\ORM\EntityManager->getClassMetadata() /home/vagrant/dvat/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:1752
   54.4458   16732496                                                     -> Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory->getMetadataFor() /home/vagrant/dvat/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:268
   54.4458   16732448                                                   -> Doctrine\ORM\UnitOfWork->getEntityState() /home/vagrant/dvat/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:1760
   54.4458   16732496                                                     -> spl*object*hash() /home/vagrant/dvat/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:1367
   54.4458   16732400                                                   -> Doctrine\ORM\Mapping\ClassMetadataInfo->getIdentifierValues() /home/vagrant/dvat/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:1766
   54.4458   16732448                                                     -> ReflectionProperty->getValue() /home/vagrant/dvat/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php:672

The reproducing steps are complicated and require propriety code, but this happens most of the time (80+ percent).

Here is the php bug for this: https://bugs.php.net/bug.php?id=67828

@doctrinebot

Comment created by @ocramius:

Did you try clearing your opcode caches? Is this reproducible in insulated environment?

@doctrinebot

Comment created by kparaju:

Yes, I tried clearing the opcode caches (and clearing proxies and restarting the server). This was also reproducible in multiple servers (one production and one development).

It is not yet reproducible in isolated environment, but I am looking at it. Will update the ticket if I find easy reproducing steps.

@doctrinebot

Comment created by @beberlei:

Please try without xdebug, this is enabled according to stacktrace.

@doctrinebot

Comment created by hherrera:

I would like get the Doctrine2-orm, but I get an error in the doctrineORM-2.3.6....tar.gz, could you help me please?.

@doctrinebot

Comment created by @ocramius:

[~hherrera] that is a question unrelated with the issue here.

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.