Comments (7)
benchmark hangs
Do you mean that it uses all the CPU, or that the process hangs and do nothing?
Can you check which lines are executed when it "hangs"?
from cpython.
I reproduced the issue. The problem comes from _WindowsTime
of distributed/metrics.py
.
Combine time.time() or time.monotonic() with time.perf_counter() to get an absolute clock with fine resolution.
from cpython.
I reported the issue to the dask/distributed project and I proposed a fix:
from cpython.
@mdboom: I suggest to close this issue since it's not a bug in Python, and it's now tracked in dask/distributed.
from cpython.
I want to bring a discussion elsewhere back here.
@vstinner: I definitely have no experience with these Windows APIs, however, it seems that the change in 1d95451 introduced some stateful interaction between time.time
and time.perf_counter
, since they both now call py_win_perf_counter_frequency
with the same global variable as base. Is this a regression for any code that calls time.time
and time.perf_counter
interleaved? What are the implications of that?
At a minimum, I think we should improve the "What's new" entry about this so people are aware of the interaction.
from cpython.
the change in 1d95451 introduced some stateful interaction between time.time and time.perf_counter, since they both now call py_win_perf_counter_frequency with the same global variable as base.
- time.time() now calls GetSystemTimePreciseAsFileTime()
- time.perf_counter() is unchanged
- time.monotonic() now calls GetSystemTimePreciseAsFileTime().
It's documented at: https://docs.python.org/dev/whatsnew/3.13.html#time
from cpython.
Yes, but why did that break dask? Because the assumption about time.time
having low resolution no longer holds? I think the concern is for possibly breaking other libraries using these APIs.
Sorry, I see you answered my question elsewhere.
from cpython.
Related Issues (20)
- `_io.TextIOWrapper.write`: write during flush causes `pending_bytes` length mismatch
- OOM vulnerability in the imaplib module
- Use new REPL for the "code" module HOT 1
- RuntimeError: Can't find llvm-readobj-18! HOT 3
- Odd behavior from pasting large text in the new REPL HOT 3
- Stop manually interning strings in pathlib HOT 6
- `IncompleteInputError` is undocumented HOT 10
- Deadlock while updating type cache (free-threading)
- cpython with msvc run into `Windows fatal exception: access violation` with `PyModule_AddFunctions` and `uint8_t = uint8_t * double` HOT 1
- `OSError` when creating a `multiprocessing.Queue` with `maxsize > 32767`
- Support `pythonπ` in Python 3.14 venv's HOT 6
- Performance regression in emulated arm64 on x86_64 host starting in 3.11.6
- Fixes missing dependencies in Makefile HOT 2
- Add a "clear" command to PYREPL
- Colorized output implemented in new REPL leaks into old REPL HOT 3
- PyREPL: KeyboardInterrupt does not clear completion menu if it's already visible
- New repl closes CLI session on SyntaxError inside of the match statement HOT 1
- Invalid Assert in PyState_FindModule() HOT 1
- Remove AST nodes deprecated since Python 3.8, with warnings since Python 3.12
- Python's audithook isn't called with Python 3.12 but within Jupyter Notebooks HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpython.