You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Timeout after 4 hours on reporter waiting for data #1242
Describe the bug
java.sql.SQLRecoverableException: Closed Connection
This seems to happen after 4 hours.
Provide version info
Database version 12.2.0.1.0
UT Version v3.1.10.3349
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
PL/SQL Release 12.2.0.1.0 - Production
"CORE 12.2.0.1.0 Production"
TNS for Linux: Version 12.2.0.1.0 - Production
NLSRTL Version 12.2.0.1.0 - Production
NLS_LANGUAGE AMERICAN
NLS_TERRITORY IRELAND
NLS_CURRENCY €
NLS_ISO_CURRENCY IRELAND
NLS_NUMERIC_CHARACTERS .,
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH12:MI:SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH24:MI:SSXFF
NLS_TIME_TZ_FORMAT HH12:MI:SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH24:MI:SSXFF TZR
NLS_DUAL_CURRENCY €
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS CHAR
NLS_NCHAR_CONV_EXCP FALSE
x86_64/Linux 2.4.xx
Information about client software
utplsql cli
utPLSQL-cli 3.1.8-SNAPSHOT.local
utPLSQL-java-api 3.1.8.546
To Reproduce
Run the following.
./utplsql run username/password@database:1521/utplsqltestdb -s -t 780 -f=ut_coverage_html_reporter -o=coverage.html
Expected behavior
Expect the reports to be produced.
Additional context
Our database is fairly large, 4.9 million relevant lines.
If I pass a -p parameter to keep it to one subset of tests it runs (approx 3 hours) and generates the coverage report.
However I need a complete report so removed the -P
Seems to always time out after 4 hours.
Running locally on the db server (to avoid any network/firewall timeout) shows the same result.
Nothing in the Oracle alert log/tracefiles, in fact the sql is still running in the database after the disconnect indicating a timeout on the client.
Let me see if there is sone timeout setting that could cause this behavior.
Few questions that coukd help give answer.
If you run the same command but with ut_documentation_reporter, how long does it take to complete?
When running with -p commznd, what do you provide as an argument?
utPLSQL reporters use output-buffer mechanism (table)
For each invoked reporter, the buffer gets populated with data as the main utPLSQL test execution session executed the tests.
When starting a utPLSQl-cli run, the cli starts several sessions for reporters (I think it is one for each reporter + 1 for the main utPLSQL run session).
Each of the reporter sessions is waiting for data to arrive in the buffer table and when it arrives it is instantly consumed (read and deleted) by the reported and data is provided from reporter to an output file.
To prevent situations where a DB may have uncountable amounts of ghost sessions in situations where main session dies or something goes terribly wrong and no data is sent to the reporters, the report consumer session has a timeout of 4 hours.
That timeout is reset each time the reporter session receives some data from the main session.
The problem is, that for coverage, no data is produced until after the test run is finished and coverage data is collected and processed.
I think we need to rewrite the mechanism of synchronization between sessions to be time-independent.
Activity
jgebal commentedon Aug 26, 2022
Let me see if there is sone timeout setting that could cause this behavior.
Few questions that coukd help give answer.
If you run the same command but with ut_documentation_reporter, how long does it take to complete?
When running with -p commznd, what do you provide as an argument?
varianjv commentedon Aug 26, 2022
-p=schemaname.PACKAGENAME
Works ok as I said, runs in 3 hrs and generates a 770Mb output file.
I will run your suggested command there now and report back ut_documentation_reporter
varianjv commentedon Aug 27, 2022
ut_documentation_reporter runs in about 30 minutes (I should have known this as we use this in a jenkins pipeline)
varianjv commentedon Aug 30, 2022
@jgebal Any ideas?
jgebal commentedon Jan 16, 2023
This is actually a bug in utPLSQL.
utPLSQL reporters use output-buffer mechanism (table)
For each invoked reporter, the buffer gets populated with data as the main utPLSQL test execution session executed the tests.
When starting a utPLSQl-cli run, the cli starts several sessions for reporters (I think it is one for each reporter + 1 for the main utPLSQL run session).
Each of the reporter sessions is waiting for data to arrive in the buffer table and when it arrives it is instantly consumed (read and deleted) by the reported and data is provided from reporter to an output file.
To prevent situations where a DB may have uncountable amounts of ghost sessions in situations where main session dies or something goes terribly wrong and no data is sent to the reporters, the report consumer session has a timeout of 4 hours.
That timeout is reset each time the reporter session receives some data from the main session.
The problem is, that for coverage, no data is produced until after the test run is finished and coverage data is collected and processed.
I think we need to rewrite the mechanism of synchronization between sessions to be time-independent.
jgebal commentedon Jan 16, 2023
@varianjv - sorry for coming back to this so late.
[-]java.sql.SQLRecoverableException: Closed Connection [/-][+]Timeout after 4 hours on reporter waiting for data[/+]