Ticket #317 (new defect)

Opened 6 years ago

Last modified 3 years ago

Duplicate text fragments in client's copy

Reported by: okhotin Owned by: armin
Priority: normal Milestone:
Component: Gobby Version: 0.4.5
Severity: critical Keywords:
Cc: Launchpad Bug:

Description

When a server has a document with many changes and a client subscribes to this document, sometimes (not always) it happens that the client obtains a larger document than the one on the server. The client's copy has some fragment duplicated, while the server's copy remains correct. The client ignores the loss of synchronization, and if the user tries to modify parts of the document below the duplicated fragment, these modifications are applied to wrong places in the server's copy.

This was observed on Gobby server and client versions 0.4.3--0.4.5 running on Windows XP SP2

Further observations:

* If the client is restarted and reconnected to the server, another attempt to subscribe to the same document sometimes results in the duplication of a different fragment. Sometimes the client is able to load a correct copy.

* If the session is saved on the server, it does not contain any duplicate blocks. If the server is restarted from this file, the session is correctly restored. However, the client still has the same problems when connecting to the restarted server.

* If there are no marked changes in the document (that is, it was just opened from a plain text file) the client always connects correctly.

* Sample saved server's and client's sessions demonstrating this behaviour are available upon request (these are 150KB LaTeX files of a research paper).

Change History

  Changed 6 years ago by armin

I assume with "gobby server" you mean gobby hosting a session, right? Did you also try out whether this happens with the sobby standalone server?

* Sample saved server's and client's sessions demonstrating this behaviour are available upon request (these are 150KB LaTeX files of a research paper).

When loading the server's session and then connecting with a client, does it reproduce the problem? If yes, those sessions would really be helpful to fix the problem.

  Changed 6 years ago by okhotin <alexander.okhotin@…>

Yes, I have used gobby 0.4.5 hosting a session; this was a windows executable downloaded from gobby.0x539.de. I have never tried to compile sobby, so I could not test it.

"When loading the server's session and then connecting with a client, does it reproduce the problem?" --- yes, the problem is reproduced. The client loads the file correctly with a certain probability (around 1/2), otherwise there are extra lines. I will now send the sessions to you by e-mail.

follow-up: ↓ 4   Changed 6 years ago by armin

Thanks for the sessions. Does the problem also occur for you when both client and server run on the same computer? Does it happen within a LAN, or only via the internet? I cannot reproduce the problem yet, but I only testet locally on my linux laptop so far. I probably can get access to a windows machine on Friday.

in reply to: ↑ 3   Changed 6 years ago by okhotin

"Does the problem also occur for you when both client and server run on the same computer?" --- yes, it does. I have just tested it by starting two instances of gobby on my office machine, one serving the session "1_server.obby" (which I sent to you) and the other connecting to it. I made seven attempts to connect, and the 3980-line TeX document loaded as a document with the following number of lines: 4366, 3980, 4366, 3980, 4711, 3980, 4360.

Previously the same error occurred both over LAN and over the internet.

  Changed 6 years ago by armin

I'm sorry I still can't reproduce the problem. This is how I proceed on windows 2000: I open a gobby instance hosting 1_server.obby. Then, in another gobby instance on the same host I connect to localhost and subscribe to the large document. Then, I unsubscribe and subscribe again (since the problem did not occur). I also tried reconnecting completely, and even reopening the server. I made around 10 attempts, and I end up with 3980 lines each time.

Perhaps the problem is related to re-joining. What user names are you using for host and client, respectively? If those match the ones in the saved session, could you please try whether the problem also happens when taking completely unrelated user names? Thanks.

  Changed 6 years ago by okhotin

Originally, user "okhotin" was hosting a session, and user "mike" was connecting to it. I have now tried to reproduce the problem using different user names, and it seems to me that it does not really matter whether the names of the original users or any new names are used. In some cases the problem is reproduced when the session "1_server.obby" is hosted on a freshly loaded gobby using a new user name, another gobby freshly started on the same machine connects to it using another new user name and immediately gets more lines than expected. On the other hand, in some cases I found myself unable to reproduce the problem on "1_server.obby" after many tries.

For two computers I have available at the moment (A and B, both running Windows XP), the problem was only reproduced when A was hosting a session, while the client could be either A or B. So it seems to me that gobby serving a session could be influenced by something on A, though I cannot identify any possible reason for that. On the other hand, earlier I have encountered the same problem on other computers as well.

I am sorry for such a vague bug report. Having got such a strange error, I could not provide any more definite details.

Note: See TracTickets for help on using tickets.