Commit 603357c
Fix deadlock in SingleRequest.clear by using the Engine as the requestLock.
This occurs because CallResourceReady only acquires 2/3 of the necessary locks to perform its runnable (SingleRequest.requestLock & EngineJob.this), and is missing the Engine.this lock.
In this change, I changed SingleRequest.requestLock to always be Engine.this.
Note that change only affects uses of SingleRequest built through RequestBuilder. Users of the public API SingleRequest.obtain are unaffected by this change.
If this fix works as intended, we can consider providing a new SingleRequest.obtain API with the requestLock param removed and deprecating the current SingleRequest.obtain.
PiperOrigin-RevId: 8178210831 parent 2f55cce commit 603357c
File tree
5 files changed
+34
-3
lines changed- instrumentation/src/androidTest/java/com/bumptech/glide
- library
- src/main/java/com/bumptech/glide
- test/src/test/java/com/bumptech/glide/request
5 files changed
+34
-3
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
539 | 539 | | |
540 | 540 | | |
541 | 541 | | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
542 | 555 | | |
543 | 556 | | |
544 | 557 | | |
| |||
653 | 666 | | |
654 | 667 | | |
655 | 668 | | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
656 | 672 | | |
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| 72 | + | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| |||
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
| 104 | + | |
102 | 105 | | |
103 | 106 | | |
104 | 107 | | |
| |||
1166 | 1169 | | |
1167 | 1170 | | |
1168 | 1171 | | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
1169 | 1177 | | |
1170 | | - | |
| 1178 | + | |
1171 | 1179 | | |
1172 | 1180 | | |
1173 | 1181 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
1071 | 1072 | | |
1072 | 1073 | | |
1073 | 1074 | | |
| 1075 | + | |
| 1076 | + | |
1074 | 1077 | | |
1075 | 1078 | | |
1076 | 1079 | | |
| |||
0 commit comments