This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cappy
Recipients cappy, gregory.p.smith, haizaar, martin.panter, miss-islington, twouters, vstinner, xtreak
Date 2019-10-01.18:00:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1569952822.43.0.274093840921.issue37424@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-10-01 18:00:22cappysetrecipients: + cappy, twouters, gregory.p.smith, vstinner, martin.panter, miss-islington, xtreak, haizaar
2019-10-01 18:00:22cappysetmessageid: <1569952822.43.0.274093840921.issue37424@roundup.psfhosted.org>
2019-10-01 18:00:22cappylinkissue37424 messages
2019-10-01 18:00:22cappycreate