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

bug: crashed while running a subgraph check #674

Closed
kyle-banner opened this issue Jul 12, 2021 · 8 comments
Closed

bug: crashed while running a subgraph check #674

kyle-banner opened this issue Jul 12, 2021 · 8 comments
Labels

Comments

@kyle-banner
Copy link

kyle-banner commented Jul 12, 2021

Crash Report

name = 'rover'
operating_system = 'unix:Debian'
crate_version = '0.1.8'
explanation = '''
Panic occurred in file 'library/std/src/io/stdio.rs' at line 935
'''
cause = 'failed printing to stderr: Resource temporarily unavailable (os error 11)'
method = 'Panic'
backtrace = '''

  0: 0x56518f5c6a21 - std::io::stdio::_eprint::h0abfddebba7f1456
  1: 0x56518e338e5e - <unresolved>
  2: 0x56518e33039e - rover::command::subgraph::Subgraph::run::h4b03b805ad05df21
  3: 0x56518e2f538f - rover::cli::Rover::run::h840963b9e834130b
  4: 0x56518e2ceb1d - <unresolved>
  5: 0x56518e2cb513 - <unresolved>
  6: 0x56518e2cb529 - <unresolved>
  7: 0x56518f5d17da - std::rt::lang_start_internal::h4461fc58637f04f8
  8: 0x56518e2cf352 - <unresolved>
  9: 0x7f300e87f09b - __libc_start_main
 10: 0x56518e2c9699 - <unresolved>
 11:        0x0 - <unresolved>'''
$ rover subgraph check charter-sspp-graph@qa-cnet --schema build/schema.graphql --name=graphql-account-scs-service --query-count-threshold=100 --validation-period=1w
Checked the proposed subgraph against charter-sspp-graph@qa-cnet
Compared 112 schema changes against 21 operations
┌────────┬──────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────┐
│ Change │                   Code                   │                                      Description                                       │
├────────┼──────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────┤
│ PASS   │ FIELD_ADDED                              │ type `Account`: field `address` added                                                  │
├────────┼──────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────┤
│ PASS   │ FIELD_ADDED                              │ type `Account`: field `newQueryField` added

// many other fields added...

│ PASS   │ FIELD_ADDED                              │ type `Mutation`: field `newMutationField` added                                    │
└────────┴──────────────────────────────────────────┴─────────────────────
+ result=101
+ set +x
error Command failed with exit code 101.

(edited by @EverlastingBugstopper just to fix up some formatting)

@abernix abernix added triage issues and PRs that need to be triaged bug 🐞 labels Jul 20, 2021
@EverlastingBugstopper
Copy link
Contributor

@kyle-banner thanks for the report, I'm sorry you ran into this bug, we'd love to iron it out for you.

It looks like you're getting an OS Error 11 which is... definitely unexpected! Can I ask for the output of the rover info command, and also what environment you're running this on? This error is occurring in a call to Rust's eprintln! macro, which makes me think that something weird is going on with the system that's running Rover. Are you calling Rover from a Makefile or some other orchestrator?

Could you also try to reproduce this error by appending --log debug and copy + paste the entirety of what's printed?

@danpayne17
Copy link

Hi @EverlastingBugstopper . Kyle is on vacation so I'll chime in here with what we know. Here is the output from rover info:

Rover Info:
Version: 0.1.8
Install Location: /root/.rover/bin/rover
OS: Debian 10 (buster) [64-bit]
Shell: Unknown

Rover is being called from a bash shell script that I wrote. The script is being called by a GitLab pipeline runner. Attached is the debug output from the command.

Thanks for taking a look at this!

rover-debug-console-output.txt

@EverlastingBugstopper
Copy link
Contributor

That is super strange! It looks like the panic occurs rrriiigghhhttt as it's about to finish printing. At the top it says there were 112 schema changes, and the table seems to include 112 passes, and then panics right around the time it's about to finish printing the table.

I've tried to reproduce this issue by printing even larger tables, but can't seem to reproduce!

Truly think this has something to do with the environment that it's running in - are you able to run the bash script you have locally and cause the same panic?

@EverlastingBugstopper
Copy link
Contributor

Ah! I think I may have found the culprit. Seems like node does some funky business to set stdout/stderr streams to non-blocking mode, which doesn't play nicely with Rust.

I've found this comment describing the issue which also links to workarounds by Mozilla.

@danpayne17
Copy link

When I run locally, it works fine, but obviously I'm on a different system:

Rover Info:
Version: 0.1.8
Install Location: /Users/dan.payne/.rover/bin/rover
OS: Mac OS 10.14.6 [64-bit]
Shell: /usr/local/bin/bash

@danpayne17
Copy link

Oh nice! I will look at that comment.

@danpayne17
Copy link

That fixed it! Buried in there was that the issue goes away in later versions of node12. I upgraded and now pipeline completes successfully. Thanks for the help!

@EverlastingBugstopper
Copy link
Contributor

Awesome!! Glad I could help 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants