This problem still occurs with 4.0.0.1059-0_x64, and I'm no closer to
finding a cause, except that it looks like Firebird is somewhere
encoding integer values incorrectly or seems to suffer from a buffer
overflow somewhere depending on the configured value of TcpRemoteBufferSize.
If I change one of the two test classes that triggers this problem to
create a single database for the entire test class, the problem changes
from a too large buffer being read (which causes the hang) to an error
Unsupported or unexpected operation code 16777216 in processOperation
[SQLState:08000, ISC error code:337248276]
This error means that Jaybird received a response packet with an
operation code of 16777216 instead of a valid operation code
(op_response (9), op_fetch_response (66) or op_sql_response (78)).
Mark
On 27-3-2018 19:08, Mark Rotteveel wrote:
I increased the TcpRemoteBufferSize to 32767 (the documented maximum
value) in my firebird.conf, and when I run the full test suite of
Jaybird, the tests hang consistently on the same test. It is blocked on
reading from the socket during a fetch.
If I run this test in isolation it works, if I run all tests in the same
class it works. It only happens when I run all tests. Given this test
(like most Jaybird tests) creates a new database, it likely isn't a
problem with the test itself.
If I disable wire encryption, it works. If I comment out
TcpRemoteBufferSize and re-enable wire encryption, it works. If I set
TcpRemoteBufferSize to 16384 or 32760 it also works fine.
This all suggests that maybe some data isn't flushed, or there might be
a buffer overflow or another type of boundary issue somewhere, or that
maybe somewhere an assumption of multiples of 8 bytes has crept in.
I'm not sure how long this problem has been there (and maybe it already
exists in Firebird 3), I do recall having similar problems before, but
I'm not sure if I changed TcpRemoteBufferSize when that happened (I
sometimes do and sometimes don't change this setting). I'll see if I can
find the time and energy later this week to run these tests on earlier
snapshots and Firebird 3 as well, and maybe try some different values.
I hope in the meantime, that maybe one of you has an idea what the
problem might be.
--
Mark Rotteveel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel