When attempting to restore an invalid archive file like the one attached (generated by a version of mongodump prior to the fix for
TOOLS-2453), mongorestore hangs indefinitely. The hang was introduced in this commit
While we do not necessarily guarantee any particular behavior on invalid inputs, we should investigate this one, because it may be indicative of an underlying issue in archive restore behavior.
A quick investigation revealed that the three goroutines that were not restoring intents got stuck here. It is unclear whether this is expected behavior or a bug.
This comment suggests that we may be incorrectly waiting for all goroutines instead of terminating when receiving the first error. (this was indeed what we did prior to the commit that changed the behavior)