You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Rolf Campbell <Ro...@solace.com> on 2021/12/02 00:29:07 UTC

Can't create temporary file from template ... No such file or directory

I'm an svn administrator for my company and I end up doing a lot of merges.

Today, I ran into this failure (reproducable).

svn: warning: W000002: Can't create temporary file from template '/opt/sbox/rcampbell/auto-merge/solcbr/dataplane/sw/assuredDelivery/messageSpool/defrag/svn-XXXXXX': No such file or directory
svn: E155027: Failure occurred resolving one or more conflicts

This happens after I run two commands:

svn merge ^/trunk@184967 ^/trunk@185348 .  --accept postpone

and then

svn resolve solcbr/dataplane/sw/assuredDelivery/messageSpool

and then it gives me output:

$ svn resolve solcbr/dataplane/sw/assuredDelivery/messageSpool
Searching tree conflict details for 'solcbr/dataplane/sw/assuredDelivery/messageSpool' in repository:
Checking r184967... done
Tree conflict on 'solcbr/dataplane/sw/assuredDelivery/messageSpool':
A new directory appeared during merge of
'^/trunk/solcbr/dataplane/sw/assuredDelivery/messageSpool:184968-185348'.
It was added by solbuild in r184967.
A directory which already occupies this path was found in the working copy.
Select: (p) Postpone, (r) Mark as resolved, (i) Ignore incoming addition,
        (m) Merge the directories,
        (R) Delete my directory and replace it with incoming directory,
        (M) Replace and merge, (h) Help, (q) Quit resolution: m
C    solcbr/dataplane/sw/assuredDelivery/messageSpool/Rules.mk
svn: warning: W000002: Can't create temporary file from template '/opt/sbox/rcampbell/auto-merge/solcbr/dataplane/sw/assuredDelivery/messageSpool/defrag/svn-XXXXXX': No such file or directory
svn: E155027: Failure occurred resolving one or more conflicts


$ svn --version
svn, version 1.14.1 (r1886195)
   compiled Oct  1 2021, 11:42:52 on x86_64-unknown-linux-gnu

The directory "/opt/sbox/rcampbell/auto-merge/solcbr/dataplane/sw/assuredDelivery/messageSpool/defrag" does not exist because it is a subdirectory that was added in trunk but NOT added in the working branch.

We have already managed to get this merge to complete by renaming the directories so they don't collide, but this happens to us more than you might imagine and it would be nice if someone could take a look at this.  Am I doing something wrong or is this a bug in subversion?

-Rolf

________________________________
Confidentiality notice

This e-mail message and any attachment hereto contain confidential information which may be privileged and which is intended for the exclusive use of its addressee(s). If you receive this message in error, please inform sender immediately and destroy any copy thereof. Furthermore, any disclosure, distribution or copying of this message and/or any attachment hereto without the consent of the sender is strictly prohibited. Thank you.

Re: Can't create temporary file from template ... No such file or directory

Posted by Rolf Campbell <Ro...@solace.com>.
Thank you for this reproduction script. This is extremely helpful! I
can confirm this reproduces the above error for me exactly. I tested
with 1.10.6, 1.14.1, and an unreleased build of trunk. In all three,
the assertion failure occurs on the same line 384. I'll try to figure
out where the code is taking a wrong turn. In the meantime, if you do
succeed in reproducing the original issue, please do let us know!

Thanks,
Nathan
​I've tried a few more times to make a small reproduction of my original issue, but I just keep hitting the same assert every time.  I'm hoping that once that assert is fixed, maybe I can get to my original issue.
________________________________
Confidentiality notice

This e-mail message and any attachment hereto contain confidential information which may be privileged and which is intended for the exclusive use of its addressee(s). If you receive this message in error, please inform sender immediately and destroy any copy thereof. Furthermore, any disclosure, distribution or copying of this message and/or any attachment hereto without the consent of the sender is strictly prohibited. Thank you.

Re: Can't create temporary file from template ... No such file or directory

Posted by Nathan Hartman <ha...@gmail.com>.
On Thu, Dec 2, 2021 at 3:29 PM Rolf Campbell <Ro...@solace.com> wrote:
>
> Hello Nathan,
>
> Thank you for the reply.
>
> I assure you that it was not related to disk space.  I tried it on 3 different computers using 2 different versions of SVN.
>
> I tried to create a reproduction script and instead I caused the svn client to crash.
>
> Here is my script:
>
> svnadmin create test
> svn checkout file://$PWD/test test.1
> cd test.1
> svn mkdir ^/trunk -m ""
> svn mkdir ^/branches -m ""
> touch a
> svn add a
> svn commit -m ""
> svn cp ^/trunk ^/branches/b -m ""
> svn mkdir ^/trunk/c -m ""
> svn mkdir ^/trunk/c/d -m ""
> svn mkdir ^/branches/b/c -m ""
> svn mkdir ^/branches/b/c/e -m ""
> cd ..
> svn co file://$PWD/test/branches/b
> cd b
> svn merge ^/trunk .
>
> And here is the output when I try it (multiple times):
> --- Merging r4 through r8 into '.':
>    C c
>    A c/d
> --- Recording mergeinfo for merge of r4 through r8 into '.':
>  U   .
> Summary of conflicts:
>   Tree conflicts: 1
> Searching tree conflict details for 'c' in repository:
> Checking r5... done
> Tree conflict on 'c':
> A new directory appeared during merge of
> '^/trunk/c:4-8'.
> It was added by rcampbell in r5.
> A directory which already occupies this path was found in the working copy.
> Select: (p) Postpone, (r) Mark as resolved, (i) Ignore incoming addition,
>         (m) Merge the directories,
>         (R) Delete my directory and replace it with incoming directory,
>         (M) Replace and merge, (h) Help, (q) Quit resolution: m
> svn: E235000: In file 'subversion/libsvn_wc/adm_ops.c' line 384: assertion failed (!copyfrom_url || (svn_uri_is_canonical(copyfrom_url, scratch_pool) && SVN_IS_VALID_REVNUM(copyfrom_rev)))
> Aborted (core dumped)

Thank you for this reproduction script. This is extremely helpful! I
can confirm this reproduces the above error for me exactly. I tested
with 1.10.6, 1.14.1, and an unreleased build of trunk. In all three,
the assertion failure occurs on the same line 384. I'll try to figure
out where the code is taking a wrong turn. In the meantime, if you do
succeed in reproducing the original issue, please do let us know!

Thanks,
Nathan

Re: Fwd: Can't create temporary file from template ... No such file or directory

Posted by Daniel Sahlberg <da...@gmail.com>.
Den ons 15 dec. 2021 kl 07:47 skrev Nathan Hartman <hartman.nathan@gmail.com
>:

> Anyway I have to pause for today...
>
> Oh one more thing. I believe I succeeded to reproduce the OP's
> original issue. If one more subdirectory is added, e.g., trunk/c/d/f,
> then f will trigger the same response as the OP reported.
>

Great work so far Nathan, I'm sure you will find your way through
eventually! I'm following along with great interest but family obligations
has so far kept me from digging into the code myself.

Kind regards,
Daniel

Re: Fwd: Can't create temporary file from template ... No such file or directory

Posted by Nathan Hartman <ha...@gmail.com>.
On Thu, Dec 9, 2021 at 10:32 AM Nathan Hartman <ha...@gmail.com> wrote:
> So the above can be distilled to:
>
> #  .
> #  ├── trunk/
> #  │   └── c/
> #  │       └── d/
> #  └── branches
> #      └── b/ (from trunk@2)
> #          └── c/
>
> It is the 'd' directory ('trunk/c/d/') that is throwing us off course.

As I mentioned before, in diff_dir_added() where that apr_pstrcat()
call happens, right_source->repos_relpath is NULL and my thinking was
that something is forgetting to set it. Long before reaching this
point, there are a few places that seem to come close to setting it
but none do, for reasons that appear reasonable.

So, if I hack diff_dir_added() to force the path to be what I think it
ought to be...

