{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/hhvm/issues/5421","labels_url":"https://api.github.com/repos/facebook/hhvm/issues/5421/labels{/name}","comments_url":"https://api.github.com/repos/facebook/hhvm/issues/5421/comments","events_url":"https://api.github.com/repos/facebook/hhvm/issues/5421/events","html_url":"https://github.com/facebook/hhvm/issues/5421","id":82421723,"number":5421,"title":"Segfault when trying to run PHPUnit's test suite (4.6 branch)","user":{"login":"sebastianbergmann","id":25218,"avatar_url":"https://avatars.githubusercontent.com/u/25218?v=3","gravatar_id":"","url":"https://api.github.com/users/sebastianbergmann","html_url":"https://github.com/sebastianbergmann","followers_url":"https://api.github.com/users/sebastianbergmann/followers","following_url":"https://api.github.com/users/sebastianbergmann/following{/other_user}","gists_url":"https://api.github.com/users/sebastianbergmann/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastianbergmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastianbergmann/subscriptions","organizations_url":"https://api.github.com/users/sebastianbergmann/orgs","repos_url":"https://api.github.com/users/sebastianbergmann/repos","events_url":"https://api.github.com/users/sebastianbergmann/events{/privacy}","received_events_url":"https://api.github.com/users/sebastianbergmann/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/hhvm/labels/crash","name":"crash","color":"e63737"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-05-29T13:11:24Z","updated_at":"2015-06-24T13:56:18Z","closed_at":null,"body":"## Version Information\r\n\r\n    $ hhvm --version\r\n    HipHop VM 3.7.0 (rel)\r\n    Compiler: 1432365749_210873458\r\n    Repo schema: de2ad6572c3e61a7c559656fe50ddb42d096626d\r\n\r\n\r\n    $ yum info hhvm\r\n    Loaded plugins: auto-update-debuginfo, fastestmirror, langpacks, remove-with-leaves\r\n    Loading mirror speeds from cached hostfile\r\n     * fedora: ftp.cc.uoc.gr\r\n     * fedora-debuginfo: fedora.uib.no\r\n     * remi: rpms.remirepo.net\r\n     * rpmfusion-free: mirror.nl.leaseweb.net\r\n     * rpmfusion-free-debuginfo: mirror.nl.leaseweb.net\r\n     * rpmfusion-free-updates: mirror.nl.leaseweb.net\r\n     * rpmfusion-free-updates-debuginfo: mirror.nl.leaseweb.net\r\n     * rpmfusion-nonfree: mirror.nl.leaseweb.net\r\n     * rpmfusion-nonfree-debuginfo: mirror.nl.leaseweb.net\r\n     * rpmfusion-nonfree-updates: mirror.nl.leaseweb.net\r\n     * rpmfusion-nonfree-updates-debuginfo: mirror.nl.leaseweb.net\r\n     * updates: ftp.pbone.net\r\n     * updates-debuginfo: ftp.pbone.net\r\n    Installed Packages\r\n    Name        : hhvm\r\n    Arch        : x86_64\r\n    Version     : 3.7.0\r\n    Release     : 1.fc21\r\n    Size        : 71 M\r\n    Repo        : installed\r\n    From repo   : jrobeson-hhvm\r\n    Summary     : HipHop VM (HHVM) is a virtual machine for executing programs written in PHP\r\n    URL         : http://hhvm.com\r\n    License     : PHP and Zend and BSD and MIT and and ASL 2.0 and LGPLv2 with exceptions\r\n    Description : HipHop VM (HHVM) is a new open-source virtual machine designed for executing\r\n                : programs written in PHP.\r\n                : HHVM uses a just-in-time compilation approach to achieve superior performance\r\n                : while maintaining the flexibility that PHP developers are accustomed to.\r\n\r\n\r\n## Trying to run PHPUnit's testsuite with HHVM\r\n\r\n    $ hhvm phpunit\r\n    [1]    25078 segmentation fault (core dumped)  hhvm phpunit\r\n\r\n\r\n## Trying to run PHPUnit's testsuite with HHVM (through GDB (without debug symbols for HHVM))\r\n\r\n    $ gdb hhvm\r\n    GNU gdb (GDB) Fedora 7.8.2-38.fc21\r\n    Copyright (C) 2014 Free Software Foundation, Inc.\r\n    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\r\n    This is free software: you are free to change and redistribute it.\r\n    There is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\r\n    and \"show warranty\" for details.\r\n    This GDB was configured as \"x86_64-redhat-linux-gnu\".\r\n    Type \"show configuration\" for configuration details.\r\n    For bug reporting instructions, please see:\r\n    <http://www.gnu.org/software/gdb/bugs/>.\r\n    Find the GDB manual and other documentation resources online at:\r\n    <http://www.gnu.org/software/gdb/documentation/>.\r\n    For help, type \"help\".\r\n    Type \"apropos word\" to search for commands related to \"word\"...\r\n    Reading symbols from hhvm...(no debugging symbols found)...done.\r\n    Missing separate debuginfos, use: debuginfo-install hhvm-3.7.0-1.fc21.x86_64\r\n    (gdb) r phpunit\r\n    Starting program: /usr/bin/hhvm phpunit\r\n    [Thread debugging using libthread_db enabled]\r\n    Using host libthread_db library \"/lib64/libthread_db.so.1\".\r\n    Detaching after fork from child process 25154.\r\n    Detaching after fork from child process 25155.\r\n    PHPUnit 4.6.9 by Sebastian Bergmann and contributors.\r\n\r\n    Configuration read from /usr/local/src/phpunit/phpunit.xml\r\n\r\n    .............................................................   61 / 1330 (  4%)\r\n    .............................................................  122 / 1330 (  9%)\r\n    .............................................................  183 / 1330 ( 13%)\r\n    .............................................................  244 / 1330 ( 18%)\r\n    .............................................................  305 / 1330 ( 22%)\r\n    .............................................................  366 / 1330 ( 27%)\r\n    .............................................................  427 / 1330 ( 32%)\r\n    .............................................................  488 / 1330 ( 36%)\r\n    .............................................................  549 / 1330 ( 41%)\r\n    .............................................................  610 / 1330 ( 45%)\r\n    ................................Detaching after fork from child process 25157.\r\n    S............................  671 / 1330 ( 50%)\r\n    .............................................................  732 / 1330 ( 55%)\r\n    .............................................................  793 / 1330 ( 59%)\r\n    ................................ESDetaching after fork from child process 25158.\r\n    ...........................  854 / 1330 ( 64%)\r\n    ..............\r\n    Program received signal SIGSEGV, Segmentation fault.\r\n    0x00000000013a956a in HPHP::jit::FixupMap::fixupWork(HPHP::ExecutionContext*, HPHP::ActRec*) const ()\r\n    (gdb) bt\r\n    #0  0x00000000013a956a in HPHP::jit::FixupMap::fixupWork(HPHP::ExecutionContext*, HPHP::ActRec*) const ()\r\n    #1  0x0000000002b260bb in HPHP::jit::MCGenerator::syncWork() ()\r\n    #2  0x0000000000d33de1 in HPHP::ExecutionContext::handleError(std::string const&, int, bool, HPHP::ExecutionContext::ErrorThrowMode, std::string const&, bool) ()\r\n    #3  0x0000000002b7c777 in HPHP::raise_warning(char const*, ...) ()\r\n    #4  0x0000000001ab6df5 in HPHP::libxml_ext_entity_loader(char const*, char const*, _xmlParserCtxt*) ()\r\n    #5  0x00007ffff3f76478 in xmlXIncludeDoProcess () from /lib64/libxml2.so.2\r\n    #6  0x00007ffff3f77b96 in xmlXIncludeProcessTreeFlagsData () from /lib64/libxml2.so.2\r\n    #7  0x00000000019def90 in HPHP::c_DOMDocument_ni_xinclude(HPHP::ObjectData*, long) ()\r\n    #8  0x0000000002b5ac2e in void HPHP::Native::callFunc<false, false>(HPHP::Func const*, void*, HPHP::TypedValue*, HPHP::TypedValue&) ()\r\n    #9  0x0000000001168531 in HPHP::TypedValue* HPHP::Native::methodWrapper<false, false>(HPHP::ActRec*) ()\r\n    #10 0x000000000780538f in ?? ()\r\n    #11 0x0000000002b1a566 in enterTCHelper ()\r\n    #12 0x000000000135b176 in HPHP::jit::x64::(anonymous namespace)::BackEnd::enterTCHelper(unsigned char*, HPHP::ActRec*) ()\r\n    #13 0x00000000015057bf in HPHP::jit::MCGenerator::enterTC(unsigned char*, HPHP::ActRec*) ()\r\n    #14 0x000000000100f071 in HPHP::enterVM(HPHP::ActRec*, HPHP::StackArgsState, HPHP::Resumable*, HPHP::ObjectData*) ()\r\n    #15 0x0000000002b19c8f in HPHP::ExecutionContext::invokeFunc(HPHP::TypedValue*, HPHP::Func const*, HPHP::Variant const&, HPHP::ObjectData*, HPHP::Class*, HPHP::VarEnv*, HPHP::StringData*, HPHP::ExecutionContext::InvokeFlags) ()\r\n    #16 0x0000000000bc9bc5 in HPHP::ObjectData::o_invoke(HPHP::String const&, HPHP::Variant const&, bool) ()\r\n    #17 0x00000000019b1af1 in HPHP::f_hphp_invoke_method(HPHP::Variant const&, HPHP::String const&, HPHP::String const&, HPHP::Variant const&) ()\r\n    #18 0x0000000003c29594 in ?? ()\r\n    #19 0x00000000039b96b0 in ?? ()\r\n    #20 0x00007fffd98292b0 in ?? ()\r\n    #21 0x00007fffd7c28080 in ?? ()\r\n    #22 0x0000000003c29319 in ?? ()\r\n    #23 0x00007fffd7c28080 in ?? ()\r\n    #24 0x0000000003c27f88 in ?? ()\r\n    #25 0x00007fffe6e2a9b0 in ?? ()\r\n    #26 0x0000000003c242bc in ?? ()\r\n    #27 0x0000000002b1a566 in enterTCHelper ()\r\n    #28 0x000000000135b176 in HPHP::jit::x64::(anonymous namespace)::BackEnd::enterTCHelper(unsigned char*, HPHP::ActRec*) ()\r\n    #29 0x00000000015057bf in HPHP::jit::MCGenerator::enterTC(unsigned char*, HPHP::ActRec*) ()\r\n    #30 0x000000000100ef29 in HPHP::enterVM(HPHP::ActRec*, HPHP::StackArgsState, HPHP::Resumable*, HPHP::ObjectData*) ()\r\n    #31 0x0000000002b19c8f in HPHP::ExecutionContext::invokeFunc(HPHP::TypedValue*, HPHP::Func const*, HPHP::Variant const&, HPHP::ObjectData*, HPHP::Class*, HPHP::VarEnv*, HPHP::StringData*, HPHP::ExecutionContext::InvokeFlags) ()\r\n    #32 0x0000000002b6e16d in HPHP::ExecutionContext::invokeUnit(HPHP::TypedValue*, HPHP::Unit const*) ()\r\n    #33 0x0000000002b6dfd7 in HPHP::invoke_file(HPHP::String const&, bool, char const*) ()\r\n    #34 0x0000000000d03c38 in HPHP::include_impl_invoke(HPHP::String const&, bool, char const*) ()\r\n    #35 0x0000000000c495a2 in HPHP::hphp_invoke(HPHP::ExecutionContext*, std::string const&, bool, HPHP::Array const&, HPHP::VRefParamValue const&, std::string const&, std::string const&, bool&, std::string&, bool, bool, bool) ()\r\n    #36 0x0000000000c49e2e in HPHP::hphp_invoke_simple(std::string const&, bool) ()\r\n    #37 0x0000000000c61806 in HPHP::execute_program_impl(int, char**) ()\r\n    #38 0x0000000000c625de in HPHP::execute_program(int, char**) ()\r\n    #39 0x0000000000b715ef in main ()\r\n    (gdb) quit\r\n    A debugging session is active.\r\n\r\n\t    Inferior 1 [process 25150] will be killed.\r\n\r\n    Quit anyway? (y or n) y\r\n\r\n## Trying to run PHPUnit's testsuite with HHVM (through GDB (with debug symbols for HHVM))\r\n\r\n    $ gdb hhvm                                  \r\n    GNU gdb (GDB) Fedora 7.8.2-38.fc21\r\n    Copyright (C) 2014 Free Software Foundation, Inc.\r\n    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\r\n    This is free software: you are free to change and redistribute it.\r\n    There is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\r\n    and \"show warranty\" for details.\r\n    This GDB was configured as \"x86_64-redhat-linux-gnu\".\r\n    Type \"show configuration\" for configuration details.\r\n    For bug reporting instructions, please see:\r\n    <http://www.gnu.org/software/gdb/bugs/>.\r\n    Find the GDB manual and other documentation resources online at:\r\n    <http://www.gnu.org/software/gdb/documentation/>.\r\n    For help, type \"help\".\r\n    Type \"apropos word\" to search for commands related to \"word\"...\r\n    Reading symbols from hhvm...Reading symbols from /usr/lib/debug/usr/bin/hhvm.debug...done.\r\n    [1]    25784 segmentation fault (core dumped)  gdb hhvm\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/hhvm/issues/comments/114876034","html_url":"https://github.com/facebook/hhvm/issues/5421#issuecomment-114876034","issue_url":"https://api.github.com/repos/facebook/hhvm/issues/5421","id":114876034,"user":{"login":"aingram","id":476313,"avatar_url":"https://avatars.githubusercontent.com/u/476313?v=3","gravatar_id":"","url":"https://api.github.com/users/aingram","html_url":"https://github.com/aingram","followers_url":"https://api.github.com/users/aingram/followers","following_url":"https://api.github.com/users/aingram/following{/other_user}","gists_url":"https://api.github.com/users/aingram/gists{/gist_id}","starred_url":"https://api.github.com/users/aingram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aingram/subscriptions","organizations_url":"https://api.github.com/users/aingram/orgs","repos_url":"https://api.github.com/users/aingram/repos","events_url":"https://api.github.com/users/aingram/events{/privacy}","received_events_url":"https://api.github.com/users/aingram/received_events","type":"User","site_admin":false},"created_at":"2015-06-24T13:56:17Z","updated_at":"2015-06-24T13:56:17Z","body":"As an aside, to use gdb with hhvm, preface it with `LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so`. This will avoid the segfault in gdb that you mentioned."}}