RJ Garcia
10/22/2026, 3:19 AMobject ItemTable : IntIdTable("item") {
val linkTokenId = optReference("link_token_id", LinkTokenTable)
}
object LinkTokenTable : IntIdTable("link_token") {
val itemId = optReference("item_id", ItemTable)
}
on a cold JVM where neither of those classes have been initialized yet, if you happen to run two queries in parallel (on separate threads), you can enter a deadlock due to class initialization (similar to what's described here)
I created a repro to highlight the issue - github.com/ragboyjr/exposed-init-deadlock-reproRJ Garcia
10/22/2026, 3:20 AMRJ Garcia
10/22/2026, 3:29 AMYang Wang
10/27/2026, 2:25 PMRJ Garcia
10/27/2026, 2:25 PMRJ Garcia
10/27/2026, 3:13 PMYang Wang
10/27/2026, 3:19 PMreference / optReference )
And if there's an edge between A->B and also B->A, then we flag that.
Limitation is that we don't detect longer cycles, such as A → B → C → ARJ Garcia
10/27/2026, 3:20 PMRJ Garcia
10/27/2026, 3:20 PM