Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Ghost" send callback in macOS (kqueue) #105

Open
TheWaWaR opened this issue Jul 25, 2024 · 0 comments
Open

"Ghost" send callback in macOS (kqueue) #105

TheWaWaR opened this issue Jul 25, 2024 · 0 comments

Comments

@TheWaWaR
Copy link

TheWaWaR commented Jul 25, 2024

I'm writing a high performance MQTT benchmark tool with libxev, when I start 10000 MQTT client connections and setup the keep alive time to 5 seconds (send Pingreq message every 5s). The connecting process is ok, but after 5+ seconds later there maybe some "ghost" send callback happened with send operation. The "ghost" here means: after the callback been called and returned with a .disarm and then the callback will called again even without a loop.add().

Reproduce steps:

  • Start a MQTT broker
  • Start the benchmark tool with -c 10000
  • Wait for 5s+ and the there may have an invalid send callback

After some debug, the callback is called in kqueue.zig:434.

The source code is here.
The libxev commit id used is: 1dd3c9015a542757b049f6d33beb8941f57bce1f

If I uncomment main.zig:291:

comp.* = .{};

There will be a op=noop log with a following panic.

NOTE: I also run this program in ARM64 Linux, with no problem.

@TheWaWaR TheWaWaR changed the title "Ghost" timer callback in macOS (kqueue) "Ghost" send callback in macOS (kqueue) Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant