Thread: Bug in master when refreshing constraints node (though only when collapsed and with --enable-debug)

I've found an odd bug that is only apparent in --enable-debug builds.
It's not clear that it's a PgAdmin bug. It's rather difficult to get a
useful back trace when the code that exhibits the bug is hidden behind
event loop indirection, and I'm still not very familiar with the
codebase, so I though that this might be a good candidate to isolate
using git bisect. For what it's worth, the backtrace is available from
http://pastebin.com/m4iCqYwH .

PgAdmin crashes when I refresh the "constraints" node in the object
browser that is a child of a table. Note that this only happens when
the node is collapsed.

I've reproduced this on both my laptop and desktop. Both are Fedora
machines with wx 2.8/gtk, so perhaps someone could independently
reproduce this on a somewhat different system.

I did a git checkout to a fairly old revision - from late November
last year. The problem is present way back then, which makes it not
such a good candidate for a git bisect after all.

Does anyone have any idea why I might see this problem?

--
Regards,
Peter Geoghegan

On Mon, Jan 31, 2011 at 9:10 PM, Peter Geoghegan
<peter.geoghegan86@gmail.com> wrote:
> I've found an odd bug that is only apparent in --enable-debug builds.
> It's not clear that it's a PgAdmin bug. It's rather difficult to get a
> useful back trace when the code that exhibits the bug is hidden behind
> event loop indirection, and I'm still not very familiar with the
> codebase, so I though that this might be a good candidate to isolate
> using git bisect. For what it's worth, the backtrace is available from
> http://pastebin.com/m4iCqYwH .
>
> PgAdmin crashes when I refresh the "constraints" node in the object
> browser that is a child of a table. Note that this only happens when
> the node is collapsed.
>
> I've reproduced this on both my laptop and desktop. Both are Fedora
> machines with wx 2.8/gtk, so perhaps someone could independently
> reproduce this on a somewhat different system.
>
> I did a git checkout to a fairly old revision - from late November
> last year. The problem is present way back then, which makes it not
> such a good candidate for a git bisect after all.
>
> Does anyone have any idea why I might see this problem?

A couple of thoughts:

- I committed a fix for a *very* similar issue (the same assertion)
here: http://git.postgresql.org/gitweb?p=pgadmin3.git;a=commitdiff;h=9ec6b29fe3fbd9cc196d5e91b55f3697f02bcad8

- Magnus reported another similar issue when refreshing an *expanded*
"Tables" node: http://archives.postgresql.org/pgadmin-hackers/2011-01/msg00157.php

The same issue perhaps? Can you track it down with the clues in the
earlier fix and the referenced wxWidgets bug?

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

On 31 January 2011 21:22, Dave Page <dpage@pgadmin.org> wrote:
> A couple of thoughts:
>
> - I committed a fix for a *very* similar issue (the same assertion)
> here: http://git.postgresql.org/gitweb?p=pgadmin3.git;a=commitdiff;h=9ec6b29fe3fbd9cc196d5e91b55f3697f02bcad8
>
> - Magnus reported another similar issue when refreshing an *expanded*
> "Tables" node: http://archives.postgresql.org/pgadmin-hackers/2011-01/msg00157.php

Sorry, I meant only when it was expanded, so it's even more similar.
I've checked, and I can reproduce this on "Tables", "Columns",
"Sequences", "Catalogs", "Schemas", "Tablespaces" and perhaps more.

> The same issue perhaps? Can you track it down with the clues in the
> earlier fix and the referenced wxWidgets bug?

I'll try.

I've gone all the way back to last February 3rd, just shy of a year
ago, to see if the problem is present there. I'm afraid that it is. I
then went back to May 11 the year before. Once again, the problem is
there.

I find it very hard to believe that the problem has been around for
that long, and that only myself and Magnus have noticed it in all that
time. Seems more like a wxWidgets or GTK+ bug.

--
Regards,
Peter Geoghegan

Le 31/01/2011 23:43, Peter Geoghegan a écrit :
> On 31 January 2011 21:22, Dave Page <dpage@pgadmin.org> wrote:
>> A couple of thoughts:
>>
>> - I committed a fix for a *very* similar issue (the same assertion)
>> here: http://git.postgresql.org/gitweb?p=pgadmin3.git;a=commitdiff;h=9ec6b29fe3fbd9cc196d5e91b55f3697f02bcad8
>>
>> - Magnus reported another similar issue when refreshing an *expanded*
>> "Tables" node: http://archives.postgresql.org/pgadmin-hackers/2011-01/msg00157.php
>
> Sorry, I meant only when it was expanded, so it's even more similar.
> I've checked, and I can reproduce this on "Tables", "Columns",
> "Sequences", "Catalogs", "Schemas", "Tablespaces" and perhaps more.
>
>> The same issue perhaps? Can you track it down with the clues in the
>> earlier fix and the referenced wxWidgets bug?
>
> I'll try.
>
> I've gone all the way back to last February 3rd, just shy of a year
> ago, to see if the problem is present there. I'm afraid that it is. I
> then went back to May 11 the year before. Once again, the problem is
> there.
>
> I find it very hard to believe that the problem has been around for
> that long, and that only myself and Magnus have noticed it in all that
> time. Seems more like a wxWidgets or GTK+ bug.
>

AFAIK, and provided I'm not wrong on the issue you're talking about,
this is a issue we've always been aware of.

The tree has a big bug in its refresh, and noone has yet been able to
fix it.

If you can give it a go, I'm more than happy about it.


--
Guillaume
 http://www.postgresql.fr
 http://dalibo.com

On 31 January 2011 23:00, Guillaume Lelarge <guillaume@lelarge.info> wrote:
> The tree has a big bug in its refresh, and noone has yet been able to
> fix it.
>
> If you can give it a go, I'm more than happy about it.

Seems like the kind of thing that is likely to require outside
expertise. I'd like to have a go. I'll put it on the backburner.  :-)

--
Regards,
Peter Geoghegan