Report analysis hangs with ORA-03146


We are using SonarQube 7.9.1 with Oracle 19c DB.
Recently we are seeing below error

Caused by: org.apache.ibatis.exceptions.PersistenceException:
### Error updating database.  Cause: java.sql.SQLException: ORA-03146: invalid buffer length for TTC field

### The error may exist in org.sonar.db.source.FileSourceMapper
### The error may involve org.sonar.db.source.FileSourceMapper.update-Inline
### The error occurred while setting parameters
### SQL: update       file_sources     set       updated_at = ?,       binary_data = ?,       line_hashes = ?,       line_hashes_version = ?,       line_count = ?,       data_hash = ?,       src_hash = ?,       revision = ?     where       id = ?
### Cause: java.sql.SQLException: ORA-03146: invalid buffer length for TTC field

        at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(
        at org.apache.ibatis.session.defaults.DefaultSqlSession.update(
        at org.apache.ibatis.binding.MapperMethod.execute(
        at org.apache.ibatis.binding.MapperProxy.invoke(
        at com.sun.proxy.$Proxy46.update(Unknown Source)
        at org.sonar.db.source.FileSourceDao.update(
        at org.sonar.ce.task.projectanalysis.source.PersistFileSourcesStep$FileSourceVisitor.persistSource(
        at org.sonar.ce.task.projectanalysis.source.PersistFileSourcesStep$FileSourceVisitor.visitFile(
        ... 36 common frames omitted
Caused by: java.sql.SQLException: ORA-03146: invalid buffer length for TTC field

        at oracle.jdbc.driver.T4CTTIoer11.processError(
        at oracle.jdbc.driver.T4CTTIoer11.processError(
        at oracle.jdbc.driver.T4C8Oall.processError(
        at oracle.jdbc.driver.T4CTTIfun.receive(
        at oracle.jdbc.driver.T4CTTIfun.doRPC(
        at oracle.jdbc.driver.T4C8Oall.doOALL(
        at oracle.jdbc.driver.T4CPreparedStatement.doOall8(
        at oracle.jdbc.driver.T4CPreparedStatement.doOall8(
        at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(
        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(
        at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(

When this error occurs, SonarQube report analysis will hang and reports for other projects will be waiting.

we need to restart the SonarQube server for the hanged analysis to get canceled and for other analysis to continue (on SonarQube restart).

We are using using latest Oracle 19c JDBC driver and set below extra properties for CE server."( SHA256 )""( AES256 )"

We observed that this issue happening to files with more lines like (5K-10K) and does not happen consistently.

Appreciate any feedback/guidance to resolve this issue.

With Regards,
Vara Prasad.

Hello @VaraPrasad ,

After digging into issue I found that this error seems to be an internal one of oracle (might worth asking them if you have support subscription):

ORA-03146: Invalid buffer length for TTC field
Cause: A corrupt Two-Task Common (TTC) packet was received.
Action: This is a internal protocol error. Contact Oracle Support Services.

Also you could try with different Oracle Driver version which is more mature like: 12.2.01.

Are you able to test those analysis with encryption disabled to see if that’s related?


@VaraPrasad, it seems, that the error you are experiencing is indeed a known bug in Oracle 19c database when blob objects are written via JDBC. You will need to get in touch with Oracle to get 30955880 patch for your database version to address this.



Thanks Jacek and Michal for the inputs.
We will evaluate the options suggested and get back to you on how it goes.

With Regards,
Vara Prasad.