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 end of $JAYBIRD/build.sh
execution?
I have found a combination of tests that will trigger it in a relatively
short amount of time. In src/test/org/firebirdsql/jdbc/ create a class
TestReproHang with the following content:
package org.firebirdsql.jdbc;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({ TestFBBlobStream.class,
TestFBDatabaseMetaData.class })
public class TestReproHang {
}
Then from the commandline use:
build.sh one-test-pure-java -Dtest=ReproHang
The problem only occurs with Java 8 or higher, although this might again
be a difference in order, because I recall something changed between
Java 7 and 8 in the order of things returned by certain reflection
methods. If you previously built with Java 7, make sure to clean first
using build.sh clean.
Also, I'm using Windows, so that might also be a factor.
I just now noticed that just before it hangs, the memory usage of the
Java process increases dramatically, and if I attach a profiler, I see
that a single array has been allocated with a size of 1 062 356 034
bytes. The start of the array seems to be incomplete, and it is only
populated for +/- 19641 bytes.
This at least explains why my process hangs trying to read more data
(Firebird is never going to send it 1GB of data to fill that array). Now
that I have a relatively short method of reproducing this, I'll see what
happens in Jaybird when I step through it with a debugger, but that will
probably have to wait until the weekend.
Mark
--
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