Skip to content

vcs-svn: avoid hangs for corrupt deltas

Jonathan Nieder git 1 version In review

Get series with b4
b4 am 20110527110828.GA7972@elie

Versions newest first

  1. v1 Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4test-svn-fe: split off "test-svn-fe -d" into a separate functiontest-svn-fe.c+32 -222 replies
2/4vcs-svn: cap number of bytes read from sliding viewtest-svn-fe.c vcs-svn/sliding_window.c vcs-svn/sliding_window.h+5 -20 replies
3/4vcs-svn: guard against overflow when computing preimage lengthvcs-svn/fast_export.c+14 -10 replies
4/4vcs-svn: avoid hangs from corrupt deltast/t9010-svn-fe.sh vcs-svn/fast_export.c+46 -90 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by.

PatchRamkumar Ramachandra
1/4
2/4Inspired-by
3/4
4/4Inspired-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH/RFC db/text-delta 0/4] vcs-svn: avoid hangs for corrupt deltas

Hi,

As promised, here's a quick series to stop a too-greedy delta from causing svn-fe deadlock. It took longer than I thought it would, mostly because I started too late.

If I remember correctly, this first showed up as a theoretical possibility when chatting with Ram and later showed up in practice due to a bug in a test script or something like that. I don't remember the details but luckily it is not hard to make up a delta exhibiting the problem. See the test script in patch 4 for details.

After review, I'd like to push this to the main svn-fe branch and ask Junio to pull it so text delta support can be rolled out. There's just no reason not to, except for the obvious ones:

- less pleasant raw UI for svn-fe
- losing support for non-git fast-import backends that don't support cat-blob yet

Waiting for those would be to put the cart before the horse (how can people experiment with making something better if they haven't experienced what we have now?). Review of the pending patches at

git://repo.or.cz/git/jrn.git svn-fe-next

to find missed details or other things that would be nice to get taken care of toward that end would be very welcome.

As for this series: hopefully it's simple but it's perfectly possible I got something terribly wrong. Thoughts welcome, as always.

Thanks to David and Ram for some useful discussions on irc, including those that led to these patches.

Jonathan Nieder (4):
test-svn-fe: split off "test-svn-fe -d" into a separate function
vcs-svn: cap number of bytes read from sliding view
vcs-svn: guard against overflow when computing preimage length
vcs-svn: avoid hangs from corrupt deltas