Re: Having child process Segmentation fault

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If you must use mod_php and prefork (and get segfaults), the first step is to usually unload all mod_php extensions that are not strictly needed. If you use the event or worker mpm, then you must recompile php to be thread-safe.

A better and future-proof approach would be to set up fastcgi (via proxy_fcgi, mod_fcgid or mod_fastcgi) and serve the php scripts separately.

On Tue, Sep 4, 2018 at 5:26 PM Matthew Goebel <mgoebel@xxxxxxxxx> wrote:

Hello,

apache 2.4.34
php 7.1.21
on SLES 12.sp3x64

Grabbed a traceback of one of the failing process, not sure how to proceed from here, or if
this is the correct forum.

  (gdb) backtrace full
#0  0x00007f598af473dd in writev () from /lib64/libc.so.6
No symbol table info available.
#1  0x00007f598ba8dfaa in apr_socket_sendv (sock=sock@entry=0x7f596c011140,
    vec=vec@entry=0x7f597d1f5e60, nvec=nvec@entry=5,
    len=len@entry=0x7f597d1f5dd8) at network_io/unix/sendrecv.c:212
        rv = <optimized out>
        requested_len = <optimized out>
        i = <optimized out>
#2  0x00000000004502e2 in writev_nonblocking (s=s@entry=0x7f596c011140,
    vec=vec@entry=0x7f597d1f5e60, nvec=5, bb=0x7f596c011900,
    cumulative_bytes_written=0x7f59300058f0, c=0x7f596c0113e8)
    at core_filters.c:787
        n = 0
        rv = 0
        arv = <optimized out>
        bytes_written = 0
        bytes_to_write = 68934
        i = <optimized out>
        offset = 0
        old_timeout = 60000000
#3  0x0000000000450523 in send_brigade_nonblocking (s=s@entry=0x7f596c011140,
    bb=bb@entry=0x7f596c011900,
    bytes_written=bytes_written@entry=0x7f59300058f0, c=c@entry=0x7f596c0113e8)
---Type <return> to continue, or q <return> to quit---
    at core_filters.c:704
        bucket = <optimized out>
        next = <optimized out>
        rv = <optimized out>
        vec = {{iov_base = 0x7f59300088d8, iov_len = 3282}, {
            iov_base = 0x7f59402ef278, iov_len = 16413}, {
            iov_base = 0x7f59402f4288, iov_len = 16413}, {
            iov_base = 0x7f59402f9298, iov_len = 16413}, {
            iov_base = 0x7f5948102673, iov_len = 16413}, {iov_base = 0x0,
            iov_len = 0}, {iov_base = 0x0, iov_len = 0}, {iov_base = 0x0,
            iov_len = 0}, {iov_base = 0x0, iov_len = 0}, {iov_base = 0x0,
            iov_len = 0}, {iov_base = 0x0, iov_len = 140022526783755}, {
            iov_base = 0x400, iov_len = 140022526782984}, {
            iov_base = 0x7f59400fa350, iov_len = 140021303583824}, {
            iov_base = 0x10, iov_len = 140021437851264}, {
            iov_base = 0x7f59400fa450, iov_len = 140022560088857}, {
            iov_base = 0x0, iov_len = 140022571932715}}
        nvec = 5
#4  0x0000000000451139 in send_brigade_blocking (c=0x7f596c0113e8,
    bytes_written=0x7f59300058f0, bb=0x7f596c011900, s=0x7f596c011140)
    at core_filters.c:733
        rv = 0
#5  ap_core_output_filter (f=0x7f59300056d8, new_bb=0x7f596c011900)
---Type <return> to continue, or q <return> to quit---
    at core_filters.c:542
        c = 0x7f596c0113e8
        net = 0x7f5930005690
        ctx = 0x7f59300058d8
        bb = 0x7f596c011900
        bucket = <optimized out>
        next = <optimized out>
        flush_upto = <optimized out>
        bytes_in_brigade = 0
        non_file_bytes_in_brigade = <optimized out>
        eor_buckets_in_brigade = <optimized out>
        morphing_bucket_in_brigade = 0
        rv = <optimized out>
