You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Eric Hanchrow <of...@blarg.net> on 2003/06/06 21:47:09 UTC

bug: Useless error message when SVN_SSH points to non-existent file

This is svn 0.23.0 on Cygwin, configured with
"--prefix=/usr/local/stow/svn-0.23.0"

Since this is a client-only installation, I don't have Berkeley DB
installed.

Here's an example of subversion working happily:

        $ svn ls svn+ssh://offby1.atm01.sea.blarg.net/home/offby1/svn-repos/trunk/config-files

When I run this, I see, as I expect, a list of the files in my
`config-files' directory on the repository.

(Of course if *you* try exactly the above, it'll fail because you
can't log in to that machine.  But you get the point.)

Now here's how to reproduce the problem that I'm whining about:

        $ SVN_SSH=garbage svn ls svn+ssh://offby1.atm01.sea.blarg.net/home/offby1/svn-repos/trunk/config-files

In this case, instead of seeing an error message to the effect of "I
can't run the SSH program `garbage' because command not found", I see 

        svn: Network connection closed unexpectedly
        svn: Connection closed unexpectedly

This actually bit me -- I had set SVN_SSH in my environment while
playing with some Win32 subversion clients, and then forgot that it
was there.  Afterwards, every time I tried to run the Cygwin
subversion, I got the above cryptic message, and had to scratch my
head for a long time before I figured out what was wrong.

-- 
Tobacco: It's not just for killing children anymore.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: bug: Useless error message when SVN_SSH points to non-existent file

Posted by Greg Hudson <gh...@MIT.EDU>.
I fixed this in rev 6165, so it should be fixed in 0.24.  The error will
look like:

  svn: No such file or directory
  svn: exec of 'blah' failed

which is ugly but functional, like most of our error message.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: bug: Useless error message when SVN_SSH points to non-existent file

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Friday, June 6, 2003, at 10:48 PM, Greg Hudson wrote:

> On Fri, 2003-06-06 at 20:49, Garrett Rooney wrote:
>> Unfortunately, it seems that fixing this will require changes to APR.
>
> I don't like the idea of trying to find out in advance whether the
> tunnel agent is executable.  There's no completely robust way of doing
> so under Unix (access() runs afoul of setuid, eaccess() isn't portable,
> and checking permission bits by hand doesn't work right with AFS), and
> it's complicated at any rate because of the path search.
>
> One option is to change the protocol so that the "greeting" can be an
> error message.  That change could have other applications down the road
> ("this repository has moved").  We can either do this Very Soon (before
> 0.24) in a backward-incompatible manner, by changing the format of the
> greeting, or we can do it later in a backward-compatible but less
> elegant manner, by compatibly extending the greeting syntax.  I will
> look into doing it the first way now, I think; if I run into problems,
> we can always do it the other way later.
>
> (From an APR perspective, we can use apr_procattr_child_errfn_set to
> write the error message when the exec doesn't succeed.)

Wow, that's quite a bit cooler than the way I was going, thanks Greg ;-)

-garrett


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: bug: Useless error message when SVN_SSH points to non-existent file

Posted by Greg Hudson <gh...@MIT.EDU>.
On Fri, 2003-06-06 at 20:49, Garrett Rooney wrote:
> Unfortunately, it seems that fixing this will require changes to APR.

I don't like the idea of trying to find out in advance whether the
tunnel agent is executable.  There's no completely robust way of doing
so under Unix (access() runs afoul of setuid, eaccess() isn't portable,
and checking permission bits by hand doesn't work right with AFS), and
it's complicated at any rate because of the path search.

One option is to change the protocol so that the "greeting" can be an
error message.  That change could have other applications down the road
("this repository has moved").  We can either do this Very Soon (before
0.24) in a backward-incompatible manner, by changing the format of the
greeting, or we can do it later in a backward-compatible but less
elegant manner, by compatibly extending the greeting syntax.  I will
look into doing it the first way now, I think; if I run into problems,
we can always do it the other way later.

(From an APR perspective, we can use apr_procattr_child_errfn_set to
write the error message when the exec doesn't succeed.)


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: bug: Useless error message when SVN_SSH points to non-existent file

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Friday, June 6, 2003, at 05:47 PM, Eric Hanchrow wrote:

>
> This is svn 0.23.0 on Cygwin, configured with
> "--prefix=/usr/local/stow/svn-0.23.0"
>
> Since this is a client-only installation, I don't have Berkeley DB
> installed.
>
> Here's an example of subversion working happily:
>
>         $ svn ls  
> svn+ssh://offby1.atm01.sea.blarg.net/home/offby1/svn-repos/trunk/ 
> config-files
>
> When I run this, I see, as I expect, a list of the files in my
> `config-files' directory on the repository.
>
> (Of course if *you* try exactly the above, it'll fail because you
> can't log in to that machine.  But you get the point.)
>
> Now here's how to reproduce the problem that I'm whining about:
>
>         $ SVN_SSH=garbage svn ls  
> svn+ssh://offby1.atm01.sea.blarg.net/home/offby1/svn-repos/trunk/ 
> config-files
>
> In this case, instead of seeing an error message to the effect of "I
> can't run the SSH program `garbage' because command not found", I see
>
>         svn: Network connection closed unexpectedly
>         svn: Connection closed unexpectedly
>
> This actually bit me -- I had set SVN_SSH in my environment while
> playing with some Win32 subversion clients, and then forgot that it
> was there.  Afterwards, every time I tried to run the Cygwin
> subversion, I got the above cryptic message, and had to scratch my
> head for a long time before I figured out what was wrong.

Unfortunately, it seems that fixing this will require changes to APR.   
We can use apr_procattr_error_check_set to make apr_proc_create try to  
verify that what we're executing exists and is readable/executable, but  
that will currently only work if you're using APR_PROGRAM or  
APR_PROGRAM_ENV, or if the first character of the program is a /.  In  
all other cases, there's a todo comment about searching PATH for the  
program, but currently it isn't done.  We're using APR_PROGRAM_PATH,  
and the SVN_SSH probably won't be an absolute path, so that won't work  
for us at the moment.

Anyone feel like writing some APR code?

-garrett


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org