PHPUnit Doctrine and PHP7



我目前正在使用PHP7上的Phpunit进行验证。

如果我在开发系统上运行它们,它们没有任何问题。但是,如果我在詹金斯构建服务器上执行它们,他们会因分段故障而失败。

听到输出的示例:

    +PHPUnit 5.4.2 by Sebastian Bergmann and contributors.
    [2016-06-19 22:55:50] snc_redis.INFO: Executing command "GET DoctrineNamespaceCacheKey[]" [] []
    [2016-06-19 22:55:50] snc_redis.INFO: Executing command "GET [ProjectLibraryEntityBundleEntityUserUser$CLASSMETADATA][2]" [] []
    [2016-06-19 22:55:50] snc_redis.INFO: Executing command "GET [ProjectLibraryEntityBundleEntityCompanyCompany$CLASSMETADATA][2]" [] []
    [2016-06-19 22:55:50] doctrine.DEBUG: SELECT t0.first_name AS first_name_1, t0.last_name AS last_name_2, t0.password AS password_3, t0.role AS role_4, t0.credentials_expire_date AS credentials_expire_date_5, t0.account_expire_date AS account_expire_date_6, t0.last_login AS last_login_7, t0.id AS id_8, t0.email_address AS email_address_9, t0.phone AS phone_10, t0.created AS created_11, t0.updated AS updated_12, t0.deletedAt AS deletedAt_13, t0.active AS active_14, t0.default_company_id AS default_company_id_15, t0.log_created_by AS log_created_by_16, t0.log_updated_by AS log_updated_by_17 FROM user t0 WHERE t0.id = ? [1] []
    [2016-06-19 22:55:50] snc_redis.INFO: Executing command "GET [ProjectLibraryEntityBundleEntityAclUserRoleMap$CLASSMETADATA][2]" [] []
    [2016-06-19 22:55:50] snc_redis.INFO: Executing command "GET [ProjectLibraryEntityBundleEntityUserU2FKey$CLASSMETADATA][2]" [] []
    [2016-06-19 22:55:50] snc_redis.INFO: Executing command "GET [ProjectLibraryEntityBundleEntityUserUser$GEDMO_TRANSLATABLE_CLASSMETADATA][2]" [] []
    [2016-06-19 22:55:50] snc_redis.INFO: Executing command "GET acl.1" [] []
    [2016-06-19 22:55:50] snc_redis.INFO: Executing command "GET acl.data" [] []
    [2016-06-19 22:55:50] snc_redis.INFO: Executing command "GET acl.actions" [] []
    [2016-06-19 22:55:50] snc_redis.INFO: Executing command "GET [ProjectLibraryEntityBundleEntityAclRole$CLASSMETADATA][2]" [] []
    [2016-06-19 22:55:50] snc_redis.INFO: Executing command "GET [ProjectLibraryEntityBundleEntityAclRole$GEDMO_TREE_CLASSMETADATA][2]" [] []
    [2016-06-19 22:55:50] snc_redis.INFO: Executing command "GET DoctrineNamespaceCacheKey[]" [] []
    [2016-06-19 22:55:50] snc_redis.INFO: Executing command "GET [02813b2d6dfe9134ce2041e7bb276aed][1]" [] []
    [2016-06-19 22:55:50] doctrine.DEBUG: SELECT a0_.admin AS admin_0, a0_.id AS id_1, a0_.name AS name_2, a0_.active AS active_3, a0_.created AS created_4, a0_.updated AS updated_5, a0_.tree_left AS tree_left_6, a0_.tree_level AS tree_level_7, a0_.tree_right AS tree_right_8, a0_.tree_root AS tree_root_9, a0_.parent_id AS parent_id_10, a0_.log_created_by AS log_created_by_11, a0_.log_updated_by AS log_updated_by_12 FROM acl_role a0_ WHERE a0_.parent_id IS NULL [] []
    [2016-06-19 22:55:50] snc_redis.INFO: Executing command "GET [ProjectLibraryEntityBundleEntityAclRole$GEDMO_TRANSLATABLE_CLASSMETADATA][2]" [] []
    [2016-06-19 22:55:50] snc_redis.INFO: Executing command "GET [fde6635bd67dc387082cbca14c42f757][1]" [] []
    [2016-06-19 22:55:50] doctrine.DEBUG: SELECT a0_.admin AS admin_0, a0_.id AS id_1, a0_.name AS name_2, a0_.active AS active_3, a0_.created AS created_4, a0_.updated AS updated_5, a0_.tree_left AS tree_left_6, a0_.tree_level AS tree_level_7, a0_.tree_right AS tree_right_8, a0_.tree_root AS tree_root_9, a0_.parent_id AS parent_id_10, a0_.log_created_by AS log_created_by_11, a0_.log_updated_by AS log_updated_by_12 FROM acl_role a0_ WHERE a0_.parent_id = ? [2] []
    [2016-06-19 22:55:50] snc_redis.INFO: Executing command "GET [fde6635bd67dc387082cbca14c42f757][1]" [] []
    [2016-06-19 22:55:50] doctrine.DEBUG: SELECT a0_.admin AS admin_0, a0_.id AS id_1, a0_.name AS name_2, a0_.active AS active_3, a0_.created AS created_4, a0_.updated AS updated_5, a0_.tree_left AS tree_left_6, a0_.tree_level AS tree_level_7, a0_.tree_right AS tree_right_8, a0_.tree_root AS tree_root_9, a0_.parent_id AS parent_id_10, a0_.log_created_by AS log_created_by_11, a0_.log_updated_by AS log_updated_by_12 FROM acl_role a0_ WHERE a0_.parent_id = ? [3] []
    [2016-06-19 22:55:50] snc_redis.INFO: Executing command "GET [fde6635bd67dc387082cbca14c42f757][1]" [] []
    [2016-06-19 22:55:50] doctrine.DEBUG: SELECT a0_.admin AS admin_0, a0_.id AS id_1, a0_.name AS name_2, a0_.active AS active_3, a0_.created AS created_4, a0_.updated AS updated_5, a0_.tree_left AS tree_left_6, a0_.tree_level AS tree_level_7, a0_.tree_right AS tree_right_8, a0_.tree_root AS tree_root_9, a0_.parent_id AS parent_id_10, a0_.log_created_by AS log_created_by_11, a0_.log_updated_by AS log_updated_by_12 FROM acl_role a0_ WHERE a0_.parent_id = ? [4] []
    Segmentation fault

