I/O Error with PHP5-FPM, ptrace(PEEKDATA) failed

1928 단어

하나.Google이 알려줄 수 있는 거.


It appears you have request_slowlog_timeout enabled. This normally takes any request longer than N seconds, logs that it was taking a long time, then logs a stack trace of the script so you can see what it was doing that was taking so long.
In your case, the stack trace (to determine what the script is doing) is failing. If you're running out of processes, it is because either:
  • After php-fpm stops the process to trace it, the process fails to resume because of the error tracing it
  • The process is resuming but continues to run forever.

  • My first guess would be to disable request_slowlog_timeout. Since it's not working right, it may be doing more harm than good. If this doesn't fix the issue of running out of processes, then set the php.ini max_execution_time to something that will kill the script for sure.
    ref: http://serverfault.com/questions/406532/i-o-error-with-php5-fpm-ptracepeekdata-failed

    2.원본 코드가 알려줄 수 있어요.


    다음은 창고 정보를 인쇄하는 핵심 함수
    /****************************************
    source: https://launchpad.net/php-fpm
    filename: fpm/fpm_trace_ptrace.c
    *****************************************/
    
    int fpm_trace_get_long(long addr, long *data)
    {
            errno = 0;
    
            /*
            Reads  a word at the location addr in the child’s memory, 
            returning the word as the result of the ptrace() call
            */
            *data = ptrace(PTRACE_PEEKDATA, traced_pid, (void *) addr, 0);
    
            if (errno) {
                    zlog(ZLOG_STUFF, ZLOG_SYSERROR, "ptrace(PEEKDATA) failed");
                    return -1;
            }
    
            return 0;
    }
    

    추적 프로세스의 실행 데이터를 가져오는 데 오류가 발생하면 오류 정보를 출력합니다.이런 잘못된 정보는 무해해야 한다.

    셋.확장


    ptrace 시스템 함수.
    ptrace는 부모 프로세스가 다른 프로세스를 감시하고 제어할 수 있도록 하는 방식을 제공합니다. 하위 프로세스의 레지스터와 핵 이미지를 바꿀 수 있기 때문에 인터럽트 디버깅과 시스템 호출 추적을 실현할 수 있습니다.

    좋은 웹페이지 즐겨찾기