Thread: PATCH: pgAdmin III hangs - it try to close debugger when some query is already in progress

Hi,

Please find the patch for the same.
We found this issue from long time, but did not have time to resolve it.

--
Ashesh Vashi
EnterpriseDB INDIA: Enterprise Postgres Company

Attachment
Sorry previous patch has one 'fprintf'.
Please find the updated patch.

On Wed, Mar 10, 2010 at 1:11 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:
Hi,

Please find the patch for the same.
We found this issue from long time, but did not have time to resolve it.

--
Ashesh Vashi
EnterpriseDB INDIA: Enterprise Postgres Company


Attachment
For the benefit of the list, I've asked Ashesh to do some additional
testing on this before we commit, as the debugger code can be quite
finicky, with the threading behaving subtly differently on each of
Win32, GTK and Mac.

On Wed, Mar 10, 2010 at 8:42 AM, Ashesh Vashi
<ashesh.vashi@enterprisedb.com> wrote:
> Sorry previous patch has one 'fprintf'.
> Please find the updated patch.
>
> On Wed, Mar 10, 2010 at 1:11 PM, Ashesh Vashi
> <ashesh.vashi@enterprisedb.com> wrote:
>>
>> Hi,
>> Please find the patch for the same.
>> We found this issue from long time, but did not have time to resolve it.
>> --
>> Ashesh Vashi
>> EnterpriseDB INDIA: Enterprise Postgres Company
>>
>
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>



--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
PG East Conference: http://www.enterprisedb.com/community/nav-pg-east-2010.do

Hi Dave,

After initial testing, I found that - the connection from the dlgDebugger was not getting closed.
I have made the required changes.

Please find the updated patches for both trunk and REL_1_10_0_PATCHES (branch).
I have tested them on linux, windows and osx.

--
Ashesh Vashi
EnterpriseDB INDIA: Enterprise Postgres Company

On Wed, Mar 10, 2010 at 3:17 PM, Dave Page <dpage@pgadmin.org> wrote:
For the benefit of the list, I've asked Ashesh to do some additional
testing on this before we commit, as the debugger code can be quite
finicky, with the threading behaving subtly differently on each of
Win32, GTK and Mac.

On Wed, Mar 10, 2010 at 8:42 AM, Ashesh Vashi
<ashesh.vashi@enterprisedb.com> wrote:
> Sorry previous patch has one 'fprintf'.
> Please find the updated patch.
>
> On Wed, Mar 10, 2010 at 1:11 PM, Ashesh Vashi
> <ashesh.vashi@enterprisedb.com> wrote:
>>
>> Hi,
>> Please find the patch for the same.
>> We found this issue from long time, but did not have time to resolve it.
>> --
>> Ashesh Vashi
>> EnterpriseDB INDIA: Enterprise Postgres Company
>>
>
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>



--

Oops...
Forget to attach the patches. :-(

PFA.

--
Ashesh Vashi
EnterpriseDB INDIA: Enterprise Postgres Company


On Thu, Mar 11, 2010 at 4:50 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:
Hi Dave,

After initial testing, I found that - the connection from the dlgDebugger was not getting closed.
I have made the required changes.

Please find the updated patches for both trunk and REL_1_10_0_PATCHES (branch).
I have tested them on linux, windows and osx.

--
Ashesh Vashi
EnterpriseDB INDIA: Enterprise Postgres Company

On Wed, Mar 10, 2010 at 3:17 PM, Dave Page <dpage@pgadmin.org> wrote:
For the benefit of the list, I've asked Ashesh to do some additional
testing on this before we commit, as the debugger code can be quite
finicky, with the threading behaving subtly differently on each of
Win32, GTK and Mac.

On Wed, Mar 10, 2010 at 8:42 AM, Ashesh Vashi
<ashesh.vashi@enterprisedb.com> wrote:
> Sorry previous patch has one 'fprintf'.
> Please find the updated patch.
>
> On Wed, Mar 10, 2010 at 1:11 PM, Ashesh Vashi
> <ashesh.vashi@enterprisedb.com> wrote:
>>
>> Hi,
>> Please find the patch for the same.
>> We found this issue from long time, but did not have time to resolve it.
>> --
>> Ashesh Vashi
>> EnterpriseDB INDIA: Enterprise Postgres Company
>>
>
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>



--


Attachment
On Thu, Mar 11, 2010 at 11:21 AM, Ashesh Vashi
<ashesh.vashi@enterprisedb.com> wrote:
> Oops...
> Forget to attach the patches. :-(
> PFA.

Just tried this on Windows and get a reproducible crash :-(

1) Connect to the server. I was using PPAS 8.3R2.
2) Debug a function, eg. public.new_empno() from the PPAS sample database.
3) Run the function to the end, and then close the parameters dialogue
and the debug windows using the X button.

I also noticed there's a commented out line of code in the patch, as
well as some C style comments that should be changed to //.

>    pgAdmin3.exe!wxMutex::Lock()  Line 42 + 0x3 bytes    C++
     pgAdmin3.exe!dbgPgConn::Cancel()  Line 396    C++
     pgAdmin3.exe!dbgPgConn::Close()  Line 375    C++
     pgAdmin3.exe!dlgDirectDbg::CloseConnection()  Line 433    C++
     pgAdmin3.exe!frmDebugger::OnClose(wxCloseEvent & event={...})  Line 383    C++
     pgAdmin3.exe!wxAppConsole::HandleEvent(wxEvtHandler *
handler=0x02afcb58, void (wxEvent &)* func=0x008324d3, wxEvent &
event={...})  Line 323    C++
     pgAdmin3.exe!wxEvtHandler::ProcessEventIfMatches(const
wxEventTableEntryBase & entry={...}, wxEvtHandler *
handler=0x02afcb58, wxEvent & event={...})  Line 1233    C++
     pgAdmin3.exe!wxEventHashTable::HandleEvent(wxEvent & event={...},
wxEvtHandler * self=0x02afcb58)  Line 907 + 0x1c bytes    C++
     pgAdmin3.exe!wxEvtHandler::ProcessEvent(wxEvent & event={...})  Line
1293 + 0x1c bytes    C++
     pgAdmin3.exe!wxEvtHandler::ProcessEvent(wxEvent & event={...})  Line
1300 + 0x1c bytes    C++
     pgAdmin3.exe!wxWindowBase::Close(bool force=false)  Line 428 + 0x1c bytes    C++
     pgAdmin3.exe!wxFrame::MSWWindowProc(unsigned int message=16,
unsigned int wParam=0, long lParam=0)  Line 1042 + 0xa bytes    C++
     pgAdmin3.exe!wxWndProc(HWND__ * hWnd=0x0009067a, unsigned int
message=16, unsigned int wParam=0, long lParam=0)  Line 2613 + 0x1c
bytes    C++
     user32.dll!7e418734()
     [Frames below may be incorrect and/or missing, no symbols loaded for
user32.dll]
     user32.dll!7e418816()
     user32.dll!7e428ea0()
     user32.dll!7e428eec()
     ntdll.dll!7c90e473()
     user32.dll!7e4194be()
     user32.dll!7e428e0d()
     user32.dll!7e428dd9()
     user32.dll!7e42934b()
     user32.dll!7e428dd9()
     uxtheme.dll!5ad73bc2()
     uxtheme.dll!5ad8c7f6()
     uxtheme.dll!5ad71ac7()
     uxtheme.dll!5ad71b3d()
     user32.dll!7e4294ed()
     pgAdmin3.exe!wxVLogTrace(unsigned long mask=591482, const wchar_t *
szFormat=0x00000112, char * argptr=0x0000f060)  Line 220 + 0x11
bytes    C++
     pgAdmin3.exe!wxWindow::MSWDefWindowProc(unsigned int nMsg=274,
unsigned int wParam=61536, long lParam=7537328)  Line 2238    C++
     pgAdmin3.exe!wxWindow::MSWWindowProc(unsigned int message=274,
unsigned int wParam=61536, long lParam=7537328)  Line 3419 + 0x22
bytes    C++
     pgAdmin3.exe!wxTopLevelWindowMSW::MSWWindowProc(unsigned int
message=274, unsigned int wParam=61536, long lParam=7537328)  Line 372
+ 0x14 bytes    C++
     pgAdmin3.exe!wxFrame::MSWWindowProc(unsigned int message=274,
unsigned int wParam=61536, long lParam=7537328)  Line 1101 + 0x14
bytes    C++
     pgAdmin3.exe!wxWndProc(HWND__ * hWnd=0x0009067a, unsigned int
message=274, unsigned int wParam=61536, long lParam=7537328)  Line
2613 + 0x1c bytes    C++
     user32.dll!7e418734()
     user32.dll!7e42bdf1()
     user32.dll!7e42927b()
     user32.dll!7e4292e3()
     uxtheme.dll!5ad98895()
     uxtheme.dll!5ad71ac7()
     uxtheme.dll!5ad71b3d()
     user32.dll!7e4294ed()
     pgAdmin3.exe!wxVLogTrace(unsigned long mask=591482, const wchar_t *
szFormat=0x000000a1, char * argptr=0x00000014)  Line 220 + 0x11
bytes    C++
     pgAdmin3.exe!wxWindow::MSWDefWindowProc(unsigned int nMsg=161,
unsigned int wParam=20, long lParam=7537328)  Line 2238    C++
     pgAdmin3.exe!wxWindow::MSWWindowProc(unsigned int message=161,
unsigned int wParam=20, long lParam=7537328)  Line 3419 + 0x22
bytes    C++
     pgAdmin3.exe!wxTopLevelWindowMSW::MSWWindowProc(unsigned int
message=161, unsigned int wParam=20, long lParam=7537328)  Line 372 +
0x14 bytes    C++
     pgAdmin3.exe!wxFrame::MSWWindowProc(unsigned int message=161,
unsigned int wParam=20, long lParam=7537328)  Line 1101 + 0x14
bytes    C++
     pgAdmin3.exe!wxWndProc(HWND__ * hWnd=0x0009067a, unsigned int
message=161, unsigned int wParam=20, long lParam=7537328)  Line 2613 +
0x1c bytes    C++
     user32.dll!7e418734()
     user32.dll!7e418816()
     user32.dll!7e4189cd()
     pgAdmin3.exe!wxFindWinFromHandle(void * hWnd=0x0012fccc)  Line 3434    C++
     user32.dll!7e418a10()
     pgAdmin3.exe!wxEventLoop::ProcessMessage(tagMSG * msg=0x0012fccc)  Line 80    C++
     pgAdmin3.exe!wxEventLoop::Dispatch()  Line 294    C++
     pgAdmin3.exe!wxEventLoopManual::Run()  Line 115 + 0xd bytes    C++
     pgAdmin3.exe!wxAppBase::MainLoop()  Line 312 + 0x15 bytes    C++
     pgAdmin3.exe!wxAppBase::OnRun()  Line 368    C++
     pgAdmin3.exe!wxEntryReal(int & argc=1, wchar_t * * argv=0x01e9c610)
Line 460 + 0x1b bytes    C++
     pgAdmin3.exe!wxEntry(int & argc=1, wchar_t * * argv=0x01e9c610)
Line 209 + 0xd bytes    C++
     pgAdmin3.exe!wxEntry(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__
* __formal=0x00000000, HINSTANCE__ * __formal=0x00000000, int
nCmdShow=1)  Line 386 + 0xd bytes    C++
     pgAdmin3.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__
* hPrevInstance=0x00000000, char * lpCmdLine=0x00151f1c, int
nCmdShow=1)  Line 115 + 0x1e bytes    C++
     pgAdmin3.exe!__tmainCRTStartup()  Line 589 + 0x35 bytes    C
     pgAdmin3.exe!WinMainCRTStartup()  Line 414    C
     kernel32.dll!7c817077()


--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
PG East Conference: http://www.enterprisedb.com/community/nav-pg-east-2010.do