IPC `ArrowFileWriter` can produce entirely zero-filled encapsulated messages
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まず ArrowFileWriter と、ArrowWriter.cs および ArrowBatchWriter.cs における使用箇所を読み、特に BaseStream.Position と、異なるスレッドからのシリアライズされた WriteRecordBatch 呼び出しを確認します。可能であれば、ゼロで埋められた IPC メッセージを再現し、圧縮書き込みと非圧縮書き込み、および影響を受けたオフセットを比較します。完了条件は、ArrowFileWriter が書き込みを行わずに位置を進められるかどうかを特定すること、または必要なストリームの使用方法や環境要因を記録することです。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug, including details regarding any error messages, version, and platform.
Environment
Apache.Arrow/Apache.Arrow.Compression23.0.0,net472, x64, Windows 11ArrowFileWriterover a plainFileStream, writing record batches continuously for the duration of a recording
Background
We are using Apache.Arrow to save continuous streaming data from ONIX hardware, where our project (OpenEphys.Onix1) is hosted as a package that can run in Bonsai-Rx.
Problem
Rarely, on one specific computer, a file comes out with an entire encapsulated message (continuation marker, metadata, and body) replaced by zeros. The footer is intact and its Block offsets are correct for every batch, including all batches after the zeroed one, so the file reads until it hits the gap and then raises ArrowInvalid: Unexpected empty message in IPC file format. Happens with and without Zstd compression, always early in the recording. Individual valid batches can be read and concatenated together, but this leaves a gap in the recorded samples as confirmed by our clock parameter.
ArrowFileWriter takes the block offset from BaseStream.Position and the following batch is recorded at the correct offset; we believe this points to Arrow having issued the writes and FileStream having accepted them, but the bytes were lost before being saved to disk. We'd like to confirm if this is the case before concluding it's environmental.
We are tracking this in our own issue in case it is how we are utilizing the API. For more details (e.g., byte offsets, and affected files), see open-ephys/bonsai-onix1#683. We have been unable to replicate this on two other systems.
Our usage
ArrowWriter.cs— construction,WriteRecordBatch, andWriteEndon disposeArrowBatchWriter.cs— batches are accumulated with an RxBuffer(timeout, count), soWriteRecordBatchcalls are serialized but arrive on different threads (producer thread on a count flush, thread-pool timer thread on a timeout flush)
Note also that our ArrowBuffers wrap unmanaged memory via a custom MemoryManager<byte> to handle OpenCV.Net.Mat objects.
I'd be happy to answer any questions you might have about our usage, and if there is any other information I can provide to narrow this down please let me know.
Questions
- Is there any path in
ArrowFileWriterthat advancesBaseStream.Positionwithout writing bytes (a seek, or padding emitted by seeking)? - Is there anything we should be doing differently?
FileOptions.WriteThrough, periodicFlush(true)on the base stream, or otherwise to keep a lower layer from silently dropping a write like this?
- 主要言語
- C#
- スター
- 40
- フォーク
- 30
- 平均マージ
- 1日 7時間
- マージ済み PR(30日)
- 12
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/arrow-dotnet のほかの issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
apache/arrow-dotnet#410 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 65/100
apache/arrow-dotnet#448 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
apache/arrow-dotnet#446 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
apache/arrow-dotnet#399 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
apache/arrow-dotnet#397 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
apache/arrow-dotnet の issue をすべて見る
似ている issue
-
area-ai untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
dotnet/extensions#7790 ·
メンテナーはふだん 1 日以内に返信
-
P2 testing
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
area-Infrastructure-coreclr os-ios os-maccatalyst os-tvos untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
dotnet/runtime#134766 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
0 - Backlog Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
BrighterCommand/Brighter#4444 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信