Opened 9 years ago

Closed 7 years ago

#472 closed defect (fixed)

replicate3 test fails on flint on Windows

Reported by: charliejuggler Owned by: olly
Priority: normal Milestone: 1.2.14
Component: Replication Version: 1.2.8
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: Microsoft Windows

Description

As follows:

C:\work\xapian\xapian-SVN\xapian-core\tests>apitest -b flint replicate3 -v
Running tests with backend "flint"...
Running test: replicate3... FAILED
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
...
<multiple copies of this message until>
...
Caught expected NetworkError exception: NetworkError: Incomplete block in changeset
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: Incomplete block in changeset
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: Incomplete block in changeset
..\tests\dbcheck.cc:140: ((db.get_doccount()) == expected_doccount))
Expected `db.get_doccount()' and `expected_doccount' to be equal: were 1 and 2

apitest backend flint: 0 tests passed, 1 failed.

Change History (17)

comment:1 Changed 9 years ago by olly

  • Owner changed from olly to richard

Assigning to Richard as he added this testcase fairly recently.

comment:2 Changed 9 years ago by richard

I've been trying to see what's going wrong here, but am a bit stuck so I've added a little extra debugging (in r14515) to try and help pin it down. If you could update and paste the output with that version, that should help.

comment:3 Changed 9 years ago by richard

  • Status changed from new to assigned

comment:4 Changed 9 years ago by charliejuggler

Here you are:

Running tests with backend "flint"...
Running test: replicate3... FAILED
Trying replication with a changeset truncated to 10 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 11 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 12 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 13 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 14 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 15 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 16 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 17 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 18 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 19 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 20 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 21 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 22 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 23 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 24 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 25 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 26 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 27 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 28 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 29 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 30 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 1030 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 2030 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 3030 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 4030 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 5030 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 6030 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 7030 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 8030 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 9030 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 10030 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 10444 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 10445 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 10446 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 10447 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 10448 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 10449 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 10450 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: read failed (Reached the end of the file.)
Trying replication with a changeset truncated to 10451 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: Incomplete block in changeset
Trying replication with a changeset truncated to 10452 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: Incomplete block in changeset
Trying replication with a changeset truncated to 10453 bytes, from 10454 bytes
Expecting exception NetworkError
Caught expected NetworkError exception: NetworkError: Incomplete block in changeset
..\tests\dbcheck.cc:140: ((db.get_doccount()) == (expected_doccount))
Expected `db.get_doccount()' and `expected_doccount' to be equal: were 1 and 2


apitest backend flint: 0 tests passed, 1 failed.

comment:5 Changed 9 years ago by charliejuggler

This test also hangs forever when using the Brass backend - not sure if this is related.

comment:6 Changed 9 years ago by charliejuggler

If there's any way I can help to track this down, let me know: v1.2.3 doesn't pass the test suite because of this issue.

comment:7 Changed 9 years ago by charliejuggler

This is still evident on 1.2.4

comment:8 Changed 8 years ago by charliejuggler

This is still evident on 1.2.5. It's been a while since we could run the tests successfully on a Windows build, perhaps me and Richard should put our heads together and try and fix this one.

comment:9 Changed 8 years ago by charliejuggler

replicate4 is also hanging forever on Brass.

comment:10 Changed 8 years ago by charliejuggler

...and replicate2 hangs on Flint.

comment:11 Changed 8 years ago by charliejuggler

Still evident on 1.2.6

comment:12 Changed 8 years ago by charliejuggler

Still evident on 1.2.8

comment:13 Changed 7 years ago by olly

  • Milestone set to 1.2.13
  • Version changed from SVN trunk to 1.2.8

I've just noticed that we're missing O_BINARY from a number of open() calls in the replication code in the library, and also in some of the replication tests. I suspect that is the cause of this problem.

It's now fixed on trunk (in r16961 and r16962). Marking to backport that for 1.2, but it would be great if you could test this.

comment:14 Changed 7 years ago by olly

  • Component changed from Backend-Flint to Replication
  • Milestone changed from 1.2.13 to 1.2.x

Fixed the missing O_BINARY in 1.2 branch in r17007.

Not closing for now as I don't know if this will actually fix this issue.

comment:15 Changed 7 years ago by boomboo

Tested with 1.2.13 on win7 x64, still hangs on replicate3, tried chert / flint and brass.

comment:16 Changed 7 years ago by olly

  • Milestone changed from 1.2.x to 1.2.14
  • Owner changed from richard to olly
  • Status changed from assigned to new

Turns out that our RealTime::sleep() implementation for Windows is rather broken, and either doesn't sleep (if we're before the deadline) or sleeps for 43+ years (if we're after the deadline). Fixed in trunk r17071; boomboo confirmed on IRC that this patch makes replicate3 pass on Windows for chert, flint, and brass.

So once this is backported we can finally close this ticket!

comment:17 Changed 7 years ago by olly

  • Resolution set to fixed
  • Status changed from new to closed

Backported to 1.2 branch in r17074.

Note: See TracTickets for help on using tickets.