Thread: bug report

bug report

From
Krzysztof Kajkowski
Date:
Hi!

Thanks for making one of the most usable program for PostgreSQL!

I think I've found a bug. Steps to reproduce:

- open program and a connection to remote postgres db (via ssh tunnel
for example)
- click on desired table
- click on SQL console
- in the opened console delete "--" sign before DROP statement. SQL will
look like this (for example):

DROP TABLE public.artykuly;

CREATE TABLE public.artykuly
(
  numer int8,
  autor text,
  podtytul text,
  tytul text
) WITHOUT OIDS;
REVOKE ALL ON TABLE public.artykuly FROM public;
GRANT ALL ON TABLE public.artykuly TO postgres;
GRANT ALL ON TABLE public.artykuly TO cayco;

- run the statement
- if you close the SQL window the program will immediately terminate (in
90% of cases) and throw a memory protection fault.

I attached a valgrind log from the program crash. I don't know what
could be more helpful - feel free to ask me!

cheers

P.S.
11:27 (cayco@laptop)~$ apt-cache show pgadmin3
Package: pgadmin3
Priority: optional
Section: misc
Installed-Size: 10440
Maintainer: Raphael Enrici <blacknoz@club-internet.fr>
Architecture: i386
Version: 1.0.2-4

Debian Sid.

--
Krzysztof Kajkowski    GG: 176706     jabber: cayco@chrome.pl
Gazeta Studencka    http://www.studencka.pl/
Registered Linux user:    237605
IT professional. Linux. Administration. Programming.

Attachment

Re: bug report

From
Andreas Pflug
Date:
Krzysztof Kajkowski wrote:

>Hi!
>
>Thanks for making one of the most usable program for PostgreSQL!
>
>I think I've found a bug. Steps to reproduce:
>
>- open program and a connection to remote postgres db (via ssh tunnel
>for example)
>- click on desired table
>- click on SQL console
>- in the opened console delete "--" sign before DROP statement. SQL will
>look like this (for example):
>
>  
>
This is probably a problem (refresh of dropped object) we fixed in 
January for CVS head, and which will be included in 1.0.3.

Regards,
Andreas




Re: bug report

From
blacknoz@club-internet.fr
Date:
----Message d'origine----
>Date: Tue, 11 May 2004 23:09:28 +0200
>De: Andreas Pflug <pgadmin@pse-consulting.de>
>A: Krzysztof Kajkowski <cayco@studencka.pl>
>Copie à: pgadmin-support@postgresql.org
>Sujet: Re: [pgadmin-support] bug report
>
>Krzysztof Kajkowski wrote:
>
>>Hi!
>>
>>Thanks for making one of the most usable program for PostgreSQL!
>>
>>I think I've found a bug. Steps to reproduce:
>>
>>- open program and a connection to remote postgres db (via ssh tunnel
>>for example)
>>- click on desired table
>>- click on SQL console
>>- in the opened console delete "--" sign before DROP statement. SQL will
>>look like this (for example):
>>
>This is probably a problem (refresh of dropped object) we fixed in
>January for CVS head, and which will be included in 1.0.3.

Hi Andreas, Krzysztof,

as Krzysztof is using debian unstable and unless he is not using the latest provided version, this problem should be
fixed.

