To reproduce, run the following SQL with the mariadb client with --delimiter=// option:
Once the query has started, interrupt it with Ctrl+C. With a direct connection to the database the connection is killed immediately but with MaxScale the KILL command it generates doesn't end up being processed correctly.
There's possibly a race condition of sorts where the execution of the sub-KILL commands that are derived from the original one end up being discarded due to the fact that the session is stopping. If this is true then the solution is to wait until all the sent commands have been written to the network before the OK packet is sent for the original KILL command.