Hitting a squid with a sword in multiplayer will cause an "end of stream" and disconnect you from the server, but the server does not crash. You can rejoin the server immediately afterwards. My friend and I both tried it and it happened for him (the host) as well. Not sure if it's only with swords because before we tried anything else the squids all despawned.
Linked issues
Comments 2
Duplicate of MC-32699
Can confirm here is console output as well.