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

Suppress generator error on panic #48

Open
jamesbornholt opened this issue Aug 10, 2021 · 2 comments
Open

Suppress generator error on panic #48

jamesbornholt opened this issue Aug 10, 2021 · 2 comments

Comments

@jamesbornholt
Copy link
Member

When a thread panics in a Shuttle test, generator produces an error that gets printed to stdout via tracing. This error is a red herring: it mentions generator::gen_impl and so suggests that maybe something went wrong in that code, when really it's just that a Shuttle thread panicked and that panic is being propagated. It would be nice to suppress this error so we don't lead users down the wrong debugging path.

@bkragl
Copy link
Contributor

bkragl commented Aug 12, 2021

+1

I have a Shuttle test running inside a proptest, where a failing execution aborts before showing the input used by proptest (and probably even before proptest tries to minimize).

After the stack backtrace the output finishes as follows:

Aug 12 11:16:32.499 ERROR generator::gen_impl: set panicked inside generator    
thread panicked while panicking. aborting.
error: test failed, to rerun pass '-p foo --lib'

Caused by:
  process didn't exit successfully: `/path/to/foo-7e20baac4e3ab4e7 'foo:bar' --exact --nocapture` (signal: 4, SIGILL: illegal instruction)

Will suppressing the generator error resolve the nested panicking and SIGILL?

@jamesbornholt
Copy link
Member Author

No, the generator error is only an error message printed when the Shuttle thread is panicking -- it doesn't actually create its own panic. Nested panics like this usually happen because a Drop handler panics during stack unwinding. We could consider creating an option to disable stack unwinding after a panic (by leaking the generator threads) to make minimization work.

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

No branches or pull requests

2 participants