Project

General

Profile

Bug #40781

ceph-crash crashes: 'memoryview: a bytes-like object is required'

Added by Harry Coin 7 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
common
Target version:
% Done:

0%

Source:
Tags:
ceph-crash
Backport:
nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature:

Description

To avoid the bug below in ceph-crash, change line 35 in /usr/bin/ceph-crash from:
- f = open(os.path.join(path, 'meta'), 'r')
to
+ f = open(os.path.join(path, 'meta'), 'rb')
in ceph -v
ceph version 14.2.1 (d555a9489eb35f84f2e1ef49b77e19da9d113972) nautilus (stable)

Jul 15 08:08:14 nocsupport4 systemd1: Started Ceph crash dump collector.
Jul 15 08:08:14 nocsupport4 ceph-crash1260: INFO:__main__:monitoring path /var/lib/ceph/crash, delay 600s
Jul 15 08:08:15 nocsupport4 ceph-crash1260: Traceback (most recent call last):
Jul 15 08:08:15 nocsupport4 ceph-crash1260: File "/usr/bin/ceph-crash", line 83, in <module>
Jul 15 08:08:15 nocsupport4 ceph-crash1260: main()
Jul 15 08:08:15 nocsupport4 ceph-crash1260: File "/usr/bin/ceph-crash", line 76, in main
Jul 15 08:08:15 nocsupport4 ceph-crash1260: scrape_path(args.path)
Jul 15 08:08:15 nocsupport4 ceph-crash1260: File "/usr/bin/ceph-crash", line 57, in scrape_path
Jul 15 08:08:15 nocsupport4 ceph-crash1260: rc = post_crash(crashpath)
Jul 15 08:08:15 nocsupport4 ceph-crash1260: File "/usr/bin/ceph-crash", line 36, in post_crash
Jul 15 08:08:15 nocsupport4 ceph-crash1260: stdout, stderr = pr.communicate(input=f.read())
Jul 15 08:08:15 nocsupport4 ceph-crash1260: File "/usr/lib/python3.7/subprocess.py", line 939, in communicate
Jul 15 08:08:15 nocsupport4 ceph-crash1260: stdout, stderr = self._communicate(input, endtime, timeout)
Jul 15 08:08:15 nocsupport4 ceph-crash1260: File "/usr/lib/python3.7/subprocess.py", line 1666, in _communicate
Jul 15 08:08:15 nocsupport4 ceph-crash1260: input_view = memoryview(self._input)
Jul 15 08:08:15 nocsupport4 ceph-crash1260: TypeError: memoryview: a bytes-like object is required, not 'str'
Jul 15 08:08:15 nocsupport4 systemd1: ceph-crash.service: Main process exited, code=exited, status=1/FAILURE
Jul 15 08:08:15 nocsupport4 systemd1: ceph-crash.service: Failed with result 'exit-code'.


Related issues

Copied to Ceph - Backport #40946: nautilus: ceph-crash crashes: 'memoryview: a bytes-like object is required' Resolved

History

#1 Updated by Dan Mick 7 months ago

  • Status changed from New to 12

python3 I assume. Looks right to me.

#2 Updated by Dan Mick 7 months ago

  • Assignee set to Dan Mick

#4 Updated by Dan Mick 7 months ago

  • Status changed from 12 to Fix Under Review

#5 Updated by Kefu Chai 7 months ago

  • Backport set to nautilus

#6 Updated by Kefu Chai 7 months ago

  • Status changed from Fix Under Review to Pending Backport

#7 Updated by Nathan Cutler 7 months ago

  • Copied to Backport #40946: nautilus: ceph-crash crashes: 'memoryview: a bytes-like object is required' added

#8 Updated by Nathan Cutler 6 months ago

  • Pull request ID set to 29053

#9 Updated by Nathan Cutler 3 months ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Also available in: Atom PDF