wtf: socket.cc `recv()` timeout

I implemented a custom mutator, and it takes about 1~5 mins for one mutate cycle.

When I run wtf with the custom mutator, I get the following error:

Could not receive size (-1)
Receive failed

https://github.com/0vercl0k/wtf/blob/3ccad88f43308b9f731d0cbe8cc100dd655d49b1/src/wtf/socket.cc#L241-L245

Is there any part of the code that sets the timeout or flag such as O_NONBLOCK?

Actually, I already checked O_NONBLOCK.

int is_block = !(fnctl(Fd, F_GETFL, 0) & O_NONBLOCK);
// Result: 1

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 23 (15 by maintainers)

Commits related to this issue

Most upvoted comments

Hmmmm, it is meant to prevent an infinite testcase running and if it hits it should send a timeout status to the server. I might need to check that code then cause it might be a bug in its own 🤔

On Tue, Apr 4, 2023 at 6:27 PM extf33 @.***> wrote:

My bad, it was me. I gave --limit 100 and thought it is only for execution time.

— Reply to this email directly, view it on GitHub https://github.com/0vercl0k/wtf/issues/156#issuecomment-1496799957, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALIORK4PLYWMDODWN3RNPTW7TDATANCNFSM6AAAAAAWMX2NXA . You are receiving this because you commented.Message ID: @.***>

I’ll try to repro this this weekend then, thanks for all the details!

Cheers

On Fri, Mar 31, 2023 at 3:01 AM extf33 @.***> wrote:

I worked on Ubuntu 22.04 KVM, hmm I gonna test it with sleep().

I tested with a sleep(5601000);, the same error occured.

strace result is as follows:

recvfrom(8, 0x563e8545c340, 4, 0, NULL, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set) — SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} — rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system call)

— Reply to this email directly, view it on GitHub https://github.com/0vercl0k/wtf/issues/156#issuecomment-1491665098, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALIORLCEXKHPOKHZP36UXDW62TPRANCNFSM6AAAAAAWMX2NXA . You are receiving this because you commented.Message ID: @.***>