Tony Cappellini <cappy2...@gmail.com> added the comment:

Using Python 3.7.4, I'm calling subprocess.run() with the following arguments. 
.run() still hangs even though a timeout is being passed in.

subprocess.run(cmd_list,                                            
stdout=subprocess.PIPE,                                           
stderr=subprocess.STDOUT,                                           
shell=False,                                           timeout=timeout_val,     
                                      check=True,                               
            universal_newlines=True)



cmd_list contains the name of the bash script below, which is
./rescan.sh

------------------------------------------------------------------
#!/usr/bin/bash

echo Rescanning system for PCIe devices

echo "Rescan device"
echo 1 > /sys/bus/pci/rescan

sleep 5

if [ `lspci | grep -ic "Non-Volatile memory controller"` -gt 0 ]
then
        echo "Device Detected after Rescan"
else 
        echo "Device NOT detected after Rescan"
        exit 1
fi 

echo Rescan Done


This script is scanning for NVME SSDs, so duplicating the issue is not as 
straightforward as submitting a python script.

The OS is CentOS 7. 

uname  -a shows
 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 
GNU/Linux

I know the Kernel is old, but we have a restriction against updating it.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37424>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to