I included the fix for dropped object for Debian's pgAdmin III since 1.0.2-2.
Here is the changelog entry which summarize what was done:
" Patched src/ui/frmMain.cpp with CVS version 1.70.2.1 to fix segfault when   refreshing dropped object (patch from
AndreasPflug) (closes: #240828)" 

Krzysztof, you just did an "apt-cache show" which does not prove you are using the latest package, can you verify this
withthe following command please: 
dpkg -l pgadmin3

If you are using 1.0.2-2 or > than it's another problem... Maybe I missed something with this patch.

Regards,
Raphaël



Re: bug report

From
blacknoz@club-internet.fr
Date:
----Message d'origine----
>Sujet: Re: Re: [pgadmin-support] bug report
>De: Krzysztof Kajkowski <cayco@studencka.pl>
>A: blacknoz@club-internet.fr
>Date: Wed, 12 May 2004 10:07:44 +0200
>
>W li¶cie z ¶ro, 12-05-2004, godz. 11:23, blacknoz@club-internet.fr
>pisze:
>
>Hello!
>
>My dpkg -l admin3 returns:
>
>||/ Nazwa                         Wersja                        Opis

>+++-=============================-=============================-==========================================================================
>ii  pgadmin3                      1.0.2-4
>Graphical administration tool for PostgreSQL
>
>
>so the problem still exists.


So, it seems that it still occurs... I'll try to reproduce this tonight.
Maybe a backtrace of the process would help.
If you have some time, launch pgadmin3 in gdb like this:
gdb pgadmin3
then type "run"
Reproduce the crash and when it segfault, type "bt" in the gdb window and send the output.

As I have a new version to upload for this particular package, I'll recheck twice that I didn't backout the patch since
1.0.2-2.

Regards,
Raphaël
P.S. Please, always CC to the list, you will get a more efficient help ;)



Re: bug report

From
Krzysztof Kajkowski
Date:
W liście z śro, 12-05-2004, godz. 12:17, blacknoz@club-internet.fr
pisze: 

> So, it seems that it still occurs... I'll try to reproduce this tonight.
> Maybe a backtrace of the process would help.
> If you have some time, launch pgadmin3 in gdb like this:
> gdb pgadmin3
> then type "run"
> Reproduce the crash and when it segfault, type "bt" in the gdb window and send the output.

Here it goes:

