Philip Martin <philip.martin_at_wandisco.com> writes:
> stsp_at_apache.org writes:
>
>> Author: stsp
>> Date: Tue Jan 26 15:46:59 2010
>> New Revision: 903284
>>
>> URL: http://svn.apache.org/viewvc?rev=903284&view=rev
>> Log:
>> Make svn patch provide notifications about individual hunks.
>> Make the CLI client print them.
>
> I don't know why yet, but this patch is causing lots of regression
> test failures, e.g.:
I think it's only indirectly caused by this patch, it appears that the
real problem is a memory reuse problem tickled by the increase in size
of svn_wc_notify_t. Valgrind wasn't much help until I rebuilt apr and
apr-util, then:
==13758== Invalid read of size 4
==13758== at 0x50FA05B: close_directory (update_editor.c:3166)
==13758== by 0x50B6D6E: close_directory (ambient_depth_filter_editor.c:567)
==13758== by 0x5541477: close_directory (cancel.c:261)
==13758== by 0x5541477: close_directory (cancel.c:261)
==13758== by 0x69E924A: update_entry (reporter.c:855)
==13758== by 0x69E9B2C: delta_dirs (reporter.c:1028)
==13758== by 0x69E91F6: update_entry (reporter.c:852)
==13758== by 0x69E9B2C: delta_dirs (reporter.c:1028)
==13758== by 0x69EA575: drive (reporter.c:1195)
==13758== by 0x69EAA4B: finish_report (reporter.c:1262)
==13758== by 0x69EAEA4: svn_repos_finish_report (reporter.c:1352)
==13758== by 0x67C07AA: reporter_finish_report (ra_plugin.c:213)
==13758== Address 0xc0991f0 is 56 bytes inside a block of size 120 free'd
==13758== at 0x4C2130F: free (vg_replace_malloc.c:323)
==13758== by 0x5E11469: pool_clear_debug (apr_pools.c:1432)
==13758== by 0x5E11599: pool_destroy_debug (apr_pools.c:1494)
==13758== by 0x5E1166D: apr_pool_destroy_debug (apr_pools.c:1536)
==13758== by 0x50F47B8: maybe_bump_dir_info (update_editor.c:862)
==13758== by 0x50FA01B: close_directory (update_editor.c:3159)
==13758== by 0x50B6D6E: close_directory (ambient_depth_filter_editor.c:567)
==13758== by 0x5541477: close_directory (cancel.c:261)
==13758== by 0x5541477: close_directory (cancel.c:261)
==13758== by 0x69E924A: update_entry (reporter.c:855)
==13758== by 0x69E9B2C: delta_dirs (reporter.c:1028)
==13758== by 0x69E91F6: update_entry (reporter.c:852)
So I think the problem is caused by:
------------------------------------------------------------------------
r880099 | rhuijben | 2009-10-14 16:27:43 +0100 (Wed, 14 Oct 2009) | 37 lines
Following up on issues discovered/worked around by gstein in r40000
and in preparation for moving all property operations in the database,
take baton lifetime in the update editor in our own hands. Construct per
dir and per file pools in their parent pool and the top level directory
in the editor pool.
This moves the final cleanup for the directories to the close/bump of
their parent or of the editor in case of the root, instead of at closing
of the parent pool of the editor (read: at svn exit time).
Use this functionality to introduce a per file log and a per file/dir
wq item accumulator, which will be used for property operations soon.
* subversion/libsvn_wc/update_editor.c
(dir_baton): Remove copy of edit_baton->db, add wq_accumulator.
(bump_dir_info): Add pool.
(flush_log): Use db from edit baton. Also flush the wq_accumulator.
(cleanup_dir_baton): Update user.
(make_dir_baton): Create baton in parent and allocate everything in the
baton pool.
(maybe_bump_dir_info): Destroy the directory pool after bumping.
(close_directory): Flush the log if skipping the directory.
(file_baton): Add log and wq accumulator.
(make_file_baton): Create pool in parent dir pool and allocate everything in
this pool.
(flush_file_log): New function, like flush_log()
(open_file, add_file, merge_file):
Add accumulated work to file accumulator.
(close_file): If not skipping, send accumulated operations to the wq. Destroy
file pool.
(make_editor): Rename pools to match their usage.
--
Philip
Received on 2010-01-27 02:38:35 CET