This is a resurrection of a thread from 6 months ago, for which I now
have more information. The basic background was:

>> I'm getting a crash during conversion when GetPathDepth recurses
>> itself forever (Perl exhausts its address space then segfaults). It
>> appears to be caused by a pair of physicalaction rows which refer to
>> each other

I've now put some effort into this and have created the following
(which are all at the bottom of this e-mail):

1. A minimal testcase, in the form of a batch file which should be run
on a brand new, totally empty sourcesafe database and which will
create something which crashes vss2svn (r336).

2. The entire contents of the PhysicalAction table resulting from the
above database, as it exists upon entry to MergeParentData().

3. A patch against vss2svn.pl r336 which makes the problem go away.
I'm reluctant to use the word 'fixes' because I don't understand
enough about what the parentdata column is used for to be at all sure
that I've done the right thing. I have, however, confirmed that the
resultant svn repository has the correct history for my testcase.

I'd be very appreciative if somebody knowledgable could review this
patch. It does still throw the warning "ERROR -- Multiple child recs
for parent MOVE rec '7' at vss2svn.pl line 740", but I believe this to
be harmless because the timestamp check shortly thereafter sorts it
all out correctly.

Richard.

-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----
**** make-broken-db.bat

setlocal
set SSDIR=c:\vss\broken
ss create -YAdmin -I- $/first
sleep 2
ss create -YAdmin -I- $/first/second
sleep 2
ss create -YAdmin -I- $/third
sleep 2
ss move -YAdmin $/first/second $/third/second
sleep 2
ss move -YAdmin $/third/second $/first/second
sleep 2
ss move -YAdmin $/third $/first/second/third
endlocal

-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----
**** vss_data.physicalaction.txt

[I changed my mind and added this as an attachment instead so that the
line breaks don't get mangled and because it's not important that it
be archived.]

-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----
**** vss2svn.pl.r336.patch

Index: vss2svn.pl
===================================================================
--- vss2svn.pl  (revision 336)
+++ vss2svn.pl  (working copy)
@@ -599,10 +599,11 @@
     parentdata > 0
     AND physname = ?
     AND actiontype = ?
+    AND timestamp <= ?
 EOSQL

     my $sth = $gCfg{dbh}->prepare($sql);
-    $sth->execute( @{ $row }{qw(parentphys actiontype)} );
+    $sth->execute( @{ $row }{qw(parentphys actiontype timestamp)} );

     $parents =  $sth->fetchall_arrayref( {} );
     $maxParentDepth = 0;
     
action_id   physname    version     parentphys  actiontype  itemname    
itemtype    timestamp   author      is_binary   info        priority    sortkey 
    parentdata  label       comment
----------  ----------  ----------  ----------  ----------  ----------  
----------  ----------  ----------  ----------  ----------  ----------  
----------  ----------  ----------  ----------
0           AAAAAAAA    1                       ADD         /           1       
    1204934932  Admin       0                       1           AAAAAAAA    0
1           BAAAAAAA                AAAAAAAA    ADD         first/      1       
    1204934935  Admin       0                       1           AAAAAAAB    1
2           DAAAAAAA                AAAAAAAA    ADD         third/      1       
    1204934939  Admin       0                       1           AAAAAAAD    1
3           DAAAAAAA                AAAAAAAA    MOVE_TO     third/      1       
    1204934946  Admin       0                       5           AAAAAAAD    1
4           BAAAAAAA    1                       ADD         first/      1       
    1204934935  Admin       0                       1           AAAAAAAB    0
5           CAAAAAAA                BAAAAAAA    ADD         second/     1       
    1204934937  Admin       0                       1           AAAAAAAC    1
6           CAAAAAAA                BAAAAAAA    MOVE_TO     second/     1       
    1204934942  Admin       0                       5           AAAAAAAC    1
7           CAAAAAAA                BAAAAAAA    MOVE_FROM   second/     1       
    1204934944  Admin       0                       5           AAAAAAAC    1
8           CAAAAAAA    1                       ADD         second/     1       
    1204934937  Admin       0                       1           AAAAAAAC    0
9           DAAAAAAA                CAAAAAAA    MOVE_FROM   third/      1       
    1204934946  Admin       0                       5           AAAAAAAD    1
10          DAAAAAAA    1                       ADD         third/      1       
    1204934939  Admin       0                       1           AAAAAAAD    0
11          CAAAAAAA                DAAAAAAA    MOVE_FROM   second/     1       
    1204934942  Admin       0                       5           AAAAAAAC    1
12          CAAAAAAA                DAAAAAAA    MOVE_TO     second/     1       
    1204934944  Admin       0                       5           AAAAAAAC    1
_______________________________________________
vss2svn-users mailing list
Project homepage:
http://www.pumacode.org/projects/vss2svn/
Subscribe/Unsubscribe/Admin:
http://lists.pumacode.org/mailman/listinfo/vss2svn-users-lists.pumacode.org
Mailing list web interface (with searchable archives):
http://dir.gmane.org/gmane.comp.version-control.subversion.vss2svn.user

Reply via email to