Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-11584

Scanner fails if report is larger than 1GB on PostgreSQL

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Database, Scanner
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      Scanner fails with error:

      [17:54:40] :	 [Step 2/2] 22:54:40.499 INFO: Analysis report generated in 162680ms, dir size=8 GB
      [17:58:00] :	 [Step 2/2] 22:58:00.054 INFO: Analysis reports compressed in 199555ms, zip size=1 GB
      [17:58:00] :	 [Step 2/2] 22:58:00.054 INFO: Analysis report generated in [REPLACED]
      [17:58:00] :	 [Step 2/2] 22:58:00.054 DEBUG: Upload report
      [17:58:14] :	 [Step 2/2] 22:58:14.230 DEBUG: POST 500 https://[REPLACED]/api/ce/submit?projectKey=[REPLACED] | time=14173ms
      [17:58:14] :	 [Step 2/2] 22:58:14.535 INFO: ------------------------------------------------------------------------
      [17:58:14] :	 [Step 2/2] 22:58:14.535 INFO: EXECUTION FAILURE
      [17:58:14] :	 [Step 2/2] 22:58:14.535 INFO: ------------------------------------------------------------------------
      [17:58:14] :	 [Step 2/2] 22:58:14.535 INFO: Total time: 1:23:29.541s
      [17:58:18]W:	 [Step 2/2] 22:58:18.845 ERROR: Error during SonarQube Scanner execution
      [17:58:18]W:	 [Step 2/2] 22:58:18.845 ERROR: Failed to upload report - 500: An error has occurred. Please contact your administrator
      [17:58:18] :	 [Step 2/2] 22:58:18.845 INFO: Final Memory: 397M/1984M
      [17:58:18] :	 [Step 2/2] 22:58:18.845 INFO: ------------------------------------------------------------------------
      [17:58:19]W:	 [Step 2/2] Process exited with code 1
      [17:58:19]E:	 [Step 2/2] Process exited with code 1 (Step: Run sonar-scanner (Command Line))
      [17:58:19]E:	 [Step 2/2] Step Run sonar-scanner (Command Line) failed
      

      The related error on server side is:

      2018.12.05 09:32:23 ERROR web[AWauWbjkjQ/76cgSCE6T][o.s.s.w.WebServiceEngine] Fail to process request http://[REPLACED]
      java.lang.IllegalStateException: Fail to insert data of CE task AWd9tgr771Xw9ki7tKii
      	at org.sonar.db.ce.CeTaskInputDao.insert(CeTaskInputDao.java:56)
      	at org.sonar.server.computation.queue.ReportSubmitter.submitReport(ReportSubmitter.java:178)
      	at org.sonar.server.computation.queue.ReportSubmitter.submit(ReportSubmitter.java:97)
      	at org.sonar.server.ce.ws.SubmitAction.handle(SubmitAction.java:114)
      	at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:103)
      	at org.sonar.server.ws.WebServiceFilter.doFilter(WebServiceFilter.java:86)
      	at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:126)
      	at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:95)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:87)
      	at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:71)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:72)
      	at org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:48)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.sonar.server.platform.web.RedirectFilter.doFilter(RedirectFilter.java:61)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.sonar.server.platform.web.requestid.RequestIdFilter.doFilter(RequestIdFilter.java:63)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:62)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
      	at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
      	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: org.postgresql.util.PSQLException: Unable to bind parameter values for statement.
      	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:328)
      	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
      	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
      	at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:155)
      	at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:132)
      	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
      	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
      	at org.sonar.db.ce.CeTaskInputDao.insert(CeTaskInputDao.java:53)
      	... 45 common frames omitted
      Caused by: java.io.IOException: Bind message length 1,299,090,755 too long.  This can be caused by very large or incorrect length specifications on InputStream parameters.
      	at org.postgresql.core.v3.QueryExecutorImpl.sendBind(QueryExecutorImpl.java:1512)
      	at org.postgresql.core.v3.QueryExecutorImpl.sendOneQuery(QueryExecutorImpl.java:1789)
      	at org.postgresql.core.v3.QueryExecutorImpl.sendQuery(QueryExecutorImpl.java:1326)
      	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:298)
      	... 52 common frames omitted
      

      The root cause is that the scanner report is too large and can't be persisted in the PostgreSQL column ce_task_input.input_data. The type bytea is restricted to 1GB.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              simon.brandhof Simon Brandhof
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: