A severe Avro bug AVRO-2944 was recently found in the static method for creating a DataFileReader instance, where it can get stuck in an infinite loop while trying to read the 4 byte "magic" header of the file.
The stack trace looks like this,
"main" #1 prio=5 os_prio=0 tid=0x00007f8798027000 nid=0x7d9c runnable [0x00007f87a0924000]
at java.security.AccessController.doPrivileged(Native Method)
This was fixed in Avro 1.10.1 but has not yet been patched to any other Avro versions. The issue has existed since Avro 1.5 although we have encountered it recently. It does not happen in normal circumstances, there has to be some very unusual input stream behavior (partial/throttled read, or unexpected EOF) causing it. We've only seen it with the S3AFileSystem's S3AInputStream, suddenly starting a few days ago for no apparent reason. Even now it is sporadic, happening a small percent of the time in job tasks that read many S3 files but often enough to be problematic. An AWS support case is open to attempt to find out what could have caused this.
To avoid the external dependency on a particular Avro version to fix this, we can probably just patch this locally in Crunch since it's only one static method and apart from one legacy constant everything we need access to in the Avro code is public.