Skip to content

Fail Simulation workflow on library panic #136

Description

@AnnaShaleva

Is your feature request related to a problem? Please describe.

Sometimes simulation workflow log may include panic due to various library errors, like in #135:

2024-11-28T17:15:35.499+0300	DEBUG	dbft/dbft.go:655	recovering finished cv=0/7 preq=0/0 presp=3/7 pco=0/7 co=0/7	{"id": 13}
2024-11-28T17:15:35.499+0300	DEBUG	dbft/dbft.go:231	received message	{"id": 13, "type": "Commit", "from": 1, "height": 1, "view": 0, "my_height": 1, "my_view": 0}
2024-11-28T17:15:35.499+0300	INFO	dbft/dbft.go:595	received Commit	{"id": 13, "validator": 1}
2024-11-28T17:15:35.499+0300	INFO	dbft/check.go:118	approving block	{"id": 13, "height": 1, "hash": "e776a98a8412d80eebbab84ec583b5b8a0be17e961d8f73fbf632eb2ec034a47", "tx_count": 1, "merkle": "755b010000000000000000000000000000000000000000000000000000000000", "prev": "0000000000000000000000000000000000000000000000000000000000000000"}
2024-11-28T17:15:35.499+0300	DEBUG	simulation/main.go:183	received block	{"id": 13, "height": 1}
2024-11-28T17:15:35.499+0300	ERROR	dbft/dbft.go:222	too big validator index	{"id": 13, "from": 65535}
github.com/nspcc-dev/dbft.(*DBFT[...]).OnReceive
	/home/anna/Documents/GitProjects/nspcc-dev/dbft/dbft.go:222
main.(*simNode).Run
	/home/anna/Documents/GitProjects/nspcc-dev/dbft/internal/simulation/main.go:97
main.main.func1
	/home/anna/Documents/GitProjects/nspcc-dev/dbft/internal/simulation/main.go:78
2024-11-28T17:15:35.499+0300	ERROR	dbft/dbft.go:222	too big validator index	{"id": 13, "from": 65535}
github.com/nspcc-dev/dbft.(*DBFT[...]).OnReceive
	/home/anna/Documents/GitProjects/nspcc-dev/dbft/dbft.go:222
main.(*simNode).Run
	/home/anna/Documents/GitProjects/nspcc-dev/dbft/internal/simulation/main.go:97
main.main.func1
	/home/anna/Documents/GitProjects/nspcc-dev/dbft/internal/simulation/main.go:78

Process exit status code is non-zero in this case, hence workflow PASSes.

Describe the solution you'd like

Workflow should FAIL in such cases.

Additional context

It's not critical, however it leads to the fact that we're missing some bugs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    I4No visible changesS4RoutineU3RegularenhancementImproving existing functionality

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions