rsize != 0 on error