Re-creating a destroyed array element by createhere: stale location entries misplace it and reject its epoch
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- cpp
- Ambito
- distributed-systems
Direzione di ricerca
Start with CkArray::insertElement and its isRemote(idx) redirect, then CkLocCache::insert and the epoch check there, and reclaimRemote on the home side. Run tests/charm++/objid_insert (./objid_insert +p4 and +p4 -b) with phase 6 switched from createhome to createhere to reproduce both the misplacement and the epoch rejection. Done means the re-created element lands on the sending PE and later sends stop taking the detour, which the issue leaves to a design choice.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Found while extending tests/charm++/objid_insert for #4028; the defects predate the object id redesign and exist on main and reviewed-with-reconverse too. No application in the tree re-creates a destroyed element, so this is filed for the record, not as a blocker.
Scenario
Array element X lives on PE P. Other PEs have cached "X at P, epoch e". X is destroyed: P drops its record and tells the home, which erases its own cache entry but keeps the index-to-id binding (reclaimRemote). No other PE is told, so every other PE still holds "X at P, epoch e".
Later a [createhere] message for X is sent from PE B, so X should be re-created on B (the sending PE).
Defect 1: placement
CkArray::insertElement first asks isRemote(idx). B's stale entry says "at P", so B forwards the constructor message to P. The redirect exists for bound arrays, where a new element must be created where its sibling lives, but it cannot tell a live sibling from a stale entry for a dead element. The element is created somewhere other than B, or bounces.
Small fix: restrict the redirect to location managers that serve more than one array (bound arrays). For a single array, inserting an index that already lives elsewhere is a user error.
Defect 2: epoch
The re-created element registers with epoch 0 (createLocal default). Cache updates apply only when newer, so every PE holding the old entry keeps "X at P" and every later send takes the detour through P and the home; the repair it triggers carries epoch 0 and is rejected again. Delivery stays correct, the detour is permanent. In a debug build the creating PE asserts in CkLocCache::insert (epoch >= e.epoch) if it held the old entry itself.
For a packed-kind array the id is fixed by the index, so the re-created element reuses the id the stale caches know; a fresh id (possible for the hashed kind) does not cover it.
Proposed approach: lazy invalidation at load balancing
The home learns of every deletion. Keep the dead indices at the home and, at the next load-balancing step, when location updates are broadcast anyway, include "forget this id" entries, so every PE drops the stale entry and its epoch. Nothing is sent per deletion. Re-creation between a deletion and the next balancing step stays undefined until an application needs it.
Reproducer
tests/charm++/objid_insert phase 6 re-creates destroyed elements by createhome only; switching the re-creation to createhere shows both defects (the test header says so). Any build; ./objid_insert +p4 and +p4 -b.
- Lingua principale
- C++
- Stelle
- 241
- Fork
- 62
- Merge medio
- 1g 1h
- PR unite (30g)
- 121
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di charmplusplus/charm
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
charmplusplus/charm#4210 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
charmplusplus/charm#4160 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
charmplusplus/charm#3619 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
charmplusplus/charm#4204 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 49/100
charmplusplus/charm#4200 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di charmplusplus/charm
Issue simili
-
mlir
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
llvm/llvm-project#241070 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
backlog documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 96/100
EchoTools/nevr-runtime#2354 ·
I maintainer di solito rispondono entro 1 giorno
-
Page request: clang-replApertahelp wanted new command
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
tldr-pages/tldr#25111 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Ask the `ServerHelper` for fresh headers on every poll in `Future::get`, as is done for cookiesApertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
NVIDIA/cuda-quantum#5886 ·
I maintainer di solito rispondono entro 1 giorno