You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by SteveKing <st...@gmx.ch> on 2004/08/25 17:22:22 UTC

crash with 'svn st -u' in RC2

Hi,

Just received another crashreport for TortoiseSVN. This time, the user 
sending the crashreport also provided the steps which lead to the crash.
I've reported crashs with 'svn st -u' already four times during the last 
6 months, but since I could only provide the location where it crashes 
but no "recipe" how and why this happens, it never got fixed.

So this time, I can at least provide a description and a reason why it 
happens:

- relocate a working copy --> (apparent) success
- 'svn up' --> "unexpected end of delta source"
- 'svn st -u' --> crash

The location of the crash is in
libsvn_wc/status.c: 1335
(1.1.x branch).

You can see there:
       /* See if the directory was deleted or replaced. */
       dir_status = apr_hash_get (pb->statii, db->path, 
APR_HASH_KEY_STRING);
       if ((dir_status->repos_text_status == svn_wc_status_deleted)
           || (dir_status->repos_text_status == svn_wc_status_replaced))
         was_deleted = TRUE;

after the apr_hash_get() call, it's assumed that dir_status is != NULL.
But as the crash shows, it _is_ NULL. And two lines further:
       /* Now do the status reporting. */
       SVN_ERR (handle_statii (eb, dir_status ? dir_status->entry : NULL,
                               db->path, db->statii, was_deleted, TRUE, 
pool));

here, a check is done if dir_status _might_ be NULL. So there must be a 
reason this can be NULL, only the check should be done right after the 
apr_hash_get() function call.

Stefan


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

Re: crash with 'svn st -u' in RC2

Posted by Mark Phippard <Ma...@softlanding.com>.
SteveKing <st...@gmx.ch> wrote on 08/26/2004 03:11:36 PM:

> Greg Hudson wrote:
> 
> > On Thu, 2004-08-26 at 14:53, SteveKing wrote:
> > 
> >>As for the why this happens: please do the NULL check even if you 
can't 
> >>find out when exactly and under what circumstances it happens.
> > 
> > 
> > That way lies eventual madness.  I know it can be frustrating, but 
when
> > we find a bug, we do need to make sure we fix it in the proper way, 
and
> > not just plaster over it.
> > 
> 
> Sure. But in such cases, I still add the check but give the user an 
> error message with as much information I can put in it. That way when 
> this happens later again, I can find out much more than just from a 
> crash. If a program crashes, users tend to just say some curses, restart 

> and try again. But if an error message is shown, eventually with the 
> hint text to contact the developers they will do that more likely.
> And: a crash is a much worse user impression than an error message!

As I see it there are two aspects to this bug:

1)  Why did the function return NULL?

2)  Why wasn't the NULL checked for as it is a few lines later?

While both problems should be fixed, #2 can be fixed now and prevents a 
crash.  I think all Stefan is saying is why hold up that fix while you 
figure out the cause of #1?

Mark


_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. by IBM Email Security Management Services powered by MessageLabs. 
_____________________________________________________________________________

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

Re: crash with 'svn st -u' in RC2

Posted by SteveKing <st...@gmx.ch>.
Greg Hudson wrote:

> On Thu, 2004-08-26 at 14:53, SteveKing wrote:
> 
>>As for the why this happens: please do the NULL check even if you can't 
>>find out when exactly and under what circumstances it happens.
> 
> 
> That way lies eventual madness.  I know it can be frustrating, but when
> we find a bug, we do need to make sure we fix it in the proper way, and
> not just plaster over it.
> 

Sure. But in such cases, I still add the check but give the user an 
error message with as much information I can put in it. That way when 
this happens later again, I can find out much more than just from a 
crash. If a program crashes, users tend to just say some curses, restart 
and try again. But if an error message is shown, eventually with the 
hint text to contact the developers they will do that more likely.
And: a crash is a much worse user impression than an error message!

Stefan



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

Re: crash with 'svn st -u' in RC2

Posted by Greg Hudson <gh...@MIT.EDU>.
On Thu, 2004-08-26 at 14:53, SteveKing wrote:
> As for the why this happens: please do the NULL check even if you can't 
> find out when exactly and under what circumstances it happens.

That way lies eventual madness.  I know it can be frustrating, but when
we find a bug, we do need to make sure we fix it in the proper way, and
not just plaster over it.


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

Re: crash with 'svn st -u' in RC2

Posted by Ben Collins-Sussman <su...@collab.net>.
On Thu, 2004-08-26 at 13:53, SteveKing wrote:

> Sorry, I'm not on IRC. So I don't know if you guys discuss things there. 
> And since no reply came on the mailing list, I thought that nothing 
> would be done.

You're right, we should have at least acknowledged receipt of your
report, even if we couldn't act on it instantly.  Sorry about that.

Thanks for finding it, Steve.



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

Re: crash with 'svn st -u' in RC2

Posted by SteveKing <st...@gmx.ch>.
Ben Collins-Sussman wrote:

> We are interested.  And yes, we should be doing that NULL check, as you
> pointed out.  Thanks for spotting it.  It will be fixed.
> 
> But as ghudson pointed out in IRC, we really ought to spend a tiny bit
> of effort to figure out *why* dir_status was NULL to begin with.  That's
> why we've not reacted quickly just yet.

Sorry, I'm not on IRC. So I don't know if you guys discuss things there. 
And since no reply came on the mailing list, I thought that nothing 
would be done.

As for the why this happens: please do the NULL check even if you can't 
find out when exactly and under what circumstances it happens. Users 
don't care why something crashes. I've reported this now the fourth 
time, everytime with the same crash location and it never got fixed 
because you guys couldn't find out *why* it crashed. I would be very 
dissapointed if it still wouldn't get fixed for that reason.

Stefan


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

Re: crash with 'svn st -u' in RC2

Posted by Ben Collins-Sussman <su...@collab.net>.
On Thu, 2004-08-26 at 13:32, SteveKing wrote:
> It's now been more than 24 hours since I posted the mail about a crash 
> when doing 'svn st -u'. And no replies yet?
> 
> I can understand that crashes which happen with TortoiseSVN don't 
> concern you, but I clearly stated that the crash happens inside the 
> Subversion library. So I really expect you guys to at least be a 
> _little_ interested.

We are interested.  And yes, we should be doing that NULL check, as you
pointed out.  Thanks for spotting it.  It will be fixed.

But as ghudson pointed out in IRC, we really ought to spend a tiny bit
of effort to figure out *why* dir_status was NULL to begin with.  That's
why we've not reacted quickly just yet.



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

Re: crash with 'svn st -u' in RC2

Posted by Stefan <st...@tigris.org>.
Ben Reser wrote:

> Relax.  It's been seen.  It's not particularly simple to resolve.  We
> need to handle it gracefully and I just haven't had time to figure out
> how to do that.
> 
> Please do try and remember that the vast majority of us are not getting
> paid to work on Subversion.  Things don't always happen overnight.

I know that. I don't get paid to work on TSVN either.
And I don't expect it to be fixed right away. All I expect is a reply 
that someone is looking at it - otherwise I won't know if someone has 
even read my mail.

Stefan



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

Re: crash with 'svn st -u' in RC2

Posted by Ben Reser <be...@reser.org>.
On Thu, Aug 26, 2004 at 08:32:38PM +0200, SteveKing wrote:
> It's now been more than 24 hours since I posted the mail about a crash 
> when doing 'svn st -u'. And no replies yet?
> 
> I can understand that crashes which happen with TortoiseSVN don't 
> concern you, but I clearly stated that the crash happens inside the 
> Subversion library. So I really expect you guys to at least be a 
> _little_ interested.

Steve,

Relax.  It's been seen.  It's not particularly simple to resolve.  We
need to handle it gracefully and I just haven't had time to figure out
how to do that.

Please do try and remember that the vast majority of us are not getting
paid to work on Subversion.  Things don't always happen overnight.

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

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

Re: crash with 'svn st -u' in RC2

Posted by SteveKing <st...@gmx.ch>.
It's now been more than 24 hours since I posted the mail about a crash 
when doing 'svn st -u'. And no replies yet?

I can understand that crashes which happen with TortoiseSVN don't 
concern you, but I clearly stated that the crash happens inside the 
Subversion library. So I really expect you guys to at least be a 
_little_ interested.

Stefan

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

Re: crash with 'svn st -u' in RC2

Posted by Stefan <st...@tigris.org>.
I just found out the real reason for why the working copy got into a 
state where 'svn st -u' crashes:
the user used the 'svn switch --relocate' command to switch to a 
different branch instead of using just 'svn switch'. Apparently, this 
users (and I guess some others too) thought that switching could change 
his working copy by merging some changes from branch which he didn't 
wanted. So he used relocate because "it just rewrites the URL's without 
touching any files in my working copy".

I added a big red warning to the TortoiseSVN docs about this.

But the crash still happens and should be fixed!

Stefan


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