[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    RE: RFR: 8145294: TestLogRotation.java triggers a race in the UL framework
From:       Markus Gronlund <markus.gronlund () oracle ! com>
Date:       2015-12-16 9:32:59
Message-ID: 38eaa2ba-5c3a-4a3b-ac8d-6e380e9ac11b () default
[Download RAW message or body]

Hi Marcus,

Looks good, thanks for fixing.

As we spoke out-of-band, post this fix, lets figure a way of how to generalize this \
with some kind of SemaphoreAcquireRelease utility.

/Markus

-----Original Message-----
From: Marcus Larsson 
Sent: den 16 december 2015 09:46
To: serviceability-dev@openjdk.java.net; hotspot-runtime-dev@openjdk.java.net
Subject: RFR: 8145294: TestLogRotation.java triggers a race in the UL framework

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic