[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-2d-dev
Subject: Integrated: 8238170: BeanContextSupport remove and propertyChange can deadlock
From: Sergey Bylokhov <serb () openjdk ! org>
Date: 2023-01-29 20:07:23
Message-ID: wj4CZ4xbFIvFPC8JuSHjKQBmOVk7s25DySsmR5Aj6DU=.5e4d1e90-e7c9-43b5-9909-9af4efb01558 () github ! com
[Download RAW message or body]
On Tue, 24 Jan 2023 03:15:50 GMT, Sergey Bylokhov <serb@openjdk.org> wrote:
> Two methods in the BeanContextSupport class use two locks in a different order, \
> which can cause a deadlock.
> Here is the first order: (1) first acquire BeanContext.globalHierarchyLock and then \
> children:
> enter public method remove(Object) at line 484
> call remove(Object, boolean) at line 485
> acquire synchronization on BeanContext.globalHierarchyLock at line 502
> acquire synchronization on children at line 534
>
> Here is the second order: (2) first acquire children and then \
> BeanContext.globalHierarchyLock:
> enter public method propertyChange() at line 1110
> acquire synchronization on children at line 1114
> call remove(Object, boolean) at line 1121
> acquire synchronization on BeanContext.globalHierarchyLock at line 502
>
> The fix added the "BeanContext.globalHierarchyLock" before the usage of the \
> "children" lock in the propertyChange method.
This pull request has now been integrated.
Changeset: d4e9f5e5
Author: Sergey Bylokhov <serb@openjdk.org>
URL: https://git.openjdk.org/jdk/commit/d4e9f5e5f2c92964c3602f34a59b92947d1595a5
Stats: 158 lines in 3 files changed: 147 ins; 0 del; 11 mod
8238170: BeanContextSupport remove and propertyChange can deadlock
Reviewed-by: phh
-------------
PR: https://git.openjdk.org/jdk/pull/12158
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic