[JIRA] (JENKINS-57997) Performance plugin parses the same file multiple times

0 views
Skip to first unread message

goldyliang@gmail.com (JIRA)

unread,
Jun 12, 2019, 11:23:02 PM6/12/19
to jenkinsc...@googlegroups.com
Goldy Liang created an issue
 
Jenkins / Bug JENKINS-57997
Performance plugin parses the same file multiple times
Issue Type: Bug Bug
Assignee: Andrey Pokhilko
Components: performance-plugin
Created: 2019-06-13 03:22
Priority: Major Major
Reporter: Goldy Liang

In some cases, the Performance plugin parses the same CSV files of the same build multiple times, even if has been already parsed. This causes the UI halting and not able to show any data, until all of them get parsed multiple times, which takes extremely long time.

The way I reproduce it is to run the same build again and again without delay (performance reporting of large csv files, but without testing), like below pipeline snippet:

//A CSV file named report.csv is firstly created with large dataset

perfReport report.csv

After several builds, the job UI is halting and there is no performance report showed, unless after an extremely long time.

From the Jenkins log, I can see the same report gets parsed again and again.

For example, after building #67, #68 & #69, below is the Jenkins log:

Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/69/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/68/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/67/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/68/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/67/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/68/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/67/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/67/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/68/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/67/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/69/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/67/performance-reports/JMeterCSV/full_report' with filterRegex 'null'. 

 

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

goldyliang@gmail.com (JIRA)

unread,
Jun 12, 2019, 11:28:02 PM6/12/19
to jenkinsc...@googlegroups.com
Goldy Liang updated an issue
Change By: Goldy Liang
In some cases, the Performance plugin parses the same CSV files of the same build multiple times, even if has been already parsed. This causes the UI halting and not able to show any data, until all of them get parsed multiple times, which takes extremely long time.

The way I reproduce it is to run the same build again and again without delay (performance reporting of large csv files, but without testing), like below pipeline snippet:
{quote}{{//A CSV file named report.csv is firstly created with large dataset}}

{{perfReport report.csv}}
{quote}

After several builds, the job UI is halting and there is no performance report showed, unless after an extremely long time.

From the Jenkins log, I can see the same report gets parsed again and again.

For example, after building #67, #68 & #69, below is the Jenkins log:
{quote}Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/69/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.

Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/68/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/67/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/68/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/67/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/68/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/67/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/67/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/68/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/67/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/69/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/67/performance-reports/JMeterCSV/full_report' with filterRegex 'null'. 
{quote}
  A work-around I found is to restart the Jenkins after multiple builds have been performed, then run only one more new build. After that, the plugin parses all builds which have not been parsed yet only once, but not multiple times.

 

goldyliang@gmail.com (JIRA)

unread,
Jun 12, 2019, 11:42:03 PM6/12/19
to jenkinsc...@googlegroups.com
Goldy Liang commented on Bug JENKINS-57997
 
Re: Performance plugin parses the same file multiple times

In AbstractParser.parse, it tries to load the report from file/cache, and if not parsed yet, run the parser.

I think this can be synchronized by file name, so that if thread A is already trying to parse, the other thread B won't try doing that again, but just wait for the thread A finishes.

goldyliang@gmail.com (JIRA)

unread,
Jun 13, 2019, 12:03:02 AM6/13/19
to jenkinsc...@googlegroups.com
Goldy Liang updated an issue
Change By: Goldy Liang
In some cases, the Performance plugin parses the same CSV files of the same build multiple times, even if has been already parsed. This causes the UI halting and not able to show any data, until all of them get parsed multiple times, which takes extremely long time.

The way I reproduce it is to run the same build again and again without delay (performance reporting of large csv files, but without testing), like below pipeline snippet:
{quote}{{//A CSV file named report.csv is firstly created with large dataset}}

{{perfReport report.csv}}
{quote}
After several builds, the job UI is halting and there is no performance report showed, unless after an extremely long time.

From the Jenkins log, I can see the same report gets parsed again and again.

For example, after building #67, #68 & #69, below is the Jenkins log:
{quote}Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/69/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/68/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/67/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/68/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/67/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/68/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/67/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/67/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/68/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/67/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/69/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/67/performance-reports/JMeterCSV/full_report' with filterRegex 'null'. 
{quote}
A Two work- around I found arounds:
# Make sure the Jenkins job UI page
is not opened in any browsers when multiple builds are being run without delay. It seems like the parsing is triggered from UI request, and if the job UI page is opened, and the build only contains one report each, it will request the performance report and trigger Jenkins to restart parse the logs every time a new build is run.
# Restart the
Jenkins after multiple builds have been performed, then run only one more new build. After that, the plugin parses all builds which have not been parsed yet only once, but not multiple times.

 


 

goldyliang@gmail.com (JIRA)

unread,
Jun 13, 2019, 12:06:02 AM6/13/19
to jenkinsc...@googlegroups.com
Goldy Liang updated an issue
In some cases, the Performance plugin parses the same CSV files of the same build multiple times, even if has been already parsed. This causes the UI halting and not able to show any data, until all of them get parsed multiple times, which takes extremely long time.

The way I reproduce it is to run the same build again and again without delay (performance reporting of large csv files, but without testing), like below pipeline snippet:
{quote}{{//A CSV file named report.csv is firstly created with large dataset}}

{{perfReport report.csv}}
{quote}
When the multiple builds are being run, keep the job's UI page open in one browser.

After several builds, the job 's UI page is halting and there is no performance report showed, unless after an extremely long time.


From the Jenkins log, I can see the same report gets parsed again and again.

For example, after building #67, #68 & #69, below is the Jenkins log:
{quote}Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/69/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/68/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/67/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/68/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/67/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/68/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/67/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/67/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/68/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/67/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/69/performance-reports/JMeterCSV/full_report' with filterRegex 'null'.
Performance: Parsing report file '/local/jenkins/jobs/loadtest/builds/67/performance-reports/JMeterCSV/full_report' with filterRegex 'null'. 
{quote}
Two work-arounds:
# Make sure the Jenkins job UI page is not opened in any browsers when multiple builds are being run without delay. It seems like the parsing is triggered from UI request, and if the job UI page is opened, and the build only contains one report each, it will request the performance report and trigger Jenkins to parse the logs every time a new build is run.

# Restart the Jenkins after multiple builds have been performed, then run only one more new build. After that, the plugin parses all builds which have not been parsed yet only once, but not multiple times.

 

 

goldyliang@gmail.com (JIRA)

unread,
Jun 14, 2019, 4:13:01 PM6/14/19
to jenkinsc...@googlegroups.com
 
Re: Performance plugin parses the same file multiple times

It turns out that there is a silly bug in the AbstractParser.loadSerializedReport:

{{ protected static PerformanceReport loadSerializedReport(File reportFile) {}}

    ....

    PerformanceReport report = CACHE.getIfPresent(serialized);
    if (report == null && file.exists() && file.canRead()) {
       ...

       report = (PerformanceReport) in.readObject();
       CACHE.put(serialized, report);
       return report;
        ...

}
        // It returns null, which shall be a mistake.
    return null;//Shall return report
{{ }}}

Because of this bug, the log is re-parsed if the in-memory cache has been created.

I compiled a fix as above, and it works fine then.

 

goldyliang@gmail.com (JIRA)

unread,
Jun 14, 2019, 4:43:01 PM6/14/19
to jenkinsc...@googlegroups.com

It turned out that the same fix as pull request have been sitting there: https://github.com/jenkinsci/performance-plugin/pull/188

 

artem.fedorov@blazemeter.com (JIRA)

unread,
Jun 17, 2019, 4:01:02 AM6/17/19
to jenkinsc...@googlegroups.com

artem.fedorov@blazemeter.com (JIRA)

unread,
Jun 17, 2019, 4:02:03 AM6/17/19
to jenkinsc...@googlegroups.com
Artem Fedorov resolved as Fixed
 
Change By: Artem Fedorov
Status: Open Resolved
Assignee: Andrey Pokhilko Artem Fedorov
Resolution: Fixed
Reply all
Reply to author
Forward
0 new messages