Thread: pgadmin goes to infinite loop
hello when i click fast and repeatedly (5 times) on refresh button in 'Edit Data' window, pgadmin hogs all CPU and I have to killit manually. Does not depend on underlying data. xp sp3, pgadmin trunk rev 7966 debug build, wxMSW-2.8.10, compiler Microsoft Visual C++ 200 stack with ProcessExplorer: ntkrnlpa.exe!KiUnlockDispatcherDatabase+0x77 ntkrnlpa.exe!KeSetEvent+0x74 ntkrnlpa.exe!PspGetSetContextSpecialApc+0x4e ntkrnlpa.exe!KiDeliverApc+0xb3 hal.dll!HalpApcInterrupt+0xc5 MSVCR90D.dll!_heap_alloc_dbg_impl+0x392 MSVCR90D.dll!_heap_alloc_dbg_impl+0x38e MSVCR90D.dll!_nh_malloc_dbg_impl+0x1f MSVCR90D.dll!_nh_malloc_dbg+0x2c MSVCR90D.dll!malloc+0x1b MSVCR90D.dll!operator new+0x11 pgAdmin3_d.exe!wxGridCellCoordsArray::Add+0x1b pgAdmin3_d.exe!wxGridCellCoordsArray::DoCopy+0x3f pgAdmin3_d.exe!wxGridCellCoordsArray::wxGridCellCoordsArray+0x41 pgAdmin3_d.exe!wxGrid::CalcCellsExposed+0x1fd pgAdmin3_d.exe!wxGridWindow::OnPaint+0xaa pgAdmin3_d.exe!wxAppConsole::HandleEvent+0x11 pgAdmin3_d.exe!wxEvtHandler::ProcessEventIfMatches+0x97 pgAdmin3_d.exe!wxEventHashTable::HandleEvent+0xaf pgAdmin3_d.exe!wxEvtHandler::ProcessEvent+0xdb pgAdmin3_d.exe!wxWindow::HandlePaint+0x135 pgAdmin3_d.exe!wxWindow::MSWWindowProc+0x45c pgAdmin3_d.exe!wxWndProc+0xb3 USER32.dll!InternalCallWinProc+0x28 USER32.dll!UserCallWinProcCheckWow+0x150 USER32.dll!DispatchClientMessage+0xa3 USER32.dll!__fnDWORD+0x24 ntdll.dll!KiUserCallbackDispatcher+0x13 USER32.dll!NtUserDispatchMessage+0xc USER32.dll!DispatchMessageW+0xf USER32.dll!DialogBox2+0x15a USER32.dll!InternalDialogBox+0xd0 USER32.dll!SoftModalMessageBox+0x938 USER32.dll!MessageBoxWorker+0x2ba USER32.dll!MessageBoxTimeoutW+0x7a USER32.dll!MessageBoxExW+0x1b USER32.dll!MessageBoxW+0x45 pgAdmin3_d.exe!wxMessageDialog::ShowModal+0x294 pgAdmin3_d.exe!wxMessageBox+0x87 pgAdmin3_d.exe!sysLogger::DoLog+0x4c5 pgAdmin3_d.exe!wxLog::OnLog+0x10e pgAdmin3_d.exe!wxVLogError+0x71 pgAdmin3_d.exe!wxLogError+0x17 pgAdmin3_d.exe!pgConn::LogError+0xc3 pgAdmin3_d.exe!pgConn::ExecuteScalar+0x140 pgAdmin3_d.exe!pgSet::ExecuteScalar+0x25 pgAdmin3_d.exe!pgSet::ColType+0xfd pgAdmin3_d.exe!sqlTable::GetValue+0x254 pgAdmin3_d.exe!wxGrid::GetCellValue+0x46 pgAdmin3_d.exe!wxGridCellStringRenderer::GetBestSize+0x3c pgAdmin3_d.exe!wxGridCellStringRenderer::Draw+0xce pgAdmin3_d.exe!wxGrid::DrawCell+0x119 pgAdmin3_d.exe!wxGrid::DrawGridCellArea+0x3bb pgAdmin3_d.exe!wxGridWindow::OnPaint+0xcd pgAdmin3_d.exe!wxAppConsole::HandleEvent+0x11 pgAdmin3_d.exe!wxEvtHandler::ProcessEventIfMatches+0x97 pgAdmin3_d.exe!wxEventHashTable::HandleEvent+0xaf pgAdmin3_d.exe!wxEvtHandler::ProcessEvent+0xdb pgAdmin3_d.exe!wxWindow::HandlePaint+0x135 pgAdmin3_d.exe!wxWindow::MSWWindowProc+0x45c pgAdmin3_d.exe!wxWndProc+0xb3 USER32.dll!InternalCallWinProc+0x28 USER32.dll!UserCallWinProcCheckWow+0x150 USER32.dll!DispatchClientMessage+0xa3 USER32.dll!__fnDWORD+0x24 ntdll.dll!KiUserCallbackDispatcher+0x13 USER32.dll!NtUserDispatchMessage+0xc USER32.dll!DispatchMessageW+0xf pgAdmin3_d.exe!wxEventLoop::ProcessMessage+0x33 pgAdmin3_d.exe!wxEventLoop::Dispatch+0x252 pgAdmin3_d.exe!wxAppBase::Dispatch+0x24 pgAdmin3_d.exe!wxApp::Yield+0xb7 pgAdmin3_d.exe!frmEditGrid::Go+0x9d1 pgAdmin3_d.exe!frmEditGrid::OnRefresh+0x197 pgAdmin3_d.exe!wxAppConsole::HandleEvent+0x11 pgAdmin3_d.exe!wxEvtHandler::ProcessEventIfMatches+0x97 pgAdmin3_d.exe!wxEventHashTable::HandleEvent+0xaf pgAdmin3_d.exe!wxEvtHandler::ProcessEvent+0xdb pgAdmin3_d.exe!wxEvtHandler::ProcessEvent+0x10e pgAdmin3_d.exe!wxWindowBase::TryParent+0x93 pgAdmin3_d.exe!wxEvtHandler::ProcessEvent+0x12a pgAdmin3_d.exe!wxToolBarBase::OnLeftClick+0x84 pgAdmin3_d.exe!wxToolBar::MSWCommand+0xee pgAdmin3_d.exe!wxFrame::HandleCommand+0x3e pgAdmin3_d.exe!wxFrame::MSWWindowProc+0xfe pgAdmin3_d.exe!wxWndProc+0xb3 USER32.dll!InternalCallWinProc+0x28 USER32.dll!UserCallWinProcCheckWow+0x150 USER32.dll!SendMessageWorker+0x4a5 USER32.dll!SendMessageW+0x7f COMCTL32.dll!TBOnLButtonUp+0x122 COMCTL32.dll!ToolbarWndProc+0xb30 USER32.dll!InternalCallWinProc+0x28 USER32.dll!UserCallWinProcCheckWow+0x150 USER32.dll!CallWindowProcAorW+0x98 USER32.dll!CallWindowProcW+0x1b pgAdmin3_d.exe!wxWindow::MSWDefWindowProc+0x38 pgAdmin3_d.exe!wxWindow::MSWWindowProc+0x1240 pgAdmin3_d.exe!wxToolBar::MSWWindowProc+0x84 pgAdmin3_d.exe!wxWndProc+0xb3 USER32.dll!InternalCallWinProc+0x28 USER32.dll!UserCallWinProcCheckWow+0x150 USER32.dll!DispatchMessageWorker+0x306 USER32.dll!DispatchMessageW+0xf pgAdmin3_d.exe!wxEventLoop::ProcessMessage+0x33 Madis Pärn Jawilla Software
On Thu, Jul 9, 2009 at 10:02 AM, Madis Pärn<madis@jawilla.com> wrote: > hello > > when i click fast and repeatedly (5 times) on refresh button in 'Edit Data' > window, pgadmin hogs all CPU and I have to kill it manually. > Does not depend on underlying data. > > xp sp3, pgadmin trunk rev 7966 debug build, wxMSW-2.8.10, compiler Microsoft > Visual C++ 200 <snip> > USER32.dll!MessageBoxExW+0x1b > USER32.dll!MessageBoxW+0x45 > pgAdmin3_d.exe!wxMessageDialog::ShowModal+0x294 > pgAdmin3_d.exe!wxMessageBox+0x87 > pgAdmin3_d.exe!sysLogger::DoLog+0x4c5 > pgAdmin3_d.exe!wxLog::OnLog+0x10e > pgAdmin3_d.exe!wxVLogError+0x71 > pgAdmin3_d.exe!wxLogError+0x17 > pgAdmin3_d.exe!pgConn::LogError+0xc3 It looks like an error message box popped up which you presumable immediately hid with your frantic clicking. What did it say? What's in the logfile (assuming you have logging enabled - if not, please try recreating with it turned on). -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com
On Thu, Jul 16, 2009 at 10:46 AM, Madis Pärn<madis@jawilla.com> wrote: > i set the loglevel to DEBUG, but did not find any relevant errors. log is > attached. > > only error occured after I closed the main window (with vs debugger showing > exception occurring somewhere in wx string replace function). The only issue that springs to mind looking at the code and your log is that it's possible for the access check query to run whilst the main query thread is running, though the window in which that may be a problem is really, really tiny. Still, the attached patch should resolve that - please test. Thanks. -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com
Attachment
On Mon, Aug 3, 2009 at 3:51 PM, Madis Pärn<madis@jawilla.com> wrote: > the problem persists, multiple clicks on view refresh button hangs pgadmin > and cpu goes up. > > the error occurring and being logged is empty string "". > pgAdmin3_dbg.exe!frmEditGrid::Go+0xabb is line 1297 wxMilliSleep(10); > > any other ideas? Not really. How come the executable is called pgAdmin3_dbg.exe? Have you made any other changes to the code? ... > USER32.dll!DialogBox2+0x15a > USER32.dll!InternalDialogBox+0xd0 > USER32.dll!SoftModalMessageBox+0x938 > USER32.dll!MessageBoxWorker+0x2ba > USER32.dll!MessageBoxTimeoutW+0x7a > USER32.dll!MessageBoxExW+0x1b > USER32.dll!MessageBoxW+0x45 > pgAdmin3_dbg.exe!wxMessageDialog::ShowModal+0x294 > pgAdmin3_dbg.exe!wxMessageBox+0x87 > pgAdmin3_dbg.exe!sysLogger::DoLog+0x4c5 > pgAdmin3_dbg.exe!wxLog::OnLog+0x10e > pgAdmin3_dbg.exe!wxVLogError+0x71 > pgAdmin3_dbg.exe!wxLogError+0x17 > pgAdmin3_dbg.exe!pgConn::LogError+0xc3 > pgAdmin3_dbg.exe!pgConn::ExecuteScalar+0x140 And where is the message box? My best guess at the moment is that VC++ 2008 is causing some weirdness. We currently only support VC++ 2005. -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com
the problem persists, multiple clicks on view refresh button hangs pgadmin and cpu goes up. the error occurring and being logged is empty string "". pgAdmin3_dbg.exe!frmEditGrid::Go+0xabb is line 1297 wxMilliSleep(10); any other ideas? stack: ntkrnlpa.exe!KiUnlockDispatcherDatabase+0x77 ntkrnlpa.exe!KiDeliverApc+0x124 ntdll.dll!RtlLeaveCriticalSection+0x12 MSVCR90D.dll!_unlock+0x16 MSVCR90D.dll!_free_dbg+0x68 MSVCR90D.dll!_free_dbg+0x5f MSVCR90D.dll!free+0x10 pgAdmin3_dbg.exe!wxStringData::Unlock+0x3a pgAdmin3_dbg.exe!wxStringBase::~wxStringBase+0x1b pgAdmin3_dbg.exe!wxString::~wxString+0x14 pgAdmin3_dbg.exe!wxGrid::GetDefaultRendererForCell+0x7c pgAdmin3_dbg.exe!wxGridCellAttr::GetRenderer+0x55 pgAdmin3_dbg.exe!wxGrid::DrawCell+0xe1 pgAdmin3_dbg.exe!wxGrid::DrawGridCellArea+0x3bb pgAdmin3_dbg.exe!wxGridWindow::OnPaint+0xcd pgAdmin3_dbg.exe!wxAppConsole::HandleEvent+0x11 pgAdmin3_dbg.exe!wxEvtHandler::ProcessEventIfMatches+0x97 pgAdmin3_dbg.exe!wxEventHashTable::HandleEvent+0xaf pgAdmin3_dbg.exe!wxEvtHandler::ProcessEvent+0xdb pgAdmin3_dbg.exe!wxWindow::HandlePaint+0x135 pgAdmin3_dbg.exe!wxWindow::MSWWindowProc+0x45c pgAdmin3_dbg.exe!wxWndProc+0xb3 USER32.dll!InternalCallWinProc+0x28 USER32.dll!UserCallWinProcCheckWow+0x150 USER32.dll!DispatchClientMessage+0xa3 USER32.dll!__fnDWORD+0x24 ntdll.dll!KiUserCallbackDispatcher+0x13 USER32.dll!NtUserDispatchMessage+0xc USER32.dll!DispatchMessageW+0xf USER32.dll!DialogBox2+0x15a USER32.dll!InternalDialogBox+0xd0 USER32.dll!SoftModalMessageBox+0x938 USER32.dll!MessageBoxWorker+0x2ba USER32.dll!MessageBoxTimeoutW+0x7a USER32.dll!MessageBoxExW+0x1b USER32.dll!MessageBoxW+0x45 pgAdmin3_dbg.exe!wxMessageDialog::ShowModal+0x294 pgAdmin3_dbg.exe!wxMessageBox+0x87 pgAdmin3_dbg.exe!sysLogger::DoLog+0x4c5 pgAdmin3_dbg.exe!wxLog::OnLog+0x10e pgAdmin3_dbg.exe!wxVLogError+0x71 pgAdmin3_dbg.exe!wxLogError+0x17 pgAdmin3_dbg.exe!pgConn::LogError+0xc3 pgAdmin3_dbg.exe!pgConn::ExecuteScalar+0x140 pgAdmin3_dbg.exe!pgSet::ExecuteScalar+0x25 pgAdmin3_dbg.exe!pgSet::ColType+0xfd pgAdmin3_dbg.exe!sqlTable::GetValue+0x254 pgAdmin3_dbg.exe!wxGrid::GetCellValue+0x46 pgAdmin3_dbg.exe!wxGridCellStringRenderer::GetBestSize+0x3c pgAdmin3_dbg.exe!wxGridCellStringRenderer::Draw+0xce pgAdmin3_dbg.exe!wxGrid::DrawCell+0x119 pgAdmin3_dbg.exe!wxGrid::DrawGridCellArea+0x3bb pgAdmin3_dbg.exe!wxGridWindow::OnPaint+0xcd pgAdmin3_dbg.exe!wxAppConsole::HandleEvent+0x11 pgAdmin3_dbg.exe!wxEvtHandler::ProcessEventIfMatches+0x97 pgAdmin3_dbg.exe!wxEventHashTable::HandleEvent+0xaf pgAdmin3_dbg.exe!wxEvtHandler::ProcessEvent+0xdb pgAdmin3_dbg.exe!wxWindow::HandlePaint+0x135 pgAdmin3_dbg.exe!wxWindow::MSWWindowProc+0x45c pgAdmin3_dbg.exe!wxWndProc+0xb3 USER32.dll!InternalCallWinProc+0x28 USER32.dll!UserCallWinProcCheckWow+0x150 USER32.dll!DispatchClientMessage+0xa3 USER32.dll!__fnDWORD+0x24 ntdll.dll!KiUserCallbackDispatcher+0x13 USER32.dll!NtUserDispatchMessage+0xc USER32.dll!DispatchMessageW+0xf pgAdmin3_dbg.exe!wxEventLoop::ProcessMessage+0x33 pgAdmin3_dbg.exe!wxEventLoop::Dispatch+0x252 pgAdmin3_dbg.exe!wxAppBase::Dispatch+0x24 pgAdmin3_dbg.exe!wxApp::Yield+0xb7 pgAdmin3_dbg.exe!frmEditGrid::Go+0xabb pgAdmin3_dbg.exe!frmEditGrid::OnRefresh+0x197 pgAdmin3_dbg.exe!wxAppConsole::HandleEvent+0x11 pgAdmin3_dbg.exe!wxEvtHandler::ProcessEventIfMatches+0x97 pgAdmin3_dbg.exe!wxEventHashTable::HandleEvent+0xaf pgAdmin3_dbg.exe!wxEvtHandler::ProcessEvent+0xdb pgAdmin3_dbg.exe!wxEvtHandler::ProcessEvent+0x10e pgAdmin3_dbg.exe!wxWindowBase::TryParent+0x93 pgAdmin3_dbg.exe!wxEvtHandler::ProcessEvent+0x12a pgAdmin3_dbg.exe!wxToolBarBase::OnLeftClick+0x84 pgAdmin3_dbg.exe!wxToolBar::MSWCommand+0xee pgAdmin3_dbg.exe!wxFrame::HandleCommand+0x3e pgAdmin3_dbg.exe!wxFrame::MSWWindowProc+0xfe pgAdmin3_dbg.exe!wxWndProc+0xb3 USER32.dll!InternalCallWinProc+0x28 USER32.dll!UserCallWinProcCheckWow+0x150 USER32.dll!SendMessageWorker+0x4a5 USER32.dll!SendMessageW+0x7f COMCTL32.dll!TBOnLButtonUp+0x122 COMCTL32.dll!ToolbarWndProc+0xb30 USER32.dll!InternalCallWinProc+0x28 USER32.dll!UserCallWinProcCheckWow+0x150 USER32.dll!CallWindowProcAorW+0x98 USER32.dll!CallWindowProcW+0x1b pgAdmin3_dbg.exe!wxWindow::MSWDefWindowProc+0x38 pgAdmin3_dbg.exe!wxWindow::MSWWindowProc+0x1240 pgAdmin3_dbg.exe!wxToolBar::MSWWindowProc+0x84 pgAdmin3_dbg.exe!wxWndProc+0xb3 USER32.dll!InternalCallWinProc+0x28 USER32.dll!UserCallWinProcCheckWow+0x150 USER32.dll!DispatchMessageWorker+0x306 On 23.07.2009 11:43, Dave Page wrote: > On Thu, Jul 16, 2009 at 10:46 AM, Madis Pärn<madis@jawilla.com> wrote: >> i set the loglevel to DEBUG, but did not find any relevant errors. log is >> attached. >> >> only error occured after I closed the main window (with vs debugger showing >> exception occurring somewhere in wx string replace function). > > The only issue that springs to mind looking at the code and your log > is that it's possible for the access check query to run whilst the > main query thread is running, though the window in which that may be a > problem is really, really tiny. Still, the attached patch should > resolve that - please test. > > Thanks. > > > > ------------------------------------------------------------------------ > >
downloaded official build from website. has the same problem. exe names are nonstandard beacuse i have multiple pgadmin3.exe files in "C:\Program Files\pgAdmin III\1.10" directory. i have not modified the code. stack: ntkrnlpa.exe!KiUnlockDispatcherDatabase+0x77 ntkrnlpa.exe!KeSetEvent+0x74 ntkrnlpa.exe!PspGetSetContextSpecialApc+0x4e ntkrnlpa.exe!KiDeliverApc+0xb3 hal.dll!HalpApcInterrupt+0xc5 win32k.sys!RFONTOBJ::bInit+0xc9 win32k.sys!RFONTOBJ::vInit+0x16 win32k.sys!GreGetCharABCWidthsW+0x8c win32k.sys!NtGdiGetCharABCWidthsW+0xff ntkrnlpa.exe!KiFastCallEntry+0xf8 ntdll.dll!KiFastSystemCallRet GDI32.dll!NtGdiGetCharABCWidthsW+0xc GDI32.dll!GetCharABCWidthsW+0x18 pgadmin3_orig.exe+0x39bc11 GDI32.dll!hGetPEBHandle+0x38 pgadmin3_orig.exe+0x356c5a pgadmin3_orig.exe+0x35b2a1 MSVCR80.dll!free+0xec Madis On 3.08.2009 18:08, Dave Page wrote: > On Mon, Aug 3, 2009 at 3:51 PM, Madis Pärn<madis@jawilla.com> wrote: >> the problem persists, multiple clicks on view refresh button hangs pgadmin >> and cpu goes up. >> >> the error occurring and being logged is empty string "". >> pgAdmin3_dbg.exe!frmEditGrid::Go+0xabb is line 1297 wxMilliSleep(10); >> >> any other ideas? > > Not really. How come the executable is called pgAdmin3_dbg.exe? Have > you made any other changes to the code? > > ... >> USER32.dll!DialogBox2+0x15a >> USER32.dll!InternalDialogBox+0xd0 >> USER32.dll!SoftModalMessageBox+0x938 >> USER32.dll!MessageBoxWorker+0x2ba >> USER32.dll!MessageBoxTimeoutW+0x7a >> USER32.dll!MessageBoxExW+0x1b >> USER32.dll!MessageBoxW+0x45 >> pgAdmin3_dbg.exe!wxMessageDialog::ShowModal+0x294 >> pgAdmin3_dbg.exe!wxMessageBox+0x87 >> pgAdmin3_dbg.exe!sysLogger::DoLog+0x4c5 >> pgAdmin3_dbg.exe!wxLog::OnLog+0x10e >> pgAdmin3_dbg.exe!wxVLogError+0x71 >> pgAdmin3_dbg.exe!wxLogError+0x17 >> pgAdmin3_dbg.exe!pgConn::LogError+0xc3 >> pgAdmin3_dbg.exe!pgConn::ExecuteScalar+0x140 > > And where is the message box? My best guess at the moment is that VC++ > 2008 is causing some weirdness. We currently only support VC++ 2005. >
On Tue, Aug 4, 2009 at 8:03 AM, Madis Pärn<madis@jawilla.com> wrote: > downloaded official build from website. has the same problem. > > exe names are nonstandard beacuse i have multiple pgadmin3.exe files in > "C:\Program Files\pgAdmin III\1.10" directory. > i have not modified the code. Any ideas about the message box? Your custom build was clearly displaying one according to the stack trace. Can anyone else reproduce this, because I can't :-( (or :-), depending on your viewpoint!) -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com