RedHatInsights/insights-core

OSError: [Errno 90] Message too long

Closed this issue · 1 comments

This issue was brought to my attention by some support engineers, it appears when there is a large amount of content exceptions logged from parsers. It eventually hits a limit, and the below exception occurs when logging exceptions to syslog with the -s parameter. I can provide more information on how to reproduce this internally.

$ insights run -p <rules_repo_name> path/to/must-gather/
---------
Progress:
---------
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib64/python3.11/logging/handlers.py", line 1005, in emit
    self.socket.send(msg)
OSError: [Errno 90] Message too long

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.11/logging/handlers.py", line 1009, in emit
    self.socket.send(msg)
OSError: [Errno 90] Message too long

@ryan-blakley - Thanks for providing this information internally, I can reproduce this issue on my end. And I noticed the following details:

  File "/usr/share/analysis/insights/repos/insights-core/insights/formats/_syslog.py", line 55, in logit
    self.logger.error("{0}[pid:{1}] user:{2}: ERROR - {3}".format(cname, pid, user, msg))
Message: "insights-run[pid:12345] user:user: ERROR - Exception in ccx_ocp_core.parsers.must_gather.logs.OpenShiftMultusCurrentLogsMG - [ContentException('Empty (after filtering): /case/openshit-dev/namespaces/openshift-multus/pods/multus-2946g/kube-multus/kube-multus/logs/current.log'), ContentException('Empty (after filtering): /case/openshit-dev/namespaces/openshift-multus/pods/multus-2b5gj/kube-multus/kube-multus/logs/current.log')

This is a known issue that was introduced into the core few days ago, see RHINENG-11843, and I submitted PR #4183 to fix it.