Skip to content

Wire compression causes "Error reading data from the connection" under specific conditions #8753

@michalk1111

Description

@michalk1111

This issue is somewhat similar to long time fixed #6700 (caused by wire compression; only the affected connection is dropped, the server doesn’t crash), but it only occurs under the following specific conditions (all must be met):

  • A new client (FB 5.0 or FB 4.0 line) connects to FB 3.0 server. (I can’t reproduce it when connecting a 3.0 client to a 3.0 server or a 5.0 client to a 5.0 server.).

  • Several active connections to different databases. (I can’t reproduce it with only one active client application.)

  • It probably occurs only when some databases are being dropped or created. (I can’t reproduce it during normal use of already existing databases.)

  • Wire compression must be activated via the database DPB parameter (config='WireCompression=true' in Database.Params). I cannot reproduce it when wire compression was already enabled in the client-side firebird.conf file. (So, if there is a client-side firebird.conf, its WireCompression setting must be either false or commented out in order to reproduce the error. If it is set to true, the DPB parameter doesn’t change anything and the bug does not appear.)

Since it is difficult or impossible to achieve all these conditions in ISQL, I have prepared a specific Windows test case application (Delphi sources attached). All it does is repeatedly create and drop specified databases. Wire compression is actually activated just for a moment before the database is dropped, but that is sufficient to trigger the bug. Tested with 5.0.3.1683 32-bit fbclient.dll and 3.0.13.33818 64-bit server,

To reproduce the error:

  1. Unzip the attached files TestApp.zip.
  2. Run several instances (2 as a minimum, 3-4 recommended) of TestApp.exe.
  3. Fill in distinct database names (e.g., Test1.fdb in the first application instance, Test2.fdb in the second, etc.). Make sure the folder selected for databases (default: C:\Tmp) exists. Connections must use TCP/IP.
  4. Click Run in all applications so that they execute in parallel.
  5. The errors "Error reading data from the connection" should appear shortly.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions