AdoptOpenJDK / AdoptOpenJDK/IcedTea-Web

OpenWebstart get stuck on certificate selection screen (multi-threading with event dispatch thread hack)

Đang mở
#962 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Java
Star
268
Fork
96
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

I was able to reproduce this with a self-issued certificate on localhost.

The problem exists when doing a backend call in a SwingUtilities.invokeLater at the same time as a background thread calls a the backend to the server with a broken certificate.

Result: the certificate dialog and the UI are completely frozen.

Now it's super easy to reproduce, see my comment:
https://github.com/karakun/OpenWebStart/issues/594#issuecomment-2498960727

I suspect that the locking does not work properly in this case, in the following section:
https://github.com/AdoptOpenJDK/IcedTea-Web/blob/d8414248348bc2b08cb5f97926decaa491a0dfa8/core/src/main/java/net/adoptopenjdk/icedteaweb/client/parts/dialogs/security/SecurityDialogs.java#L305

``` awt thread
message.lock = null;
...

// background thread
message.lock = new Semaphore(0);
...
message.lock.acquire();
```
and most likely both call `JNLPRuntime.getSecurityDialogHandler().postMessage(message);`

btw this issue was first raised here: https://github.com/karakun/OpenWebStart/issues/594
but the broken code is in this repo (14 year old code ... :-))

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.