Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic with println on pipeline #472

Open
1 task done
mengzhuo opened this issue Nov 14, 2024 · 0 comments · May be fixed by #473
Open
1 task done

Panic with println on pipeline #472

mengzhuo opened this issue Nov 14, 2024 · 0 comments · May be fixed by #473

Comments

@mengzhuo
Copy link

Bug Report

Environment

OS

Operating System: Linux

MoonBit CLI Tools Version

moon 0.1.20241111 (e6d64e0 2024-11-11) ~/.moon/bin/moon
moonc v0.1.20241111+dc2407357 ~/.moon/bin/moonc
moonrun 0.1.20241111 (e6d64e0 2024-11-11) ~/.moon/bin/moonrun

Steps to Reproduce

a simple program

fn main {
  for {
    println("y")
  }
}

Runs with
moon run main.mbt | head -n 1

Expected Behavior

print y for once

Actual Behavior

RUST_BACKTRACE=full bash tests/yes.sh
+ moon run src/yes
+ head -n 2
+ grep 'y\ny\n'
thread 'main' panicked at library/std/src/io/stdio.rs:1118:9:
failed printing to stdout: Broken pipe (os error 32)
stack backtrace:
   0:     0x5593e1c60004 - <unknown>
   1:     0x5593e1bb075b - <unknown>
   2:     0x5593e1c3a5fe - <unknown>
   3:     0x5593e1c612a7 - <unknown>
   4:     0x5593e1c61136 - <unknown>
   5:     0x5593e1c61ace - <unknown>
   6:     0x5593e1c614b2 - <unknown>
   7:     0x5593e1c61409 - <unknown>
   8:     0x5593e1c613f6 - <unknown>
   9:     0x5593e1b408a2 - <unknown>
  10:     0x5593e1c5fa82 - <unknown>
  11:     0x5593e1b4a320 - <unknown>
  12:     0x5593e23c7146 - <unknown>
fatal runtime error: failed to initiate panic, error 5
error: failed to run

Stack backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: __libc_start_main
  10: <unknown>

Checklist

  • (Optional) My case is minimal enough to be reproducible.
@lijunchen lijunchen linked a pull request Nov 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant