crossbario / crossbar

Crossbar.io - WAMP application router
https://crossbar.io/
Other
2.05k stars 274 forks source link

RawSocket transport CI tests #1493

Open oberstet opened 5 years ago

oberstet commented 5 years ago

As one step, our CI already runs a whole bunch of Autobahn based examples against the tested crossbar commit (the Travis builds py36-examples and pypy3-examples).

We should add a bunch of tests specifically for RawSocket against crossbar running a RawSocket WAMP transport, eg testing different message sizes (by using different WAMP call/event test payloads) up to the configured maximum (eg 16M).

To add such a test, the following 2 files need to be modified

and a new test file ./twisted/wamp/rpc/rawsocket/ created in AB repo.

oberstet commented 5 years ago

For background, here is a PM of a user that runs into issues with largish message sizes on crossbar / rawsocket:

The backend is using a raw socket and configures the max TX and RX message size to 16MB. We checked with the Wireshark that during the handshaking, the backend send 7F F1 00 00 to the Crossbar and the Crossbar responds with 7F F1 00 00 (I attached the Wireshark dump file). According to the WAMP spec, this means 16MB. Later when backend sends data to the frontend via Crossbar (it publishes) the Crossbar prints this error and the backend disconnects: 2019-02-09T11:53:25-0400 [Router 24184] WampRawSocketProtocol: WAMP Protocol Error (invalid serialization of WAMP message (Invalid control character at: line 1 column 65533 (char 65532))) - aborting connection 2019-02-09T11:53:25-0400 [Router 24184] failing RawSocket connection - message length exceeded: message was 1651466610 bytes, but current maximum is 16777216 bytes. There is no way the message we send is 1651466610 bytes.

oberstet commented 5 years ago

Received feedback from the OP: the problem is not in crossbar, but the client (it mixed up / merged chunks of messages). Nevertheless, having tests on our side would be good;)

ecorm commented 5 years ago

There indeed was a problem in CppWAMP, but the Crossbar problem still persists after resolving it.

See #1499

ecorm commented 5 years ago

As I've reported in #1499, it had nothing to do with Crossbar and problem has been resolved. It would still be a good idea to test large RawSocket messages in your tests.