Re:Reading /proc/pid/cmdline can hang forever
by andreasvc on Tuesday October 28, 2014 @09:23PM
(#8524937)
Why is that? Doesn't it make more sense to have a deadline of, say, 10 seconds after which the stat/read/etc will simply fail? I remember trying to fix this for broken NFS mounts and not succeeding.
[ Parent
| on HN ]
Re:Reading /proc/pid/cmdline can hang forever
by peterwwillis on Tuesday October 28, 2014 @11:06PM
(#8525305)
Basically, in order to maintain the integrity of the filesystem state, it is assumed that all NFS operations are only temporarily unavailable, and the system generally waits forever for the server to respond. If the kernel interrupted the operation with the client, the client might decide to act in a way that negatively affects the state of the filesystem.
Of course there's no reason for 'ps' not to build in its own timeout for i/o. It could cause premature failure on loaded boxes, but it wouldn't hurt anything.