Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Outdated documentation of shared memory API usage

Aperta Adatta ai principianti
#372 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@uwe-martin ci sta già lavorando.

Dal 22/10/2026.

  • #373 di @uwe-martin — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
76/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
cpp
Ambito
documentation

Direzione di ricerca

Inizia da score/datarouter/doc/design/shm_apis.md e confronta ogni affermazione segnalata con l’implementazione attuale, inclusi reader_factory_impl.cpp e la directory wait_free_producer_queue. Verifica come la modalità dinamica crea il file di memoria condivisa, quali flag di apertura vengono usati, come i writer gestiscono un buffer pieno e cosa succede quando i tentativi di riconnessione falliscono. Il lavoro è concluso quando la documentazione descrive accuratamente il design lock-free attuale e il comportamento della connessione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Description

score/datarouter/doc/design/shm_apis.md contains several statements that do not match the current codebase:

Incorrect statements:

  • Lines 22-24 describe a POSIX mutex in shared memory protecting read/write pointer consistency. The implementation uses lock-free atomics with no mutex anywhere in the shared memory structures or the wait_free_producer_queue directory.
  • Line 22 states the writer advances the reader pointer when the buffer is full. In practice, the writer drops the message.
  • Line 20 states "the reader can (and does) modify the shared memory." The reader maps with PROT_READ only (reader_factory_impl.cpp) and holds const SharedData&. All shared memory mutations are performed by the writer process.

Inaccurate or incomplete statements:

  • Line 20 only mentions open() for shared memory creation. In dynamic mode, mkstemps() creates the file.
  • Line 20 omits the O_EXCL and O_CLOEXEC flags used alongside O_RDWR.
  • Line 45 states reconnection is handled transparently, without noting that prolonged failure triggers permanent client shutdown.
  • Line 56 states DataRouter "waits for the reconnect." There is no explicit wait — the session is destroyed and the server continues listening; a reconnecting client creates a new session.

The documentation appears to describe a predecessor design (mutex-based circular buffer) that has since been replaced by the current lock-free alternating double-buffer design.

Problem notifications

No functional impact.

Analysis results

Documentation will be updated in subsequent PR.

Solution

See linked PR.

Error Occurrence Rate

None

How to reproduce

No response

Supporting Information

No response

Classification

Minor

First Affected Release

not released (main)

Last Affected Release

not released (main)

Expected Fixed Release

before release (main)

Category
  • Safety Relevant
  • Security Relevant
Lingua principale
C++
Stelle
2
Fork
32
Merge medio
4g 7h
PR unite (30g)
13

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di eclipse-score/logging

Tutte le issue di eclipse-score/logging

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.