Skip to content

Changes

Started by upstream project gerrit-libosmocore #2386
Started 5 hr 59 min ago
Queued 7.3 sec
Took 3 min 5 sec on built-in
osmo_io: iofd_txqueue_dequeue(): fix double next->io_len decrement

The fill-up logic in iofd_txqueue_dequeue() was incorrectly
decrementing next->io_len twice: once when removing a buffer that
didn't fit, and again when assigning to msg_iovlen.  This may cause
next->io_len to reach 0 and trigger an assert at osmo_io.c:274:

  Assert failed next->io_len > 0

Add separate osmo_io_backpressure_test to verify queue management
under network backpressure conditions.  Use separate .ok files for
poll vs io_uring backends since they produce different I/O patterns.
This unit test reproduces the assert when the fix is not applied.

Change-Id: Ia96e25d11d8d683fa9dd0c56bdac257992edd782
Fixes: 3c2a02db4 ("osmo-io: Put together message buffers when dequeued from tx queue")
Related: OS#6997
Vadim Yanitskiy at