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

Re: Crash with svn_pool_destroy in update

From: Karl Fogel <kfogel_at_newton.ch.collab.net>
Date: 2002-02-01 18:52:22 CET

Brandon,

Can you set your mailer to send this message as plain text, not HTML,
and resend? It's hard for a lot of us to read when it's HTML...

Thanks,
-Karl

Brandon Ehle <azverkan@yahoo.com> writes:
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <title></title>
> </head>
> <body>
> In our Subversion GUI app, we are calling the following function to update
> a directory. &nbsp;If you call this function on a directory with no .svn data,
> this works fine. &nbsp;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. &nbsp;The same Update function running on Linux seems to work ok,
> and the cmdline win32 client doesn't crash when updating the same directory.
> &nbsp;Commenting out the DeleteTempPool() function makes everything work ok, but
> I assume this is a runtime memory leak? &nbsp;Crashes on both our GUI apps repository
> on the Subversion repository. &nbsp;Crashes even when I disable the after_editor
> and notify_restore callbacks. &nbsp;<br>
> <br>
> Win2k + MSVC6<br>
> apr CVS today 10:42 AM EST<br>
> neon-0.18.2-svn-win32.zip<br>
> db-4.0.14-win32.zip<br>
> subversion SVN today 10:42 AM EST<br>
> <br>
> Stack Trace:<code><br>
> <br>
> NTDLL! 77fa03bc()<br>
> NTDLL! 77f82811()<br>
> </code><samp>_close_lk(int 3) line 108 + 74 bytes<br>
> _close(int 3) line 60 + 9 bytes<br>
> close_file_descriptor(void * 0x00000003) line 1169 + 12 bytes<br>
> run_cleanups(cleanup_t * 0x00b72a08) line 1781 + 13 bytes<br>
> apr_pool_destroy(apr_pool_t * 0x00b5e010) line 601 + 12 bytes<br>
> SVNVersionCtrl::DeleteTempPool() line 35<br>
> SVNVersionCtrl::Update(const wxString & {...}, unsigned char 1, long
> -1, __int64 0) line 109<br>
> MyFrame::OnCvsUpdate(wxCommandEvent & {...}) line 176 + 59 bytes<br>
> wxEvtHandler::SearchEventTable(wxEventTable & {...}, wxEvent & {...})
> line 886<br>
> wxEvtHandler::ProcessEvent(wxEvent & {...}) line 800 + 19 bytes<br>
> wxFrameBase::ProcessCommand(int 6) line 199 + 26 bytes<br>
> wxFrame::HandleCommand(unsigned short 6, unsigned short 0, unsigned long
> 0) line 712 + 18 bytes<br>
> wxFrame::MSWWindowProc(unsigned int 273, unsigned int 6, long 0) line 782
> + 22 bytes<br>
> wxWndProc(HWND__ * 0x00b30402, unsigned int 273, unsigned int 6, long 0)
> line 2070 + 26 bytes<br>
> USER32! 77e12e98()<br>
> USER32! 77e130e0()<br>
> USER32! 77e15824()<br>
> wxApp::DoMessage() line 1032<br>
> wxApp::MainLoop() line 1073<br>
> wxAppBase::OnRun() line 118 + 42 bytes<br>
> wxEntry(void * 0x00400000, void * 0x00000000, char * 0x0013309f, int 1, unsigned
> char 1) line 823 + 16 bytes<br>
> WinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char * 0x0013309f,
> int 1) line 81 + 23 bytes<br>
> WinMainCRTStartup() line 330 + 54 bytes<br>
> KERNEL32! 77e97d08()<br>
> </samp><br>
> Offending Code:<br>
> <code><br>
> void SVNVersionCtrl::CreateTempPool() {<br>
> &nbsp; pool=svn_pool_create(root_pool);<br>
> }<br>
> <br>
> void SVNVersionCtrl::DeleteTempPool() {<br>
> &nbsp; svn_pool_destroy(pool); &nbsp; &nbsp; &nbsp; &nbsp; </code><code><-------- Dies here</code><br>
> <code>&nbsp; pool=NULL;<br>
> }<br>
> </code><code><br>
> v</code><code>oid SVNVersionCtrl::Update(const wxString& dir, bool recurse,
> long int revnum, maven_int64 time) {<br>
> </code><code>&nbsp; CreateTempPool();<br>
> <br>
> &nbsp; assert(!fCurrentDir.IsEmpty());<br>
> <br>
> &nbsp; svn_stringbuf_t *full_dir=wxToSvn(fCurrentDir);<br>
> &nbsp; svn_stringbuf_t *local_dir=wxToSvn(dir);<br>
> &nbsp; svn_path_add_component(full_dir, local_dir);<br>
> <br>
> &nbsp; Printf("Subversion - Update %s\n", local_dir->data);<br>
> <br>
> &nbsp; svn_delta_edit_fns_t *before_editor=NULL;<br>
> &nbsp; void *before_edit_baton=NULL;<br>
> &nbsp; svn_delta_edit_fns_t *after_editor=NULL;<br>
> &nbsp; void *after_edit_baton=NULL;<br>
> <br>
> &nbsp; GetUpdateBaton(local_dir, &after_editor, &after_edit_baton);<br>
> <br>
> &nbsp; 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);<br>
> &nbsp; if (err) {<br>
> &nbsp;&nbsp;&nbsp; Printf("Update Failed '%s'\n", err->message);<br>
> &nbsp; } else {<br>
> &nbsp;&nbsp;&nbsp; Print("Update Complete\n");<br>
> &nbsp; }<br>
> <br>
> &nbsp; DeleteTempPool(); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <-------- From here<br>
> }<br>
> </code><br>
> The data to the svn_client_update call looks like this:<br>
> <br>
> <code>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</code><code>)
> line 70<br>
> </code><br>
> Any ideas on how to go about tracking this down?<br>
> <br>
> </body>
> </html>
>
>
> ---------------------------------------------------------------------
> 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

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.