[[[
Index: subversion/libsvn_client/conflicts.c
===================================================================
--- subversion/libsvn_client/conflicts.c (revision 1895966)
+++ subversion/libsvn_client/conflicts.c (working copy)
@@ -7568,7 +7568,7 @@ diff_dir_added(const char *relpath,

   SVN_ERR(svn_io_dir_make(local_abspath, APR_OS_DEFAULT, scratch_pool));
   copyfrom_url = apr_pstrcat(scratch_pool, b->repos_root_url, "/",
-                             right_source->repos_relpath, SVN_VA_NULL);
+                             "trunk/c/d"
/*right_source->repos_relpath*/, SVN_VA_NULL);
   SVN_ERR(svn_wc_add4(b->ctx->wc_ctx, local_abspath, svn_depth_infinity,
                       copyfrom_url, right_source->revision,
                       NULL, NULL, /* cancel func/baton */
]]]

...then it appears the call to svn_wc_add4() succeeds -- at least it
doesn't fail.

But immediately after (in diff_dir_added(),
libsvn_client/conflicts.c), we go into a loop that will call
svn_wc_prop_set4() four times. In the first iteration, it tries to set
"svn:entry:committed-rev" despite this foreboding comment in
svn_wc_prop_set4():

/* we don't do entry properties here */

Sure enough, we get:

svn: warning: apr_err=SVN_ERR_BAD_PROP_KIND
svn: warning: W200008: Property 'svn:entry:committed-rev' is an entry property
subversion/svn/merge-cmd.c:556,
subversion/svn/resolve-cmd.c:157: (apr_err=SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE)
svn: E155027: Failure occurred resolving one or more conflicts

Now, this all leads me to believe that something is messed up long
before we get here. What's making this a bigger challenge to debug
than I'd like it to be is all the void pointers to various batons. I
just can't seem to hold in my head the types of more than a few so
quickly lose the ability to trace what comes from where, unless
there's some gdb trick I don't know about that can make it resolve the
correct type.

Anyway I have to pause for today...

Oh one more thing. I believe I succeeded to reproduce the OP's
original issue. If one more subdirectory is added, e.g., trunk/c/d/f,
then f will trigger the same response as the OP reported.

Cheers,
Nathan

Re: Fwd: Can't create temporary file from template ... No such file or directory

Posted by Nathan Hartman <ha...@gmail.com>.
On Thu, Dec 9, 2021 at 8:34 AM Nathan Hartman <ha...@gmail.com> wrote:
> I haven't found the cause yet but I do know now that the bug isn't in how we are constructing the path. I'm away from my machine atm but I'll write back soon with more...

The OP's repro script creates this structure:

#  .
#  ├── a
#  ├── trunk/
#  │   └── c/
#  │       └── d/
#  └── branches/
#      └── b/ (from trunk@3)
#          └── c/
#              └── e/

The 'trunk/c/' and 'branches/b/c/' directories have separate ancestry
and (correctly) trigger the conflict.

The 'a' file is irrelevant.

The 'branches/b/c/e/' directory is irrelevant. The same assertion
fails whether it is present or not.

So the above can be distilled to:

#  .
#  ├── trunk/
#  │   └── c/
#  │       └── d/
#  └── branches
#      └── b/ (from trunk@2)
#          └── c/

It is the 'd' directory ('trunk/c/d/') that is throwing us off course.

As I said before I haven't finished yet; I'll try to have another
debug session tonight to look more closely at update_entry() in
libsvn_repos/reporter.c; I think there will be an important clue
there.

Simplified repo script:

[[[

$SVNADMIN create repo
$SVN checkout file://$PWD/repo wc1
cd wc1
$SVN mkdir ^/trunk -m ""
$SVN mkdir ^/branches -m ""
$SVN cp ^/trunk ^/branches/b -m ""
$SVN mkdir ^/trunk/c -m ""
$SVN mkdir ^/trunk/c/d -m ""
$SVN mkdir ^/branches/b/c -m ""
cd ..
$SVN co file://$PWD/repo/branches/b wc2
cd wc2
$SVN merge ^/trunk .

]]]

Cheers,
Nathan

Re: Fwd: Can't create temporary file from template ... No such file or directory

Posted by Nathan Hartman <ha...@gmail.com>.
On Thu, Dec 9, 2021 at 6:37 AM Bert Huijben <be...@qqmail.nl> wrote:

> We have helper functions for this scenario (svn_uri__*()) that also
> perform the required escaping rules (required for url, but not for relpath)


I haven't found the cause yet but I do know now that the bug isn't in how
we are constructing the path. I'm away from my machine atm but I'll write
back soon with more...

Cheers,
Nathan

RE: Fwd: Can't create temporary file from template ... No such file or directory

Posted by Bert Huijben <be...@qqmail.nl>.
We have helper functions for this scenario (svn_uri__*()) that also perform the required escaping rules (required for url, but not for relpath)

	Bert

-----Original Message-----
From: Stefan Sperling <st...@elego.de> 
Sent: Monday, December 6, 2021 9:31 AM
To: Nathan Hartman <ha...@gmail.com>
Cc: Subversion Developers <de...@subversion.apache.org>
Subject: Re: Fwd: Can't create temporary file from template ... No such file or directory

On Sun, Dec 05, 2021 at 11:21:48PM -0500, Nathan Hartman wrote:
> On Sun, Dec 5, 2021 at 12:55 PM James McCoy <ja...@jamessan.com> wrote:
> >
> > On Sun, Dec 05, 2021 at 12:41:30PM -0500, Nathan Hartman wrote:
> > > It's not dumping core on mine. I would like to debug this properly 
> > > but am running into various nonsense. For example, I haven't 
> > > figured out how to run it under gdb since svn is being called 
> > > through the libtool script;
> >
> > "libtool exec gdb ./subversion/svn ..." will run svn with the 
> > environment setup properly.
> 
> Perfect. That's the clue I needed. Thanks, James.
> 
> At diff_dir_added() at libsvn_client/conflicts.c:7570 (in current 
> trunk, r1895609) we are attempting to concat some path components
> with:
> 
>   copyfrom_url = apr_pstrcat(scratch_pool, b->repos_root_url, "/",
>                              right_source->repos_relpath, 
> SVN_VA_NULL);
> 
> However, right_source->repos_relpath is an empty string, so we end up 
> with b->repos_root_url plus a trailing slash, causing the path to 
> become non-canonical.
> 
> The fix might be as simple as checking for that and not calling 
> apr_pstrcat(), but I would like to dig a little more before jumping to 
> conclusions.

Thanks, Nathan. I see this is in the conflict resolver so this is probably code I have written. But I won't snag this away from you. And if you need any help, just let me know. (I have not yet looked into details; I suspect that right_source might be bogus or simply invalid?)

Cheers,
Stefan


Re: Fwd: Can't create temporary file from template ... No such file or directory

Posted by Nathan Hartman <ha...@gmail.com>.
On Mon, Dec 6, 2021 at 3:31 AM Stefan Sperling <st...@elego.de> wrote:
>
> Thanks, Nathan. I see this is in the conflict resolver so this is probably
> code I have written. But I won't snag this away from you. And if you need
> any help, just let me know. (I have not yet looked into details; I suspect
> that right_source might be bogus or simply invalid?)

Thanks. I'm sure I will have questions soon! Not sure yet whether
right_source is bogus. I have a thought I'll test tomorrow. It's
getting late here so calling it a day for now, but I've been having
fun single-stepping through this merge invocation. Once I identify
what is unusual about this scenario, I'll try to reproduce it in a
regression test using the standard Greek tree if possible; if not,
then I'll fall back to just running the same steps as the repro. I'll
know more soon...

Cheers,
Nathan

Re: Fwd: Can't create temporary file from template ... No such file or directory

Posted by Stefan Sperling <st...@elego.de>.
On Sun, Dec 05, 2021 at 11:21:48PM -0500, Nathan Hartman wrote:
> On Sun, Dec 5, 2021 at 12:55 PM James McCoy <ja...@jamessan.com> wrote:
> >
> > On Sun, Dec 05, 2021 at 12:41:30PM -0500, Nathan Hartman wrote:
> > > It's not dumping core on mine. I would like to debug this properly but
> > > am running into various nonsense. For example, I haven't figured out
> > > how to run it under gdb since svn is being called through the libtool
> > > script;
> >
> > "libtool exec gdb ./subversion/svn ..." will run svn with the
> > environment setup properly.
> 
> Perfect. That's the clue I needed. Thanks, James.
> 
> At diff_dir_added() at libsvn_client/conflicts.c:7570 (in current
> trunk, r1895609) we are attempting to concat some path components
> with:
> 
>   copyfrom_url = apr_pstrcat(scratch_pool, b->repos_root_url, "/",
>                              right_source->repos_relpath, SVN_VA_NULL);
> 
> However, right_source->repos_relpath is an empty string, so we end up
> with b->repos_root_url plus a trailing slash, causing the path to
> become non-canonical.
> 
> The fix might be as simple as checking for that and not calling
> apr_pstrcat(), but I would like to dig a little more before jumping to
> conclusions.

Thanks, Nathan. I see this is in the conflict resolver so this is probably
code I have written. But I won't snag this away from you. And if you need
any help, just let me know. (I have not yet looked into details; I suspect
that right_source might be bogus or simply invalid?)

Cheers,
Stefan

Re: Fwd: Can't create temporary file from template ... No such file or directory

Posted by Nathan Hartman <ha...@gmail.com>.
On Sun, Dec 5, 2021 at 12:55 PM James McCoy <ja...@jamessan.com> wrote:
>
> On Sun, Dec 05, 2021 at 12:41:30PM -0500, Nathan Hartman wrote:
> > It's not dumping core on mine. I would like to debug this properly but
> > am running into various nonsense. For example, I haven't figured out
> > how to run it under gdb since svn is being called through the libtool
> > script;
>
> "libtool exec gdb ./subversion/svn ..." will run svn with the
> environment setup properly.

Perfect. That's the clue I needed. Thanks, James.

At diff_dir_added() at libsvn_client/conflicts.c:7570 (in current
trunk, r1895609) we are attempting to concat some path components
with:

  copyfrom_url = apr_pstrcat(scratch_pool, b->repos_root_url, "/",
                             right_source->repos_relpath, SVN_VA_NULL);

However, right_source->repos_relpath is an empty string, so we end up
with b->repos_root_url plus a trailing slash, causing the path to
become non-canonical.

The fix might be as simple as checking for that and not calling
apr_pstrcat(), but I would like to dig a little more before jumping to
conclusions.

I was hoping this would give some insight to the non-canonical path
assertions we hear about every so often; I'm sure this one has bitten
before...

Cheers,
Nathan

P.S., I invoked gdb with:

$ libtool exec gdb -tui -args /path/to/subversion/svn/svn merge ^/trunk

Note: At first I thought Emacs wouldn't run it through libtool with
M-x gdb because it complained that I didn't give '-i=mi' even though I
did and displayed everything garbled; but it turns out I forgot -args:

M-x gdb -> libtool exec gdb -i=mi -args /path/to/subversion/svn/svn
merge ^/trunk

Re: Fwd: Can't create temporary file from template ... No such file or directory

Posted by James McCoy <ja...@jamessan.com>.
On Sun, Dec 05, 2021 at 12:41:30PM -0500, Nathan Hartman wrote:
> It's not dumping core on mine. I would like to debug this properly but
> am running into various nonsense. For example, I haven't figured out
> how to run it under gdb since svn is being called through the libtool
> script;

"libtool exec gdb ./subversion/svn ..." will run svn with the
environment setup properly.

Cheers,
-- 
James
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7  2D23 DFE6 91AE 331B A3DB

Fwd: Can't create temporary file from template ... No such file or directory

Posted by Nathan Hartman <ha...@gmail.com>.
Bringing this from users@ to dev@.

Rolf Campbell discovered an assertion failure that I think might shed
some light on other assertion failures we've been hearing about from
time to time.

> ---------- Forwarded message ---------
> From: Rolf Campbell <Ro...@solace.com>
> Date: Thu, Dec 2, 2021 at 3:29 PM
> Subject: Re: Can't create temporary file from template ... No such file or directory
> To: Nathan Hartman <ha...@gmail.com>
> Cc: users@subversion.apache.org <us...@subversion.apache.org>
>
>
> Hello Nathan,
>
> Thank you for the reply.
>
> I assure you that it was not related to disk space.  I tried it on 3 different computers using 2 different versions of SVN.
>
> I tried to create a reproduction script and instead I caused the svn client to crash.
>
> Here is my script:
>
> svnadmin create test
> svn checkout file://$PWD/test test.1
> cd test.1
> svn mkdir ^/trunk -m ""
> svn mkdir ^/branches -m ""
> touch a
> svn add a
> svn commit -m ""
> svn cp ^/trunk ^/branches/b -m ""
> svn mkdir ^/trunk/c -m ""
> svn mkdir ^/trunk/c/d -m ""
> svn mkdir ^/branches/b/c -m ""
> svn mkdir ^/branches/b/c/e -m ""
> cd ..
> svn co file://$PWD/test/branches/b
> cd b
> svn merge ^/trunk .
>
> And here is the output when I try it (multiple times):
> --- Merging r4 through r8 into '.':
>    C c
>    A c/d
> --- Recording mergeinfo for merge of r4 through r8 into '.':
>  U   .
> Summary of conflicts:
>   Tree conflicts: 1
> Searching tree conflict details for 'c' in repository:
> Checking r5... done
> Tree conflict on 'c':
> A new directory appeared during merge of
> '^/trunk/c:4-8'.
> It was added by rcampbell in r5.
> A directory which already occupies this path was found in the working copy.
> Select: (p) Postpone, (r) Mark as resolved, (i) Ignore incoming addition,
>         (m) Merge the directories,
>         (R) Delete my directory and replace it with incoming directory,
>         (M) Replace and merge, (h) Help, (q) Quit resolution: m
> svn: E235000: In file 'subversion/libsvn_wc/adm_ops.c' line 384: assertion failed (!copyfrom_url || (svn_uri_is_canonical(copyfrom_url, scratch_pool) && SVN_IS_VALID_REVNUM(copyfrom_rev)))
> Aborted (core dumped)


It's not dumping core on mine. I would like to debug this properly but
am running into various nonsense. For example, I haven't figured out
how to run it under gdb since svn is being called through the libtool
script; if I configure with --disable-shared the build fails. Sorry,
I don't have the details atm. I'll have to rerun it later. Out of time
for today but I will try to resolve these issues soon.

What I do know so far is the reason that check_can_add_node() fails
the assertion check: copyfrom_url is not canonical. When I run the
above repro script at /home/nate/ramdrive, the non-canonical URL is
"file:///home/nate/ramdrive/test/".

Cheers,
Nathan

Re: Can't create temporary file from template ... No such file or directory

Posted by Rolf Campbell <Ro...@solace.com>.
Hello Nathan,

Thank you for the reply.

I assure you that it was not related to disk space.  I tried it on 3 different computers using 2 different versions of SVN.

I tried to create a reproduction script and instead I caused the svn client to crash.

Here is my script:

svnadmin create test
svn checkout file://$PWD/test test.1
cd test.1
svn mkdir ^/trunk -m ""
svn mkdir ^/branches -m ""
touch a
svn add a
svn commit -m ""
svn cp ^/trunk ^/branches/b -m ""
svn mkdir ^/trunk/c -m ""
svn mkdir ^/trunk/c/d -m ""
svn mkdir ^/branches/b/c -m ""
svn mkdir ^/branches/b/c/e -m ""
cd ..
svn co file://$PWD/test/branches/b
cd b
svn merge ^/trunk .

And here is the output when I try it (multiple times):
--- Merging r4 through r8 into '.':
   C c
   A c/d
--- Recording mergeinfo for merge of r4 through r8 into '.':
 U   .
Summary of conflicts:
  Tree conflicts: 1
Searching tree conflict details for 'c' in repository:
Checking r5... done
Tree conflict on 'c':
A new directory appeared during merge of
'^/trunk/c:4-8'.
It was added by rcampbell in r5.
A directory which already occupies this path was found in the working copy.
Select: (p) Postpone, (r) Mark as resolved, (i) Ignore incoming addition,
        (m) Merge the directories,
        (R) Delete my directory and replace it with incoming directory,
        (M) Replace and merge, (h) Help, (q) Quit resolution: m
svn: E235000: In file 'subversion/libsvn_wc/adm_ops.c' line 384: assertion failed (!copyfrom_url || (svn_uri_is_canonical(copyfrom_url, scratch_pool) && SVN_IS_VALID_REVNUM(copyfrom_rev)))
Aborted (core dumped)
________________________________
From: Nathan Hartman <ha...@gmail.com>
Sent: December 2, 2021 10:36
To: Rolf Campbell <Ro...@solace.com>
Cc: users@subversion.apache.org <us...@subversion.apache.org>
Subject: Re: Can't create temporary file from template ... No such file or directory

Warning – this email originated outside of Solace. Please think before you click or open any links or attachments. If this email is suspicious, report it to it@solace.com
________________________________

On Wed, Dec 1, 2021 at 7:31 PM Rolf Campbell <Ro...@solace.com> wrote:
>
> I'm an svn administrator for my company and I end up doing a lot of merges.
>
> Today, I ran into this failure (reproducable).
>
> svn: warning: W000002: Can't create temporary file from template '/opt/sbox/rcampbell/auto-merge/solcbr/dataplane/sw/assuredDelivery/messageSpool/defrag/svn-XXXXXX': No such file or directory
> svn: E155027: Failure occurred resolving one or more conflicts
>
> This happens after I run two commands:
>
> svn merge ^/trunk@184967<ma...@184967> ^/trunk@185348<ma...@185348> . --accept postpone
>
> and then
>
> svn resolve solcbr/dataplane/sw/assuredDelivery/messageSpool
>
> and then it gives me output:
>
> $ svn resolve solcbr/dataplane/sw/assuredDelivery/messageSpool
> Searching tree conflict details for 'solcbr/dataplane/sw/assuredDelivery/messageSpool' in repository:
> Checking r184967... done
> Tree conflict on 'solcbr/dataplane/sw/assuredDelivery/messageSpool':
> A new directory appeared during merge of
> '^/trunk/solcbr/dataplane/sw/assuredDelivery/messageSpool:184968-185348'.
> It was added by solbuild in r184967.
> A directory which already occupies this path was found in the working copy.
> Select: (p) Postpone, (r) Mark as resolved, (i) Ignore incoming addition,
> (m) Merge the directories,
> (R) Delete my directory and replace it with incoming directory,
> (M) Replace and merge, (h) Help, (q) Quit resolution: m
> C solcbr/dataplane/sw/assuredDelivery/messageSpool/Rules.mk
> svn: warning: W000002: Can't create temporary file from template '/opt/sbox/rcampbell/auto-merge/solcbr/dataplane/sw/assuredDelivery/messageSpool/defrag/svn-XXXXXX': No such file or directory
> svn: E155027: Failure occurred resolving one or more conflicts
>
>
> $ svn --version
> svn, version 1.14.1 (r1886195)
> compiled Oct 1 2021, 11:42:52 on x86_64-unknown-linux-gnu
>
> The directory "/opt/sbox/rcampbell/auto-merge/solcbr/dataplane/sw/assuredDelivery/messageSpool/defrag" does not exist because it is a subdirectory that was added in trunk but NOT added in the working branch.
>
> We have already managed to get this merge to complete by renaming the directories so they don't collide, but this happens to us more than you might imagine and it would be nice if someone could take a look at this. Am I doing something wrong or is this a bug in subversion?

Hi Rolf,

The first thing to find out is whether there is a bug in Subversion or
the cause is elsewhere.

The best way to track down the cause is with a reproduction script
that constructs a minimal repository that exposes the issue. Without
that, it is very difficult to know the cause. A reproduction script
would allow us to run the same steps on different machines with
different builds and versions of Subversion; if there is a bug, that
will help fix it and translated into a regression test to prevent it
from returning in the future.

For now, we can try to narrow it down:

When you say that this happens often, do you mean failure to create
temporary files? Has that started recently (e.g., with this install of
SVN 1.14.1)? Temporary file creation is done by APR. What version of
APR is used in this build? The output of 'svn --version --verbose'
gives the version of APR. What OS is used?

A potentially dumb question, but is it possible the volume where the
working copy is located is low of space?

If this happens again, could you try to run the same merge + resolve
(or whatever steps cause the issue to resurface) on a different
machine to see if the same failure occurs?

Thanks,
Nathan
________________________________
Confidentiality notice

This e-mail message and any attachment hereto contain confidential information which may be privileged and which is intended for the exclusive use of its addressee(s). If you receive this message in error, please inform sender immediately and destroy any copy thereof. Furthermore, any disclosure, distribution or copying of this message and/or any attachment hereto without the consent of the sender is strictly prohibited. Thank you.

Re: Can't create temporary file from template ... No such file or directory

Posted by Nathan Hartman <ha...@gmail.com>.
On Wed, Dec 1, 2021 at 7:31 PM Rolf Campbell <Ro...@solace.com> wrote:
>
> I'm an svn administrator for my company and I end up doing a lot of merges.
>
> Today, I ran into this failure (reproducable).
>
> svn: warning: W000002: Can't create temporary file from template '/opt/sbox/rcampbell/auto-merge/solcbr/dataplane/sw/assuredDelivery/messageSpool/defrag/svn-XXXXXX': No such file or directory
> svn: E155027: Failure occurred resolving one or more conflicts
>
> This happens after I run two commands:
>
> svn merge ^/trunk@184967 ^/trunk@185348 .  --accept postpone
>
> and then
>
> svn resolve solcbr/dataplane/sw/assuredDelivery/messageSpool
>
> and then it gives me output:
>
> $ svn resolve solcbr/dataplane/sw/assuredDelivery/messageSpool
> Searching tree conflict details for 'solcbr/dataplane/sw/assuredDelivery/messageSpool' in repository:
> Checking r184967... done
> Tree conflict on 'solcbr/dataplane/sw/assuredDelivery/messageSpool':
> A new directory appeared during merge of
> '^/trunk/solcbr/dataplane/sw/assuredDelivery/messageSpool:184968-185348'.
> It was added by solbuild in r184967.
> A directory which already occupies this path was found in the working copy.
> Select: (p) Postpone, (r) Mark as resolved, (i) Ignore incoming addition,
>         (m) Merge the directories,
>         (R) Delete my directory and replace it with incoming directory,
>         (M) Replace and merge, (h) Help, (q) Quit resolution: m
> C    solcbr/dataplane/sw/assuredDelivery/messageSpool/Rules.mk
> svn: warning: W000002: Can't create temporary file from template '/opt/sbox/rcampbell/auto-merge/solcbr/dataplane/sw/assuredDelivery/messageSpool/defrag/svn-XXXXXX': No such file or directory
> svn: E155027: Failure occurred resolving one or more conflicts
>
>
> $ svn --version
> svn, version 1.14.1 (r1886195)
>    compiled Oct  1 2021, 11:42:52 on x86_64-unknown-linux-gnu
>
> The directory "/opt/sbox/rcampbell/auto-merge/solcbr/dataplane/sw/assuredDelivery/messageSpool/defrag" does not exist because it is a subdirectory that was added in trunk but NOT added in the working branch.
>
> We have already managed to get this merge to complete by renaming the directories so they don't collide, but this happens to us more than you might imagine and it would be nice if someone could take a look at this.  Am I doing something wrong or is this a bug in subversion?

Hi Rolf,

The first thing to find out is whether there is a bug in Subversion or
the cause is elsewhere.

The best way to track down the cause is with a reproduction script
that constructs a minimal repository that exposes the issue. Without
that, it is very difficult to know the cause. A reproduction script
would allow us to run the same steps on different machines with
different builds and versions of Subversion; if there is a bug, that
will help fix it and translated into a regression test to prevent it
from returning in the future.

For now, we can try to narrow it down:

When you say that this happens often, do you mean failure to create
temporary files? Has that started recently (e.g., with this install of
SVN 1.14.1)? Temporary file creation is done by APR. What version of
APR is used in this build? The output of 'svn --version --verbose'
gives the version of APR. What OS is used?

A potentially dumb question, but is it possible the volume where the
working copy is located is low of space?

If this happens again, could you try to run the same merge + resolve
(or whatever steps cause the issue to resurface) on a different
machine to see if the same failure occurs?

Thanks,
Nathan