#6  0x00007f5986c2a488 in bio_filter_out_pass (
    outctx=outctx@entry=0x7f596c0118e0) at ssl_engine_io.c:139
No locals.
#7  0x00007f5986c2a521 in bio_filter_out_write (bio=<optimized out>,
    in=0x7f5948102673 "\027\003\003@\030@N\252Ţ\260\216\371\362G\364\030\067\205\213}t\266@!\253\345M5\257'\252X)\310b\222\225#\303ԙ*", inl=16413)
    at ssl_engine_io.c:240
        outctx = 0x7f596c0118e0
        e = <optimized out>
        need_flush = <optimized out>
---Type <return> to continue, or q <return> to quit---
#8  0x00007f5988fdabeb in BIO_write () from /lib64/libcrypto.so.1.0.0
No symbol table info available.
#9  0x00007f5989341bd2 in ?? () from /lib64/libssl.so.1.0.0
No symbol table info available.
#10 0x00007f59893422c6 in ?? () from /lib64/libssl.so.1.0.0
No symbol table info available.
#11 0x00007f5986c2da86 in ssl_filter_write (f=0x7f596c0118b8,
    f=0x7f596c0118b8, len=<optimized out>, data="" out>)
    at ssl_engine_io.c:852
        filter_ctx = 0x7f596c011860
        outctx = 0x7f596c0118e0
        res = <optimized out>
#12 ssl_io_filter_output (f=0x7f596c0118b8, bb=0x7f59781bc418)
    at ssl_engine_io.c:1808
        data = "" "[{\"id\":167,\"name\":\"1st Floor, Across from Printing Station\",\"slug\":\"1st-floor-across-from-printing-station\",\"alias\":null,\"description\":null,\"latitudeIllustration\":null,\"longitudeIllustration\":null,\"la"...
        len = 590666
        bucket = 0x7f5930000a68
        status = <optimized out>
        filter_ctx = 0x7f596c011860
        inctx = <optimized out>
---Type <return> to continue, or q <return> to quit---
        outctx = 0x7f596c0118e0
        rblock = APR_NONBLOCK_READ
#13 0x00007f5986c2abca in ssl_io_filter_coalesce (f=0x7f596c011890,
    bb=0x7f59781bc418) at ssl_engine_io.c:1725
        e = <optimized out>
        upto = <optimized out>
        bytes = <optimized out>
        ctx = <optimized out>
        count = <optimized out>
#14 0x000000000046fa74 in ap_http_chunk_filter (f=0x7f59781bcaf0,
    b=0x7f59781bc418) at chunk_filter.c:188
        bytes = <optimized out>
        eos = <optimized out>
        flush = <optimized out>
        chunk_hdr = "9034a\r\n\000\210\336\001\060Y\177\000\000\000\000\000"
        c = 0x7f596c0113e8
        more = <optimized out>
        tmp = 0x0
        e = <optimized out>
        rv = <optimized out>
#15 0x000000000046e3c1 in ap_http_header_filter (f=<optimized out>,
    b=0x7f59781bc418) at http_filters.c:1537
        r = <optimized out>
---Type <return> to continue, or q <return> to quit---
        c = <optimized out>
        clheader = <optimized out>
        protocol = 0x479e1a "HTTP/1.1"
        e = <optimized out>
        b2 = <optimized out>
        h = {pool = 0x7f59300068a8, bb = 0x7f59781bc888}
        ctx = 0x7f59781bc4b8
        ctype = <optimized out>
        eb = <optimized out>
        rv = <optimized out>
        recursive_error = 0
#16 0x000000000043e567 in ap_content_length_filter (f=0x7f5930007de0,
    b=0x7f59781bc418) at protocol.c:1849
        r = 0x7f593001de88
        ctx = 0x7f59781bc468
        e = 0x7f59781bc420
        eos = <optimized out>
        eblock = APR_NONBLOCK_READ
#17 0x000000000046fd27 in ap_byterange_filter (f=0x7f5930007db8,
    bb=0x7f59781bc418) at byterange_filter.c:494
        r = 0x7f593001de88
        c = 0x7f596c0113e8
        e = <optimized out>
