Project

General

Profile

Bug #20037

rgw log includes zero byte sometimes

Added by Jens Harbott over 1 year ago. Updated 10 months ago.

Status:
Resolved
Priority:
Normal
Target version:
-
Start date:
05/22/2017
Due date:
% Done:

0%

Source:
Tags:
Backport:
jewel hammer
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

The log line looks like this:

2017-05-22 14:29:15.107592 7f7727288700 20 get_obj_state: setting s->obj_tag to 5d698ce5-1e38-4ca2-8c34-b508515893bb.4115.7^@

making the file seem a binary file instead of a text file for utils like grep, hindering further processing.

Complete log for the request attached.

bad.rgw.log View (15.6 KB) Jens Harbott, 05/22/2017 02:35 PM


Related issues

Copied to rgw - Backport #20480: jewel: rgw log includes zero byte sometimes Resolved
Copied to rgw - Backport #20481: hammer: rgw log includes zero byte sometimes Rejected

History

#1 Updated by Jens Harbott over 1 year ago

Similar things happen in the output of radosgw-admin object stat, some strings are shown with a trailing \u0000:

$ radosgw-admin object stat --bucket=bla --object=test3 
{
    "name": "test3",
    "size": 524832,
    "policy": {
        "acl": {
            "acl_user_map": [
                {
                    "user": "testuser",
                    "acl": 15
                }
            ],
            "acl_group_map": [],
            "grant_map": [
                {
                    "id": "testuser",
                    "grant": {
                        "type": {
                            "type": 0
                        },
                        "id": "testuser",
                        "email": "",
                        "permission": {
                            "flags": 15
                        },
                        "name": "First User",
                        "group": 0
                    }
                }
            ]
        },
        "owner": {
            "id": "testuser",
            "display_name": "First User" 
        }
    },
    "etag": "fc6cd955f73309491281e260fb3a3ec7\u0000",
    "tag": "default.4185.25\u0000",
    "manifest": {
        "objs": [],
        "obj_size": 524832,
        "explicit_objs": "false",
        "head_obj": {
            "bucket": {
                "name": "bla",
                "pool": ".rgw.buckets",
                "data_extra_pool": ".rgw.buckets.extra",
                "index_pool": ".rgw.buckets.index",
                "marker": "default.4181.1",
                "bucket_id": "default.4181.1" 
            },
            "key": "",
            "ns": "",
            "object": "test3",
            "instance": "" 
        },
        "head_size": 524288,
        "max_head_size": 524288,
        "prefix": ".HMardeFI8bkByiZcoNTTz4vPa2nnVrN_",
        "tail_bucket": {
            "name": "bla",
            "pool": ".rgw.buckets",
            "data_extra_pool": ".rgw.buckets.extra",
            "index_pool": ".rgw.buckets.index",
            "marker": "default.4181.1",
            "bucket_id": "default.4181.1" 
        },
        "rules": [
            {
                "key": 0,
                "val": {
                    "start_part_num": 0,
                    "start_ofs": 524288,
                    "part_size": 0,
                    "stripe_max_size": 4194304,
                    "override_prefix": "" 
                }
            }
        ]
    },
    "attrs": {
        "user.rgw.content_type": "binary\/octet-stream\u0000",
        "user.rgw.x-amz-date": "Thu, 01 Jun 2017 08:36:53 +0000\u0000" 
    }
}

#2 Updated by Abhishek Lekshmanan over 1 year ago

  • Status changed from New to In Progress
  • Assignee set to Abhishek Lekshmanan

seems like we're doing a str. assign where bufferlist::c_Str() itself would be sufficient

#4 Updated by Jens Harbott over 1 year ago

Fix has been merged, please backport to Jewel.

#5 Updated by Casey Bodley over 1 year ago

  • Status changed from In Progress to Pending Backport
  • Backport set to jewel hammer

#6 Updated by Nathan Cutler over 1 year ago

  • Copied to Backport #20480: jewel: rgw log includes zero byte sometimes added

#7 Updated by Nathan Cutler over 1 year ago

  • Copied to Backport #20481: hammer: rgw log includes zero byte sometimes added

#8 Updated by Nathan Cutler 10 months ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF