Fix crashes due to subprocess strange return #124

Closed
opened 2021-05-10 00:57:12 -04:00 by JoshuaBoniface · 1 comment
JoshuaBoniface commented 2021-05-10 00:57:12 -04:00 (Migrated from git.bonifacelabs.ca)
Exception in thread Thread-1350221:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/share/pvc/pvcnoded/Daemon.py", line 1120, in collect_ceph_stats
    retcode, stdout, stderr = common.run_os_command('ceph df --format json', timeout=1)
  File "/usr/share/pvc/pvcnoded/common.py", line 89, in run_os_command
    stderr=subprocess.PIPE,
  File "/usr/lib/python3.7/subprocess.py", line 477, in run
    stdout, stderr = process.communicate()
  File "/usr/lib/python3.7/subprocess.py", line 939, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
  File "/usr/lib/python3.7/subprocess.py", line 1674, in _communicate
    selector.register(self.stderr, selectors.EVENT_READ)
  File "/usr/lib/python3.7/selectors.py", line 352, in register
    key = super().register(fileobj, events, data)
  File "/usr/lib/python3.7/selectors.py", line 238, in register
    key = SelectorKey(fileobj, self._fileobj_lookup(fileobj), events, data)
  File "/usr/lib/python3.7/selectors.py", line 225, in _fileobj_lookup
    return _fileobj_to_fd(fileobj)
  File "/usr/lib/python3.7/selectors.py", line 40, in _fileobj_to_fd
    "{!r}".format(fileobj)) from None
ValueError: Invalid file object: <_io.BufferedReader name=203>
Execution of job "node_keepalive (trigger: interval[0:00:05], next run at: 2021-05-10 00:48:28 EDT)" skipped: maximum number of running instances reached (1)
Execution of job "node_keepalive (trigger: interval[0:00:05], next run at: 2021-05-10 00:48:33 EDT)" skipped: maximum number of running instances reached (1)
Execution of job "node_keepalive (trigger: interval[0:00:05], next run at: 2021-05-10 00:48:38 EDT)" skipped: maximum number of running instances reached (1)
Execution of job "node_keepalive (trigger: interval[0:00:05], next run at: 2021-05-10 00:48:43 EDT)" skipped: maximum number of running instances reached (1)
Execution of job "node_keepalive (trigger: interval[0:00:05], next run at: 2021-05-10 00:48:48 EDT)" skipped: maximum number of running instances reached (1)
Execution of job "node_keepalive (trigger: interval[0:00:05], next run at: 2021-05-10 00:48:53 EDT)" skipped: maximum number of running instances reached (1)
``` Exception in thread Thread-1350221: Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner self.run() File "/usr/lib/python3.7/threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "/usr/share/pvc/pvcnoded/Daemon.py", line 1120, in collect_ceph_stats retcode, stdout, stderr = common.run_os_command('ceph df --format json', timeout=1) File "/usr/share/pvc/pvcnoded/common.py", line 89, in run_os_command stderr=subprocess.PIPE, File "/usr/lib/python3.7/subprocess.py", line 477, in run stdout, stderr = process.communicate() File "/usr/lib/python3.7/subprocess.py", line 939, in communicate stdout, stderr = self._communicate(input, endtime, timeout) File "/usr/lib/python3.7/subprocess.py", line 1674, in _communicate selector.register(self.stderr, selectors.EVENT_READ) File "/usr/lib/python3.7/selectors.py", line 352, in register key = super().register(fileobj, events, data) File "/usr/lib/python3.7/selectors.py", line 238, in register key = SelectorKey(fileobj, self._fileobj_lookup(fileobj), events, data) File "/usr/lib/python3.7/selectors.py", line 225, in _fileobj_lookup return _fileobj_to_fd(fileobj) File "/usr/lib/python3.7/selectors.py", line 40, in _fileobj_to_fd "{!r}".format(fileobj)) from None ValueError: Invalid file object: <_io.BufferedReader name=203> Execution of job "node_keepalive (trigger: interval[0:00:05], next run at: 2021-05-10 00:48:28 EDT)" skipped: maximum number of running instances reached (1) Execution of job "node_keepalive (trigger: interval[0:00:05], next run at: 2021-05-10 00:48:33 EDT)" skipped: maximum number of running instances reached (1) Execution of job "node_keepalive (trigger: interval[0:00:05], next run at: 2021-05-10 00:48:38 EDT)" skipped: maximum number of running instances reached (1) Execution of job "node_keepalive (trigger: interval[0:00:05], next run at: 2021-05-10 00:48:43 EDT)" skipped: maximum number of running instances reached (1) Execution of job "node_keepalive (trigger: interval[0:00:05], next run at: 2021-05-10 00:48:48 EDT)" skipped: maximum number of running instances reached (1) Execution of job "node_keepalive (trigger: interval[0:00:05], next run at: 2021-05-10 00:48:53 EDT)" skipped: maximum number of running instances reached (1) ```
JoshuaBoniface commented 2021-05-10 01:07:49 -04:00 (Migrated from git.bonifacelabs.ca)

closed via commit b851a6209c

closed via commit b851a6209c4018d5b58f3f482967f1b14b30f910
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: parallelvirtualcluster/pvc#124
No description provided.