php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68999 SIGPIPE in cli-server
Submitted: 2015-02-06 17:42 UTC Modified: -
From: hannes dot magnusson at gmail dot com Assigned:
Status: Open Package: Built-in web server
PHP Version: 5.5.21 OS: Ubuntu
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2015-02-06 17:42 UTC] hannes dot magnusson at gmail dot com
Description:
------------
Refreshing possibly not-existing page (that then becomes available) frequently resulted in a sigpipe.

Actual result:
--------------
(gdb) bt full
#0  0x00007ffff68e525d in __libc_send (fd=4, buf=0x1a1f4b0, n=1168, flags=-1) at ../sysdeps/unix/sysv/linux/x86_64/send.c:27
        resultvar = 18446744073709551584
        oldtype = -17552
#1  0x00000000009de051 in php_cli_server_client_send_through (client=0x18df5d0, str=0x1a1f4b0 "\037\213\b", str_len=1168)
    at /usr/local/p/src/5.5.17/sapi/cli/php_cli_server.c:1815
        nbytes_sent = 1581478478088291072
        tv = {
          tv_sec = 10, 
          tv_usec = 0
        }
        nbytes_left = 1168
#2  0x00000000009da423 in sapi_cli_server_ub_write (str=0x1a1f4b0 "\037\213\b", str_length=1168, tsrm_ls=0x119da80)
    at /usr/local/p/src/5.5.17/sapi/cli/php_cli_server.c:619
        client = 0x18df5d0
#3  0x0000000000866cc9 in php_output_op (op=0, str=0x1a1f4b0 "\037\213\b", len=1168, tsrm_ls=0x119da80)
    at /usr/local/p/src/5.5.17/main/output.c:1093
        context = {
          op = 0, 
          in = {
            data = 0x0, 
            size = 0, 
            used = 0, 
            free = 0, 
            _res = 0
          }, 
          out = {
            data = 0x1a1f4b0 "\037\213\b", 
            size = 0, 
            used = 1168, 
            free = 0, 
            _res = 0
          }, 
          tsrm_ls = 0x119da80
        }
        active = 0x83d127 <ts_resource_ex+50 at /usr/local/p/src/5.5.17/TSRM/TSRM.c:329>
        obh_cnt = 112
#4  0x0000000000864541 in php_output_write (str=0x1a1f4b0 "\037\213\b", len=1168, tsrm_ls=0x119da80)
    at /usr/local/p/src/5.5.17/main/output.c:269
No locals.
#5  0x0000000000867345 in php_output_stack_pop (flags=1, tsrm_ls=0x119da80) at /usr/local/p/src/5.5.17/main/output.c:1256
        context = {
          op = 9, 
          in = {
            data = 0x18089b0 "<!DOCTYPE html>\n<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\">\n<head>\n\n  <meta charset=\"utf-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"> \n\n  <title>PHP: 404 Not "..., 
            size = 20480, 
            used = 3146, 
            free = 0, 
            _res = 0
          }, 
          out = {
            data = 0x1a1f4b0 "\037\213\b", 
            size = 3216, 
            used = 1168, 
            free = 1, 
            _res = 0
          }, 
          tsrm_ls = 0x119da80
        }
        current = 0x0
        orphan = 0x19016a0
#6  0x000000000086494a in php_output_end_all (tsrm_ls=0x119da80) at /usr/local/p/src/5.5.17/main/output.c:350
No locals.
#7  0x0000000000846ae3 in php_request_shutdown (dummy=0x0) at /usr/local/p/src/5.5.17/main/main.c:1766
        send_buffer = 1 '\001'
        __orig_bailout = 0x7fffffffdaa0
        __bailout =           {{
            __jmpbuf =               {0,
              8390257034011823021,
              4358288,
              140737488346192,
              0,
              0,
              8390257032585759661,
              -8390258165219112019}, 
            __mask_was_saved = 0, 
            __saved_mask = {
              __val =                 {140737488346192,
                0,
                0,
                8390257032579468205,
                10056485908490439597,
                140733193388032,
                140737326355408,
                0,
                82,
                18446603336221212561,
                140737329821536,
                64,
                4358288,
                140737488346192,
                0,
                0}
            }
          }}
        report_memleaks = 1 '\001'
        tsrm_ls = 0x119da80
#8  0x00000000009e0042 in php_cli_server_request_shutdown (server=0x119a1c0 <server>, client=0x18df5d0, tsrm_ls=0x119da80)
    at /usr/local/p/src/5.5.17/sapi/cli/php_cli_server.c:2108
No locals.
#9  0x00000000009e04fe in php_cli_server_dispatch (server=0x119a1c0 <server>, client=0x18df5d0, tsrm_ls=0x119da80)
    at /usr/local/p/src/5.5.17/sapi/cli/php_cli_server.c:2176
        is_static_file = 1
