[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Divide by zero at subversion/libsvn_fs_fs/fs_fs.c:upgrade_pack_revprops() (was Re: SVN crach Log)

From: Stefan Fuhrmann <stefan.fuhrmann_at_wandisco.com>
Date: Tue, 18 Jun 2013 23:53:12 +0200

On Tue, Jun 18, 2013 at 11:47 PM, Bert Huijben <bert_at_qqmail.nl> wrote:

> Shouldn’t be to hard by just passing the options to create an 1.1
> compatible FSFS respository?
>

No. You need to upgrade from 1.1 to 1.4 .. 1.7 and *then* 1.8.
The problem occurs in repos that support sharding but are
not shared.

-- Stefan^2.

>
> *From:* Stefan Fuhrmann
> *Sent:* Tuesday, June 18, 2013 11:39 PM
> *To:* Ivan Zhakov
> *Cc:* Miliotis Nikolaos; Subversion Development
>
> On Tue, Jun 18, 2013 at 10:42 PM, Ivan Zhakov <ivan_at_visualsvn.com> wrote:
>
>> On Wed, Jun 19, 2013 at 12:37 AM, Stefan Fuhrmann
>> <stefan.fuhrmann_at_wandisco.com> wrote:
>> > On Tue, Jun 18, 2013 at 6:53 PM, Ivan Zhakov <ivan_at_visualsvn.com>
>> wrote:
>> >>
>> >> On Tue, Jun 18, 2013 at 5:51 PM, Miliotis Nikolaos
>> >> <NMiliotis_at_eurobank.gr> wrote:
>> >> >
>> >> > Hi,
>> >> >
>> >> > I have installed Subversion 1.8 and tried to upgrade the repository.
>> >> > During the upgrade it
>> >> > produced the attached files.
>> >> >
>> >> > The command I used was:
>> >> >
>> >> > svnadmin –verify .
>> >> > svnadmin –upgrade .
>> >> Subversion crash (divide by zero) occur at
>> >> subversion/libsvn_fs_fs/fs_fs.c:1481 in upgrade_pack_revprops()
>> >> [[[
>> >> static svn_error_t *
>> >> upgrade_pack_revprops(svn_fs_t *fs,
>> >> apr_pool_t *scratch_pool)
>> >> {
>> >> fs_fs_data_t *ffd = fs->fsap_data;
>> >> const char *revprops_shard_path;
>> >> const char *revprops_pack_file_dir;
>> >> apr_int64_t shard;
>> >> apr_int64_t first_unpacked_shard
>> >> = ffd->min_unpacked_rev / ffd->max_files_per_dir;
>> >> ^^^^^ zero!
>> >>
>> >> apr_pool_t *iterpool = svn_pool_create(scratch_pool);
>> >> const char *revsprops_dir = svn_dirent_join(fs->path,
>> PATH_REVPROPS_DIR,
>> >>
>> >> ]]]
>> >>
>> >> ffd->max_files_per_dir == 0 for some reason.
>> >
>> >
>> > It's legal even for recent repository formats to not use sharding at
>> all.
>> > In that case, max_files_per_dir can actually be 0.
>> >
>> > r1494287 fixes this issue (should be shipped of 1.8.1).
>> >
>> Great! Is it possible to write test case for this issue?
>>
>
> Can be done but requires some fiddling with format files etc.
> Will do that tomorrow.
>
> -- Stefan^2.
>
Received on 2013-06-18 23:53:42 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.