Project

General

Profile

Actions

Bug #53694

open

rgw: invalid error documents in reply to notification topic creation

Added by Matt Benjamin over 2 years ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Target version:
-
% Done:

0%

Source:
Tags:
notifications
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

While experimenting with the pubsub CreateTopic API, I accidentally sent a version of the following (golang-based) topic:
ct_rsp, err := sconn.CreateTopic(&sns.CreateTopicInput{
Name: aws.String(topic),
Attributes: map[string]*string{
"verify-ssl": aws.String("false"),
"use-ssl": aws.String("false"),
"kafka-ack-level": aws.String("none"),
"push-endpoint": aws.String("kafka://lemon:9092"),
"persistent": aws.String("false"), // for now!
},
})
with push-endpoint set to "lemon:9092"--i.e, missing the scheme portion of the url.

Naturally this fails, but I was surprised when it crashed the golang program trying to create the topic:
"""
-----------------------------------------------------
2021/12/21 18:33:23 DEBUG: Response sns/CreateTopic Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 400 Bad Request
Content-Length: 185
Accept-Ranges: bytes
Connection: Keep-Alive
Content-Type: application/xml
Date: Tue, 21 Dec 2021 23:33:23 GMT
X-Amz-Request-Id: tx0000087ca879463ee8541-0061c26443-1036-default

-----------------------------------------------------
SerializationError: failed to unmarshal error message
status code: 400, request id:
caused by: UnmarshalError: failed to unmarshal error message
00000000 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 |00000010 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 55 54 |.0" encoding="UT|
00000020 46 2d 38 22 3f 3e 3c 45 72 72 6f 72 3e 3c 43 6f |F-8"?><Error><Co|
00000030 64 65 3e 49 6e 76 61 6c 69 64 49 6e 70 75 74 3c |de>InvalidInput<|
00000040 2f 43 6f 64 65 3e 3c 52 65 71 75 65 73 74 49 64 |/Code><RequestId|
00000050 3e 74 78 30 30 30 30 30 38 37 63 61 38 37 39 34 |>tx0000087ca8794|
00000060 36 33 65 65 38 35 34 31 2d 30 30 36 31 63 32 36 |63ee8541-0061c26|
00000070 34 34 33 2d 31 30 33 36 2d 64 65 66 61 75 6c 74 |443-1036-default|
00000080 3c 2f 52 65 71 75 65 73 74 49 64 3e 3c 48 6f 73 |</RequestId><Hos|
00000090 74 49 64 3e 31 30 33 36 2d 64 65 66 61 75 6c 74 |tId>1036-default|
000000a0 2d 64 65 66 61 75 6c 74 3c 2f 48 6f 73 74 49 64 |-default</HostId|
000000b0 3e 3c 2f 45 72 72 6f 72 3e |></Error>|

caused by: unknown error response tag, {{ Error} []}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7ace05]

goroutine 1 [running]:
main.main()
/home/mbenjamin/dev/rgw/s3_py/go/notify/notify.go:87 +0x705
"""
I think this indicates a problem with the error document RGW is returning, though I don't see the issue offhand...

Matt

Actions #1

Updated by zhipeng li over 2 years ago

is golang client program crashed ?

Actions #2

Updated by Yuval Lifshitz over 1 year ago

  • Subject changed from rgw: pubsub: invalid error documents? to rgw: invalid error documents in reply to notification topic creation
  • Tags set to notifications
Actions

Also available in: Atom PDF