[PING] RFR: 8145294: TestLogRotation.java triggers a race in the UL framework

Staffan Larsen staffan.larsen at oracle.com
Fri Dec 18 13:32:54 UTC 2015


Looks good!

Thanks,
/Staffan

> On 18 dec. 2015, at 14:01, Marcus Larsson <marcus.larsson at oracle.com> wrote:
> 
> 
> 
> On 2015-12-16 09:46, Marcus Larsson wrote:
>> Hi,
>> 
>> Please review the following patch to fix a race in file rotations with UL.
>> 
>> Summary:
>> freopen and fwrite are not safe to use concurrently and hence the VM might crash if a thread tries to write during a rotation. Writing and rotating needs to be properly synchronized, but using a Mutex is problematic here because the synchronization must be usable already at argument parse time. The patch replaces the previously used mutexes with semaphores (like with the LogConfiguration_lock case). LogFileOutputs are now rotatable at any time and the LogOutput interface has been simplified to reflect this.
>> 
>> Webrev:
>> http://cr.openjdk.java.net/~mlarsson/8145294/
>> 
>> Issue:
>> https://bugs.openjdk.java.net/browse/JDK-8145294
>> 
>> Testing:
>> TestLogRotation in RBT and locally
>> 
>> Thanks,
>> Marcus
> 



More information about the serviceability-dev mailing list