git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jonathan Nieder <jrnieder@gmail.com>
Date
May 27, 2011, 11:08 UTC
Message-ID
<20110527110828.GA7972@elie>
In-Reply-To
<BANLkTinBGnCKsUOXY_RD-7yNyM7XqNTsRw@mail.gmail.com>
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
Next: Jonathan Nieder
Message 1 of 7 in “vcs-svn: avoid hangs for corrupt deltas”
  1. 0/4 vcs-svn: avoid hangs for corrupt deltasJonathan Nieder, May 27, 2011
  2. 1/4 test-svn-fe: split off "test-svn-fe -d" into a separate functionJonathan Nieder, May 27, 2011
  3. Drew NorthupMay 31, 2011
  4. Jonathan NiederMay 31, 2011
  5. 2/4 vcs-svn: cap number of bytes read from sliding viewJonathan Nieder, May 27, 2011
  6. 3/4 vcs-svn: guard against overflow when computing preimage lengthJonathan Nieder, May 27, 2011
  7. 4/4 vcs-svn: avoid hangs from corrupt deltasJonathan Nieder, May 27, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.