#0  0x08501420 in wxWindowBase::GetId ()
#1  0x08448b24 in gtk_window_event_event_callback ()
#2  0x4024c864 in _gtk_marshal_BOOLEAN__BOXED () from
/usr/lib/libgtk-x11-2.0.so.0
#3  0x404cea92 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#4  0x404deda6 in g_signal_emit_by_name () from
/usr/lib/libgobject-2.0.so.0
#5  0x404ddca3 in g_signal_emit_valist () from
/usr/lib/libgobject-2.0.so.0
#6  0x404de0d6 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#7  0x4032e8f7 in gtk_widget_send_expose () from
/usr/lib/libgtk-x11-2.0.so.0
#8  0x4033c037 in _gtk_window_query_nonaccels () from
/usr/lib/libgtk-x11-2.0.so.0
#9  0x4033c4c4 in _gtk_window_query_nonaccels () from
/usr/lib/libgtk-x11-2.0.so.0
#10 0x404dfd0b in g_cclosure_marshal_VOID__OBJECT () from
/usr/lib/libgobject-2.0.so.0
#11 0x404ced44 in g_cclosure_new_swap () from
/usr/lib/libgobject-2.0.so.0
#12 0x404cea92 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#13 0x404de895 in g_signal_emit_by_name () from
/usr/lib/libgobject-2.0.so.0
#14 0x404ddec2 in g_signal_emit_valist () from
/usr/lib/libgobject-2.0.so.0
#15 0x404de0d6 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#16 0x40337404 in _gtk_window_internal_set_focus () from
/usr/lib/libgtk-x11-2.0.so.0
#17 0x4032f419 in gtk_widget_grab_focus () from
/usr/lib/libgtk-x11-2.0.so.0
#18 0x404df212 in g_cclosure_marshal_VOID__VOID () from
/usr/lib/libgobject-2.0.so.0
#19 0x404ced44 in g_cclosure_new_swap () from
/usr/lib/libgobject-2.0.so.0
#20 0x404cea92 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#21 0x404de895 in g_signal_emit_by_name () from
/usr/lib/libgobject-2.0.so.0
#22 0x404ddec2 in g_signal_emit_valist () from
/usr/lib/libgobject-2.0.so.0
#23 0x404de0d6 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#24 0x4032f276 in gtk_widget_grab_focus () from
/usr/lib/libgtk-x11-2.0.so.0
#25 0x401ef948 in _gtk_container_child_composite_name () from
/usr/lib/libgtk-x11-2.0.so.0
#26 0x4024ca74 in _gtk_marshal_BOOLEAN__ENUM () from
/usr/lib/libgtk-x11-2.0.so.0
#27 0x404ced44 in g_cclosure_new_swap () from
/usr/lib/libgobject-2.0.so.0
#28 0x404cea92 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#29 0x404de895 in g_signal_emit_by_name () from
/usr/lib/libgobject-2.0.so.0
#30 0x404ddca3 in g_signal_emit_valist () from
/usr/lib/libgobject-2.0.so.0
#31 0x404de0d6 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#32 0x40331e9a in gtk_widget_child_focus () from
/usr/lib/libgtk-x11-2.0.so.0
#33 0x40288c6f in gtk_scrolled_window_get_shadow_type () from
/usr/lib/libgtk-x11-2.0.so.0
#34 0x4024ca74 in _gtk_marshal_BOOLEAN__ENUM () from
/usr/lib/libgtk-x11-2.0.so.0
#35 0x404ced44 in g_cclosure_new_swap () from
/usr/lib/libgobject-2.0.so.0
#36 0x404cea92 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#37 0x404de895 in g_signal_emit_by_name () from
/usr/lib/libgobject-2.0.so.0
#38 0x404ddca3 in g_signal_emit_valist () from
/usr/lib/libgobject-2.0.so.0
#39 0x404de0d6 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#40 0x40331e9a in gtk_widget_child_focus () from
/usr/lib/libgtk-x11-2.0.so.0
#41 0x40263ee6 in gtk_notebook_new () from /usr/lib/libgtk-x11-2.0.so.0
#42 0x4024f185 in _gtk_marshal_VOID__POINTER_UINT () from
/usr/lib/libgtk-x11-2.0.so.0
#43 0x404ced44 in g_cclosure_new_swap () from
/usr/lib/libgobject-2.0.so.0
#44 0x404cea92 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#45 0x404de895 in g_signal_emit_by_name () from
/usr/lib/libgobject-2.0.so.0
#46 0x404ddec2 in g_signal_emit_valist () from
/usr/lib/libgobject-2.0.so.0
#47 0x404de0d6 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#48 0x4026403d in gtk_notebook_new () from /usr/lib/libgtk-x11-2.0.so.0
#49 0x40261f89 in gtk_notebook_new () from /usr/lib/libgtk-x11-2.0.so.0
#50 0x4026563c in gtk_notebook_remove_page () from
/usr/lib/libgtk-x11-2.0.so.0
#51 0x08497211 in wxNotebook::DoRemovePage ()
#52 0x084adf50 in wxBookCtrl::DeletePage ()
#53 0x0849717c in wxNotebook::DeletePage ()
#54 0x084970b2 in wxNotebook::DeleteAllPages ()
#55 0x08496264 in wxNotebook::~wxNotebook ()
#56 0x084fbe0f in wxWindowBase::DestroyChildren ()
#57 0x0844a727 in wxWindow::~wxWindow ()
#58 0x0851b012 in wxSplitterWindow::~wxSplitterWindow ()
#59 0x084fbe0f in wxWindowBase::DestroyChildren ()
#60 0x0844a727 in wxWindow::~wxWindow ()
#61 0x084f7727 in wxTopLevelWindowBase::~wxTopLevelWindowBase ()
#62 0x08441f34 in wxTopLevelWindowGTK::~wxTopLevelWindowGTK ()
#63 0x084b9f0a in wxTopLevelWindow::~wxTopLevelWindow ()
#64 0x084c218a in wxFrameBase::~wxFrameBase ()
#65 0x08489357 in wxFrame::~wxFrame ()
#66 0x0825c9d9 in frmQuery::~frmQuery ()
#67 0x084ab6f1 in wxAppBase::DeletePendingObjects ()
#68 0x084ab92a in wxAppBase::OnIdle ()
#69 0x08556eb2 in wxAppConsole::HandleEvent ()
#70 0x085ceba1 in wxEvtHandler::ProcessEventIfMatches ()
#71 0x085cdd58 in wxEventHashTable::HandleEvent ()
#72 0x085ced8e in wxEvtHandler::ProcessEvent ()
#73 0x084ab7cf in wxAppBase::ProcessIdle ()
#74 0x08423be8 in wxApp::WakeUpIdle ()
#75 0x405259c1 in g_timeout_add () from /usr/lib/libglib-2.0.so.0
#76 0x40523086 in unblock_source () from /usr/lib/libglib-2.0.so.0
#77 0x40524029 in g_main_context_dispatch () from
/usr/lib/libglib-2.0.so.0
#78 0x40524347 in g_main_context_dispatch () from
/usr/lib/libglib-2.0.so.0
#79 0x405249b0 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#80 0x4024abaf in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#81 0x089423e8 in ?? ()
#82 0x40876170 in timezone () from /lib/tls/libc.so.6
#83 0xbffff9a0 in ?? ()
#84 0xbffff8b8 in ?? ()
#85 0x089423e8 in ?? ()
#86 0x00000000 in ?? ()
#87 0x40874e9c in ?? () from /lib/tls/libc.so.6
#88 0x40876170 in timezone () from /lib/tls/libc.so.6
#89 0xbffff9a0 in ?? ()
#90 0xbffff8b8 in ?? ()
#91 0x085301ce in wxEventLoop::Run ()
Previous frame inner to this frame (corrupt stack?)