我并不是真的这个问题来源。但是我怀疑它是由与phpunit和php7的学说/符合造成的但是我真的不知道在哪里寻找。

更新:

每次segfault时,我都会在DMESG部分中获得这样的行:

[1729155.916967] traps: php[26512] general protection ip:70a8b3 sp:7ffe544fa660 error:0 in php7.0[400000+94f000]

这些是我打电话时收到的最后一行

strace phpunit

    lstat("/var/lib/jenkins/workspace/Project Full Build/var/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parameter.php", {st_mode=S_IFREG|0644, st_size=2561, ...}) = 0
    lstat("/var/lib/jenkins/workspace/Project Full Build/var/vendor/doctrine/orm/lib/Doctrine/ORM/Query", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    open("/var/lib/jenkins/workspace/Project Full Build/var/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parameter.php", O_RDONLY) = 11
    fstat(11, {st_mode=S_IFREG|0644, st_size=2561, ...}) = 0
    fstat(11, {st_mode=S_IFREG|0644, st_size=2561, ...}) = 0
    fstat(11, {st_mode=S_IFREG|0644, st_size=2561, ...}) = 0
    mmap(NULL, 2561, PROT_READ, MAP_SHARED, 11, 0) = 0x7f1929b66000
    munmap(0x7f1929b66000, 2561)            = 0
    close(11)                               = 0
    lstat("/var/lib/jenkins/workspace/Project Full Build/var/vendor/doctrine/orm/lib/Doctrine/ORM/Query/ParameterTypeInferer.php", {st_mode=S_IFREG|0644, st_size=2289, ...}) = 0
    lstat("/var/lib/jenkins/workspace/Project Full Build/var/vendor/doctrine/orm/lib/Doctrine/ORM/Query", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    open("/var/lib/jenkins/workspace/Project Full Build/var/vendor/doctrine/orm/lib/Doctrine/ORM/Query/ParameterTypeInferer.php", O_RDONLY) = 11
    fstat(11, {st_mode=S_IFREG|0644, st_size=2289, ...}) = 0
    fstat(11, {st_mode=S_IFREG|0644, st_size=2289, ...}) = 0
    fstat(11, {st_mode=S_IFREG|0644, st_size=2289, ...}) = 0
    mmap(NULL, 2289, PROT_READ, MAP_SHARED, 11, 0) = 0x7f1929b66000
    munmap(0x7f1929b66000, 2289)            = 0
    close(11)                               = 0
    poll([{fd=6, events=POLLIN|POLLPRI|POLLERR|POLLHUP}], 1, 0) = 0 (Timeout)
    sendto(6, "*2rn$3rnGETrn$37rn[fde6635bd67dc"..., 57, MSG_DONTWAIT, NULL, 0) = 57
    poll([{fd=6, events=POLLIN|POLLPRI|POLLERR|POLLHUP}], 1, 0) = 1 ([{fd=6, revents=POLLIN}])
    recvfrom(6, "$", 1, MSG_PEEK, NULL, NULL) = 1
    poll([{fd=6, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 1 ([{fd=6, revents=POLLIN}])
    recvfrom(6, "$1496rn22737Doctrine\ORM\Query\"..., 8192, MSG_DONTWAIT, NULL, NULL) = 1505
    write(9, "[2016-06-21 21:39:48] snc_redis."..., 106[2016-06-21 21:39:48] snc_redis.INFO: Executing command "GET [fde6635bd67dc387082cbca14c42f757][1]" [] []
    ) = 106
    write(10, "[2016-06-21 21:39:48] doctrine.D"..., 464[2016-06-21 21:39:48] doctrine.DEBUG: SELECT a0_.admin AS admin_0, a0_.id AS id_1, a0_.name AS name_2, a0_.active AS active_3, a0_.created AS created_4, a0_.updated AS updated_5, a0_.tree_left AS tree_left_6, a0_.tree_level AS tree_level_7, a0_.tree_right AS tree_right_8, a0_.tree_root AS tree_root_9, a0_.parent_id AS parent_id_10, a0_.log_created_by AS log_created_by_11, a0_.log_updated_by AS log_updated_by_12 FROM acl_role a0_ WHERE a0_.parent_id = ? [2] []
    ) = 464
    sendto(4, "24313SELECT a0_.admin AS admin_0"..., 423, MSG_DONTWAIT, NULL, 0) = 423
    poll([{fd=4, events=POLLIN|POLLERR|POLLHUP}], 1, 1471228928) = 1 ([{fd=4, revents=POLLIN}])
    recvfrom(4, "11r523def10yoda_dev3a0_10acl_r"..., 48, MSG_DONTWAIT, NULL, NULL) = 48
    poll([{fd=4, events=POLLIN|POLLERR|POLLHUP}], 1, 1471228928) = 1 ([{fd=4, revents=POLLIN}])
    recvfrom(4, "nf?111/33def10yoda_dev3"..., 287, MSG_DONTWAIT, NULL, NULL) = 287
    poll([{fd=4, events=POLLIN|POLLERR|POLLHUP}], 1, 1471228928) = 1 ([{fd=4, revents=POLLIN}])
    recvfrom(4, "df?23f20120=103def10yoda_dev3"..., 287, MSG_DONTWAIT, NULL, NULL) = 287
    poll([{fd=4, events=POLLIN|POLLERR|POLLHUP}], 1, 1471228928) = 1 ([{fd=4, revents=POLLIN}])
    recvfrom(4, "yoda_dev3a0_10acl_rolefparent_id_"..., 287, MSG_DONTWAIT, NULL, NULL) = 287
    poll([{fd=4, events=POLLIN|POLLERR|POLLHUP}], 1, 1471228928) = 1 ([{fd=4, revents=POLLIN}])
    recvfrom(4, "15213762", 287, MSG_DONTWAIT, NULL, NULL) = 10
    poll([{fd=6, events=POLLIN|POLLPRI|POLLERR|POLLHUP}], 1, 0) = 0 (Timeout)
    sendto(6, "*2rn$3rnGETrn$37rn[fde6635bd67dc"..., 57, MSG_DONTWAIT, NULL, 0) = 57
    poll([{fd=6, events=POLLIN|POLLPRI|POLLERR|POLLHUP}], 1, 0) = 1 ([{fd=6, revents=POLLIN}])
    recvfrom(6, "$", 1, MSG_PEEK, NULL, NULL) = 1
    poll([{fd=6, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 1 ([{fd=6, revents=POLLIN}])
    recvfrom(6, "$1496rn22737Doctrine\ORM\Query\"..., 8192, MSG_DONTWAIT, NULL, NULL) = 1505
    write(9, "[2016-06-21 21:39:48] snc_redis."..., 106[2016-06-21 21:39:48] snc_redis.INFO: Executing command "GET [fde6635bd67dc387082cbca14c42f757][1]" [] []
    ) = 106
    write(10, "[2016-06-21 21:39:48] doctrine.D"..., 464[2016-06-21 21:39:48] doctrine.DEBUG: SELECT a0_.admin AS admin_0, a0_.id AS id_1, a0_.name AS name_2, a0_.active AS active_3, a0_.created AS created_4, a0_.updated AS updated_5, a0_.tree_left AS tree_left_6, a0_.tree_level AS tree_level_7, a0_.tree_right AS tree_right_8, a0_.tree_root AS tree_root_9, a0_.parent_id AS parent_id_10, a0_.log_created_by AS log_created_by_11, a0_.log_updated_by AS log_updated_by_12 FROM acl_role a0_ WHERE a0_.parent_id = ? [3] []
    ) = 464
    sendto(4, "24313SELECT a0_.admin AS admin_0"..., 423, MSG_DONTWAIT, NULL, 0) = 423
    poll([{fd=4, events=POLLIN|POLLERR|POLLHUP}], 1, 1471228928) = 1 ([{fd=4, revents=POLLIN}])
    recvfrom(4, "11r523def10yoda_dev3a0_10acl_r"..., 277, MSG_DONTWAIT, NULL, NULL) = 277
    poll([{fd=4, events=POLLIN|POLLERR|POLLHUP}], 1, 1471228928) = 1 ([{fd=4, revents=POLLIN}])
    recvfrom(4, "23f2012000973def10yoda_dev3a0_"..., 287, MSG_DONTWAIT, NULL, NULL) = 287
    poll([{fd=4, events=POLLIN|POLLERR|POLLHUP}], 1, 1471228928) = 1 ([{fd=4, revents=POLLIN}])
    recvfrom(4, "v3a0_10acl_rolevtree_root_9ttree_"..., 287, MSG_DONTWAIT, NULL, NULL) = 287
    poll([{fd=4, events=POLLIN|POLLERR|POLLHUP}], 1, 1471228928) = 1 ([{fd=4, revents=POLLIN}])
    recvfrom(4, "ad only011232016-05-08 00:28:422320"..., 287, MSG_DONTWAIT, NULL, NULL) = 152
    poll([{fd=6, events=POLLIN|POLLPRI|POLLERR|POLLHUP}], 1, 0) = 0 (Timeout)
    sendto(6, "*2rn$3rnGETrn$37rn[fde6635bd67dc"..., 57, MSG_DONTWAIT, NULL, 0) = 57
    poll([{fd=6, events=POLLIN|POLLPRI|POLLERR|POLLHUP}], 1, 0) = 1 ([{fd=6, revents=POLLIN}])
    recvfrom(6, "$", 1, MSG_PEEK, NULL, NULL) = 1
    poll([{fd=6, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 1 ([{fd=6, revents=POLLIN}])
    recvfrom(6, "$1496rn22737Doctrine\ORM\Query\"..., 8192, MSG_DONTWAIT, NULL, NULL) = 1505
    write(9, "[2016-06-21 21:39:48] snc_redis."..., 106[2016-06-21 21:39:48] snc_redis.INFO: Executing command "GET [fde6635bd67dc387082cbca14c42f757][1]" [] []
    ) = 106
    write(10, "[2016-06-21 21:39:48] doctrine.D"..., 464[2016-06-21 21:39:48] doctrine.DEBUG: SELECT a0_.admin AS admin_0, a0_.id AS id_1, a0_.name AS name_2, a0_.active AS active_3, a0_.created AS created_4, a0_.updated AS updated_5, a0_.tree_left AS tree_left_6, a0_.tree_level AS tree_level_7, a0_.tree_right AS tree_right_8, a0_.tree_root AS tree_root_9, a0_.parent_id AS parent_id_10, a0_.log_created_by AS log_created_by_11, a0_.log_updated_by AS log_updated_by_12 FROM acl_role a0_ WHERE a0_.parent_id = ? [4] []
    ) = 464
    sendto(4, "24313SELECT a0_.admin AS admin_0"..., 423, MSG_DONTWAIT, NULL, 0) = 423
    poll([{fd=4, events=POLLIN|POLLERR|POLLHUP}], 1, 1471228928) = 1 ([{fd=4, revents=POLLIN}])
    recvfrom(4, "11r523def10yoda_dev3a0_10acl_r"..., 135, MSG_DONTWAIT, NULL, NULL) = 135
    poll([{fd=4, events=POLLIN|POLLERR|POLLHUP}], 1, 1471228928) = 1 ([{fd=4, revents=POLLIN}])
    recvfrom(4, "acl_role6name_24namef103773751"..., 287, MSG_DONTWAIT, NULL, NULL) = 287
    poll([{fd=4, events=POLLIN|POLLERR|POLLHUP}], 1, 1471228928) = 1 ([{fd=4, revents=POLLIN}])
    recvfrom(4, "10yoda_dev3a0_10acl_roleftree_leve"..., 287, MSG_DONTWAIT, NULL, NULL) = 287
    poll([{fd=4, events=POLLIN|POLLERR|POLLHUP}], 1, 1471228928) = 1 ([{fd=4, revents=POLLIN}])
    recvfrom(4, "21log_created_by_1116log_created_b"..., 287, MSG_DONTWAIT, NULL, NULL) = 287
    poll([{fd=4, events=POLLIN|POLLERR|POLLHUP}], 1, 1471228928) = 1 ([{fd=4, revents=POLLIN}])
    recvfrom(4, "2", 287, MSG_DONTWAIT, NULL, NULL) = 3
    poll([{fd=6, events=POLLIN|POLLPRI|POLLERR|POLLHUP}], 1, 0) = 0 (Timeout)
    sendto(6, "*2rn$3rnGETrn$37rn[fde6635bd67dc"..., 57, MSG_DONTWAIT, NULL, 0) = 57
    poll([{fd=6, events=POLLIN|POLLPRI|POLLERR|POLLHUP}], 1, 0) = 1 ([{fd=6, revents=POLLIN}])
    recvfrom(6, "$", 1, MSG_PEEK, NULL, NULL) = 1
    poll([{fd=6, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 1 ([{fd=6, revents=POLLIN}])
    recvfrom(6, "$1496rn22737Doctrine\ORM\Query\"..., 8192, MSG_DONTWAIT, NULL, NULL) = 1505
    --- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=0} ---
    +++ killed by SIGSEGV +++
    Segmentation fault

有人可以告诉我这来自哪里吗?据我所知,我在调用作曲家更新之前运行它似乎有效。但是它不会。因此,它实际上似乎不是一个核心问题,而是一个插件问题,因此我目前正在更深入地研究它

好的下一部分将非常奇怪。我启用了以下moduls,其中唯一缺少的moduls:

xdebug

我将opcache.ini文件重新配置为以下设置

zend_extension=opcache.so
opcache.memory_consumption = 2048
opcache.enable_cli = On
opcache.file_cache /tmp/php

之后,它始终执行。即使我删除了这些行。无论我做什么,我都无法复制它。这真的很令人沮丧,但至少它有效。

如果有人能使我激动,我真的很高兴。

相关内容

  • 没有找到相关文章