最終成功
Kline、tick、orderbook、history四流同一binary通過。
Kline、tick、orderbook、history四流同一binary通過。
核心教訓
「冇數」可以係request、callback、capture、parser、靜市或entitlement;逐層驗。
「冇數」可以係request、callback、capture、parser、靜市或entitlement;逐層驗。
禁止
見0就盲retry/換timeout/重啟;每步要有acceptance domain。
見0就盲retry/換timeout/重啟;每步要有acceptance domain。
故障總表
| 問題 | 症狀/當時誤判 | 真正修正 | 點證明修好 |
|---|---|---|---|
| SSH / private-file gate | SSH拒絕key;workspace reset後mode變0644。 | 先lstat驗 regular/non-symlink/nlink1/UID,再將dir 0700、key/state 0600;永不打印key。 | StrictHostKeyChecking通過;SSH可用;每turn重新preflight。 |
| FEX binary architecture | 首個Rev-10係AArch64,FEX主程式要x86-64,mapping gate失敗。 | 本地build ELF64 x86-64;remote copy後hash+/proc/maps雙gate,舊r5絕不覆蓋。 | readelf Machine=AMD x86-64;candidate mapped、r5 absent;rollback再驗相反。 |
| Rev-10 ACK永遠0 | 0x1843 request送到、Kline push可到,但rsp=0/sub_ok=0。 | CoreBiz callback需要live QObject owner;用dlsym取得process-lifetime INNProtoCenter::ms_pOwner,唔傳nullptr。 | rsp_0x1843 err0/result0、sub_ok1;同binary多次重測。 |
| Incremental只見初段burst | field3=1安全共存,但isolated test只見約8秒初段push。 | Dedicated no-GUI process用full-set(省略timer_sub #3);保留native-triggered bounded resub。 | 180秒收到跨4支bar、push span>140秒。 |
| GUI tap 0 bytes | Owner切CSV/訂閱頁後,/dev/shm/ftnn_chart.tap兩次120秒byte-identical。 | 承認acceptance domain錯:passive r5 tap observer冇送0x1843;改用Rev-10 active SendCommand。 | active test ACK成功、Kline到;tap 0只代表producer/FD無寫。 |
| Tick一直0 | Server其實有bit35 frame,但舊decoder只等public ParseFromString/Array,且把live wire-0 price/time當錯誤。 | hook INNProtoCenter::OnRecvPush raw 0x1844;Tick outer #1/#2及item #4/#7接受有約束varint;price÷1e9,varint price必須有exchange timestamp。 | 獨立tick-only sent1/rsp1、tick items>0、timeout0、malformed0;舊negative fixture仍pass。 |
| OrderBook一直0 | raw hook見到bit3,但106幀全部malformed;舊parser假設price/volume/timestamp係double。 | 私下capture一個52B public-market payload;按live schema讀wire-0 fixed-point price、raw volume、order_count、server/exchange ms、precision field10。 | bit3 decoder malformed降至0;NVDA bid/ask snapshots持續到。 |
| OrderBook重複row | 同一state經raw callback/protobuf path重複落盤。 | raw OnRecvPush成為唯一production decode入口;public Parse hooks只留fallback/停用;報raw rows同unique key,唔隱藏重複。 | Unified raw-only smoke四流齊到;final source明確單入口。 |
| 0x1811整包malformed | 要求8條,response有7條OHLC+1條只得metadata嘅future/forming slot。 | history parser允許structurally-valid incomplete slot,記placeholder_count並drop;push parser仍要求OHLC。 | rsp summary result0、7 bars、1 placeholder、timeout0。 |
| 35×1000長跑stall | live四流+35個大history response同process寫大量JSON,約50秒後event/status停。 | watchdog>300秒即fail+rollback;後續backfill降100、再試single-inflight。 | 兩次都安全rollback;證明唔係靠增大timeout解決。 |
| Single-inflight仍stall | attempt2第三個SID 0x1811 sent後無response,整個event loop/log停止。 | 唔再喺live process做history;使用先前35/35 verified 0x1811 baseline import,r3只跑live tick/OB/Kline。 | r3由09:33後持續log、mtime近0、35/35 history baseline、無stall。 |
| Zombie誤判 | SIGTERM後PID仍存在但已Z,舊stop_pid以為仲alive。 | 讀/proc/PID/status;Z/(zombie)當exited;再做maps/env/config rollback gate。 | 每次candidate停後唯一r5 main恢復。 |
| Council HTTP 0 | POST傳輸狀態不明,盲retry會重複。 | purpose/key/body SHA綁ledger;exact poll sender/body hash先reconcile;UNCERTAIN時禁重試。 | receipt 65104由poll reconcile,無duplicate。 |
| Runner pending阻塞poll | 未exact-handle host seq時,runner只回pending,cursor唔前進。 | 有完成交付就exact-ack一次;non-target/heartbeat寫disposition,再逐seq cumulative=false處理。長任務用hourly/final monitor。 | cursor==journal_cursor;每個covered seq有ledger/evidence。 |
新手診斷決策樹
- FTNN main仲喺度? 唔喺:停止測試,按rollback metadata重開r5。
- candidate真係mapped? /proc/maps驗candidate SHA檔名;r5唔可以同時mapped。
- 0x1843 sent未? 無:timer/SendCommand symbol/config未armed。
- rsp有冇? sent有、rsp0:先查live QObject owner,唔好先怪server。
- rsp result0但data0? raw hook OnRecvPush;唔好只信public protobuf hook。
- raw frame有、decoder0? 私下capture一個public-market payload,按field/wire type修schema;唔貼raw去Relay。
- decoder有但log0? 查SID allowlist、router、offset、append file、fsync。
- 一段後停? status/timer/log mtime;history同live分process/phase;large backfill限流。
- 全部正常但tick0? 確認市場有成交;orderbook/Kline更新唔必然等於新matched trade。
由失敗到成功嘅版本鏈
| 階段 | 做到 | 未做到 | 下一步 |
|---|---|---|---|
| r5 passive | 安全觀察;歷史tap解碼 | 無主動ACK;GUI/tap依賴 | Rev-10 active |
| Rev-10 original | request送出、Kline direct hook | rsp0、tick/OB0 | ms_pOwner |
| owner-bound | ACK/sub_ok | tick/OB仍0 | raw OnRecvPush |
| raw push | 證實bit35/bit3 frame有到 | malformed | live wire schema correction |
| tickfix/obfix/historyfix | 四流獨立PASS | 多source整合 | unified raw-only binary |
| unified | 一個binary四流PASS | 35×history+live stall | live-only+verified history baseline |
| 68114 r3 | 35隻長跑穩定、history 35/35 imported | 等待12:00 final | 自動rollback+hash report |
每次修正必做嘅驗證
1. Offline: ASan+UBSan harness 124 checks / 0 failures
2. Build: source SHA + x86-64 SO SHA
3. Preflight: one FTNN main + r5 mapped + passive config exact
4. Candidate: mapped gate + r5 absent
5. Flow: sent/rsp/frame/timeout/malformed per-flow
6. Durability: append-only per-symbol logs + fsync + hourly snapshot
7. Rollback: r5 mapped / r10 absent / env exact / config exact
8. Council: details in HTML; short exact-ack + pointer
問題唔應點樣處理
- 唔好因為GUI tap 0就話0x1843失敗;兩個acceptance domain。
- 唔好因為rsp result0就話每個bit entitlement成功;仲要見對應push。
- 唔好因為parser malformed就話server冇數;先查wire schema。
- 唔好將decoder rows直接當network frames;要識batch同duplicate path。
- 唔好喺live process同時打35×1000 history;backfill同live分離。
- 唔好用累計ack;每seq一次exact handle。
而家成功流程嘅最短復刻
- 跟Guide完成preflight。
- 用unified raw-only x86-64 binary SHA
8100c2d0e407459f2b9f56c4201cb9d0446ab0615697ce8b2b037b389a62e869。 - isolated full-set訂 bits 0/1/3/35/10001;orderbook prob10、tick prob1、Kline 1m prob2。
- callback owner用
INNProtoCenter::ms_pOwner。 - 0x1844只由raw OnRecvPush decode。
- history先離線/分phase;唔同live大批量並發。
- 逐流驗收,再多symbol。
- deadline到自動passive→stop→restore r5→四項rollback gate。
報告索引
| Beginner normal-flow guide | 14,425 B · f19e8b1b0d79084c1dcc901f9879d398babf3870e8482cf7d4201529a3d397d7https://filebin.net/a88-ftnn-20261129/A88_FTNN_DATA_PIPELINE_BEGINNER_GUIDE.html |
|---|---|
| Four-flow restoration | 28,453 B · 30a75dc8084b8b9874ed40a3b3127851e3312a3908328c89f8b7706adfea5b2e |
| Noon attempt1 incident | 2,007 B · 9526c7f4e21ae6017c81915e23ae195d151b18f5c0cdaef553b8d67fb7ebb0b1 |
| Success vs current comparison | 7,131 B · d1a9a6f8d2de9b7d48831fef109f12166048ac541705fe2548cba4a7f378d2c7 |
| OpenD crosswalk | 28,846 B · 24ebf3daf1d96a4963953fac4f52b9c4d4d565b52058e779cfe8b7883f9b5421 |
| GUI tap retests | 12,220 B · 700ec339f71109407c1e37b668fbfe94da26426cef4a77f72d95853e84c05795 |
| Unified source | 112,604 B · f51f299d327e00d78d043726d7ee3197c2477a0a2fddd32c01ca00e52cb2f47bopen source |
| Serial-pull experiment source | 112,934 B · 5b54a038e76e6f17ca762f454cf8ea62311f1651b30e534e9f2d30f6aee51e20open source |
| First long final evidence | 31,201 B · 807d5262eb915b9b02af1a5669a9ffaa9e3de0f2cca9a231fdb7dc53c87ccb5copen final evidence |
| Noon attempt1 final evidence | 32,840 B · cc8da5ec8887c7ee89d9456c481f0d878a9a72a46d9492719e16fb14ea1748bbopen final evidence |
使用方法:正常上手照Beginner Guide;遇錯按本文決策樹;所有live變更仍需owner/host授權,本文唔係credential或無限制操作許可。
Rev2 correction 68143:逐項文獻/出處
| 故障項 | 文獻/出處 | 對應證據 |
|---|---|---|
| SSH/private-file gate | OpenSSH private-key permission gate;Council Manual v2.0.9 private-file S0規則;ssh(1) | 實際0644拒絕訊息;每turn lstat/chmod preflight。 |
| FEX architecture/mapping | ELF readelf -h Machine;Linux /proc/PID/maps | AArch64 candidate mapping gate FAIL;x86-64 SHA pinned後PASS。 |
| Callback owner | live libCoreBiz.so SendCommand disassembly;exported INNProtoCenter::ms_pOwner / QObject constructor。 | ACK/continuity report |
| 0x1843 / 0x1844 subscription | OpenD sub.html作語義參考;FTNN_KlineSub_Extracted.proto;libQotBase symbols/disassembly。 | success/current comparison |
| GUI tap acceptance domain | FTA4 header decoder;r5 passive config;0x1843 active path分層。 | 兩次GUI tap retest |
| Tick schema/capture | OpenD quote.html Ticker;live libCorePB descriptor;historical FTA4 tap。 | four-flow restoration |
| OrderBook schema | quote.html OrderBook/OrderBookDetail;52B live public-market capture;libCorePB field names。 | four-flow restoration內bit3 varint/precision證據。 |
| History placeholder/pagination | request-history-kline.html;FTCmdKline KlineRsp descriptor。 | OpenD/0x1811 crosswalk |
| Zombie handling | proc_pid_status(5) State: Z | remote stop_pid修正+每次rollback process inventory。 |
| HTTP 0 / exactly once | Council Manual v2.0.9 outbound ledger / uncertain transport規則。 | receipt 65104由exact body hash poll reconcile,無resend。 |
| Runner pending/cursor | pinned run_cycles_standard_v2_0.py mark_action_handled / journal-before-cursor。 | disposition ledgers+cursor==journal_cursor。 |
68143 補充項
| 項 | 有冇遇過 | 精準記錄 |
|---|---|---|
| SID / market mapping | 有 | db market code唔等於NN_CSMktType;live證BTC/ETH/ANT=17、NVDA-USDC=37。修正用IStockUtil::GetCSMktType,fallback只保命。出處:libQotBase symbol+QotSubDiagnose/live ext header。 |
| Log寫入 | 有 | 35×1000 history+live同process令central log/event loop stall;append-only router、offset/truncation gate、每分鐘fsync、mtime watchdog。出處:68118 incident。 |
| Entitlement明確拒絕 | 未遇過 | 未收到explicit auth/permission error;result0+0 frame唔等於entitlement deny。最終tick/OB經schema修正有數,證舊0唔係已證權限問題。 |
Stall attempt 1 精確數字
68118 attempt1:tick 4、OB 84、Kpush 33、backfill 396、history 4/35;之後central log >300秒無進展,candidate停止,rollback四項PASS。
可直接開原文嘅報告索引
- Beginner Guide
- Four-flow restoration
- Noon attempt1 incident
- Success vs current comparison
- OpenD protocol crosswalk
- GUI tap retests
Rev3 pin note:原Chronicle全文保留;本section追加逐項source、可點link及68143缺項。