Comments (13)
Adding pk
calls in channels.scm
shows that (put-message n)
is called twice with the same value of n
when things go wrong.
With GUILE_JIT_THRESHOLD=-1
, the problem seems to go away.
Could we have a program counter synchronization issue or similar when returning from JITted code? Thoughts, @wingo?
(This reminds me of https://issues.guix.gnu.org/28211#23, though that one didn't involve JIT particularly.)
from fibers.
AFAICS this program is deterministic. On aarch64, is the number at which we see a problem deterministic, too?
from fibers.
Does the problem reproduce on qemu?
from fibers.
Hey!
AFAICS this program is deterministic. On aarch64, is the number at which we see a problem deterministic, too?
@wingo No, the number changes at each run.
In qemu-aarch64
running on x86_64 (via binfmt_misc
support), the problem does not occur.
FWIW, the AArch64 machine I'm testing on is a SoftIron OverDrive with this CPU:
$ lscpu
Architecture: aarch64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Vendor ID: ARM
Model name: Cortex-A57
Model: 2
Thread(s) per core: 1
Core(s) per cluster: 4
Socket(s): -
Cluster(s): 1
Stepping: r1p2
BogoMIPS: 500.00
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
NUMA:
NUMA node(s): 1
NUMA node0 CPU(s): 0-3
Vulnerabilities:
Itlb multihit: Not affected
L1tf: Not affected
Mds: Not affected
Meltdown: Not affected
Mmio stale data: Not affected
Retbleed: Not affected
Spec store bypass: Vulnerable
Spectre v1: Mitigation; __user pointer sanitization
Spectre v2: Vulnerable
Srbds: Not affected
Tsx async abort: Not affected
from fibers.
On your machine if you taskset to a specific CPU does that change anything? Trying to understand here.
from fibers.
@wingo The problem almost disappears (happens once every 10-20 runs instead of once every run or so) when binding the process to a single core, like so:
guix shell guile guile-fibers hwloc -- hwloc-bind core:0 -- sh -c 'while guile ../fibers-channel.scm ; do : ; done'
from fibers.
guix shell guile guile-fibers hwloc -- hwloc-bind core:0 -- sh -c 'while guile ../fibers-channel.scm ; do : ; done'
I used the same snippet on one of my machines. On my pbp as far as I can tell core0 is an A53 core. In the loop I had failures at 10, 5, 7, 1, 27, 3, 1, 20, 3, 2, 7, and then I stopped it.
Without pinning it to one cpu I had failures at 1, 6, 3, 2, 1, 1, 1, 3, 2, 7, 7, 2 and then I stopped it.
from fibers.
If this really only happens for JIT-compiled code, then one possibility would be bad codegen for atomics. It would be in https://gitlab.com/wingo/lightening/-/blob/main/lightening/aarch64-cpu.c#L2520-2565. But that would be weird given that this test is single-threaded!
from fibers.
Related Issues (20)
- Possibly wrong usage of atomic-box-set! HOT 1
- Lots of unmerged pull reqs!? HOT 4
- Unknown meta command: fibers HOT 2
- In procedure pipe: Too many open files HOT 6
- Infinite loops on uncaught exceptions HOT 5
- Guix build guile-fibers test fails: Too many heap sections. HOT 2
- epoll instance is dead HOT 6
- fibers does not build without epoll HOT 4
- Memory leak on context switches HOT 9
- fibers.scm uses deprecated bitvector-set! HOT 7
- README.md doesn't document dependencies
- fibers depends on gnulib HOT 1
- configure.ac has two operating systems hard-coded, posix-clocks-foo.scm related? HOT 4
- `race-until` test runs forever (1.2.0 + affinity patch, NetBSD 9 amd64) HOT 1
- Cannot print backtraces within a fiber HOT 13
- [doc] clarify the use of dynamic-wind, probably in the Barriers chapter HOT 1
- Guile deprecation warning due to bit-count HOT 9
- Fibers wait can forever on a file descriptor once it has been closed HOT 1
- On GNU/Hurd, 'time_units_per_microsec' is zero HOT 1
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 fibers.