> 
> As I have a new version to upload for this particular package, I'll recheck twice that I didn't backout the patch
since1.0.2-2.
 
> 
> Regards,
> Raphaël
> P.S. Please, always CC to the list, you will get a more efficient help ;)

sory, wrong button :-)

-- 
Krzysztof Kajkowski    GG: 176706     jabber: cayco@chrome.pl
Gazeta Studencka    http://www.studencka.pl/
Registered Linux user:    237605 
IT professional. Linux. Administration. Programming.



Re: bug report

From
Raphaël Enrici
Date:
Krzysztof Kajkowski wrote:

>W liście z śro, 12-05-2004, godz. 12:17, blacknoz@club-internet.fr
>pisze: 
>
>  
>
>>So, it seems that it still occurs... I'll try to reproduce this tonight.
>>Maybe a backtrace of the process would help.
>>If you have some time, launch pgadmin3 in gdb like this:
>>gdb pgadmin3
>>then type "run"
>>Reproduce the crash and when it segfault, type "bt" in the gdb window and send the output.
>>    
>>
>
>Here it goes:
>
>#0  0x08501420 in wxWindowBase::GetId ()
>#1  0x08448b24 in gtk_window_event_event_callback ()
>#2  0x4024c864 in _gtk_marshal_B
>  
>
...
to me it's another bug... It's the one related to this:
open the sql window, modify it, don't launch and just quit it.
pgA3 will ask if you want to save or not, if you click on "no" it crashes.
The segfault is not due to any kind of dropped object.
Can you confirm this ?
Andreas, what is the status of this one ? I can't remember... When it 
was on the top of the stack, I tried looking at it and it seems pgA3 did 
not crashed while traced... It make me thought some object was 
unproperly destroyed too fast which effectively made the "GetId" fail...

>>P.S. Please, always CC to the list, you will get a more efficient help ;)
>>    
>>
>sory, wrong button :-)
>  
>
No problem with it... That's just for you and may be others suffering 
from the same issue ;)

Regards,
Raphaël


Re: bug report

From
Andreas Pflug
Date:
blacknoz@club-internet.fr wrote:

>
>I included the fix for dropped object for Debian's pgAdmin III since 1.0.2-2.
>
>
>  
>
Hi Raphaël,

