Message353707
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. |
|
| Date |
User |
Action |
Args |
| 2019-10-01 18:00:22 | cappy | set | recipients:
+ cappy, twouters, gregory.p.smith, vstinner, martin.panter, miss-islington, xtreak, haizaar |
| 2019-10-01 18:00:22 | cappy | set | messageid: <1569952822.43.0.274093840921.issue37424@roundup.psfhosted.org> |
| 2019-10-01 18:00:22 | cappy | link | issue37424 messages |
| 2019-10-01 18:00:22 | cappy | create | |
|