---Type <return> to continue, or q <return> to quit---
        bsend = <optimized out>
        tmpbb = <optimized out>
        range_start = <optimized out>
        range_end = <optimized out>
        clength = <optimized out>
        rv = <optimized out>
        found = 0
        bound_head = 0x0
        indexes = <optimized out>
        idx = <optimized out>
        i = <optimized out>
        original_status = <optimized out>
        max_ranges = <optimized out>
        max_overlaps = 20
        max_reversals = <optimized out>
        overlaps = <optimized out>
        reversals = <optimized out>
        core_conf = <optimized out>
#18 0x000000000043aa04 in ap_filter_flush (bb=0x7f59781bc418,
    ctx=<optimized out>) at util_filter.c:683
        f = <optimized out>
        rv = <optimized out>
#19 0x000000000043e952 in ap_rwrite (buf=<optimized out>, nbyte=590666,
---Type <return> to continue, or q <return> to quit---
    r=<optimized out>) at protocol.c:2000
No locals.
#20 0x00007f598525907c in php_apache_sapi_ub_write (
    str=0x7f591ff0b000 "[{\"id\":167,\"name\":\"1st Floor, Across from Printing Station\",\"slug\":\"1st-floor-across-from-printing-station\",\"alias\":null,\"description\":null,\"latitudeIllustration\":null,\"longitudeIllustration\":null,\"la"..., str_length=590666)
    at /usr/local/src/php-7.1.21/sapi/apache2handler/sapi_apache2.c:81
        r = 0x7f593001de88
        ctx = 0x7f593825f4c0
#21 0x00007f59850c6051 in php_output_op (op=0,
    str=0x7f591fe12018 "[{\"id\":167,\"name\":\"1st Floor, Across from Printing Station\",\"slug\":\"1st-floor-across-from-printing-station\",\"alias\":null,\"description\":null,\"latitudeIllustration\":null,\"longitudeIllustration\":null,\"la"..., len=590666) at /usr/local/src/php-7.1.21/main/output.c:1073
        context = {op = 0, in = {data = "" size = 0, used = 0, free = 0,
            _reserved = 0}, out = {
            data = "" "[{\"id\":167,\"name\":\"1st Floor, Across from Printing Station\",\"slug\":\"1st-floor-across-from-printing-station\",\"alias\":null,\"description\":null,\"latitudeIllustration\":null,\"longitudeIllustration\":null,\"la"..., size = 593920, used = 590666, free = 0, _reserved = 0}}
        active = 0x7f596325e000
        obh_cnt = 1
---Type <return> to continue, or q <return> to quit---
#22 0x00007f59850c3b06 in php_output_write (
    str=0x7f591fe12018 "[{\"id\":167,\"name\":\"1st Floor, Across from Printing Station\",\"slug\":\"1st-floor-across-from-printing-station\",\"alias\":null,\"description\":null,\"latitudeIllustration\":null,\"longitudeIllustration\":null,\"la"..., len=590666) at /usr/local/src/php-7.1.21/main/output.c:257
No locals.
#23 0x00007f59850a5cf9 in php_output_wrapper (
    str=0x7f591fe12018 "[{\"id\":167,\"name\":\"1st Floor, Across from Printing Station\",\"slug\":\"1st-floor-across-from-printing-station\",\"alias\":null,\"description\":null,\"latitudeIllustration\":null,\"longitudeIllustration\":null,\"la"..., str_length=590666) at /usr/local/src/php-7.1.21/main/main.c:1964
No locals.
#24 0x00007f598524548f in ZEND_ECHO_SPEC_TMPVAR_HANDLER ()
    at /usr/local/src/php-7.1.21/Zend/zend_vm_execute.h:51332
        str = 0x7f591fe12000
        free_op1 = 0x7f59632134f0
        z = 0x7f59632134f0
#25 0x00007f59851d04f0 in execute_ex (ex=0x7f5963213030)
    at /usr/local/src/php-7.1.21/Zend/zend_vm_execute.h:429
        orig_opline = 0x7f596c011340
        orig_execute_data = 0x7f596c0110b8