what is 1.0.2-2? While we might need to release maintenance versions 
much more often, we should try to have a consistent versioning over 
platforms, including fix tracking in changelog.txt. Maybe we shoul 
release a 1.0.3 very soon now.

Regards,
Andreas




Re: bug report

From
Andreas Pflug
Date:
Raphaël Enrici wrote:

> Krzysztof Kajkowski wrote:
>
>> W liście z śro, 12-05-2004, godz. 12:17, blacknoz@club-internet.fr
>> pisze:
>>  
>>
>>> So, it seems that it still occurs... I'll try to reproduce this 
>>> tonight.
>>> Maybe a backtrace of the process would help.
>>> If you have some time, launch pgadmin3 in gdb like this:
>>> gdb pgadmin3
>>> then type "run"
>>> Reproduce the crash and when it segfault, type "bt" in the gdb 
>>> window and send the output.
>>>   
>>
>>
>> Here it goes:
>>
>> #0  0x08501420 in wxWindowBase::GetId ()
>> #1  0x08448b24 in gtk_window_event_event_callback ()
>> #2  0x4024c864 in _gtk_marshal_B
>>  
>>
> ...
> to me it's another bug... It's the one related to this:
> open the sql window, modify it, don't launch and just quit it.
> pgA3 will ask if you want to save or not, if you click on "no" it 
> crashes.
> The segfault is not due to any kind of dropped object.
> Can you confirm this ?
> Andreas, what is the status of this one ? I can't remember... 

That mentioned problem was about objects deleted outside of the object 
tree (e.g. from query window or other workstation), so that the object 
wasn't valid any more when refresh is triggered.

> When it was on the top of the stack, I tried looking at it and it 
> seems pgA3 did not crashed while traced... It make me thought some 
> object was unproperly destroyed too fast which effectively made the 
> "GetId" fail...

AFAICS from a quick glance at wx source the segv happens after the page 
contents is destroyed, however this must be debugged.

Regards,
Andreas




Re: bug report

From
blacknoz@club-internet.fr
Date:
Hi Andreas,

----Message d'origine----
>Date: Wed, 12 May 2004 22:05:39 +0200
>De: Andreas Pflug <pgadmin@pse-consulting.de>
>A: blacknoz@club-internet.fr, Dave Page <dpage@vale-housing.co.uk>
>Copie à: pgadmin-support@postgresql.org
>Sujet: Re: [pgadmin-support] bug report
>
>what is 1.0.2-2? While we might need to release maintenance versions
>much more often, we should try to have a consistent versioning over
>platforms, including fix tracking in changelog.txt. Maybe we shoul
>release a 1.0.3 very soon now.

1.0.2-2 is the release 2 of the Official Debian package. May be I should have insist a little more on what I do in
Debianpackage: 
the first release (1.0.2-1) was the official 1.0.2 pgAdmin III with the fix for "Mule internal encoded DB" and the fix
forthe help system and some stuff in the install stage to be compliant with the Debian FHS. 

1.0.2-2 was released to close a bug which was opened at debian.org concerning the crash. I simply included the patch
mentioned.

etc...
I'm about to upload 1.0.2-5 which corrects stuff specific to Debian copyright concerns and also includes the fix from
Hiroshito correct SQL highlights. 

Concerning the fact that we should try to keep a sync versioning, I fully agree with this as I *do* understand that you
can'tbe aware of everything I do in Debian and that it can complexify bug tracking for you and other developers. 
On the other side, I think that all bugs reported directly to Debian which can be rapidly corrected in the Debian
package(in particular crash bugs) should be corrected. I always took simple patches which were in general backported to
thestable branch by you or Dave and which were candidates for the next stable release so that I don't face a side
effect.

I think we should try to discuss about this with other pgadmin-hackers if you are ok. I don't want to be a new source
forproblems ;) 

Concerning 1.0.3 I'm 150% for it as there are many crash bugs solved since actual 1.0.2.... May be we should review
reasonsfor maintenance release based on bug impact (crash and so on) ? 

Regards,
Raphael