Re: Crash in token.c after incomplete cherry pick merges in 1.15

2021-08-20 Thread jkordani
My pleasure!On Aug 20, 2021 08:45, Stefan Sperling  wrote:On Tue, Aug 10, 2021 at 02:46:50PM +0200, Stefan Sperling wrote:
> On Mon, Aug 09, 2021 at 06:19:38PM -0400, Joshua Kordani wrote:
> > Attached is a script to reproduce the error.
> > 
> > I also have a packed rr debugger session that I can provide (I highly
> > recommend the rr reversible debugger).  Its ~30meg
> 
> Thank you Joshua! The patch below makes your test script succeed for me.
> 
> Ideally I should commit a regression test together with this patch.
> I will need to find time to convert your script into a regression test.

I have finally gotten around this now.

Test added in https://svn.apache.org/r1892470
Fix committed in https://svn.apache.org/r1892471
Nominated for backport to 1.14.x in https://svn.apache.org/r1892472

Thanks for your report, Joshua!

Regards,
Stefan


CONFIDENTIALITY NOTICE: This communication may contain private, confidential and privileged material for the sole use of the intended recipient. If you are not the intended recipient, please delete this e-mail and any attachments permanently.



Re: Crash in token.c after incomplete cherry pick merges in 1.15

2021-08-20 Thread Stefan Sperling
On Tue, Aug 10, 2021 at 02:46:50PM +0200, Stefan Sperling wrote:
> On Mon, Aug 09, 2021 at 06:19:38PM -0400, Joshua Kordani wrote:
> > Attached is a script to reproduce the error.
> > 
> > I also have a packed rr debugger session that I can provide (I highly
> > recommend the rr reversible debugger).  Its ~30meg
> 
> Thank you Joshua! The patch below makes your test script succeed for me.
> 
> Ideally I should commit a regression test together with this patch.
> I will need to find time to convert your script into a regression test.

I have finally gotten around this now.

Test added in https://svn.apache.org/r1892470
Fix committed in https://svn.apache.org/r1892471
Nominated for backport to 1.14.x in https://svn.apache.org/r1892472

Thanks for your report, Joshua!

Regards,
Stefan


Re: Crash in token.c after incomplete cherry pick merges in 1.15

2021-08-10 Thread Stefan Sperling
On Mon, Aug 09, 2021 at 06:19:38PM -0400, Joshua Kordani wrote:
> Attached is a script to reproduce the error.
> 
> I also have a packed rr debugger session that I can provide (I highly
> recommend the rr reversible debugger).  Its ~30meg

Thank you Joshua! The patch below makes your test script succeed for me.

Ideally I should commit a regression test together with this patch.
I will need to find time to convert your script into a regression test.

In the meantime can you confirm that the patch helps?

Regards,
Stefan

Index: subversion/libsvn_client/conflicts.c
===
--- subversion/libsvn_client/conflicts.c(revision 1892118)
+++ subversion/libsvn_client/conflicts.c(working copy)
@@ -3028,12 +3028,12 @@ conflict_tree_get_details_local_missing(svn_client
   deleted_basename,
   conflict->pool);
   details->moves = moves;
+  details->wc_move_targets = apr_hash_make(conflict->pool);
   if (details->moves != NULL)
 {
   apr_pool_t *iterpool;
   int i;
 
-  details->wc_move_targets = apr_hash_make(conflict->pool);
   iterpool = svn_pool_create(scratch_pool);
   for (i = 0; i < details->moves->nelts; i++)
 {
Index: subversion/libsvn_wc/wc_db.c
===
--- subversion/libsvn_wc/wc_db.c(revision 1892057)
+++ subversion/libsvn_wc/wc_db.c(working copy)
@@ -16732,7 +16732,7 @@ svn_wc__db_find_working_nodes_with_basename(apr_ar
   SVN_ERR(svn_sqlite__get_statement(, wcroot->sdb,
 STMT_SELECT_PRESENT_HIGHEST_WORKING_NODES_BY_BASENAME_AND_KIND));
   SVN_ERR(svn_sqlite__bindf(stmt, "ist", wcroot->wc_id, basename,
-kind_map, kind));
+kind_map_none, kind));
   SVN_ERR(svn_sqlite__step(_row, stmt));
 
   *local_abspaths = apr_array_make(result_pool, 1, sizeof(const char *));
@@ -16776,7 +16776,7 @@ svn_wc__db_find_copies_of_repos_path(apr_array_hea
   SVN_ERR(svn_sqlite__get_statement(, wcroot->sdb,
 STMT_SELECT_COPIES_OF_REPOS_RELPATH));
   SVN_ERR(svn_sqlite__bindf(stmt, "ist", wcroot->wc_id, repos_relpath,
-kind_map, kind));
+kind_map_none, kind));
   SVN_ERR(svn_sqlite__step(_row, stmt));
 
   *local_abspaths = apr_array_make(result_pool, 1, sizeof(const char *));


Crash in token.c after incomplete cherry pick merges in 1.15

2021-08-09 Thread Joshua Kordani

Attached is a script to reproduce the error.

I also have a packed rr debugger session that I can provide (I highly 
recommend the rr reversible debugger).  Its ~30meg


--
Joshua Kordani
Senior Engineer
Robotic Research, LLC
jkord...@roboticresearch.com


CONFIDENTIALITY NOTICE: This communication may contain private, confidential 
and privileged material for the sole use of the intended recipient. If you are 
not the intended recipient, please delete this e-mail and any attachments 
permanently.

#!/bin/bash

repo=$(mktemp -d)
wc=$(mktemp -d)

pushd /tmp/

svnadmin create $repo
svn co file:///$repo $wc
cd $wc
mkdir -p {trunk,branches/feature}/module{1,2}/
touch trunk/module1/m1file{1,2}
touch trunk/module2/m2file{1,2}
svn add trunk branches
svn commit -m "initial state" 
svn copy -m "created feature" ^/trunk ^/branches/feature1
svn up
cd branches/feature1/module1
svn move m1file1 ../module2/m1file1-from-module1
cd ../
svn commit -m "Moved file to other module"
cd ../../trunk/
cd module1
svn up
svn merge -c3 ^/branches/feature1/module1 .
svn commit -m "cherry picked deletion into module folder"
touch mfile3
rm mfile3 
touch m1file3
svn add m1file3 
svn revert m1file3
rm m1file3 
cd ../../branches/feature1/module1
touch m1file3
svn add m1file3
svn commit -m "created a new file in module1 of feature branch"
svn copy -m "made test branch of feature" ^/branches/feature{1,2}
svn up
cd ../../feature2
cd ../../feature2/
svn up
cd ../../
svn up
cd feature2
cd module1
touch m1file4
svn add m1file4
svn commit -m "meant to do this in the accidental branch I created called 
feature (not feature1)"
echo meaningless1>m1file2
svn add m1file2
svn st
svn commit -m "meaningless change to module1 in test branch"
echo meaningless2 > m1file2
svn commit -m "meaningless change to module1 in test branch"
cd ../../feature1
svn merge ^/branches/feature2 .
svn commit -m "merged test into feature1 after file was created on test"
cd module1
svn move m1file4 m1file4new
svn commit -m "moved file4 in feature1 branch"
svn move m1file4new ../module2/
cd ../
svn commit -m "moved file4 from module1 to module2 in feature"
ls module1
ls module2
cd ../../
ls
cd branches/
cd ../trunk/
svn merge -c12 ^/branches/feature1/ .
svn up
svn merge -c12 ^/branches/feature1/ .

popd

#output below

# jkordani@host:~/Code/svncrash$ svnadmin create repo-1
# jkordani@host:~/Code/svncrash$ svn co file:///$(pwd)/repo-1 wc1.2
# Checked out revision 0.
# jkordani@host:~/Code/svncrash$ cd wc1.2
# jkordani@host:~/Code/svncrash/wc1.2$ mkdir -p 
{trunk,branches/feature}/module{1,2}/
# jkordani@host:~/Code/svncrash/wc1.2$ touch trunk/module1/m1file{1,2}
# jkordani@host:~/Code/svncrash/wc1.2$ touch trunk/module2/m2file{1,2}
# jkordani@host:~/Code/svncrash/wc1.2$ svn add trunk branches
# A trunk
# A trunk/module1
# A trunk/module1/m1file1
# A trunk/module1/m1file2
# A trunk/module2
# A trunk/module2/m2file1
# A trunk/module2/m2file2
# A branches
# A branches/feature
# A branches/feature/module1
# A branches/feature/module2
# jkordani@host:~/Code/svncrash/wc1.2$ svn commit -m "initial state" 
# Adding branches
# Adding branches/feature
# Adding branches/feature/module1
# Adding branches/feature/module2
# Adding trunk
# Adding trunk/module1
# Adding trunk/module1/m1file1
# Adding trunk/module1/m1file2
# Adding trunk/module2
# Adding trunk/module2/m2file1
# Adding trunk/module2/m2file2
# Transmitting file data done
# Committing transaction...
# Committed revision 1.
# jkordani@host:~/Code/svncrash/wc1.2$ svn copy ^/trunk ^/branches/feature1
# Waiting for Emacs...

# Log message unchanged or not specified
# (a)bort, (c)ontinue, (e)dit:
# a
# jkordani@host:~/Code/svncrash/wc1.2$ svn copy -m "created feature" ^/trunk 
^/branches/feature1
# Committing transaction...
# Committed revision 2.
# jkordani@host:~/Code/svncrash/wc1.2$ svn up
# Updating '.':
# Abranches/feature1
# Abranches/feature1/module1
# Abranches/feature1/module1/m1file1
# Abranches/feature1/module1/m1file2
# Abranches/feature1/module2
# Abranches/feature1/module2/m2file1
# Abranches/feature1/module2/m2file2
# Updated to revision 2.
# jkordani@host:~/Code/svncrash/wc1.2$ cd branches/feature1/module1
# jkordani@host:~/Code/svncrash/wc1.2/branches/feature1/module1$ svn move 
m1file1 ../module2/m1file1-from-module1
# A 
/home/jkordani/Code/svncrash/wc1.2/branches/feature1/module2/m1file1-from-module1
# D m1file1
# jkordani@host:~/Code/svncrash/wc1.2/branches/feature1/module1$ #svn commit -m 
"Moved file to other module"
# jkordani@host:~/Code/svncrash/wc1.2/branches/feature1/module1$ cd ../
# jkordani@host:~/Code/svncrash/wc1.2/branches/feature1$ svn commit -m "Moved 
file to other module"
# Deleting   module1/m1file1
# Adding module2/m1file1-from-module1
# Committing