#26 0x00007f59851d06f2 in zend_execute (op_array=0x7f5963277100,
    return_value=0x0) at /usr/local/src/php-7.1.21/Zend/zend_vm_execute.h:474
---Type <return> to continue, or q <return> to quit---
        execute_data = 0x7f5963213030
#27 0x00007f59851663f3 in zend_execute_scripts (type=8, retval=0x0,
    file_count=3) at /usr/local/src/php-7.1.21/Zend/zend.c:1482
        files = {{gp_offset = 40, fp_offset = 48,
            overflow_arg_area = 0x7f597d1f68c0,
            reg_save_area = 0x7f597d1f67f0}}
        i = 1
        file_handle = 0x7f597d1f8b10
        op_array = 0x7f5963277100
#28 0x00007f59850a73b5 in php_execute_script (primary_file=0x7f597d1f8b10)
    at /usr/local/src/php-7.1.21/main/main.c:2577
        realfile = "\200\267\313%Y\177\000\000@\000 cY\177\000\000X̀\205Y\177\000\000\t\000\000\200\273\000\000\000\000\000\300%Y\177\000\000\030\000\000\000\060\000\000\000\200\200\037}Y\177\000\000\300\177\037}Y\177", '\000' <repeats 14 times>, "\273\000\000\000xր\205Y\177\000\000\200\267\313%Y\177\000\000@{\037}Y\177\000\000\215\354\033\205Y\177\000\000|\001\000\000\f\f\000\000\200\267\313%Y\177\000\000pV%cY\177\000\000\363Q\200/\240R\337FXY\021\070Y\177\000\000(\322\000lY\177\000\000\370\316\000lY\177\000\000\200\321\000lY\177\000\000\363Q@-\240R\337F\363Q\214\f\251\242\336F\000\000\000\000Y\177\000\000\070\353"...
        __orig_bailout = 0x7f597d1f8b80
        __bailout = {{__jmpbuf = {16, 5106891357341897203, 140021034245768,
              140022040826856, 140022040826040, 140022040826688,
              5106891349752304115, 5106697741168169459}, __mask_was_saved = 0,
---Type <return> to continue, or q <return> to quit---
            __saved_mask = {__val = {140022328031680, 0, 1022202216448,
                140020228816896, 0, 140020228816907, 140022472647926,
                140022472647928, 5958008864, 140022328031760, 0,
                18446744073709551615, 85899345920, 140022468438840,
                140022472647933, 803158884352}}}}
        prepend_file_p = 0x0
        append_file_p = 0x0
        prepend_file = {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}}, filename = 0x0, opened_path = 0x0,
          type = ZEND_HANDLE_FILENAME, free_filename = 0 '\000'}
        append_file = {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}}, filename = 0x0, opened_path = 0x0,
          type = ZEND_HANDLE_FILENAME, free_filename = 0 '\000'}
        old_cwd = 0x7f597d1f68c0 "/"
        use_heap = 0 '\000'
        retval = 0
#29 0x00007f598525aec3 in php_handler (r=0x7f593001de88)
    at /usr/local/src/php-7.1.21/sapi/apache2handler/sapi_apache2.c:712
        zfd = {handle = {fd = 1663463424, fp = 0x7f5963267000, stream = {
---Type <return> to continue, or q <return> to quit---
              handle = 0x7f5963267000, isatty = 0, mmap = {len = 1242,
                pos = 0, map = 0x0,
                buf = 0x7f598c576000 <error: Cannot access memory at address 0x7f598c576000>, old_handle = 0x0, old_closer = 0x0},
              reader = 0x7f59850ca32f <_php_stream_read>,
              fsizer = 0x7f59850a3431 <php_zend_stream_fsizer>,
              closer = 0x7f59850a340b <php_zend_stream_mmap_closer>}},
          filename = 0x7f593825d9e0 "/home/apache2/htdocs2/index.php",
          opened_path = 0x0, type = ZEND_HANDLE_MAPPED,
          free_filename = 0 '\000'}
        __orig_bailout = 0x0
        __bailout = {{__jmpbuf = {140021303573424, 5106891357130084851,
              140021034245768, 140022040826856, 140022040826040,
              140022040826688, 5106891357377548787, 5106698065591161331},
            __mask_was_saved = 0, __saved_mask = {__val = {140021034245768, 0,
                11380080, 140022040826688, 140022496206646, 140021170826208,
                140021034248000, 19, 140022040826856, 140021034246208,
                140021034245768, 0, 140022328036488, 18446744069425425408,
                140021034245768, 140022040826856}}}}
        ctx = 0x7f593825f4c0
        conf = 0xa93a90
        brigade = 0x7f59781bc268
        bucket = 0xadfe78
