Fail Simulation workflow on library panic #26

Open
opened 2025-12-28 17:07:41 +00:00 by sami · 0 comments
Owner

Originally created by @AnnaShaleva on GitHub (Nov 28, 2024).

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.

Originally created by @AnnaShaleva on GitHub (Nov 28, 2024). ## 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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/dbft#26
No description provided.