Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Outdated documentation of shared memory API usage

オープン 初心者向け
#372 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@uwe-martin がすでに取り組んでいます。

2026年10月22日 から。

  • #373 @uwe-martin による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
cpp
領域
documentation

調査の方向性

score/datarouter/doc/design/shm_apis.md から始め、reader_factory_impl.cpp と wait_free_producer_queue ディレクトリを含む現在の実装と、指摘された各記述を照合してください。動的モードで共有メモリファイルをどのように作成するか、どのオープンフラグを使うか、バッファが満杯のときに writer がどう処理するか、再接続に失敗したときに何が起きるかを確認してください。ドキュメントが現在の lock-free 設計と接続動作を正確に説明できたら完了です。

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
C++
スター
2
フォーク
32
平均マージ
4日 7時間
マージ済み PR(30日)
13

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

eclipse-score/logging のほかの issue

eclipse-score/logging の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。