rust-fuzz / honggfuzz-rs

Fuzz your Rust code with Google-developed Honggfuzz !
https://crates.io/crates/honggfuzz
Apache License 2.0
449 stars 40 forks source link

Termination issues since update to 0.5.41 #20

Closed ghost closed 5 years ago

ghost commented 5 years ago

Since updating to version 0.5.41, we see termination failures like

Size:407 (i,b,hw,edge,ip,cmp): 0/0/0/3/0/1, Tot:0/0/0/8005/15/167155
Entering phase 2/2: Dynamic Main
Size:788 (i,b,hw,edge,ip,cmp): 0/0/0/0/0/3, Tot:0/0/0/8005/15/167158
Terminating thread no. #0, left: 3
Terminating thread no. #2, left: 1
[2019-02-18T13:16:27+0000][W][14] main():254 pthread_kill(thread=0, SIGUSR1): Interrupted system call
[2019-02-18T13:16:27+0000][W][14] main():254 pthread_kill(thread=2, SIGUSR1): Interrupted system call
Terminating forcefully

repeatedly in our CI. We don't think that anything changed on the host that runs the fuzzing job but more importantly we are not sure where to start investigating. Any ideas what could have caused this?

ghost commented 5 years ago

Maybe also of note, we have configured this job for a fixed number of iterations and see these failures when that number is presumably reached and the fuzzer should shut down gracefully.

ghost commented 5 years ago

Maybe updating upstream honggfuzz could be promising as it contains a few commits related to signal handling?

PaulGrandperrin commented 5 years ago

Hi @adam-rhebo, I have no idea where it came from and how to reproduce. But it seems that upstream went through significant changes. I just released a new version with updated upstream, 0.5.42, could you check if it is now resolved?

ghost commented 5 years ago

I just released a new version with updated upstream, 0.5.42, could you check if it is now resolved?

Will do.

ghost commented 5 years ago

Seems to have done the trick:

Size:3942 (i,b,hw,edge,ip,cmp): 0/0/0/0/0/1, Tot:0/0/0/6703/14/141865
Size:979 (i,b,hw,edge,ip,cmp): 0/0/0/0/0/1, Tot:0/0/0/6703/14/141866
Size:463 (i,b,hw,edge,ip,cmp): 0/0/0/0/0/1, Tot:0/0/0/6703/14/141867
Terminating thread no. #1, left: 4
Terminating thread no. #2, left: 3
Terminating thread no. #0, left: 3
[2019-02-19T19:30:44+0000][W][91] pingThreads():201 pthread_kill(thread=0, SIGUSR1): Success
[2019-02-19T19:30:44+0000][W][91] pingThreads():201 pthread_kill(thread=1, SIGUSR1): Success
[2019-02-19T19:30:44+0000][W][91] pingThreads():201 pthread_kill(thread=2, SIGUSR1): Success
[2019-02-19T19:30:44+0000][W][91] pingThreads():201 pthread_kill(thread=0, SIGUSR1): Success
[2019-02-19T19:30:44+0000][W][91] pingThreads():201 pthread_kill(thread=1, SIGUSR1): Success
[2019-02-19T19:30:44+0000][W][91] pingThreads():201 pthread_kill(thread=2, SIGUSR1): Success
Terminating thread no. #3, left: 1
[2019-02-19T19:30:44+0000][W][91] pingThreads():201 pthread_kill(thread=0, SIGUSR1): Success
[2019-02-19T19:30:44+0000][W][91] pingThreads():201 pthread_kill(thread=1, SIGUSR1): Success
[2019-02-19T19:30:44+0000][W][91] pingThreads():201 pthread_kill(thread=2, SIGUSR1): Success
[2019-02-19T19:30:44+0000][W][91] pingThreads():201 pthread_kill(thread=3, SIGUSR1): Success
Summary iterations:10000004 time:1395 speed:7168