Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os.kill(pid, signal.SIGTERM) has no effect using paddlepaddle/paddle:latest-dev #11509

Closed
typhoonzero opened this issue Jun 15, 2018 · 8 comments · Fixed by #11635
Closed

os.kill(pid, signal.SIGTERM) has no effect using paddlepaddle/paddle:latest-dev #11509

typhoonzero opened this issue Jun 15, 2018 · 8 comments · Fixed by #11635
Assignees

Comments

@typhoonzero
Copy link
Contributor

Some unit tests like test_listen_and_serv_op.py, run the test with paddlepaddle/paddle:latest-dev docker image, the call os.kill(pid, signal.SIGTERM) have no effect, while run kill pid in the shell can successfully terminate the process. When using manylinux docker images, this issue is gone.

More info: #11470

@typhoonzero
Copy link
Contributor Author

@velconia Can you please take a look at this?

@velconia
Copy link
Collaborator

OK

@velconia
Copy link
Collaborator

具体是说, 只能支持SIGINT, 不能支持SIGTERM是吗?

@typhoonzero
Copy link
Contributor Author

需要支持SIGINT, SIGTERM,不能使用SIGKILL

@gongweibao gongweibao self-assigned this Jun 18, 2018
@gongweibao
Copy link
Contributor

How to reproduce the hang ISSUE?

@velconia
Copy link
Collaborator

velconia commented Jun 19, 2018

抱歉, 我也没能复现, 请问方便描述下具体的复现方法吗?

是在 paddlepaddle/paddle:latest-dev 这个 image里编译后执行ctest吗? @typhoonzero

@velconia
Copy link
Collaborator

I got some problems in running paddle_build.sh in paddlepaddle/paddle:latest-dev, maybe the code below in paddle_build.sh was wrong

    # Support build for all python versions, currently
    # including cp27-cp27m and cp27-cp27mu.
    PYTHON_FLAGS=""
    if [ "$1" != "" ]; then
        echo "using python abi: $1"
        if [ "$1" == "cp27-cp27m" ]; then
            export LD_LIBRARY_PATH=/opt/_internal/cpython-2.7.11-ucs2/lib:${LD_LIBRARY_PATH#/opt/_internal/cpython-2.7.11-ucs4/lib:}
            export PATH=/opt/python/cp27-cp27m/bin/:${PATH}
            PYTHON_FLAGS="-DPYTHON_EXECUTABLE:FILEPATH=/opt/python/cp27-cp27m/bin/python
        -DPYTHON_INCLUDE_DIR:PATH=/opt/python/cp27-cp27m/include/python2.7
        -DPYTHON_LIBRARIES:FILEPATH=/opt/_internal/cpython-2.7.11-ucs2/lib/libpython2.7.so"
        elif [ "$1" == "cp27-cp27mu" ]; then
            export LD_LIBRARY_PATH=/opt/_internal/cpython-2.7.11-ucs4/lib:${LD_LIBRARY_PATH#/opt/_internal/cpython-2.7.11-ucs2/lib:}
            export PATH=/opt/python/cp27-cp27mu/bin/:${PATH}
            PYTHON_FLAGS="-DPYTHON_EXECUTABLE:FILEPATH=/opt/python/cp27-cp27mu/bin/python
        -DPYTHON_INCLUDE_DIR:PATH=/opt/python/cp27-cp27mu/include/python2.7
        -DPYTHON_LIBRARIES:FILEPATH=/opt/_internal/cpython-2.7.11-ucs4/lib/libpython2.7.so"
        fi
    fi

It seems that the PYTHON_FLAGS should be

export PYTHON_FLAGS="-DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python  -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python2.7  -DPYTHON_LIBRARIES:FILEPATH=/usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so"

@velconia
Copy link
Collaborator

After some effort, I got the stack, it seems that libusb_exit was the reason why our psever hangs up

image

So, I walks through the depencecies of libusb and got this information follow:

image

So, the opencv-python depends on the libusb, and after I installed opencv via pip install opencv-python, things were fixed, so it seemed that the opencv installed via apt-get is different with pip

According to this answer in stackoverflow, we should install both of them to avoid this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants