os.stat bug?

Nobody nobody at nowhere.com
Mon Mar 21 13:44:24 EDT 2011


On Mon, 21 Mar 2011 09:32:11 +0100, Laszlo Nagy wrote:

> So the state of the process changes to "STOP", but the program does not 
> stop until the os.stat call returns back (sometimes for 30 seconds).
> 
> Could it be a problem with the operation system? Is it possible that an 
> os.stat call requires 100% CPU power from the OS? Or is it a problem 
> with the Python implementation?

It's the OS kernel. If it was Python or the C library, sending SIGKILL
would result in immediate termination.

Is the disk interface operating in PIO mode? A slow disk shouldn't cause
100% CPU consumption; the OS would just get on with something else (or
just idle) while waiting for data to become available. But if it's
having to copy data from the controller one word at a time, that could
cause it (and would also make the disk appear slow).




More information about the Python-list mailing list