CQLSH goes out of memory and eventually crashes when a user pastes content containing tabs into the cqlsh shell.
It is normal to copy and paste some DDL from a text file into CQLSH command line. If the content that is copied contains tabs for indentation, when this content is pasted into CQLSH, CQLSH hangs. The amount of memory on the OS will slowly increase until the operating system kills the cqlsh process once its "oom_score" ramps up.
Since cqlsh supports command completion, the presence of tabs in the pasted DDL will trigger cqlsh to attempt to complete the given text, and this will lead to the OOM.
This behaviour has been identified in Jira: CASSANDRA-11177.
A simple workaround to this issue is to use normal spaces to indent the DDL and avoid tabs.
This behaviour will be fixed in a future release of CQLSH