Fix deadlock on ChunkedIO
What does this MR do?
This fixes a deadlock on
readline where we would loop forever when the trace chunk is degenerated.
This makes this error to be voiced hard via an exception. It does not solve the problem of data corruption, but it will contain the problem.