---Type <return> to continue, or q <return> to quit---
        rv = 0
        parent_req = 0x0
#30 0x0000000000455850 in ap_run_handler (r=r@entry=0x7f593001de88)
    at config.c:170
        pHook = <optimized out>
        n = 5
        rv = -1
#31 0x0000000000455d99 in ap_invoke_handler (r=r@entry=0x7f593001de88)
    at config.c:444
        handler = <optimized out>
        p = <optimized out>
        result = <optimized out>
        old_handler = 0x0
        ignore = <optimized out>
#32 0x000000000046aa4c in ap_internal_redirect (new_uri=<optimized out>,
    r=<optimized out>) at http_request.c:791
        access_status = <optimized out>
        new = 0x7f593001de88
#33 0x00007f5985dea25c in handler_redirect (r=0x7f5930006920)
    at mod_rewrite.c:5256
No locals.
#34 0x0000000000455850 in ap_run_handler (r=r@entry=0x7f5930006920)
    at config.c:170
---Type <return> to continue, or q <return> to quit---
        pHook = <optimized out>
        n = 4
        rv = -1
#35 0x0000000000455d99 in ap_invoke_handler (r=r@entry=0x7f5930006920)
    at config.c:444
        handler = <optimized out>
        p = <optimized out>
        result = <optimized out>
        old_handler = 0x7f5985df2e14 "redirect-handler"
        ignore = <optimized out>
#36 0x000000000046b6da in ap_process_async_request (r=0x7f5930006920)
    at http_request.c:453
        access_status = 0
#37 0x0000000000467c51 in ap_process_http_async_connection (c=0x7f596c0113e8)
    at http_core.c:154
        r = 0x7f5930006920
        cs = 0x7f596c0113b0
#38 ap_process_http_connection (c=0x7f596c0113e8) at http_core.c:248
No locals.
#39 0x000000000045f380 in ap_run_process_connection (c=c@entry=0x7f596c0113e8)
    at connection.c:42
        pHook = <optimized out>
        n = 2
---Type <return> to continue, or q <return> to quit---
        rv = -1
#40 0x0000000000472dca in process_socket (thd=<optimized out>,
    p=<optimized out>, sock=<optimized out>, cs=0x7f596c011340,
    my_child_num=<optimized out>, my_thread_num=<optimized out>)
    at event.c:1048
        c = 0x7f596c0113e8
        conn_id = <optimized out>
        clogging = <optimized out>
        rv = <optimized out>
        rc = 0
#41 0x0000000000474348 in worker_thread (thd=0xad5f40, dummy=<optimized out>)
    at event.c:2122
        csd = 0x7f596c011140
        cs = 0x0
        te = 0x0
        ptrans = 0x7f596c0110b8
        ti = <optimized out>
        process_slot = 0
        thread_slot = 5
        rv = <optimized out>
        is_idle = 0
#42 0x00007f598b413724 in start_thread () from /lib64/libpthread.so.0
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#43 0x00007f598af4ee8d in clone () from /lib64/libc.so.6
No symbol table info available.



Thanks,
Matt

--
Matthew Goebel : goebel@xxxxxxxxxxxxxxxx : Unix Jockey @ EMU : Hail Eris
Neo-Student, Net Lurker, Donut consumer, and procrastinating medher...
 "Always with the negative waves, Moriarty" - Oddball
 "Comfort the troubled, and trouble the comfortable." - Dietrich Bonhoeffer


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux