Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

Monday, 12 October 2015

Clubknight - data loss testing

Cluknight occassionally loses the data from the beginning of a log string to the pool status file.

Rough guesstimate - 0.3% of logging attempts

Here is an attempt to re-create the data loss under controlled conditions

1st try:
From Chromebook
On local intranet
HP laptop as server, using wired ethernet, Virgin Superhub2 as router

Test / 151012 data loss / 0820
5 fencers, to 10
Alternating patterns of  10-0, 0-10, 5-10/10-5
No errors
85 hits
~105 records
679 lines of data
30KB

2nd
from Chrome on GRL's Samsung Galaxy 3
Test / 151012 data loss / 0845 Samsung Chrome
5 fencers, to 10
Alternating patterns of  10-0, 0-10, 5-10/10-5
15 bouts
~125 hits
~155 records
1098 lines
48KB

Bout 1
  Hit 1 missing
  Hits 3 and 2 are written out of order
Bout 2 Hit 2 missing entirely
Bout 3
  Hit 2,4,6,8,13 missing
  11,12 out of order
Bout 4
  3 2 1 4 7 6 9 10
  5, 8 missing
Bout 5
  4 2 1 3 5 6 7 9 8
  10 missing
Bout 6
  1 3 4 5 7 8 9 10 13 11 12 15 14
  2, 6 missing
Bout 7

3rd pool  151012-1710-Chromebook
======
Upgraded PHP to 5.5.30
(hardware - HP laptop, NAS, Mongoose 5.5 running from NAS, PHP 5.5.30 not-thread safe x86 )
A one second pause between each send is perfectly adequate
Clicking as fast as you can led to 60% data loss, and out of order for the other 40%

Clicking ~2/sec still loses
Bout 6
Reloaded into LG G3
On touchscreen, going from 10th increment to End the bout asap, lost some of the writing 





PHP bug, PHP upgrade, PHP configuration

The tests are showing that the writes are happening out of order, or not happening at all.

But none of them are happening partially.

Reading up on the PHP site, PHP is indeed designed so that they should either happen in full, or not happen at all.

So it's a PHP bug.

I have upgraded from PHP 5.5.10, supplied with Mongoose, to PHP 5.5.30, the latest in the 5.5 series.

I have upgraded to non-thread safe, x86

There are reports that PHP is not threadsafe whichever of the two binaries you choose.

To alter the version used, simply place the unzipped PHP folder in the Mongoose directory, and amend the mongoose config .txt file in the Mongoose directory to refer to the new PHP directory.