romange / helio

A modern framework for backend development based on io_uring Linux interface
Apache License 2.0
447 stars 50 forks source link

fix: Do not crash if connection is not found in list #232

Closed chakaz closed 7 months ago

chakaz commented 8 months ago

This happens in Dragonfly if we kill the server immediately after starting replication.

Fixes https://github.com/dragonflydb/dragonfly/issues/2737

romange commented 7 months ago

@chakaz can you explain how this happens? based on the code flow it should not happen

chakaz commented 7 months ago

I agree and I don't know. I think that we have a place where we started yielding where we didn't before. I didn't think it's worth it to delve into it, but let me know if you think otherwise.

romange commented 7 months ago

I would prefer adding DCHECK that it != end so we would at least get better stack traces

chakaz commented 7 months ago

We already have a stack trace, see https://github.com/dragonflydb/dragonfly/issues/2737 the problem is that because it's a callback on another thread we don't know the origin