Skip to content

keep-alive packets trigger fevent for raw flows #2

@th1j5

Description

@th1j5

A (minimal) working example to trigger the bug is found on this branch

  1. start sudo irmd --stdout
  2. make local layer
irm ipcp create type local name local_ipcp
irm ipcp bootstrap type local name local_ipcp layer local_layer
irm name register oping_server layer local_layer
irm bind prog oping name oping_server
  1. start oping --listen
  2. start oping -n oping_server -c 5

observe after the oping client has stopped sending pings (but is still connected and sending keep-alives due to sleep(50))
that on the server side (printf statements added in branch) we get:

Type of event: 1.
message len: -11
Type of event: 1.
message len: -11
Type of event: 1.
message len: -11
Type of event: 32.
message len: -1006

The -1006 is #define EFLOWPEER 1006 /* Flow is down (peer timed out) */
but those three flow_read events before (-11) are EAGAIN 11 Resource temporarily unavailable

using the poor mans debugger (printf), I can say it is due to https://ouroboros.rocks/cgit/ouroboros/tree/src/lib/dev.c#n1345

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions