Project

General

Profile

Actions

Bug #40781

closed

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

Added by Harry Coin almost 5 years ago. Updated over 4 years 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 (v1):
Crash signature (v2):

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 1 (0 open1 closed)

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

Updated by Dan Mick almost 5 years ago

  • Status changed from New to 12

python3 I assume. Looks right to me.

Actions #2

Updated by Dan Mick almost 5 years ago

  • Assignee set to Dan Mick
Actions #4

Updated by Dan Mick almost 5 years ago

  • Status changed from 12 to Fix Under Review
Actions #5

Updated by Kefu Chai almost 5 years ago

  • Backport set to nautilus
Actions #6

Updated by Kefu Chai over 4 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #7

Updated by Nathan Cutler over 4 years ago

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

Updated by Nathan Cutler over 4 years ago

  • Pull request ID set to 29053
Actions #9

Updated by Nathan Cutler over 4 years 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".

Actions

Also available in: Atom PDF