Skip to content

OJ9-WASI-EXCEPTION-UNWIND-001: deferred MethodHandle infrastructure loading crashes after stdout flush #1

Description

@zacharywhitley

Deviation

ID: OJ9-WASI-EXCEPTION-UNWIND-001
Backend: openj9
Runtime: semeru
Layer: backend-runtime
FijiLink Impact: none
DBH Impact: Blocks DBH-3B (4 error cases), blocks DBH-4/5 expansion

Description (updated)

OpenJ9-WASI crashes during deferred class initialization that touches MethodHandle/invokedynamic infrastructure. This triggers after stdout buffer flush when the runtime resumes deferred bootstrap loading.

Original classification: string concatenation in catch blocks triggers invokedynamic bootstrap.

Sharpened classification (DBH-3 finding): any deferred class loading that reaches MethodType.genericMethodTypejava.util.Arrays.fillMethodHandleNatives crashes. The trigger is not limited to catch blocks or string concat — it is any code path that causes the OpenJ9 runtime to resume deferred class initialization after I/O operations.

Evidence

DBH-3A proved 3/7 error cases equivalent (missing file, closed fd read, closed fd write). The remaining 4 cases (EOF read, zero-length read/write, denied path) all crash at the same point: deferred MethodType initialization after System.out.println flushes the output buffer.

Stack at crash:

java/lang/invoke/MethodType.genericMethodType
java/util/Arrays.fill
java/lang/Class.isHiddenImpl (JNI)
→ FIJI-LAUNCH: main threw exception

Blocking

  • DBH-3B: 4 error equivalence cases
  • DBH-4+: any test that produces >3 println calls on OpenJ9-WASI
  • unified-execution-gate

Resolution Path

  1. Investigate why MethodType.genericMethodType triggers during deferred init
  2. Either pre-initialize MethodHandle infrastructure during bootstrap, or
  3. Stub/bypass the deferred loading path on WASI single-threaded mode
  4. Re-run DBH-3 full suite: target 7/7

References

  • Deviation ledger: fijilink/deviations/deviation-ledger.json
  • DBH-3A verdict: fijilink/artifacts/dbh-3a-verdict.json
  • Tagged: fijilink-rc1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions