public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* regression in subversion with 1.7.18 (and .19)
@ 2013-05-27 22:38 David Boyce
  2013-05-28  4:47 ` David Rothenberger
  0 siblings, 1 reply; 4+ messages in thread
From: David Boyce @ 2013-05-27 22:38 UTC (permalink / raw)
  To: cygwin

I've encountered a regression in svn client behavior between Cygwin
1.7.17 and 1.7.18. I also tried today's snapshot which doesn't fix it,
though I suspect the problem is actually in the svn port to Cygwin,
not the DLL (by way of evidence I downgraded a 1.7.18 install to use
cygwin1.dll from 1.7.17 and it fails the same way). The problem itself
is hard to explain and maybe to reproduce but fortunately there's some
damning evidence from strace (below) which with luck will make the bug
obvious.

The symptom involves svn cached password access. Subversion can be
told to cache the user's password in
~/.subversion/auth/svn.simple/<hashed-value> and this is how we use
it. On Cygwin, we point $HOME at the UNC path to our home directories
on a filer and up through Cygwin 1.7.17 (which bundles svn 1.6.16)
this works. Starting with 1.7.18 (svn 1.7.9) it absolutely refuses to
find the cached password via this network path, even if we point to it
explicitly using svn --config-dir=$HOME/.subversion. If we copy the
same path to a local filesystem and point at it with --config-dir, it
works. A really interesting data point is that if we even make a local
*symlink" whose target is the network path and point at that with
--config-dir, it still works. As long as it's a local directory or we
can trick svn into thinking it's a local directory, it works.

Also, the failure is not observed in a fully logged-in Cygwin session.
We see it when using LSF, which is sort of analogous to ssh in the
sense of being a daemon which starts jobs based on network requests.
I'd guess it could be reproduced with ssh but it would take some setup
for me to try that here so I'm hoping the bug can be found without it.

Looking at strace logs is quite illuminating (note that I've scrubbed
these of company identification). Here are the first two lines from a
working (1.7.17) usage:

% grep 'prefix.company.com.*svn.simple' svn.17 | head -2
   48   33186 [main] svn 776 normalize_posix_path: src
//prefix.company.com/xyz/home/builder/.subversion/auth/svn.simple
   17   33203 [main] svn 776 normalize_posix_path:
//prefix.company.com/xyz/home/builder/.subversion/auth/svn.simple =
normalize_posix_path
(//prefix.company.com/xyz/home/builder/.subversion/auth/svn.simple)

And from the non-working 1.7.18:

% grep 'prefix.company.com.*svn.simple' svn.18 | head -2
   22  253378 [main] svn 5848 normalize_posix_path: src
/prefix.company.com/xyz/home/builder/.subversion/auth/svn.simple/1b794458a0e19fc8211326d47216f19b
   34  253412 [main] svn 5848 normalize_posix_path:
/prefix.company.com/xyz/home/builder/.subversion/auth/svn.simple/1b794458a0e19fc8211326d47216f19b
= normalize_posix_path
(/prefix.company.com/xyz/home/builder/.subversion/auth/svn.simple/1b794458a0e19fc8211326d47216f19b)

Notice two things:

(1) The double leading // has become a single /.
(2) The working version normalizes the directory whereas the broken
use includes the filename in its path (the full correct path to the
file containing the password is
"//prefix.company.com/xyz/home/builder/.subversion/auth/svn.simple/1b794458a0e19fc8211326d47216f19b").

Taken together it implies an off-by-one error causing a leading
pathname component to be dropped and a corresponding trailing
component to be added.

David Boyce

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: regression in subversion with 1.7.18 (and .19)
  2013-05-27 22:38 regression in subversion with 1.7.18 (and .19) David Boyce
@ 2013-05-28  4:47 ` David Rothenberger
  2013-05-29 21:23   ` David Rothenberger
  0 siblings, 1 reply; 4+ messages in thread
From: David Rothenberger @ 2013-05-28  4:47 UTC (permalink / raw)
  To: cygwin

On 5/27/2013 2:34 PM, David Boyce wrote:
> I've encountered a regression in svn client behavior between Cygwin
> 1.7.17 and 1.7.18. I also tried today's snapshot which doesn't fix it,
> though I suspect the problem is actually in the svn port to Cygwin,
> not the DLL (by way of evidence I downgraded a 1.7.18 install to use
> cygwin1.dll from 1.7.17 and it fails the same way).

The problem is in the svn port for Cygwin, as you mentioned. When
building svn for Cygwin 1.7, I removed support for DOS paths. This
unintentionally removed support for UNC paths as well.

I'll see what I can do to restore UNC path support without also enabling
DOS path support.

Thanks for the report.

-- 
David Rothenberger  ----  daveroth@acm.org

Volunteer Subversion Cygwin maintainer

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: regression in subversion with 1.7.18 (and .19)
  2013-05-28  4:47 ` David Rothenberger
@ 2013-05-29 21:23   ` David Rothenberger
  2013-05-30  2:18     ` David Boyce
  0 siblings, 1 reply; 4+ messages in thread
From: David Rothenberger @ 2013-05-29 21:23 UTC (permalink / raw)
  To: cygwin

David Rothenberger wrote:
> On 5/27/2013 2:34 PM, David Boyce wrote:
>> I've encountered a regression in svn client behavior between Cygwin
>> 1.7.17 and 1.7.18. I also tried today's snapshot which doesn't fix it,
>> though I suspect the problem is actually in the svn port to Cygwin,
>> not the DLL (by way of evidence I downgraded a 1.7.18 install to use
>> cygwin1.dll from 1.7.17 and it fails the same way).
> 
> The problem is in the svn port for Cygwin, as you mentioned. When
> building svn for Cygwin 1.7, I removed support for DOS paths. This
> unintentionally removed support for UNC paths as well.
> 
> I'll see what I can do to restore UNC path support without also enabling
> DOS path support.

I think the recently release subversion-1.7.9-2 package will fix your
problem. It does not fix all uses of UNC paths, especially those passed
on the command line (e.g., "svn status //server/share" or "svn export
//server/share") because those require teaching libapr1 about UNC paths,
which I haven't done (yet?).

Still, I think it will support your use case of the config directory on
a UNC share.

Please give it a shot and let me know.

-- 
David Rothenberger                spammer? -> spam@daveroth.dyndns.org
GPG/PGP: 0x7F67E734, C233 365A 25EF 2C5F C8E1 43DF B44F BA26 7F67 E734

Consultant, n.:
        Someone who'd rather climb a tree and tell a lie than stand on
        the ground and tell the truth.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: regression in subversion with 1.7.18 (and .19)
  2013-05-29 21:23   ` David Rothenberger
@ 2013-05-30  2:18     ` David Boyce
  0 siblings, 0 replies; 4+ messages in thread
From: David Boyce @ 2013-05-30  2:18 UTC (permalink / raw)
  To: cygwin

On Wed, May 29, 2013 at 1:38 PM, David Rothenberger <daveroth@acm.org> wrote:
> I think the recently release subversion-1.7.9-2 package will fix your
> problem. It does not fix all uses of UNC paths, especially those passed
> on the command line (e.g., "svn status //server/share" or "svn export
> //server/share") because those require teaching libapr1 about UNC paths,
> which I haven't done (yet?).
>
> Still, I think it will support your use case of the config directory on
> a UNC share.
>
> Please give it a shot and let me know.

My local test case now works perfectly. Thanks!

-David Boyce

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-30  1:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-27 22:38 regression in subversion with 1.7.18 (and .19) David Boyce
2013-05-28  4:47 ` David Rothenberger
2013-05-29 21:23   ` David Rothenberger
2013-05-30  2:18     ` David Boyce

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).