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

Re: fs_fs core dumps in checksum code

From: Blair Zajac <blair_at_orcaware.com>
Date: Tue, 17 Apr 2012 10:39:20 -0700

On 04/16/2012 02:16 AM, Julian Foad wrote:
> Blair Zajac wrote:
>> On 04/13/2012 12:45 AM, Julian Foad wrote:
>>> Blair Zajac wrote:
>>>> Having the empty files, such as changes, is that odd? Could that be a
>>>> hint?
>>>
>>> No, that's not interesting, that's just the result of crashing out
>>> at the point where it did -- in the middle of doing a commit.
>>
>> The 'changes' is created during the commit process and not building the
>> transaction? If so, then having an empty changes file is odd and probably only
>> possible through the RPCS API we wrote that wraps svn_fs.h and svn_repos.h, in
>> which case, could there be a bug with trying to commit empty transactions in a
>> multithreaded environment?
>
> Or maybe the commit just got as far as creating the 'changes' file but crashed out before it got around to writing the list of changes into that file and flushing/closing it.

It appears that the changes file is only modified upon any modification
to the txn and only read during the actual commit of the txn:

#!/usr/bin/python

import os
import sys
import time

import svn.fs
import svn.repos

try:
     repo = svn.repos.create('repo', None, None, {}, {})
except Exception:
     repo = svn.repos.open('repo')

fs = svn.repos.fs(repo)
txn = svn.fs.begin_txn2(fs, svn.fs.youngest_rev(fs), 0)
fs_root = svn.fs.txn_root(txn)

txn_name = svn.fs.txn_name(txn)

changes_path = os.path.join('repo', 'db', 'transactions', '%s.txn' %
txn_name,
                             'changes')
print 1, os.stat(changes_path)[6], svn.fs.paths_changed(fs_root)

svn.fs.make_dir(fs_root, '%s' % (1000*1000*time.time()))

print 2, os.stat(changes_path)[6], svn.fs.paths_changed(fs_root)

os.system("strace -p %s -o strace.out &" % os.getpid())

print svn.repos.fs_commit_txn(repo, txn)
Received on 2012-04-17 19:40:03 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.