![]() Victor, I'd appreciate it if you could take a look at this. Since this problem has been around since 3.7.0, I am lowering the priority to "deferred blocker" to not hold up 3.7.3rc1. I've attached a WIP PR that at the moment just turns Alexander's test into a potential test case. With Python 3.6.x, that fallbacks correctly but it appears that refactoring introduced with the implementation of PEP 564 ( bpo-31784, #3989) broke that for 3.7.x (and master/3.8). For older systems, timemodule.c falls back to using getrusage. ensure the results are "close" to each other.įurther investigation shows that several time related functions were added to macOS at 10.12 including clock_gettime. I don't have time to investigate further today.īTW, it would be a good idea to adapt your test program as a test case, i.e. It looks like the incorrect results show up when building on macOS 10.11.x and earlier.ġ0.12 through 10.14 have the correct results. I had time to run a quick check building on earlier macOS versions. There were a number of changes made in 3.7 to the time module and underlying code in Python, specifically Python/pytime.c, so my guess is that the changes are depending on some feature or change that is in later versions of macOS since the expected results are obtained when built directly on and run on a current macOS version. Your test also fails when run on these earlier systems with 3.7.0 or later but not 3.6.8. The macOS Pythons from are built to run on a range of OS versions: these days macOS 10.9+ or 10.6+. There does indeed seem to be a problem but, as can be seen if you run your test from SO (please attach it to this issue!) with a current 3.6.x installer for macOS which uses the same build infrastructure as the 3.7 and 3.8 installers, the results are correct. Of course, this could introduce new problems, but also fix some old ones. To fix this problem: the build for macOS should be made with compiler Clang 10.0.0 (clang-1000.11.45.5). I asked the question on Stack Overflow today, investigated, and reported here: My Windows and Linux (CentOS) computers have no such problem. I see this problem only on my iMac (macOS Mojave, Version 10.14.3). Nitapol, lukasz.langa, miss-islington, ned.deily, rhettinger, ronaldoussoren, rvijayak, vstinnerĬreated on 02:23 by Nitapol, last changed 14:59 by admin. Happy to provide more details if required.Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions In hindsight I should have done tail -f to see if the program was running. I was anticipating a very large output, and I wanted to count the number of lines so I piped the output of foo to wc -l.It seems to me the TIME values returned by ps, 1184016092-19:52:29 (from ps -e) and 24322737:01 (from ps aux), are impossibly large.Ps -eF | grep foo UID PID PPID C SZ RSS PSR STIME TTY TIME CMDīilbo 32734 203pts/16 1184016092-19:52:29 foo Running ps gives me the following output.However I am still seeing one of the processors being utilised at near 100% capacity.In the above table foo is at the top, but the %CPU it is being shown to use is 15583.The Top 10 cpu intensive process (according to ps) are:.Now it is nowhere near the top of CPU usage (top shows 0%).Until around 10 days ago (I cannot be very exact) it used 100% of one cpu on my dual core laptop (it was at the top of top sorted for CPU usage).It has been running for close to 30 days now (even more).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |