Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2019-11-26 Thread Mark Rotteveel
I finally managed to track down and fix this problem yesterday. It turns out, the problem could also occur with Firebird 3 and Jaybird 3. The problem was in Jaybird and how it skipped the padding of buffers. This worked fine for unencrypted connections, but with encrypted connections the metho

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-07-23 Thread Dimitry Sibiryakov
23.07.2018 20:18, Vlad Khorsun wrote:  > const SSHORT l = (SSHORT) MIN(length, INET_remote_buffer)    If length >= INET_remote_buffer   It can't happen Then MIN() here has no meaning. and INET_remote_buffer == 32768   This is not the case Yes, fortunately. -- WBR, SD. --

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-07-23 Thread Vlad Khorsun
23.07.2018 21:10, Dimitry Sibiryakov wrote: 23.07.2018 19:42, Vlad Khorsun wrote: Note, upper allowed value for INET_remote_buffer is MAX_DATA_HW (32768).   That's bad. > const SSHORT l = (SSHORT) MIN(length, INET_remote_buffer)   If length >= INET_remote_buffer It can't happen and

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-07-23 Thread Dimitry Sibiryakov
23.07.2018 19:42, Vlad Khorsun wrote: Note, upper allowed value for INET_remote_buffer is MAX_DATA_HW (32768). That's bad. > const SSHORT l = (SSHORT) MIN(length, INET_remote_buffer) If length >= INET_remote_buffer and INET_remote_buffer == 32768, l will be -1. -- WBR, SD. --

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-07-23 Thread Vlad Khorsun
23.07.2018 19:45, Adriano dos Santos Fernandes wrote: On 23/07/2018 13:18, Mark Rotteveel wrote: On 23-7-2018 17:25, Adriano dos Santos Fernandes wrote: On 23/07/2018 11:12, Mark Rotteveel wrote: The problem can't be reproduced with the native client, which suggests Jaybird does something wron

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-07-23 Thread Adriano dos Santos Fernandes
On 23/07/2018 13:18, Mark Rotteveel wrote: > On 23-7-2018 17:25, Adriano dos Santos Fernandes wrote: >> On 23/07/2018 11:12, Mark Rotteveel wrote: >>> The problem can't be reproduced with the native client, which suggests >>> Jaybird does something wrong, or this is something that is only >>> trigg

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-07-23 Thread Mark Rotteveel
On 23-7-2018 17:25, Adriano dos Santos Fernandes wrote: On 23/07/2018 11:12, Mark Rotteveel wrote: The problem can't be reproduced with the native client, which suggests Jaybird does something wrong, or this is something that is only triggered by what Jaybird does. Mark, are you dealing with t

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-07-23 Thread Alex Peshkoff via Firebird-devel
On 23.07.2018 18:21, Adriano dos Santos Fernandes wrote: May be has nothing to do with Mark's problem, but inet.cpp/alloc_port seems to have a race problem: -- if (!INET_initialized) {     MutexLockGuard guard(init_mutex, FB_FUNCTION);     if (!INET_initialized)     {         ...  

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-07-23 Thread Adriano dos Santos Fernandes
On 23/07/2018 11:12, Mark Rotteveel wrote: > The problem can't be reproduced with the native client, which suggests > Jaybird does something wrong, or this is something that is only > triggered by what Jaybird does. Mark, are you dealing with this situation re. partial packets with negative length

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-07-23 Thread Adriano dos Santos Fernandes
May be has nothing to do with Mark's problem, but inet.cpp/alloc_port seems to have a race problem: -- if (!INET_initialized) {     MutexLockGuard guard(init_mutex, FB_FUNCTION);     if (!INET_initialized)     {         ...         INET_initialized = true;         // This should go AFTER

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-07-23 Thread Mark Rotteveel
On 23-7-2018 15:07, Alex Peshkoff via Firebird-devel wrote: On 22.07.2018 18:03, Mark Rotteveel wrote: On 22-7-2018 16:14, Dimitry Sibiryakov wrote: 22.07.2018 14:56, Mark Rotteveel wrote: If I change one of the two test classes that triggers this problem to create a single database for the en

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-07-23 Thread Alex Peshkoff via Firebird-devel
On 23.07.2018 16:21, Dimitry Sibiryakov wrote: s = lpad('x', x, 'y') Tried - nothing bad happened. Except long screen blinking :) -- Check out the vibrant tech community on one of the world's most engaging tech sites

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-07-23 Thread Dimitry Sibiryakov
23.07.2018 15:07, Alex Peshkoff via Firebird-devel wrote: I tried to reproduce this with c++ client. I did the following - set in FB4 TcpRemoteBufferSize=8191, connected to it using FB3 client (to avoid having same size preset at both ends of wire link) 'isql -user sysdba -pas masterkey localhos

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-07-23 Thread Alex Peshkoff via Firebird-devel
On 22.07.2018 18:03, Mark Rotteveel wrote: On 22-7-2018 16:14, Dimitry Sibiryakov wrote: 22.07.2018 14:56, Mark Rotteveel wrote: 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

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-07-22 Thread Mark Rotteveel
On 22-7-2018 16:14, Dimitry Sibiryakov wrote: 22.07.2018 14:56, Mark Rotteveel wrote: 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 e

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-07-22 Thread Dimitry Sibiryakov
22.07.2018 14:56, Mark Rotteveel wrote: 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

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-07-22 Thread Mark Rotteveel
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 o

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-04-03 Thread Alex Peshkoff via Firebird-devel
On 04/03/18 16:39, Alex Peshkoff via Firebird-devel wrote: On 04/03/18 16:32, Mark Rotteveel wrote: On 2018-04-03 14:45, Alex Peshkoff via Firebird-devel wrote: I've executed it 100 times. Each time in the end I get: one-test-pure-java:     [junit] Running org.firebirdsql.jdbc.TestReproHang    

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-04-03 Thread Alex Peshkoff via Firebird-devel
On 04/03/18 16:32, Mark Rotteveel wrote: On 2018-04-03 14:45, Alex Peshkoff via Firebird-devel wrote: I've executed it 100 times. Each time in the end I get: one-test-pure-java:     [junit] Running org.firebirdsql.jdbc.TestReproHang     [junit] Tests run: 46, Failures: 0, Errors: 131, Skipped: 0

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-04-03 Thread Mark Rotteveel
On 2018-04-03 14:45, Alex Peshkoff via Firebird-devel wrote: I've executed it 100 times. Each time in the end I get: one-test-pure-java:     [junit] Running org.firebirdsql.jdbc.TestReproHang     [junit] Tests run: 46, Failures: 0, Errors: 131, Skipped: 0, Time elapsed: 7.453 sec     [junit] Test

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-04-03 Thread Alex Peshkoff via Firebird-devel
On 04/03/18 14:43, Mark Rotteveel wrote: On 2018-04-03 12:54, Alex Peshkoff via Firebird-devel wrote: On 03/29/18 18:45, Mark Rotteveel wrote: On 29-3-2018 13:19, Alex Peshkoff via Firebird-devel wrote: On 03/27/18 20:08, Mark Rotteveel wrote: I increased the TcpRemoteBufferSize to 32767 (the

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-04-03 Thread Mark Rotteveel
On 2018-04-03 12:54, Alex Peshkoff via Firebird-devel wrote: On 03/29/18 18:45, Mark Rotteveel wrote: On 29-3-2018 13:19, Alex Peshkoff via Firebird-devel wrote: On 03/27/18 20:08, Mark Rotteveel wrote: I increased the TcpRemoteBufferSize to 32767 (the documented maximum value) in my firebird.

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-04-03 Thread Alex Peshkoff via Firebird-devel
On 03/29/18 18:45, Mark Rotteveel wrote: On 29-3-2018 13:19, Alex Peshkoff via Firebird-devel wrote: On 03/27/18 20: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 Is it t

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-03-29 Thread Mark Rotteveel
On 29-3-2018 13:19, Alex Peshkoff via Firebird-devel wrote: On 03/27/18 20: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 Is it that set of tests which is started in the en

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-03-29 Thread Mark Rotteveel
On 29-3-2018 13:19, Alex Peshkoff via Firebird-devel wrote: On 03/27/18 20: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 Is it that set of tests which is started in the en

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-03-29 Thread Alex Peshkoff via Firebird-devel
On 03/27/18 20: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 Is it that set of tests which is started in the end of $JAYBIRD/build.sh execution? , the tests hang consist

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-03-28 Thread Mark Rotteveel
On 27-3-2018 19:35, Alex Peshkoff via Firebird-devel wrote: On 03/27/18 20: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 i

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-03-27 Thread Jiří Činčura
Can you try 32755 and 32756? I've seen maybe related behavior. -- Mgr. Jiří Činčura https://www.tabsoverspaces.com/ On Tue, Mar 27, 2018, at 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

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-03-27 Thread Alex Peshkoff via Firebird-devel
On 03/27/18 20: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

[Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-03-27 Thread Mark Rotteveel
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