samtools/htsjdk — pull request #30 by nnordborg (2014-06-02 07:06:33+00:00)
Title: The logging implementation is not thread-safe

Running IlluminaBasecallsToFastq with multiple threads lead to garbled log file. It's easy to see if we set VERBOSITY=DEBUG:

INFO	2014-06-02 08:48:38	IlluminaBasecallsToFastq	READ STRUCTURE IS 75T1S6B75T1S
DEBUG	2014-06-02 08:48:46	IlluminaDataProviderFactory	The following parsers will be used by IlluminaDataProvider:
DEBUG	DEBUG	2014-06-02 08:48:46	IlluminaBasecallsConverter	Reading data from tile 11206 ...
2014-06-02 08:48:46	IlluminaDataProviderFactory	The following parsers will be used by IlluminaDataProvider:
DEBUG	DEBUG	2014-06-02 08:48:46	IlluminaDataProviderFactory	The following parsers will be used by IlluminaDataProvider:

The reason is that the synchronization on 'this' is not enough since there are multiple loggers writing to the same stream (System.err). Synchronizing on 'this.out' seems to solve the problem.