pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
[pgjdbc/pgjdbc] issue #3953: "ForkJoinPool.commonPool-worker-1" java.lang.SecurityException: setContextClassLoader
2+ messages / 1 participants
[nested] [flat]

* [pgjdbc/pgjdbc] issue #3953: "ForkJoinPool.commonPool-worker-1" java.lang.SecurityException: setContextClassLoader
@ 2026-03-07 04:23 "martin-dorey-hv (@martin-dorey-hv)" <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: martin-dorey-hv (@martin-dorey-hv) @ 2026-03-07 04:23 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

**Describe the issue**
I'm experiencing exceptions which I'm confident are a regression in the driver.

**Driver Version?** 
42.7.10

**Java Version?**
openjdk version "1.8.0_472"
OpenJDK Runtime Environment (Temurin)(build 1.8.0_472-b08)
OpenJDK 64-Bit Server VM (Temurin)(build 25.472-b08, mixed mode)

**OS Version?**
CentOS Stream release 9

**PostgreSQL Version?**
18.3

**To Reproduce**
I'm afraid that I don't know how this big hairy application that I didn't write is using PostgreSQL or the driver.  I was tasked with upgrading both components.

**Expected behaviour**
Before the upgrades, when the driver was 42.7.8 and PostgreSQL was 18.1, the exceptions did not happen.  When the driver is reverted to 42.7.8 and PostgreSQL kept at 18.3, the exceptions stop.

**Logs**
```
Exception in thread "ForkJoinPool.commonPool-worker-1" java.lang.SecurityException: setContextClassLoader
        at java.util.concurrent.ForkJoinWorkerThread$InnocuousForkJoinWorkerThread.setContextClassLoader(ForkJoinWorkerThread.java:255)
        at org.postgresql.util.LazyCleanerImpl.lambda$startThread$0(LazyCleanerImpl.java:181)
        at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)
```
The driver's source line from that stack trace is:

https://github.com/pgjdbc/pgjdbc/blame/master/pgjdbc/src/main/java/org/postgresql/util/LazyCleanerIm...

... which was new three months ago under:
  
https://github.com/pgjdbc/pgjdbc/commit/bdd930bf4
 
... which is in the list of changes for 42.7.9:
 
https://jdbc.postgresql.org/changelogs/2026-01-15-42/

Before that change, the call to setContextClassLoader wasn't done on a ForkJoinPool thread.

I got no matches searching for issues with setContextClassLoader and figured it'd be better to have a weak report of a regression than no report.  But sorry nonetheless.

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [pgjdbc/pgjdbc] issue #3953: "ForkJoinPool.commonPool-worker-1" java.lang.SecurityException: setContextClassLoader
@ 2026-03-14 22:35 "martin-dorey-hv (@martin-dorey-hv)" <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: martin-dorey-hv (@martin-dorey-hv) @ 2026-03-14 22:35 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

Thanks!  I’d just been wondering about trying to construct a test case.

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-03-14 22:35 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-03-07 04:23 [pgjdbc/pgjdbc] issue #3953: "ForkJoinPool.commonPool-worker-1" java.lang.SecurityException: setContextClassLoader "martin-dorey-hv (@martin-dorey-hv)" <[email protected]>
2026-03-14 22:35 Re: [pgjdbc/pgjdbc] issue #3953: "ForkJoinPool.commonPool-worker-1" java.lang.SecurityException: setContextClassLoader "martin-dorey-hv (@martin-dorey-hv)" <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox