jenkinsci / ghprb-plugin

github pull requests builder plugin for Jenkins
https://plugins.jenkins.io/ghprb/
MIT License
506 stars 612 forks source link

Thread Lock for Trigger #754

Open shinji62 opened 5 years ago

shinji62 commented 5 years ago

Hi,

I have some issue with Jenkins most of my Job which are scheduled(cron) are never running on time or even randomly.

One of my guess based on the logs below is that the Github api is using the Trigger too much.

Not sure what is causing my job to not be trigger on time. The only thing I found was this thread.

jenkins.util.Timer [#4]
"jenkins.util.Timer [#4]" Id=127 Group=main RUNNABLE
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
    at java.net.SocketInputStream.read(SocketInputStream.java:171)
    at java.net.SocketInputStream.read(SocketInputStream.java:141)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
    -  locked java.io.BufferedInputStream@154ae878
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:735)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:678)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1593)
    -  locked sun.net.www.protocol.http.HttpURLConnection@687449ff
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
    -  locked sun.net.www.protocol.http.HttpURLConnection@687449ff
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
    at org.kohsuke.github.Requester.parse(Requester.java:615)
    at org.kohsuke.github.Requester.parse(Requester.java:607)
    at org.kohsuke.github.Requester.access$200(Requester.java:74)
    at org.kohsuke.github.Requester$PagingIterator.fetch(Requester.java:518)
    at org.kohsuke.github.Requester$PagingIterator.hasNext(Requester.java:494)
    at org.kohsuke.github.PagedIterator.fetch(PagedIterator.java:44)
    at org.kohsuke.github.PagedIterator.hasNext(PagedIterator.java:32)
    at org.jenkinsci.plugins.ghprb.GhprbPullRequest.getPRCommitAuthor(GhprbPullRequest.java:445)
    at org.jenkinsci.plugins.ghprb.GhprbPullRequest.check(GhprbPullRequest.java:222)
    at org.jenkinsci.plugins.ghprb.GhprbRepository.check(GhprbRepository.java:179)
    at org.jenkinsci.plugins.ghprb.GhprbRepository.check(GhprbRepository.java:159)
    at org.jenkinsci.plugins.ghprb.GhprbTrigger.run(GhprbTrigger.java:371)
    at hudson.triggers.Trigger.checkTriggers(Trigger.java:278)
    at hudson.triggers.Trigger$Cron.doRun(Trigger.java:226)
    at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:72)
    at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

    Number of locked synchronizers = 1
    - java.util.concurrent.ThreadPoolExecutor$Worker@79f77b4f