potential races in module shutdown functions
It is possible (though uncommon) that an application may continue to issue I/O operations from another thread while one thread is calling MPI_Finalize(). The POSIX module,for example, protects against this in the begin_shutdown() function by holding the POSIX_LOCK while setting a flag to disable instrumentation. The get_output_data function then collects data without holding a lock.
Theoretically a concurrent thread could get past the flag check but not complete instrumentation before the get_output_data function begins, however. For safety we should hold the POSIX_LOCK during the get_output_data() and shutdown() functions as well.
This needs to be changed in the other modules as well. Should be a minor update.