Hmmm. I'm not sure what's going on; hard to imagine that there's a
bug in apr_pool_destroy() on NT.
By the way, what do you mean by "update a ... directory with no .svn
data"? That should be impossible on any platform, although the error
should be detected and thrown by Subversion itself. You can only
update a working copy, i.e., a directory with .svn subdir.
Maybe DeleteTempPool is trying to destroy a pool that's already been
destroyed? Hard to know, would need much more information, but I
(personally) don't have a Windows environment to debug this in
anyway. Good luck.
-Karl
Brandon Ehle <azverkan@yahoo.com> writes:
> In our Subversion GUI app, we are calling the following function to
> update a directory. If you call this function on a directory with no
> .svn data, this works fine. If you call this function on a directory
> with .svn data the svn_pool_destroy function crashes in NTDLL closing
> a file via "_close(fd)" where fd=3. The same Update function running
> on Linux seems to work ok, and the cmdline win32 client doesn't crash
> when updating the same directory. Commenting out the DeleteTempPool()
> function makes everything work ok, but I assume this is a runtime
> memory leak? Crashes on both our GUI apps repository on the Subversion
> repository. Crashes even when I disable the after_editor and
> notify_restore callbacks.
>
> Win2k + MSVC6
> apr CVS today 10:42 AM EST
> neon-0.18.2-svn-win32.zip
> db-4.0.14-win32.zip
> subversion SVN today 10:42 AM EST
>
> Stack Trace:|
>
> NTDLL! 77fa03bc()
> NTDLL! 77f82811()
> |_close_lk(int 3) line 108 + 74 bytes
> _close(int 3) line 60 + 9 bytes
> close_file_descriptor(void * 0x00000003) line 1169 + 12 bytes
> run_cleanups(cleanup_t * 0x00b72a08) line 1781 + 13 bytes
> apr_pool_destroy(apr_pool_t * 0x00b5e010) line 601 + 12 bytes
> SVNVersionCtrl::DeleteTempPool() line 35
> SVNVersionCtrl::Update(const wxString & {...}, unsigned char 1, long
> -1, __int64 0) line 109
> MyFrame::OnCvsUpdate(wxCommandEvent & {...}) line 176 + 59 bytes
> wxEvtHandler::SearchEventTable(wxEventTable & {...}, wxEvent & {...})
> line 886
> wxEvtHandler::ProcessEvent(wxEvent & {...}) line 800 + 19 bytes
> wxFrameBase::ProcessCommand(int 6) line 199 + 26 bytes
> wxFrame::HandleCommand(unsigned short 6, unsigned short 0, unsigned
> long 0) line 712 + 18 bytes
> wxFrame::MSWWindowProc(unsigned int 273, unsigned int 6, long 0) line
> 782 + 22 bytes
> wxWndProc(HWND__ * 0x00b30402, unsigned int 273, unsigned int 6, long
> 0) line 2070 + 26 bytes
> USER32! 77e12e98()
> USER32! 77e130e0()
> USER32! 77e15824()
> wxApp::DoMessage() line 1032
> wxApp::MainLoop() line 1073
> wxAppBase::OnRun() line 118 + 42 bytes
> wxEntry(void * 0x00400000, void * 0x00000000, char * 0x0013309f, int
> 1, unsigned char 1) line 823 + 16 bytes
> WinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char *
> 0x0013309f, int 1) line 81 + 23 bytes
> WinMainCRTStartup() line 330 + 54 bytes
> KERNEL32! 77e97d08()
>
> Offending Code:
> |
> void SVNVersionCtrl::CreateTempPool() {
> pool=svn_pool_create(root_pool);
> }
>
> void SVNVersionCtrl::DeleteTempPool() {
> svn_pool_destroy(pool); ||<-------- Dies here|
> | pool=NULL;
> }
> ||
> v||oid SVNVersionCtrl::Update(const wxString& dir, bool recurse, long
> int revnum, maven_int64 time) {
> || CreateTempPool();
>
> assert(!fCurrentDir.IsEmpty());
>
> svn_stringbuf_t *full_dir=wxToSvn(fCurrentDir);
> svn_stringbuf_t *local_dir=wxToSvn(dir);
> svn_path_add_component(full_dir, local_dir);
>
> Printf("Subversion - Update %s\n", local_dir->data);
>
> svn_delta_edit_fns_t *before_editor=NULL;
> void *before_edit_baton=NULL;
> svn_delta_edit_fns_t *after_editor=NULL;
> void *after_edit_baton=NULL;
>
> GetUpdateBaton(local_dir, &after_editor, &after_edit_baton);
>
> svn_error_t *err=svn_client_update(before_editor, before_edit_baton,
> after_editor, after_edit_baton, auth_obj, full_dir, NULL, revnum,
> time, recurse, maven_notify_restored, this, pool);
> if (err) {
> Printf("Update Failed '%s'\n", err->message);
> } else {
> Print("Update Complete\n");
> }
>
> DeleteTempPool(); <-------- From here
> }
> |
> The data to the svn_client_update call looks like this:
>
> |svn_client_update(const svn_delta_edit_fns_t * 0x00000000, void *
> 0x00000000, const svn_delta_edit_fns_t * 0x00b5e148, void *
> 0x00b5e138, svn_client_auth_baton_t * 0x00b55180, svn_stringbuf_t *
> 0x00b5e0f0, svn_stringbuf_t * 0x00000000, long -1, __int64 0, int 1,
> void (void *, const char *)* 0x00401668 maven_notify_restored(void
> *,char const *), void * 0x00b50f68, apr_pool_t * 0x00b5e008||) line 70
> |
> Any ideas on how to go about tracking this down?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:37:03 2006