Skip to content

Broken pipe, failed printing to stdout #9191

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

Closed
2 tasks done
Gypsaman opened this issue Oct 24, 2024 · 3 comments
Closed
2 tasks done

Broken pipe, failed printing to stdout #9191

Gypsaman opened this issue Oct 24, 2024 · 3 comments
Labels
T-bug Type: bug T-needs-triage Type: this issue needs to be labelled

Comments

@Gypsaman
Copy link

Component

Cast

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (e903484 2024-07-19T00:35:00.583275743Z)

What command(s) is the bug in?

cast call ... | cast abi_decode

Operating System

Linux

Describe the bug

I am trying to pipe the output of a cast call to a cast abi-decode.
cast call 0x5FbDB2315678afecb367f032d93F642f64180aa3 "get_car()" --rpc-url=$LOCAL_PROVIDER | cast abi-decode "(string,uint256,uint256)"

error: the following required arguments were not provided:
  <CALLDATA>

Usage: cast abi-decode <SIG> <CALLDATA>

For more information, try '--help'.
The application panicked (crashed).
Message:  failed printing to stdout: Broken pipe (os error 32)
Location: library/std/src/io/stdio.rs:1118

This is a bug. Consider reporting it at https://github.com/foundry-rs/foundry

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1: __libc_start_call_main<unknown>
      at ./csu/../sysdeps/nptl/libc_start_call_main.h:58
   2: __libc_start_main_impl<unknown>
      at ./csu/../csu/libc-start.c:360
@Gypsaman Gypsaman added T-bug Type: bug T-needs-triage Type: this issue needs to be labelled labels Oct 24, 2024
@github-project-automation github-project-automation bot moved this to Todo in Foundry Oct 24, 2024
@grandizzy
Copy link
Collaborator

looks similar with #7055 which we're working to get a fix for soon
CC @zerosnacks

@zerosnacks
Copy link
Member

zerosnacks commented Oct 24, 2024

@grandizzy doesn't appear this is a regression of #9109 which is fortunate but #9174 does not appear to fix this either. Going to investigate this further.

Edit:

After #9174 we no longer panic but we do still throw Error: Broken pipe (os error 32) without a backtrace

cast call 0x5FbDB2315678afecb367f032d93F642f64180aa3 "get_car()" --rpc-url=https://eth-mainnet.g.alchemy.com/v2/8ivcxx0dKfJNOFV-2vU5VPAV7hkqgEuI | echo

@zerosnacks
Copy link
Member

Hi @Gypsaman, thanks for your report

Marking as a duplicate of #7055 as it is the same underlying issue that will be resolved soon.

@zerosnacks zerosnacks closed this as not planned Won't fix, can't repro, duplicate, stale Oct 24, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Foundry Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: bug T-needs-triage Type: this issue needs to be labelled
Projects
Archived in project
Development

No branches or pull requests

3 participants