Print

Print


I have a simple SSI test client/server setup where the client serializes a Google Protocol Buffer and sends it to the server. Normally this works fine with the following log on the XRootD server:
```
180108 14:20:28 13298 ctadev.13684:20@localhost Ssi_close: /test del=True
180108 14:21:09 13354 XrootdXeq: ctadev.13913:22@localhost pvt IP64 login
[DEBUG] Service::Prepare():
[DEBUG]    Resource name: /test
[DEBUG]    Resource user: 
[DEBUG]    Resource info: 
[DEBUG]    Hosts to avoid: 
[DEBUG]    Affinity: Default
[DEBUG]    Resource options: 
[DEBUG]    Resource client name: NULL
180108 14:21:09 13354 ctadev.13913:22@localhost Ssi_open: /test prepared.
180108 14:21:09 13354 ctadev.13913:22@localhost Ssi_write: 0:/test rsz=4 wsz=4
180108 14:21:09 13354 ctadev.13913:22@localhost Ssi_Activate: 0:/test [new wtReq] oucbuff rqsz=4
180108 14:21:09 13237 ctadev.13913:22@localhost Ssi_DoIt: 0:/test [begun xqReq] Calling service processor
[DEBUG] RequestProc() constructor
[DEBUG] XrdSsiPbService::ProcessRequest(): Binding Processor to Request
180108 14:21:09 13237 ctadev.13913:22@localhost Ssi_BindDone: 0:/test [begun xqReq] Bind called; for request 0
[DEBUG] RequestProc::Execute()
180108 14:21:09 13237 ctadev.13913:22@localhost Ssi_GetRequest: 0:/test [bound xqReq] sz=4
RECEIVED MESSAGE:
{
 "cmd": "SEND_METADATA",
 "repeat": 0,
 "record": {
  "testDouble": 0,
  "testFloat": 0,
  "testInt32": 0,
  "testInt64": "0",
  "testUint32": 0,
  "testUint64": "0",
  "testSint32": 0,
  "testSint64": "0",
  "testFixed32": 0,
  "testFixed64": "0",
  "testSfixed32": 0,
  "testSfixed64": "0",
  "testBool": true,
  "testString": "",
  "testBytes": ""
 }
}

180108 14:21:09 13237 ctadev.13913:22@localhost Ssi_RelReqBuff: 0:/test [bound xqReq] called
180108 14:21:09 13237 ctadev.13913:22@localhost Ssi_ProcessResponse: 0:/test [bound xqReq] Response presented wtr=False
180108 14:21:09 13237 ctadev.13913:22@localhost Ssi_ProcessResponse: 0:/test [bound doRsp] Resp data sz=0
180108 14:21:09 13354 ctadev.13913:22@localhost Ssi_fctl: 0:/test query resp status
180108 14:21:09 13354 ctadev.13913:22@localhost Ssi_fctl: 0:/test resp ready
180108 14:21:09 13354 ctadev.13913:22@localhost Ssi_Done: 0:/test [bound odRsp] resp sent; no additional data remains
180108 14:21:09 13354 ctadev.13913:22@localhost Ssi_Finalize: 0:/test [bound odRsp] Calling Finished(False)
[DEBUG] RequestProc::Finished()
[DEBUG] XrdSsiPbService::ProcessRequest(): Unbinding Processor from Request
180108 14:21:09 13237 ctadev.13913:22@localhost Ssi_Unbind: 0:/test [bound odRsp] Recycling request...
[DEBUG] ~RequestProc() destructor
180108 14:21:09 13354 XrootdXeq: ctadev.13913:22@localhost disc 0:00:00
180108 14:21:09 13354 ctadev.13913:22@localhost Ssi_close: /test del=True
```
However, if all the Protocol Buffer fields contain default values or zero, this serializes to a zero-length message. In this case, XRootD refuses to accept the message:
```
180108 14:23:58 13236 XrootdXeq: ctadev.14185:20@localhost pvt IP64 login
[DEBUG] Service::Prepare():
[DEBUG]    Resource name: /test
[DEBUG]    Resource user: 
[DEBUG]    Resource info: 
[DEBUG]    Hosts to avoid: 
[DEBUG]    Affinity: Default
[DEBUG]    Resource options: 
[DEBUG]    Resource client name: NULL
180108 14:23:58 13236 ctadev.14185:20@localhost Ssi_open: /test prepared.
180108 14:23:58 13236 ctadev.14185:20@localhost Ssi_fctl: 0:/test query resp status
180108 14:23:58 13236 ssi_fctl: ctadev.14185:20@localhost Unable to fctl /test; no such process
180108 14:23:58 13236 XrootdXeq: ctadev.14185:20@localhost disc 0:00:00
180108 14:23:58 13236 ctadev.14185:20@localhost Ssi_close: /test del=True
```
The zero-length message should be accepted and processed in the same way as any other message.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/issues/640

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1