Skip to content

[Bug] Chaos (2758eb1): LOAD DATA INLINE panics in bindAndOptimizeLoadQuery — error is *errors.errorString, not *moerr.Error #26730

Closed

Description

Environment

Field Value
Cluster / namespace mo-chaos-main-6004bec-202607281125
Build / image matrixone:commit-2758eb1d3
Endpoint 10.222.6.252:6001 (mo-chaos-regression-dis-proxy)
Artifact root /data1/chaos-test/30325858535_6004bec
CN pod (evidence) mo-chaos-regression-dis-tp-cn-4cl5c
Analysis window 2026-08-05 10:30–18:25 CST (panic at 17:59:30 CST / 09:59:30 UTC)

Scope: CN recovers from panic inside frontend (recover from panic before finishTxnFunc) but still executes a true Go panic on the LOAD DATA plan path when an underlying failure returns a plain *errors.errorString instead of *moerr.Error.

Out of scope: Client-visible TPCC consistency / ytd (PASS in same window); found leak txn storm after the same DN kill (separate class); Chaos Mesh bandwidth-* / daemon networking.

Summary

During chaos soak with active task_kill_dn, internal account sys:mo_logger ran:

LOAD DATA INLINE FORMAT='csv', DATA='…'
INTO TABLE system.rawlog
FIELDS TERMINATED BY ',';

CN logged:

internal error: panic interface conversion:
  error is *errors.errorString, not *moerr.Error

Stack top (application):

pkg/sql/plan.bindAndOptimizeLoadQuery
  …/pkg/sql/plan/build.go:289
pkg/sql/plan.BuildPlan
  …/pkg/sql/plan/build.go:691
pkg/frontend.buildPlanWithPrepareMode
  …/pkg/frontend/mysql_cmd_executor.go:3069
…

Same second as DN kill/restart (dn-0 startedAt=2026-08-05T09:59:10Z). Frontend recovered the goroutine; CN process stayed up. Later mo_logger LOAD DATA failures in the same soak often surface as normal context canceled without panic — this incident is the subset that hits the unsafe type assertion.

Expected vs actual

Expected Actual
LOAD DATA failure under DN downtime returns a normal MO / SQL error Go panic on err.(*moerr.Error)-style conversion inside bindAndOptimizeLoadQuery (build.go:289)
Error path never panics regardless of whether the wrapped error is *moerr.Error or *errors.errorString Panic when underlying error is plain *errors.errorString
Optional: CN crash No process crash — session.go recovers — but ERROR logs show full panic stack

Timeline (UTC; MO log time = UTC)

Time (UTC) Event
09:58:52+ Chaos harness: task_kill_dn apply (CST 17:58:52)
09:59:10 DN pod mo-chaos-regression-dis-dn-0 container start
09:59:30.439 CN 4cl5c: panic in bindAndOptimizeLoadQuery on LOAD DATA INLINE … system.rawlog (sys:mo_logger)
09:59:30.439 recover from panic before finishTxnFunc; query trace status=fail with panic error text
10:13:24 Same CN: found leak txn batch (separate issue class; same kill window)
10:27+ Later mo_logger LOAD to system.rawlog / statement_info / metrics often fail with context canceled only (no panic)

Evidence

CN log — panic + recover (excerpt)

time=2026/08/05 09:59:30.439571 +0000
caller=frontend/mysql_cmd_executor.go:4048
msg=error: internal error: panic interface conversion:
  error is *errors.errorString, not *moerr.Error:
runtime.panicdottypeE
…
github.com/matrixorigin/matrixone/pkg/sql/plan.bindAndOptimizeLoadQuery
  /go/src/github.com/matrixorigin/matrixone/pkg/sql/plan/build.go:289
github.com/matrixorigin/matrixone/pkg/sql/plan.BuildPlan
  …/pkg/sql/plan/build.go:691
github.com/matrixorigin/matrixone/pkg/frontend.buildPlanWithPrepareMode
  …/pkg/frontend/mysql_cmd_executor.go:3069
…

time=2026/08/05 09:59:30.439658 +0000
caller=frontend/session.go:2417
msg=recover from panic before finishTxnFunc
session_info=connectionId 329666|…|account sys:mo_logger|…
txn_id=6ff1dfb83ce9a28b18c8df82c193d0e1

Query identity

statement: LOAD DATA INLINE FORMAT='csv', DATA='log…00,0,{},internal,,\n'
           INTO TABLE system.rawlog FIELDS TERMINATED BY ','
account:   sys:mo_logger
status:    fail

Correlated chaos / pod lifecycle

# harness
2026-08-05 17:58:52 ... Executing Chaos Task: task_kill_dn
2026-08-05 17:59:23 ... Task 'task_kill_dn' completed

# kubectl
mo-chaos-regression-dis-dn-0  startedAt=2026-08-05T09:59:10Z
image=.../matrixone:commit-2758eb1d3

Contrast (same soak, no panic)

Many subsequent sys:mo_logger LOAD DATA INLINE into system.rawlog / system.statement_info / system_metrics.* fail with:

status=fail
error=context canceled

without panic interface conversion.

Impact

  • Severity: server-side panic on internal observability write path (mo_logger → system tables).
  • Availability: CN did not CrashLoop in this instance (recover path).
  • User workloads: TPCC consistency verify continued to succeed; ytd drift 0 in the same analysis window — this panic is not the TPCC data-path failure mode.
  • Release gate: any true panic in CN ERROR logs is blocking for chaos soak triage even when recovered.

Activity

  1. ghost added this to the MO-202608 milestone on Aug 5, 2026
  2. ghost added
    kind/bug
    on Aug 5, 2026
  3. ghost added theissue type on Aug 5, 2026
  4. added a commit that references this issue on Aug 5, 2026
    60d28f8
  5. assigned and unassigned on Aug 5, 2026
  6. added a commit that references this issue on Aug 5, 2026
    c8dae1d
  7. changed the title [-]Bug] Chaos (2758eb1): `LOAD DATA INLINE` panics in `bindAndOptimizeLoadQuery` — `error is *errors.errorString, not *moerr.Error`[/-] [+][Bug] Chaos (2758eb1): `LOAD DATA INLINE` panics in `bindAndOptimizeLoadQuery` — `error is *errors.errorString, not *moerr.Error`[/+] on Aug 7, 2026
  8. ghost closed this as completedon Aug 10, 2026
  9. added 3 commits that reference this issue on Sep 17, 2026
    80c0806
    bbb3af6
    6019115
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugseverity/s-1

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions