Closed daniestevez closed 3 weeks ago
I've found that the problem is that at some point the state of the input buffer for CostasLoop
becomes invalid and the buffer believes that there are nearly 2**64
items available:
_buffer->_claimStrategy._publishCursor.value() = 0, _readIndexCached = 1009593564
gr::packet_modem::CostasLoop<float, float> input available = 18446744072699958052
PublishableOutputRange calling _claimStrategy.publish(140596416, 192)
_buffer->_claimStrategy._publishCursor.value() = 140596608, _readIndexCached = 140596416, _readIndex->value() = 140596416
gr::packet_modem::CostasLoop<float, float> input available = 192
_buffer->_claimStrategy._publishCursor.value() = 140596608, _readIndexCached = 140596416, _readIndex->value() = 140596416
_buffer->_claimStrategy._publishCursor.value() = 140596608, _readIndexCached = 140596416, _readIndex->value() = 140596416
gr::packet_modem::CostasLoop<float, float> input available = 192
_buffer->_claimStrategy._publishCursor.value() = 140596608, _readIndexCached = 140596416, _readIndex->value() = 140596416
gr::packet_modem::CostasLoop<float, float>::processBulk(inSpan.size() = 64, outSpan.size() = 64)
_buffer->_claimStrategy._publishCursor.value() = 140596608, _readIndexCached = 140596416, _readIndex->value() = 140596416
_buffer->_claimStrategy._publishCursor.value() = 140596608, _readIndexCached = 140596416, _readIndex->value() = 140596416
_buffer->_claimStrategy._publishCursor.value() = 140596608, _readIndexCached = 140596480, _readIndex->value() = 140596480
gr::packet_modem::CostasLoop<float, float> input available = 128
_buffer->_claimStrategy._publishCursor.value() = 140596608, _readIndexCached = 140596480, _readIndex->value() = 140596480
_buffer->_claimStrategy._publishCursor.value() = 140596608, _readIndexCached = 140596480, _readIndex->value() = 140596480
gr::packet_modem::CostasLoop<float, float> input available = 128
_buffer->_claimStrategy._publishCursor.value() = 140596608, _readIndexCached = 140596480, _readIndex->value() = 140596480
gr::packet_modem::CostasLoop<float, float>::processBulk(inSpan.size() = 128, outSpan.size() = 128)
_buffer->_claimStrategy._publishCursor.value() = 140596608, _readIndexCached = 140596480, _readIndex->value() = 140596480
_buffer->_claimStrategy._publishCursor.value() = 140596608, _readIndexCached = 140596480, _readIndex->value() = 140596480
header data = [5, 220, 0, 85, 194, 168, 138, 174, 173, 107, 89, 62, 59, 216, 80, 248]
Writer::tryReserve(0), _offset = 140596608
WARNING: PublishableOutputRange(parent) setting _index and _offset to 0
PublishableOutputRange calling _claimStrategy.publish(0, 0)
_buffer->_claimStrategy._publishCursor.value() = 0, _readIndexCached = 140596608, _readIndex->value() = 140596608
gr::packet_modem::CostasLoop<float, float> input available = 18446744073568955008
WARNING gr::packet_modem::PayloadMetadataInsert<std::__1::complex<float>>::workInternal resampledIn = 0, resampledOut = 0
WARNING Block::prepareStreams() sync_samples == 0
Writer::tryReserve(0), _offset = 506394540
WARNING: PublishableOutputRange(parent) setting _index and _offset to 0
PublishableOutputRange calling _claimStrategy.publish(0, 0)
_buffer->_claimStrategy._publishCursor.value() = 0, _readIndexCached = 506394540, _readIndex->value() = 506394540
gr::packet_modem::CostasLoop<float, float> input available = 18446744073203157076
WARNING gr::packet_modem::PayloadMetadataInsert<std::__1::complex<float>>::workInternal resampledIn = 0, resampledOut = 0, minSyncIn = 1, nextEosTag = 18446744073709551615, availableToProcess = 0, minSyncOut = 1, availableToPublish = 65536
header data = [5, 220, 0, 85, 194, 168, 138, 174, 173, 107, 89, 62, 59, 216, 80, 248]
WARNING gr::packet_modem::PayloadMetadataInsert<std::__1::complex<float>>::workInternal resampledIn = 0, resampledOut = 0, minSyncIn = 1, nextEosTag = 18446744073709551615, availableToProcess = 0, minSyncOut = 1, availableToPublish = 65536, maxSyncIn = 18446744073709551615, maxSyncAvailableIn = 0, hasAsyncIn = true, inputSkipBefore = 0, ensureMinimalDecimation = 18446744073709551615
WARNING Block::prepareStreams() sync_samples == 0
Writer::tryReserve(0), _offset = 88890716
WARNING: PublishableOutputRange(parent) setting _index and _offset to 0
PublishableOutputRange calling _claimStrategy.publish(0, 0)
_buffer->_claimStrategy._publishCursor.value() = 0, _readIndexCached = 88890716, _readIndex->value() = 88890716
gr::packet_modem::CostasLoop<float, float> input available = 18446744073620660900
Presumably this has been fixed by https://github.com/fair-acc/gnuradio4/pull/406. Closing.
After some time processing many packets (e.g., some minutes of
iperf3
TCP transfer), thepacket_receiver_soapy
flowgraph gets stuck producing lots of invalid header decodes.The problem seems to be that the Costas loop is at some point called with 65536 input items, which its upstream block (Payload Metadata Insert) never published.