Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-43615

Security inspector hangs with GitHub OAuth eve on small user number

XMLWordPrintable

      I have 8 registered users in my system (+ including several users from SCM changelogs). In such case building reports for multiple users (actually even for a single one) hangs for a long time.

      From what I see in the stacktrace, it happens due to the massive Group/team loading and their mapping to authorities. It would be great if the GitHub OAuth plugin somehow caches this information or allows to skip GitHub Team loading at least.

      Handling GET /security-inspector/users-for-item/report from 84.75.123.29 : RequestHandlerThread[#7] ReportBuilder/report.jelly ItemForMultipleUsersReportBuilder/reportBody.jelly
      java.net.SocketInputStream.socketRead0(Native Method)
      java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
      java.net.SocketInputStream.read(SocketInputStream.java:170)
      java.net.SocketInputStream.read(SocketInputStream.java:141)
      sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
      sun.security.ssl.InputRecord.read(InputRecord.java:503)
      sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
      sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:930)
      sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
      java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
      java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
      java.io.BufferedInputStream.read(BufferedInputStream.java:345)
      sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:704)
      sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647)
      sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1569)
      sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
      java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
      sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
      org.kohsuke.github.Requester.parse(Requester.java:586)
      org.kohsuke.github.Requester._to(Requester.java:262)
      org.kohsuke.github.Requester.to(Requester.java:224)
      org.kohsuke.github.Requester.to(Requester.java:212)
      org.kohsuke.github.GHTeam.hasMember(GHTeam.java:79)
      org.jenkinsci.plugins.GithubAuthenticationToken.getGrantedAuthorities(GithubAuthenticationToken.java:406)
      org.jenkinsci.plugins.GithubOAuthUserDetails.getAuthorities(GithubOAuthUserDetails.java:45)
      hudson.model.User.impersonate(User.java:322)
      org.jenkinsci.plugins.securityinspector.impl.items.ItemForMultipleUsersReportBuilder$ReportImpl.forRow(ItemForMultipleUsersReportBuilder.java:150)
      org.jenkinsci.plugins.securityinspector.impl.items.ItemForMultipleUsersReportBuilder$ReportImpl.forRow(ItemForMultipleUsersReportBuilder.java:132)
      org.jenkinsci.plugins.securityinspector.model.SecurityInspectorReport.generateReport(SecurityInspectorReport.java:119)
      org.jenkinsci.plugins.securityinspector.model.PermissionReport.generateReport(PermissionReport.java:43)
      org.jenkinsci.plugins.securityinspector.impl.items.ItemForMultipleUsersReportBuilder$ReportImpl.generateReport(ItemForMultipleUsersReportBuilder.java:179)
      org.jenkinsci.plugins.securityinspector.impl.items.ItemForMultipleUsersReportBuilder$ReportImpl.createReport(ItemForMultipleUsersReportBuilder.java:184)
      org.jenkinsci.plugins.securityinspector.impl.items.ItemForMultipleUsersReportBuilder.getReport(ItemForMultipleUsersReportBuilder.java:105)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      

            sag47 Sam Gleske
            oleg_nenashev Oleg Nenashev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: