It is unlikely that the problem has a simple solution. In isolation reading files without newlines works. However, after some other operations (that all run in the same shell session), this becomes possible.
It is possible that the whole shell sessions is in some ill-conditioned state at that point.
https://github.com/datalad/datalad-ria/pull/85 revealed that it can hang in such cases. The contained test documents a behavior that works and one that does not.
It is unlikely that the problem has a simple solution. In isolation reading files without newlines works. However, after some other operations (that all run in the same shell session), this becomes possible.
It is possible that the whole shell sessions is in some ill-conditioned state at that point.