Project

General

Profile

Actions

Bug #67336

closed

cephfs: test failing to decode backtrace/symlink with ceph-dencoder

Added by Venky Shankar over 1 year ago. Updated 5 months ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
Correctness/Safety
Target version:
% Done:

0%

Source:
Q/A
Backport:
reef,squid
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
Pull request ID:
Tags (freeform):
backport_processed
Fixed In:
v19.3.0-4251-gb251c8ae06
Released In:
v20.2.0~2236
Upkeep Timestamp:
2025-11-01T01:35:53+00:00

Description

Seen in main branch run: /a/teuthology-2024-08-01_20:24:16-fs-main-distro-default-smithi/7831079

2024-08-04T20:49:52.268 INFO:teuthology.orchestra.run.smithi037.stderr:2024-08-04T20:49:52.262+0000 7f774270df40  1 -- 172.21.15.37:0/2920269784 shutdown_connections
2024-08-04T20:49:52.268 INFO:teuthology.orchestra.run.smithi037.stderr:2024-08-04T20:49:52.262+0000 7f774270df40  1 -- 172.21.15.37:0/2920269784 wait complete.
2024-08-04T20:49:52.269 DEBUG:teuthology.orchestra.run.smithi037:> ceph-dencoder type inode_backtrace_t import - decode dump_json
2024-08-04T20:49:52.361 INFO:teuthology.orchestra.run.smithi037.stderr:error: stray data at end of buffer, offset 95
2024-08-04T20:49:52.372 DEBUG:teuthology.orchestra.run:got remote process result: 1

Related issues 2 (0 open2 closed)

Copied to CephFS - Backport #67532: squid: cephfs: test failing to decode backtrace/symlink with ceph-dencoderResolvedVenky ShankarActions
Copied to CephFS - Backport #67533: reef: cephfs: test failing to decode backtrace/symlink with ceph-dencoderRejectedVenky ShankarActions
Actions #1

Updated by Venky Shankar over 1 year ago

Also here: /a/vshankar-2024-08-01_09:58:56-fs-wip-vshankar-testing-20240801.064407-debug-testing-default-smithi/7829835

2024-08-01T19:12:14.544 DEBUG:teuthology.orchestra.run.smithi139:> ceph-dencoder type string_wrapper import - decode dump_json
2024-08-01T19:12:14.611 INFO:teuthology.orchestra.run.smithi139.stderr:error: stray data at end of buffer, offset 11
2024-08-01T19:12:14.616 DEBUG:teuthology.orchestra.run:got remote process result: 1
Actions #2

Updated by Venky Shankar over 1 year ago

  • Assignee set to Milind Changire
Actions #3

Updated by Milind Changire over 1 year ago

The string "stray data at end of buffer" is found in decode methods of 2 classes:
  1. class DencoderBase : public Dencoder
  2. class MessageDencoderImpl : public Dencoder

So, I'm trying to see why doesn't the dencoder for class string_wrapper get selected for decoding.

Also, class string_wrapper isn't derived out of class Dencoder either.
As of now I'm not sure what's going on here or what should be happening for the command ceph-dencoder type string_wrapper import - decode dump_json

Actions #4

Updated by Venky Shankar over 1 year ago

Milind Changire wrote in #note-3:

The string "stray data at end of buffer" is found in decode methods of 2 classes:
  1. class DencoderBase : public Dencoder
  2. class MessageDencoderImpl : public Dencoder

So, I'm trying to see why doesn't the dencoder for class string_wrapper get selected for decoding.

Also, class string_wrapper isn't derived out of class Dencoder either.
As of now I'm not sure what's going on here or what should be happening for the command ceph-dencoder type string_wrapper import - decode dump_json

This issue is easily reproducible. Suggest trying a manual invocation of ceph-dencoder in a vstart cluster or running the test with vstart_runner.

Actions #5

Updated by Milind Changire over 1 year ago

It seems the length of the buffer in the bufferlist is 1 more than the (size + expected data) combined.
  1. size: 4 (int32_t)
  2. data: 27 ("/mnt/mycephfs/sym_dir/file1") <-- expected data
  3. len: 32
$ hexdump -C sl 
00000000  1b 00 00 00 2f 6d 6e 74  2f 6d 79 63 65 70 68 66  |..../mnt/mycephf|
00000010  73 2f 73 79 6d 5f 64 69  72 2f 66 69 6c 65 31 0a  |s/sym_dir/file1.|
00000020

Looks like there's a \n at the end.

Actions #6

Updated by Milind Changire over 1 year ago

PR https://github.com/ceph/ceph/pull/58213 is the one which appends an additional '\n' to the binary output.

Actions #7

Updated by Milind Changire over 1 year ago

The extra new-line char remediation has been taken care by https://github.com/ceph/ceph/pull/59025

Actions #9

Updated by Venky Shankar over 1 year ago

  • Status changed from New to Pending Backport
  • Assignee changed from Milind Changire to Adam Kupczyk
  • Backport set to reef,squid
  • Pull request ID set to 59025

Adam, assigning this to you as you are the author of the fix: https://github.com/ceph/ceph/pull/59025

Actions #10

Updated by Upkeep Bot over 1 year ago

  • Copied to Backport #67532: squid: cephfs: test failing to decode backtrace/symlink with ceph-dencoder added
Actions #11

Updated by Upkeep Bot over 1 year ago

  • Copied to Backport #67533: reef: cephfs: test failing to decode backtrace/symlink with ceph-dencoder added
Actions #12

Updated by Upkeep Bot over 1 year ago

  • Tags (freeform) set to backport_processed
Actions #14

Updated by Upkeep Bot 9 months ago

  • Status changed from Pending Backport to Resolved
  • Upkeep Timestamp set to 2025-07-08T18:13:26+00:00
Actions #15

Updated by Upkeep Bot 8 months ago

  • Merge Commit set to b251c8ae067f5164a752127439aafd0314c83e51
  • Fixed In set to v19.3.0-4251-gb251c8ae06
  • Upkeep Timestamp changed from 2025-07-08T18:13:26+00:00 to 2025-08-02T04:50:28+00:00
Actions #16

Updated by Upkeep Bot 5 months ago

  • Released In set to v20.2.0~2236
  • Upkeep Timestamp changed from 2025-08-02T04:50:28+00:00 to 2025-11-01T01:35:53+00:00
Actions

Also available in: Atom PDF