Closed
Description
_AbstractTransport.__repr__
(or Connection.__repr__
) might crash.
In a report/issue from/in Sentry self
was reported as "broken repr" in
Line 352 in 7300741
_AbstractTransport.__repr__
:
Lines 100 to 106 in 7300741
Connection.__repr__
: Lines 281 to 287 in 7300741
The full traceback:
ConnectionResetError: [Errno 104] Connection reset by peer
File "celery/worker/loops.py", line 78, in asynloop
update_qos()
File "kombu/common.py", line 444, in update
return self.set(self.value)
File "kombu/common.py", line 437, in set
self.callback(prefetch_count=new_value)
File "celery/worker/consumer/tasks.py", line 43, in set_prefetch_count
return c.task_consumer.qos(
File "kombu/messaging.py", line 552, in qos
return self.channel.basic_qos(prefetch_size,
File "amqp/channel.py", line 1878, in basic_qos
return self.send_method(
File "amqp/abstract_channel.py", line 57, in send_method
conn.frame_writer(1, self.channel_id, sig, args, content)
File "amqp/method_framing.py", line 183, in write_frame
write(view[:offset])
File "amqp/transport.py", line 352, in write
self._write(s)
BrokenPipeError: [Errno 32] Broken pipe
File "kombu/message.py", line 128, in ack_log_error
self.ack(multiple=multiple)
File "kombu/message.py", line 123, in ack
self.channel.basic_ack(self.delivery_tag, multiple=multiple)
File "amqp/channel.py", line 1391, in basic_ack
return self.send_method(
File "amqp/abstract_channel.py", line 57, in send_method
conn.frame_writer(1, self.channel_id, sig, args, content)
File "amqp/method_framing.py", line 183, in write_frame
write(view[:offset])
File "amqp/transport.py", line 352, in write
self._write(s)
I have not investigated why that is yet, but figured reporting it already is worth it, since having a proper (non-crashing) repr is more helpful during debugging/investigating issues, of course.
amqp 5.0.6 (but the code is the same in master)
sentry-sdk 1.1.0