#10 0x00000000009e0d8f in php_cli_server_recv_event_read_request (server=0x119a1c0 <server>, client=0x18df5d0, tsrm_ls=0x119da80)
    at /usr/local/p/src/5.5.17/sapi/cli/php_cli_server.c:2365
        errstr = 0x0
        status = 1
#11 0x00000000009e11a3 in php_cli_server_do_event_for_each_fd_callback (_params=0x7fffffffc850, fd=4, event=1)
    at /usr/local/p/src/5.5.17/sapi/cli/php_cli_server.c:2456
        client = 0x1836408
        params = 0x7fffffffc850
        tsrm_ls = 0x119da80
        server = 0x119a1c0 <server>
#12 0x00000000009dbc65 in php_cli_server_poller_iter_on_active (poller=0x119a1c8 <server+8>, opaque=0x7fffffffc850, 
    callback=0x9e0f32 <php_cli_server_do_event_for_each_fd_callback at /usr/local/p/src/5.5.17/sapi/cli/php_cli_server.c:2413>)
    at /usr/local/p/src/5.5.17/sapi/cli/php_cli_server.c:955
        retval = 0
        fd = 4
        max_fd = 4
#13 0x00000000009e1249 in php_cli_server_do_event_for_each_fd (server=0x119a1c0 <server>, 
    rhandler=0x9e0c71 <php_cli_server_recv_event_read_request at /usr/local/p/src/5.5.17/sapi/cli/php_cli_server.c:2353>, 
    whandler=0x9e0dca <php_cli_server_send_event at /usr/local/p/src/5.5.17/sapi/cli/php_cli_server.c:2374>, tsrm_ls=0x119da80)
    at /usr/local/p/src/5.5.17/sapi/cli/php_cli_server.c:2477
        params = {
          tsrm_ls = 0x119da80, 
          server = 0x119a1c0 <server>, 
          rhandler = 0x9e0c71 <php_cli_server_recv_event_read_request at /usr/local/p/src/5.5.17/sapi/cli/php_cli_server.c:2353>, 
          whandler = 0x9e0dca <php_cli_server_send_event at /usr/local/p/src/5.5.17/sapi/cli/php_cli_server.c:2374>
        }
#14 0x00000000009e12db in php_cli_server_do_event_loop (server=0x119a1c0 <server>, tsrm_ls=0x119da80)
    at /usr/local/p/src/5.5.17/sapi/cli/php_cli_server.c:2487
        tv = {
          tv_sec = 0, 
          tv_usec = 999971
        }
        n = 1
        retval = 0
#15 0x00000000009e16cb in do_cli_server (argc=4, argv=0x119d940, tsrm_ls=0x119da80)
    at /usr/local/p/src/5.5.17/sapi/cli/php_cli_server.c:2588
        php_optarg = 0x119d9c0 "10.5.0.91:8080"
        php_optind = 3
        c = -1
        server_bind_address = 0x119d9c0 "10.5.0.91:8080"
        document_root = 0x7fffffffca10 "/home/bjori/Sources/php/phpweb"
        router = 0x119d9e0 ".router.php"
        document_root_buf =           "/home/bjori/Sources/php/phpweb", '\000' <repeats 82 times>, "`\317\377\377\377\177\000\000\240\312\377\377\377\177\000\000\304\314\377\377\377\177\000\000\224\317\377\377\377\177\000\000\340\312\377\377\377\177\000\000\204\240c", '\000' <repeats 13 times>, "\274\314\377\377\377\177\000\000\214\317\377\377\377\177\000\000@\206\027\001\000\000\000\000\020\314\377\377\377\177\000\000"...
#16 0x00000000009d509d in main (argc=4, argv=0x119d940) at /usr/local/p/src/5.5.17/sapi/cli/php_cli.c:1381
        __orig_bailout = 0x0
        __bailout =           {{
            __jmpbuf =               {0,
              8390257033854536621,
              4358288,
              140737488346192,
              0,
              0,
              8390257033896479661,
              -8390258244354487379}, 
            __mask_was_saved = 0, 
            __saved_mask = {
              __val =                 {140737488345856,
                4131212846,
                4281292,
                4294967295,
                140737351947607,
                140737325961640,
                140737353977856,
                140737354129864,
                140737325942440,
                1,
                10362877,
                140737488346200,
                0,
                10362800,
                4358288,
                140737488346192}
            }
          }}
        tsrm_ls = 0x119da80
        c = -1
        exit_status = 0
        module_started = 1
        sapi_started = 1
        php_optarg = 0x119d9c0 "10.5.0.91:8080"
        php_optind = 3
        use_extended_info = 0
        ini_path_override = 0x0
        ini_entries = 0x0
        ini_entries_len = 0
        ini_ignore = 0
        sapi_module = 0x1182640 <cli_server_sapi_module>


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC