Aleksandr Efimov created AMBARI-26667:
-----------------------------------------

             Summary: Process-tree timeout cleanup leaves processes stopped on 
Python 3.9
                 Key: AMBARI-26667
                 URL: https://issues.apache.org/jira/browse/AMBARI-26667
             Project: Ambari
          Issue Type: Bug
          Components: ambari-agent
    Affects Versions: 3.0.0
            Reporter: Aleksandr Efimov


On Ambari 3.0.0 with Python 3.9, kill_process_tree passes str(signal.SIGKILL) 
to killtree.sh. This evaluates to Signals.SIGKILL instead of 9. The faulty call 
also remains on trunk.

When a command times out with KILL_PROCESS_TREE, killtree.sh first stops the 
process tree. Its subsequent kill command rejects the symbolic argument, 
leaving the processes stopped. HiveServer2 alert checks can consequently remain 
stale.

The argument error can be reproduced without sending a signal:

    python3.9 -c 'import signal; print(str(signal.SIGKILL))'
    bash -c 'kill -l Signals.SIGKILL'

The first command prints Signals.SIGKILL; the second reports an invalid signal 
specification.

Expected: timeout cleanup terminates the process tree. Pass 
signal.SIGKILL.value to killtree.sh.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to