Bug Report: Offsets not handled correctly
"François GAGNON" <[email protected]> Thu, 05 Dec 2002 18:25:14 +0100 (MET)
| Newsgroups | gmane.comp.file-systems.intermezzo.devel,gmane.spam.detected |
|---|---|
| Message-ID | <[email protected]> |
To developers, I seem to have found a bug in intersync-0.9.5. I understand what happens, and it seems that the code did not account for this specific case. Scenario: - 1 server, 2 clients - Start server, start client A, start client B - Client A: mkdir a - Client B: mkdir b - Client A: Abort, reintegration failed (directory exists) What happens is: - When client A does "mkdir a", it builds a kml locally that the server fetches. Since client A did not fetch anything from server, last received on client A = 0 - When client B does "mkdir b", server tells client A to fetch kml from server. However, client A starts reintegration based on last received which is 0. It then replays "mkdir a, mkdir b" instead of just "mkdir b" because rec->lr_remote_offset = 0 CDEBUG(D_KML, "remote kmlsize: %Lu, local kmlsize: %Lu, already: %d\n", kmlsize, rec->lr_remote_offset, already); I am not sure how to solve this ... If you did not understand, please let me know and I will try again. I would appreaciate to know when you have a solution so that I can continue building my lab. The whole debug info is below. I hope this helps, Best regards. Server: [root@stplabfg2 root]# (upcall.c:upc_dispatch L96): UPC: len 80 (upcall.c:upc_dispatch L105): [UPC CONNECT : Uniq 221 : PID 11483 : UID 500 Path : Fset Offset 750257721 : First recno 1 : Last recno 0 : Async 0] (upcall.c:izo_handle_upc_connect L647): connect upcall for ip: 2cb80639 port: 2432 uuid: 450c10e9-e870-49ac-a968-05a6a19a1ac5, client: 1 (connecting.c:is_peer_new L59): setting up new peer 2cb80639 port 2432 (request.c:is_get_uuid L534): (request.c:is_http_get L68): Fetching uri 'http://57.6.184.44:2432/cgi-bin/cgi_uuid?client_port=0&uuid=f01871ba-9190-40d2-b650-fd2a4b6b4ab5&client_flag=0' (range 0-0) (request.c:is_get_uuid L555): body: 450c10e9-e870-49ac-a968-05a6a19a1ac5y (upcall.c:upc_reply L65): Sending reply to Upcall (rc = 0)... (upcall.c:upc_dispatch L96): UPC: len 148 (upcall.c:upc_dispatch L105): [UPC REPSTATUS : Uniq 222 : PID 11485 : UID 500 Path : Fset rootfset Offset 0 : First recno 0 : Last recno 0 : Async 0] (upcall.c:upc_dispatch L478): no replicator found. (upcall.c:upc_reply L65): Sending reply to Upcall (rc = 0)... (upcall.c:upc_dispatch L96): UPC: len 80 (upcall.c:upc_dispatch L105): [UPC CONNECT : Uniq 223 : PID 11489 : UID 500 Path : Fset Offset 1622672953 : First recno 1 : Last recno 0 : Async 0] (upcall.c:izo_handle_upc_connect L647): connect upcall for ip: 60b80639 port: 2432 uuid: 60672dfd-52af-45e2-ad22-c80eba73370f, client: 1 (connecting.c:is_peer_new L59): setting up new peer 60b80639 port 2432 (request.c:is_get_uuid L534): (request.c:is_http_get L68): Fetching uri 'http://57.6.184.96:2432/cgi-bin/cgi_uuid?client_port=0&uuid=f01871ba-9190-40d2-b650-fd2a4b6b4ab5&client_flag=0' (range 0-0) (request.c:is_get_uuid L555): body: 60672dfd-52af-45e2-ad22-c80eba73370fÉ (upcall.c:upc_reply L65): Sending reply to Upcall (rc = 0)... (upcall.c:upc_dispatch L96): UPC: len 148 (upcall.c:upc_dispatch L105): [UPC REPSTATUS : Uniq 224 : PID 11491 : UID 500 Path : Fset rootfset Offset 0 : First recno 0 : Last recno 0 : Async 0] (upcall.c:upc_dispatch L478): no replicator found. (upcall.c:upc_reply L65): Sending reply to Upcall (rc = 0)... (upcall.c:upc_dispatch L96): UPC: len 92 (upcall.c:upc_dispatch L105): [UPC REVOKE_PERMIT : Uniq 225 : PID 11492 : UID 500 Path : Fset rootfset Offset 0 : First recno 0 : Last recno 0 : Async 0] (upcall.c:upc_dispatch L380): Permit given to peer 0x806c068 (upcall.c:upc_reply L65): Sending reply to Upcall (rc = 0)... (upcall.c:upc_dispatch L96): UPC: len 92 (upcall.c:upc_dispatch L105): [UPC GO_FETCH_KML : Uniq 226 : PID 11493 : UID 500 Path : Fset rootfset Offset 168 : First recno 0 : Last recno 0 : Async 1] (request.c:is_get_kml L427): remote kmlsize: 168, local kmlsize: 0, already: 0 Fetching kml (mkdir /a) from client A (request.c:is_http_get L68): Fetching uri 'http://57.6.184.44:2432/cache/.intermezzo/rootfset/kml' (range 0-167) (request.c:is_get_kml_range L227): kml size: 168 (request.c:is_get_kml_range L250): reint start: 168 Tell client A to fetch kml (mkdir /b) (request.c:is_get_kml_range L262): 00000001 MKDIR /b (request.c:is_get_kml_range L317): reint complete: 168 in 0 secs (upcall.c:upc_dispatch L96): UPC: len 92 (upcall.c:upc_dispatch L105): [UPC KML : Uniq 230 : PID 11480 : UID 0 Path : Fset rootfset Offset 168 : First recno 1 : Last recno 2 : Async 1] (upcall.c:upc_dispatch L416): holder: <0x8089568> peer: <0x8089568> 57.6.184.96:2432 60672dfd-52af-45e2-ad22-c80eba73370f (upcall.c:upc_dispatch L416): holder: <0x8089568> peer: <0x806c068> 57.6.184.44:2432 450c10e9-e870-49ac-a968-05a6a19a1ac5 (request.c:is_go_fetch_kml L736): offset 336, already 0 (request.c:is_http_get L68): Fetching uri 'http://57.6.184.44:2432/cgi-bin/cgi_go_fetch_kml?fset=rootfset&uuid=f01871ba-9190-40d2-b650-fd2a4b6b4ab5&kmlsize=336' (range 0-0) Client A: Start with empty file system: (request.c:is_check_offsets L485): check_offsets: our kml size 0, server last fetched 0. Server kml size 0, we last fetched 0; Server suggests we fetch from 0. Get permit and tell server to get client A kml (mkdir /a) [root@stplabfg3 i]# mkdir a (upcall.c:upc_dispatch L96): UPC: len 96 (upcall.c:upc_dispatch L105): [UPC PERMIT : Uniq 5 : PID 1067 : UID 0 Path / : Fset rootfset Offset 0 : First recno 0 : Last recno 0 : Async 0] (request.c:is_http_get L68): Fetching uri 'http://57.4.171.138:370/cgi-bin/cgi_permit?fset=rootfset&uuid=450c10e9-e870-49ac-a968-05a6a19a1ac5' (range 0-0) (request.c:is_wait_for_kml L395): kml is complete (upcall.c:upc_reply L65): Sending reply to Upcall (rc = 0)... (upcall.c:upc_dispatch L96): UPC: len 92 (upcall.c:upc_dispatch L105): [UPC KML : Uniq 6 : PID 1067 : UID 0 Path : Fset rootfset Offset 0 : First recno 0 : Last recno 1 : Async 1] (upcall.c:upc_dispatch L410): holder: <(nil)> peer: <0x806cff8> 57.4.171.138:370 f01871ba-9190-40d2-b650-fd2a4b6b4ab5 [root@stplabfg3 i]# (request.c:is_go_fetch_kml L738): offset 168, already 0 (request.c:is_http_get L68): Fetching uri 'http://57.4.171.138:370/cgi-bin/cgi_go_fetch_kml?fset=rootfset&uuid=450c10e9-e870-49ac-a968-05a6a19a1ac5&kmlsize=168' (range 0-0) Give away permit to server [root@stplabfg3 i]# (upcall.c:upc_dispatch L96): UPC: len 92 (upcall.c:upc_dispatch L105): [UPC REVOKE_PERMIT : Uniq 7 : PID 1069 : UID 500 Path : Fset rootfset Offset 0 : First recno 0 : Last recno 0 : Async 0] (upcall.c:upc_dispatch L374): Permit given to peer 0x806cff8 (upcall.c:upc_reply L65): Sending reply to Upcall (rc = 0)... Server says to pick up kml (mkdir /b) (upcall.c:upc_dispatch L96): UPC: len 92 (upcall.c:upc_dispatch L105): [UPC GO_FETCH_KML : Uniq 8 : PID 1070 : UID 500 Path : Fset rootfset Offset 336 : First recno 0 : Last recno 0 : Async 1] (request.c:is_get_kml L429): remote kmlsize: 336, local kmlsize: 0, already: 0 (request.c:is_http_get L68): Fetching uri 'http://57.4.171.138:370/cache/.intermezzo/rootfset/kml' (range 0-335) (request.c:is_get_kml_range L227): kml size: 336 (request.c:is_get_kml_range L250): reint start: 336 (request.c:is_get_kml_range L262): 00000001 MKDIR /a kml_iocreint: ... kml_iocreint: returned an error (request.c:is_get_kml_range L279) ABORT: reintegrate failed, aborting: File exists Client B: our kml size 0, server last fetched 0. Server kml size 0, we last fetched 0; Server suggests we fetch from 0. [root@stplabfg4 root]# [root@stplabfg4 root]# [root@stplabfg4 root]# (upcall.c:upc_dispatch L96): UPC: len 92 (upcall.c:upc_dispatch L105): [UPC GO_FETCH_KML : Uniq 7 : PID 1021 : UID 500 Path : Fset rootfset Offset 168 : First recno 0 : Last recno 0 : Async 1] (request.c:is_get_kml L427): remote kmlsize: 168, local kmlsize: 0, already: 0 (request.c:is_http_get L68): Fetching uri 'http://57.4.171.138:370/cache/.intermezzo/rootfset/kml' (range 0-167) (request.c:is_get_kml_range L227): kml size: 168 (request.c:is_get_kml_range L250): reint start: 168 (request.c:is_get_kml_range L262): 00000001 MKDIR /a (request.c:is_get_kml_range L317): reint complete: 168 in 0 secs [root@stplabfg4 root]# mkdir b [root@stplabfg4 root]# rmdir b [root@stplabfg4 root]# cd i [root@stplabfg4 i]# mkdir b (upcall.c:upc_dispatch L96): UPC: len 96 (upcall.c:upc_dispatch L105): [UPC PERMIT : Uniq 8 : PID 1024 : UID 0 Path / : Fset rootfset Offset 0 : First recno 0 : Last recno 0 : Async 0] upcall: IZO_UPC_PERMIT permit holder 57.4.171.138 (request.c:is_http_get L68): Fetching uri 'http://57.4.171.138:370/cgi-bin/cgi_permit?fset=rootfset&uuid=60672dfd-52af-45e2-ad22-c80eba73370f' (range 0-0) upcall: IZO_UPC_PERMIT rc = 0 (request.c:is_wait_for_kml L393): kml is complete (upcall.c:upc_reply L65): Sending reply to Upcall (rc = 0)... (upcall.c:upc_dispatch L96): UPC: len 92 (upcall.c:upc_dispatch L105): [UPC KML : Uniq 9 : PID 1024 : UID 0 Path : Fset rootfset Offset 0 : First recno 0 : Last recno 1 : Async 1] (upcall.c:upc_dispatch L416): holder: <(nil)> peer: <0x806cf70> 57.4.171.138:370 f01871ba-9190-40d2-b650-fd2a4b6b4ab5 [root@stplabfg4 i]# (request.c:is_go_fetch_kml L736): offset 168, already 0 (request.c:is_http_get L68): Fetching uri 'http://57.4.171.138:370/cgi-bin/cgi_go_fetch_kml?fset=rootfset&uuid=60672dfd-52af-45e2-ad22-c80eba73370f&kmlsize=168' (range 0-0) ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf