Uploaded image for project: 'PHP Legacy Driver'
  1. PHP Legacy Driver
  2. PHP-1417

php-fpm segfault in php_mongo_stream_notify_io

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 1.6.5
    • Fix Version/s: None
    • Component/s: pecl-mongo
    • Labels:
    • Environment:
      Gentoo, PHP 5.5.22, mongoDB 3.0.1
    • # Replies:
      15
    • Last comment by Customer:
      false
    • Sprint:
      PHP Sprint 17, PHP Sprint 18, PHP Sprint 19

      Description

      This happend not every time, only every 3-5 refreshs.

      The debug output from php-fpm with gdb:

      gdb /usr/bin/php-fpm /tmp/core-php-fpm.21917                                                                                                                                         [71/9876]
      GNU gdb (Gentoo 7.7.1 p1) 7.7.1Copyright (C) 2014 Free Software Foundation, Inc.
      License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.  Type "show copying"and "show warranty" for details.This GDB was configured as "x86_64-pc-linux-gnu".Type "show configuration" for configuration details.
      For bug reporting instructions, please see:
      <http://bugs.gentoo.org/>.
      Find the GDB manual and other documentation resources online at:<http://www.gnu.org/software/gdb/documentation/>.For help, type "help".
      Type "apropos word" to search for commands related to "word"...
      Reading symbols from /usr/bin/php-fpm...Reading symbols from /usr/lib64/debug//usr/lib64/php5.5/bin/php-fpm.debug...done.
      done.
      [New LWP 21917]
       
      warning: Could not load shared library symbols for linux-vdso.so.1.
      Do you need "set solib-search-path" or "set sysroot"?
      [Thread debugging using libthread_db enabled]
      Using host libthread_db library "/lib64/libthread_db.so.1".
      Core was generated by `php-fpm: pool www                                                             '.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  0x00007fe9b476cb8e in php_mongo_stream_notify_io () from /usr/lib64/php5.5/lib/extensions/debug-non-zts-20121212/mongo.so
      (gdb) bt full
      #0  0x00007fe9b476cb8e in php_mongo_stream_notify_io () from /usr/lib64/php5.5/lib/extensions/debug-non-zts-20121212/mongo.so
      No symbol table info available.
      #1  0x00007fe9b476a740 in php_mongo_io_stream_send () from /usr/lib64/php5.5/lib/extensions/debug-non-zts-20121212/mongo.so
      No symbol table info available.
      #2  0x00007fe9b477f554 in mongo_connect_send_packet () from /usr/lib64/php5.5/lib/extensions/debug-non-zts-20121212/mongo.so
      No symbol table info available.
      #3  0x00007fe9b477fa3e in mongo_connection_ping () from /usr/lib64/php5.5/lib/extensions/debug-non-zts-20121212/mongo.so
      No symbol table info available.
      #4  0x00007fe9b47818bf in mongo_get_connection_single () from /usr/lib64/php5.5/lib/extensions/debug-non-zts-20121212/mongo.so
      No symbol table info available.
      #5  0x00007fe9b478244d in mongo_get_read_write_connection_replicaset () from /usr/lib64/php5.5/lib/extensions/debug-non-zts-20121212/mongo.so
      No symbol table info available.
      #6  0x00007fe9b4782d20 in mongo_get_read_write_connection () from /usr/lib64/php5.5/lib/extensions/debug-non-zts-20121212/mongo.so
      No symbol table info available.
      #7  0x00007fe9b4782e75 in mongo_get_read_write_connection_with_callback () from /usr/lib64/php5.5/lib/extensions/debug-non-zts-20121212/mongo.so
      No symbol table info available.
      #8  0x00007fe9b4751288 in mongo_cursor.do_query () from /usr/lib64/php5.5/lib/extensions/debug-non-zts-20121212/mongo.so
      No symbol table info available.
      #9  0x00007fe9b4750e8e in php_mongo_runquery () from /usr/lib64/php5.5/lib/extensions/debug-non-zts-20121212/mongo.so
      No symbol table info available.
      #10 0x00007fe9b476862b in php_mongo_runcommand () from /usr/lib64/php5.5/lib/extensions/debug-non-zts-20121212/mongo.so
      No symbol table info available.
      #11 0x00007fe9b476921d in run_err () from /usr/lib64/php5.5/lib/extensions/debug-non-zts-20121212/mongo.so
      No symbol table info available.
      #12 0x00007fe9b4769316 in zim_MongoDB_lastError () from /usr/lib64/php5.5/lib/extensions/debug-non-zts-20121212/mongo.so                                                                         [20/9876]
      No symbol table info available.
      #13 0x00000000007f2915 in zend_do_fcall_common_helper_SPEC (execute_data=0x7fe9be509788) at /var/tmp/portage/dev-lang/php-5.5.22/work/sapis-build/fpm/Zend/zend_vm_execute.h:550
              ret = 0x7fe9be509768
              opline = 0x7fe9b0c70af0
              should_change_scope = 1 '\001'
              fbc = 0x287f450
      #14 0x00000000007f30e8 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0x7fe9be509788) at /var/tmp/portage/dev-lang/php-5.5.22/work/sapis-build/fpm/Zend/zend_vm_execute.h:685
      No locals.
      #15 0x00000000007f2008 in execute_ex (execute_data=0x7fe9be509788) at /var/tmp/portage/dev-lang/php-5.5.22/work/sapis-build/fpm/Zend/zend_vm_execute.h:363
              ret = 0
              original_in_execution = 0 '\000'
      #16 0x00000000007f2091 in zend_execute (op_array=0x7fe9be543290) at /var/tmp/portage/dev-lang/php-5.5.22/work/sapis-build/fpm/Zend/zend_vm_execute.h:388
      No locals.
      #17 0x00000000007b3170 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /var/tmp/portage/dev-lang/php-5.5.22/work/sapis-build/fpm/Zend/zend.c:1327
              files = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 0x7fff6ce12190, reg_save_area = 0x7fff6ce120d0}}
              i = 1
              file_handle = 0x7fff6ce144d0
              orig_op_array = 0x0
              orig_retval_ptr_ptr = 0x0
              orig_interactive = 0
      #18 0x000000000071c0ff in php_execute_script (primary_file=0x7fff6ce144d0) at /var/tmp/portage/dev-lang/php-5.5.22/work/sapis-build/fpm/main/main.c:2506
              realfile = "05\341l\377\177\000\000\374\026\064\276\351\177\000\000\002\000\000\000\000\000\000\000\002\000\000\000\001\000\000\000\333-\021\273\351\177\000\000\000\000\000\000\000\000\000\000[\
      000\000\000\351\177", '\000' <repeats 18 times>, "\020\a\020\260\351\177\000\000\340\063\341l\377\177\000\000\020\a\020\260\351\177\000\000`\213\221\002\000\000\000\000p'\020\260\351\177\000\000 \321U\2
      76\351\177\000\000 \000\003\000\005\000\000\000\020\267 \000\000\000\000\000x\001\020\260\351\177\000\000\006\000\000\000\000\000\000\000(2\341l\377\177\000\000\003\376\000\000\000\000\000\000\260tF\000
      \000\000\000\000\001\000\000\000\000\000\000\000\355\201", '\000' <repeats 22 times>...
      ---Type <return> to continue, or q <return> to quit---
              __orig_bailout = 0x7fff6ce14550
              __bailout = {{__jmpbuf = {16, -4539340391437781967, 4569088, 140735020099632, 0, 0, -4539340394738699215, 4539589765822592049}, __mask_was_saved = 0, __saved_mask = {__val = {140641845509472, 
                      17, 25, 47, 140641895209593, 81532, 43092832, 25, 140641657956208, 8592121856, 18, 2194072, 140641895230276, 140735020086576, 140641845089561, 0}}}}
              prepend_file_p = 0x0
              append_file_p = 0x0
              prepend_file = {type = ZEND_HANDLE_FILENAME, filename = 0x0, opened_path = 0x0, handle = {fd = 0, fp = 0x0, stream = {handle = 0x0, isatty = 0, mmap = {len = 0, pos = 0, map = 0x0, buf = 0x0, 
                      old_handle = 0x0, old_closer = 0x0}, reader = 0x0, fsizer = 0x0, closer = 0x0}}, free_filename = 0 '\000'}
              append_file = {type = ZEND_HANDLE_FILENAME, filename = 0x0, opened_path = 0x0, handle = {fd = 0, fp = 0x0, stream = {handle = 0x0, isatty = 0, mmap = {len = 0, pos = 0, map = 0x0, buf = 0x0, 
                      old_handle = 0x0, old_closer = 0x0}, reader = 0x0, fsizer = 0x0, closer = 0x0}}, free_filename = 0 '\000'}
              old_cwd = 0x7fff6ce121b0 "/"
              use_heap = 0 '\000'
              retval = 0
      #19 0x000000000086fce2 in main (argc=5, argv=0x7fff6ce16838) at /var/tmp/portage/dev-lang/php-5.5.22/work/sapis-build/fpm/sapi/fpm/fpm/fpm_main.c:1953
              primary_script = 0x7fe9be53c740 "/var/www/dnshome.de/htdocs/stats.graph.php"
              __orig_bailout = 0x0
              __bailout = {{__jmpbuf = {0, -4539340392398277583, 4569088, 140735020099632, 0, 0, -4539340391364381647, 4539590188723516465}, __mask_was_saved = 0, __saved_mask = {__val = {
                      0 <repeats 16 times>}}}}
              exit_status = 0
              cgi = 0
              c = -1
              use_extended_info = 0
              file_handle = {type = ZEND_HANDLE_FILENAME, filename = 0x7fe9be5092a0 "/var/www/dnshome.de/htdocs/stats.graph.php", opened_path = 0x0, handle = {fd = -1101805064, fp = 0x7fe9be53c9f8, 
                  stream = {handle = 0x7fe9be53c9f8, isatty = 0, mmap = {len = 5009, pos = 0, map = 0x0, buf = 0x7fe9afef0000 <error: Cannot access memory at address 0x7fe9afef0000>, old_handle = 0x0, 
                      old_closer = 0x0}, reader = 0x738599 <_php_stream_read>, fsizer = 0x71989c <php_zend_stream_fsizer>, closer = 0x719876 <php_zend_stream_mmap_closer>}}, free_filename = 0 '\000'}
              orig_optind = 1
              orig_optarg = 0x0
              ini_entries_len = 0
              max_requests = 500
              requests = 2
              fcgi_fd = 0
              request = {listen_socket = 0, fd = 4, id = 1, keep = 0, closed = 0, in_len = 0, in_pad = 0, out_hdr = 0x0, out_pos = 0x7fff6ce14720 "\001\006", 
                out_buf = "\001\006\000\001\r\247\001\000X-Powered-By: PHP/5.5.22-pl0-gentoo\r\nContent-type: image/png\r\n\r\n\211PNG\r\n\032\n\000\000\000\rIHDR\000\000\002\274\000\000\001,\b\003\000\000\00
      0\026ꐯ\000\000\000EPLTE\377\377\377\334\334\334\310\310\310ddd\000\000\000\000\000\377\000\000\377\000\377\000\000\365\000\000\354\000\000\343\000\000\332\000\000\321\000\000\310\000\000\277\000\000\26
      6\000\000\255\000\000\244\000\000\233\000\000\222\000\000\211\000\000\200\000\000v\000m\264\377\016\000\000\f\335IDATx\234흋\222\253\070\022\005"..., reserved = '\000' <repeats 15 times>, 
                env = 0x7fe9be5070c8}
              fpm_config = 0x7fff6ce17a0c ""
              fpm_prefix = 0x0
              fpm_pid = 0x7fff6ce17a30 ""
              test_conf = 0
              force_daemon = -1
              php_information = 0
              php_allow_to_run_as_root = 0
              __func__ = "main"
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jmikola Jeremy Mikola
              Reporter:
              Bodenhaltung Bodenhaltung [X]
              Participants:
              Last commenter:
              Alexander Golin Alexander Golin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since reply:
                5 years, 49 weeks, 5 days ago
                Date of 1st Reply: