> >> From: Stuart Henderson <st...@openbsd.org> >> Date: Mon, Oct 20, 2014 at 7:08 PM >> Subject: Re: databases/pgadmin3 is crashing on amd64 >> To: David Coppa <dco...@gmail.com> >> Cc: janis <ja...@cieti.lv>, OpenBSD Ports <ports@openbsd.org> >> >> >> On 2014/10/20 17:25, David Coppa wrote: >>> On Mon, Oct 20, 2014 at 3:27 PM, janis <ja...@cieti.lv> wrote: >>>> Hello, >>>> >>>> databases/pgadmin3 is still broken. Here is a backtrace: >>> >>> Somewhere, it's trying to unlock an unlocked mutex... >> >> I didn't see this before (I am able to make a new connection, connect, and >> browse around the db, without hitting it) but I can reproduce it by >> right-clicking >> on a server name. 1.16.1 does work so it seems it was introduced in 1.18.x. >> >> Diffing the source...(oh great...not relevant to this, but they have their >> own embedded copy of libssh2...) it looks like it may be in the connection >> cancelling code in pgConn.cpp. I'm clearly missing something with how this >> works with wxWidgets though as I only see locks not unlocks in the pgadmin >> code. >> >> Running with RTHREAD_DEBUG=5 I see lock/unlock/lock/unlock/unlock for the >> relevant mutex but not sure how to lookup which mutex is involved, at least >> "info symbol <addr>" doesn't help. > > Can you try the diff below? > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/databases/pgadmin3/Makefile,v > retrieving revision 1.29 > diff -u -p -u -p -r1.29 Makefile > --- Makefile 30 Apr 2014 14:20:08 -0000 1.29 > +++ Makefile 21 Oct 2014 12:26:35 -0000 > @@ -3,7 +3,7 @@ > COMMENT= administration and development platform for PostgreSQL > > V= 1.18.1 > -REVISION= 0 > +REVISION= 1 > DISTNAME= pgadmin3-$V > CATEGORIES= databases devel > > Index: patches/patch-pgadmin_frm_events_cpp > =================================================================== > RCS file: patches/patch-pgadmin_frm_events_cpp > diff -N patches/patch-pgadmin_frm_events_cpp > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-pgadmin_frm_events_cpp 21 Oct 2014 12:26:35 -0000 > @@ -0,0 +1,20 @@ > +$OpenBSD$ > + > +If the if() clause is false, Unlock() will be called on an already > +unlocked mutex > + > +--- pgadmin/frm/events.cpp.orig Fri Sep 27 16:51:46 2013 > ++++ pgadmin/frm/events.cpp Tue Oct 21 14:26:04 2014 > +@@ -746,9 +746,10 @@ void frmMain::OnSelRightClick(wxTreeEvent &event) > + currentObject = browser->GetObject(item); > + } > + > +- if (currentObject) > ++ if (currentObject) { > + doPopup(browser, event.GetPoint(), currentObject); > +- s_currentObjectMutex.Unlock(); > ++ s_currentObjectMutex.Unlock(); > ++ } > + } > + > + > Thanks, but unfortunately the problem remains. Backtrace looks the same:
(gdb) bt #0 0x000016d2052270da in kill () at <stdin>:2 #1 0x000016d2052894a9 in abort () at /usr/src/lib/libc/stdlib/abort.c:53 #2 0x000016d21dd9f595 in pthread_mutex_unlock (mutexp=Variable "mutexp" is not available. ) at /usr/src/lib/librthread/rthread_sync.c:219 #3 0x000016d2a98c7a99 in wxMutexInternal::Unlock () from /usr/local/lib/libwx_base.so.3.0 #4 0x000016cfaa4251ec in frmMain::OnNew () from /usr/local/bin/pgadmin3 #5 0x000016d2a98ca47d in wxEvtHandler::ProcessEventIfMatches () from /usr/local/lib/libwx_base.so.3.0 #6 0x000016d2a98ca64c in wxEventHashTable::HandleEvent () from /usr/local/lib/libwx_base.so.3.0 #7 0x000016d2a98ca78d in wxEvtHandler::ProcessEvent () from /usr/local/lib/libwx_base.so.3.0 #8 0x000016d2a98ca730 in wxEvtHandler::ProcessEvent () from /usr/local/lib/libwx_base.so.3.0 #9 0x000016d1f621e3c4 in wxWindowBase::TryParent () from /usr/local/lib/libwx_gtk2_core.so.3.0 #10 0x000016d2a98ca740 in wxEvtHandler::ProcessEvent () from /usr/local/lib/libwx_base.so.3.0 #11 0x000016d2a98ca730 in wxEvtHandler::ProcessEvent () from /usr/local/lib/libwx_base.so.3.0 #12 0x000016d1f6254b95 in wxScrollHelperEvtHandler::ProcessEvent () from /usr/local/lib/libwx_gtk2_core.so.3.0 #13 0x000016d1f626885c in wxGenericTreeCtrl::OnMouse () from /usr/local/lib/libwx_gtk2_core.so.3.0 #14 0x000016d2a98ca47d in wxEvtHandler::ProcessEventIfMatches () from /usr/local/lib/libwx_base.so.3.0 #15 0x000016d2a98ca64c in wxEventHashTable::HandleEvent () from /usr/local/lib/libwx_base.so.3.0 #16 0x000016d2a98ca78d in wxEvtHandler::ProcessEvent () from /usr/local/lib/libwx_base.so.3.0 #17 0x000016d2a98ca730 in wxEvtHandler::ProcessEvent () from /usr/local/lib/libwx_base.so.3.0 #18 0x000016d1f6254b95 in wxScrollHelperEvtHandler::ProcessEvent () from /usr/local/lib/libwx_gtk2_core.so.3.0 #19 0x000016d1f6117141 in wxWindow::GTKProcessEvent () from /usr/local/lib/libwx_gtk2_core.so.3.0 #20 0x000016d1f611cb57 in gtk_window_button_press_callback () from /usr/local/lib/libwx_gtk2_core.so.3.0 #21 0x000016d280a2ea9f in _gtk_marshal_BOOLEAN__BOXED () from /usr/local/lib/libgtk-x11-2.0.so.2400.0 #22 0x000016d1e4ab73f3 in g_closure_invoke () from /usr/local/lib/libgobject-2.0.so.4200.0 #23 0x000016d1e4acd3ff in signal_emit_unlocked_R () from /usr/local/lib/libgobject-2.0.so.4200.0 #24 0x000016d1e4acf1ff in g_signal_emit_valist () from /usr/local/lib/libgobject-2.0.so.4200.0 #25 0x000016d1e4acfe41 in g_signal_emit () from /usr/local/lib/libgobject-2.0.so.4200.0 #26 0x000016d280b4c59f in gtk_widget_event_internal () from /usr/local/lib/libgtk-x11-2.0.so.2400.0 #27 0x000016d280a273f9 in gtk_propagate_event () from /usr/local/lib/libgtk-x11-2.0.so.2400.0 #28 0x000016d280a2873f in gtk_main_do_event () from /usr/local/lib/libgtk-x11-2.0.so.2400.0 #29 0x000016d274d0fc80 in gdk_event_dispatch () from /usr/local/lib/libgdk-x11-2.0.so.2400.0 #30 0x000016d222444f4f in g_main_context_dispatch () from /usr/local/lib/libglib-2.0.so.4200.0 #31 0x000016d222446f9e in g_main_context_iterate () from /usr/local/lib/libglib-2.0.so.4200.0 #32 0x000016d222447f35 in g_main_loop_run () from /usr/local/lib/libglib-2.0.so.4200.0 #33 0x000016d280a28b11 in gtk_main () from /usr/local/lib/libgtk-x11-2.0.so.2400.0 #34 0x000016d1f610587d in wxEventLoop::Run () from /usr/local/lib/libwx_gtk2_core.so.3.0 #35 0x000016d1f6191399 in wxAppBase::MainLoop () from /usr/local/lib/libwx_gtk2_core.so.3.0 #36 0x000016d2a98638d1 in wxEntry () from /usr/local/lib/libwx_base.so.3.0 #37 0x000016cfaa181a32 in __register_frame_info () from /usr/local/bin/pgadmin3 #38 0x000016cfaa181661 in ?? () from /usr/local/bin/pgadmin3 #39 0x0000000000000000 in ?? () Current language: auto; currently asm