Bug #115449 | NativePacketPayload.readInteger causes ArrayIndexOutOfBoundsException | ||
---|---|---|---|
Submitted: | 27 Jun 2024 14:07 | Modified: | 16 Jul 2024 10:34 |
Reporter: | giacomo petronio | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | Connector / J | Severity: | S2 (Serious) |
Version: | 8.2.0 | OS: | Any |
Assigned to: | Filipe Silva | CPU Architecture: | Any |
[27 Jun 2024 14:07]
giacomo petronio
[15 Jul 2024 23:29]
Filipe Silva
Hi Giacomo, Thank you for your interest in MySQL Connector/J and for taking the time to report this issue. Can you please provide the answers for following questions? 1. Are you using MySQL Router in this production database? If so, any difference if you connect directly to the database? 2. What version of the MySQL Server are you using? 3. In what OS is the MySQL Server and Connector/J running? 4. Please test with latest MySQL Connector/J version. If getting the same result, does it help if you add "trackSessionState=true" to the connection string? 5. Without a self-contained test case it will be near to impossible to reproduce the issue. Are you able to provide a self-contained test case that fails on any environment? Thanks,
[16 Jul 2024 8:39]
giacomo petronio
1. We are not using MySQL Router. We connect directly to the database 2. The version of MySQL Server is MySQL 5.7.44 (managed by Google Cloud) 3. MySQL Server is running on a Linux server, since it's completely managed by GCP, there is no easy way to find out the OS. We have the same issue running the connector from both Linux (CentOS 7) and Windows 11 4. We tested with various Connector versions (8.0.29 8.0.33 8.1.0 8.2.0 8.3.0), including the latest one 9.0.0 always with the same results. Adding trackSessionState=true to the connection string does not change the outcome. 5. Sadly the problem occurs only in the production server, we are not able to reproduce the error in other MySQL server, even using the same data with a dump/restore
[16 Jul 2024 10:34]
Filipe Silva
Unfortunately there's nothing we can do about this at this point. MySQL Server 5.7 is no longer a maintained version--it is EOL since October 25, 2023, so the risk of hitting incompatibilities between the server and the connectors becomes higher every new release, which may not be exactly your case since you tested with drivers from the same time period. However, since you are unable to come up with a reproducible test case it would be close to impossible for us to figure out what's going on and to know what to fix. Note that the exception hints that the data coming from the server somehow got "damaged" before reaching the connector. It could be the server encoding it in ways the connector no longer expects, it could be the connector is enabling features by default the server doesn't support and as a result the decoding ended up messed up, it could simply be that the data is getting corrupted on the wire, or something else. If you find ways of reproducing the problem consistently in a system we may replicate, then please re-open this report or file a new bug providing all the information. Meanwhile I'll be forced to close this report as "Can't repeat".