Обсуждение: pgadmin 1.6.3 - segmentation fault

Поиск
Список
Период
Сортировка

pgadmin 1.6.3 - segmentation fault

От
Marcin Zajączkowski
Дата:
Hi,


Sometimes (but rarer that 1.4) my pgadmin catches segmentation fault
when I want to close "edit grid" window. Last time I ran it from gdb
(stack trace below).
It's pgadmin 1.6.3 (rev. 6115) recompiled from SRPM for FC7 (with also
recompiled wxWidgets 2.8.3). I have Fedora Core 6.

Stack trace doesn't contain debug data, so if needed I can install
debuginfo package and hunt again.


Regards
Marcin


<STACK_TRACE>
(gdb) bt
#0  0x003826e6 in wxWindowBase::CaptureMouse ()   from /usr/lib/libwx_gtk2u_core-2.8.so.0
#1  0x02143cb9 in wxGrid::ChangeCursorMode ()   from /usr/lib/libwx_gtk2u_adv-2.8.so.0
#2  0x02165549 in wxGrid::ProcessGridCellMouseEvent ()   from /usr/lib/libwx_gtk2u_adv-2.8.so.0
#3  0x02165656 in wxGridWindow::OnMouseEvent ()   from /usr/lib/libwx_gtk2u_adv-2.8.so.0
#4  0x05358045 in wxAppConsole::HandleEvent ()   from /usr/lib/libwx_baseu-2.8.so.0
#5  0x0540076f in wxEvtHandler::ProcessEventIfMatches ()   from /usr/lib/libwx_baseu-2.8.so.0
#6  0x054008bd in wxEventHashTable::HandleEvent ()   from /usr/lib/libwx_baseu-2.8.so.0
#7  0x05400a26 in wxEvtHandler::ProcessEvent ()   from /usr/lib/libwx_baseu-2.8.so.0
#8  0x002653eb in wxWindow::GTKProcessEvent ()   from /usr/lib/libwx_gtk2u_core-2.8.so.0
#9  0x0026ae26 in wxWindow::~wxWindow$base ()   from /usr/lib/libwx_gtk2u_core-2.8.so.0
#10 0x07b5c730 in gtk_marshal_BOOLEAN__VOID ()   from /usr/lib/libgtk-x11-2.0.so.0
#11 0x005dad9b in g_closure_invoke () from /lib/libgobject-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#12 0x005eb433 in g_signal_chain_from_overridden ()   from /lib/libgobject-2.0.so.0
#13 0x005ec71f in g_signal_emit_valist () from /lib/libgobject-2.0.so.0
#14 0x005ecb19 in g_signal_emit () from /lib/libgobject-2.0.so.0
#15 0x07c713f8 in gtk_widget_get_default_style ()   from /usr/lib/libgtk-x11-2.0.so.0
#16 0x07b55af3 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#17 0x07b56cf7 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#18 0x00abc46a in gdk_add_client_message_filter ()   from /usr/lib/libgdk-x11-2.0.so.0
#19 0x00680442 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#20 0x0068341f in g_main_context_check () from /lib/libglib-2.0.so.0
#21 0x006837c9 in g_main_loop_run () from /lib/libglib-2.0.so.0
#22 0x07b57174 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#23 0x00254a0c in wxEventLoop::Run () from
/usr/lib/libwx_gtk2u_core-2.8.so.0
#24 0x002f1f7c in wxAppBase::MainLoop ()   from /usr/lib/libwx_gtk2u_core-2.8.so.0
#25 0x002f1591 in wxAppBase::OnRun () from
/usr/lib/libwx_gtk2u_core-2.8.so.0
#26 0x0539535a in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
#27 0x05395417 in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
#28 0x0806d910 in main ()
#29 0x007a9f2c in __libc_start_main () from /lib/libc.so.6
#30 0x0806d6d1 in _start ()
</STACK_TRACE>




Re: pgadmin 1.6.3 - segmentation fault

От
Dave Page
Дата:
Marcin Zajączkowski wrote:
> Hi,
> 
> 
> Sometimes (but rarer that 1.4) my pgadmin catches segmentation fault
> when I want to close "edit grid" window. Last time I ran it from gdb
> (stack trace below).
> It's pgadmin 1.6.3 (rev. 6115) recompiled from SRPM for FC7 (with also
> recompiled wxWidgets 2.8.3). I have Fedora Core 6.

Can you reproduce this in a recent snapshot?

Regards, Dave


Re: pgadmin 1.6.3 - segmentation fault

От
Marcin Zajączkowski
Дата:
On 2007-06-19 09:25, Dave Page wrote:
> Marcin Zajączkowski wrote:
>> Sometimes (but rarer that 1.4) my pgadmin catches segmentation fault
>> when I want to close "edit grid" window. Last time I ran it from gdb
>> (stack trace below).
>> It's pgadmin 1.6.3 (rev. 6115) recompiled from SRPM for FC7 (with also
>> recompiled wxWidgets 2.8.3). I have Fedora Core 6.
> 
> Can you reproduce this in a recent snapshot?

I have a problem with its (and 20070618 as well) compilation (installation):
 /home/marcinz/rpmbuild/BUILD/pgadmin3-1.7.0/config/install-sh -c -m 
644 './docs/zh_TW/hints/vacuum.html' 
'/var/tmp/pgadmin3-1.6.3.20070619-1.fc6-root-marcinz/usr/share/pgadmin3/docs/zh_TW/hints/vacuum.html'
/home/marcinz/rpmbuild/BUILD/pgadmin3-1.7.0/config/install-sh-c -m 
 
644 './docs/zh_TW/hints/view-without-pk.html' 
'/var/tmp/pgadmin3-1.6.3.20070619-1.fc6-root-marcinz/usr/share/pgadmin3/docs/zh_TW/hints/view-without-pk.html'
make[2]: Leaving directory `/home/marcinz/rpmbuild/BUILD/pgadmin3-1.7.0'
make[1]: Leaving directory `/home/marcinz/rpmbuild/BUILD/pgadmin3-1.7.0'
+ cp -f ./src/include/images/elephant48.xpm 
/var/tmp/pgadmin3-1.6.3.20070619-1.fc6-root-marcinz//usr/share/pgadmin3/pgadmin3.xpm
cp: cannot stat `./src/include/images/elephant48.xpm': No such file or 
directory

Were there some changes with graphic files?


Regards
Marcin



Re: pgadmin 1.6.3 - segmentation fault

От
Dave Page
Дата:
Marcin Zajączkowski wrote:
> cp: cannot stat `./src/include/images/elephant48.xpm': No such file or 
> directory
> 
> Were there some changes with graphic files?

Yeah, in fact the entire src/ tree moved to pgadmin/.

In the spec file, change the line:

cp -f ./src/include/images/elephant48.xpm 
%{buildroot}/%{_datadir}/%{name}/%{name}.xpm

to

cp -f ./pgadmin/include/images/elephant48.xpm 
%{buildroot}/%{_datadir}/%{name}/%{name}.xpm

And that should fix it. I've made the change in SVN already.

Regards, Dave.


Re: pgadmin 1.6.3 - segmentation fault

От
Marcin Zajączkowski
Дата:
On 2007-06-19 10:29, Dave Page wrote:
(...)
> cp -f ./pgadmin/include/images/elephant48.xpm 
> %{buildroot}/%{_datadir}/%{name}/%{name}.xpm
> 
> And that should fix it. I've made the change in SVN already.

And it did it. In fact firstly I thought it was problem with your 
makefile not with spec.

I already work on a snapshot and I'll let you know if a crash happens 
(but it can take some time, it's not 1.4.x ;) ).


Regards
Marcin



Re: pgadmin 1.6.3 - segmentation fault

От
Marcin Zajączkowski
Дата:
On 2007-06-19 15:27, Marcin Zajączkowski wrote:
(...)
> I already work on a snapshot and I'll let you know if a crash happens 
> (but it can take some time, it's not 1.4.x ;) ).

I didn't get segmentation fault, but have something like that in gdb:

(...)
[New Thread -1231369328 (LWP 6763)]
[Thread -1231369328 (LWP 6763) exited]
[New Thread -1241859184 (LWP 6768)]
[Thread -1241859184 (LWP 6768) exited]
[New Thread -1252349040 (LWP 6775)]
[Thread -1252349040 (LWP 6775) exited]
Couldn't get registers: No such process.


I can't get stack trace and I'm not sure what is it caused by.


Marcin



Re: pgadmin 1.6.3 - segmentation fault

От
Dave Page
Дата:
Marcin Zajączkowski wrote:
> On 2007-06-19 15:27, Marcin Zajączkowski wrote:
> (...)
>> I already work on a snapshot and I'll let you know if a crash happens
>> (but it can take some time, it's not 1.4.x ;) ).
> 
> I didn't get segmentation fault, but have something like that in gdb:
> 
> (...)
> [New Thread -1231369328 (LWP 6763)]
> [Thread -1231369328 (LWP 6763) exited]
> [New Thread -1241859184 (LWP 6768)]
> [Thread -1241859184 (LWP 6768) exited]
> [New Thread -1252349040 (LWP 6775)]
> [Thread -1252349040 (LWP 6775) exited]
> Couldn't get registers: No such process.

Did the entire app exit at that point? Just seeing threads exit isn't a
problem in itself.

> 
> I can't get stack trace and I'm not sure what is it caused by.

I assume you're running a debug build? What were you doing when this
happened?

Regards, Dave


Re: pgadmin 1.6.3 - segmentation fault

От
Marcin Zajączkowski
Дата:
On 2007-06-27 09:38, Dave Page wrote:
> Marcin Zajączkowski wrote:
>> On 2007-06-19 15:27, Marcin Zajączkowski wrote:
>> (...)
>>> I already work on a snapshot and I'll let you know if a crash happens
>>> (but it can take some time, it's not 1.4.x ;) ).
>> I didn't get segmentation fault, but have something like that in gdb:
>>
>> (...)
>> [New Thread -1231369328 (LWP 6763)]
>> [Thread -1231369328 (LWP 6763) exited]
>> [New Thread -1241859184 (LWP 6768)]
>> [Thread -1241859184 (LWP 6768) exited]
>> [New Thread -1252349040 (LWP 6775)]
>> [Thread -1252349040 (LWP 6775) exited]
>> Couldn't get registers: No such process.
> 
> Did the entire app exit at that point? Just seeing threads exit isn't a
> problem in itself.

No, it hangs. gdb also freezes at "quit" and I have to kill pgadmin 
externally.

Note that it's probably not related with segmentation fault mentioned in 
the first mail of this thread.


>> I can't get stack trace and I'm not sure what is it caused by.
> 
> I assume you're running a debug build? What were you doing when this
> happened?

I have installed debuginfo packages for pgadmin, but I'm not sure is it 
enough. The problem is that I can't use any gdb command (like bt), 
because it responses with "Couldn't get registers: No such process." 
(even without debug info there is a generic stack trace).

It usually happens when I try to connect to some database.


Regards
Marcin



Re: pgadmin 1.6.3 - segmentation fault

От
Dave Page
Дата:
Marcin Zajączkowski wrote:
> I have installed debuginfo packages for pgadmin, but I'm not sure is it
> enough. The problem is that I can't use any gdb command (like bt),
> because it responses with "Couldn't get registers: No such process."
> (even without debug info there is a generic stack trace).
> 
> It usually happens when I try to connect to some database.

Are you starting pgAdmin from within gdb, or attaching to the hung
process? If the latter, please try the former.

Regards, Dave


Re: pgadmin 1.6.3 - segmentation fault

От
Marcin Zajączkowski
Дата:
On 2007-06-27 10:04, Dave Page wrote:
> Marcin Zajączkowski wrote:
>> I have installed debuginfo packages for pgadmin, but I'm not sure is it
>> enough. The problem is that I can't use any gdb command (like bt),
>> because it responses with "Couldn't get registers: No such process."
>> (even without debug info there is a generic stack trace).
>>
>> It usually happens when I try to connect to some database.
> 
> Are you starting pgAdmin from within gdb, or attaching to the hung
> process? If the latter, please try the former.

I already start it with "gdb pgadmin3".

On the page: http://www.h7.dion.ne.jp/~qemu-win/DebuggingTips-en.html is 
written that that could be a bug of gdb 6, but I wasn't able to confirm 
that.


Marcin



Re: pgadmin 1.6.3 - segmentation fault

От
Dave Page
Дата:
Marcin Zajączkowski wrote:
> On 2007-06-27 10:04, Dave Page wrote:
>> Marcin Zajączkowski wrote:
>>> I have installed debuginfo packages for pgadmin, but I'm not sure is it
>>> enough. The problem is that I can't use any gdb command (like bt),
>>> because it responses with "Couldn't get registers: No such process."
>>> (even without debug info there is a generic stack trace).
>>>
>>> It usually happens when I try to connect to some database.
>>
>> Are you starting pgAdmin from within gdb, or attaching to the hung
>> process? If the latter, please try the former.
> 
> I already start it with "gdb pgadmin3".
> 
> On the page: http://www.h7.dion.ne.jp/~qemu-win/DebuggingTips-en.html is
> written that that could be a bug of gdb 6, but I wasn't able to confirm
> that.

Hmm, in that case I don't know. This certainly isn't a common problem
otherwise we'd have seen it before (the database connection code has
been largely unchanged for years as well).

What platform was this again?

Regards, Dave


Re: pgadmin 1.6.3 - segmentation fault

От
Marcin Zajączkowski
Дата:
On 2007-06-27 10:50, Dave Page wrote:
> Marcin Zajączkowski wrote:
>> On 2007-06-27 10:04, Dave Page wrote:
>>> Marcin Zajączkowski wrote:
>>>> I have installed debuginfo packages for pgadmin, but I'm not sure is it
>>>> enough. The problem is that I can't use any gdb command (like bt),
>>>> because it responses with "Couldn't get registers: No such process."
>>>> (even without debug info there is a generic stack trace).
>>>>
>>>> It usually happens when I try to connect to some database.
>>> Are you starting pgAdmin from within gdb, or attaching to the hung
>>> process? If the latter, please try the former.
>> I already start it with "gdb pgadmin3".
>>
>> On the page: http://www.h7.dion.ne.jp/~qemu-win/DebuggingTips-en.html is
>> written that that could be a bug of gdb 6, but I wasn't able to confirm
>> that.
> 
> Hmm, in that case I don't know. This certainly isn't a common problem
> otherwise we'd have seen it before (the database connection code has
> been largely unchanged for years as well).

It looks like a problem with gdb which doesn't allow to fallow tracking 
application after some operation in pgadmin.
I'll try to reproduce that without gdb to see what will happen with an 
application (hang, segment, something else).


> What platform was this again?

Fedora Core 6, i386, wxGTK-2.8.3 (self compiled)


Regards
Marcin



Re: pgadmin 1.6.3 - segmentation fault

От
Marcin Zajączkowski
Дата:
On 2007-06-27 11:22, Marcin Zajączkowski wrote:
(...)
> It looks like a problem with gdb which doesn't allow to fallow tracking 
> application after some operation in pgadmin.
> I'll try to reproduce that without gdb to see what will happen with an 
> application (hang, segment, something else).

Mentioned snapshot (2007-07-19) works stable. I didn't have any 
segmentation fault for 3 weeks. Thanks Dave.


Regards
Marcin



Re: pgadmin 1.6.3 - segmentation fault

От
Marcin Zajączkowski
Дата:
On 2007-07-10 10:59, Marcin Zajączkowski wrote:
> On 2007-06-27 11:22, Marcin Zajączkowski wrote:
> (...)
>> It looks like a problem with gdb which doesn't allow to fallow 
>> tracking application after some operation in pgadmin.
>> I'll try to reproduce that without gdb to see what will happen with an 
>> application (hang, segment, something else).
> 
> Mentioned snapshot (2007-07-19) works stable. I didn't have any 
> segmentation fault for 3 weeks. Thanks Dave.

Of course 2007-06-19. A snapshot from 2007-07-19 probably doesn't not 
exist yet ;)


Marcin



Re: pgadmin 1.6.3 - segmentation fault

От
Dave Page
Дата:
Marcin Zajączkowski wrote:
> On 2007-07-10 10:59, Marcin Zajączkowski wrote:
>> On 2007-06-27 11:22, Marcin Zajączkowski wrote:
>> (...)
>>> It looks like a problem with gdb which doesn't allow to fallow
>>> tracking application after some operation in pgadmin.
>>> I'll try to reproduce that without gdb to see what will happen with
>>> an application (hang, segment, something else).
>>
>> Mentioned snapshot (2007-07-19) works stable. I didn't have any
>> segmentation fault for 3 weeks. Thanks Dave.
> 
> Of course 2007-06-19. A snapshot from 2007-07-19 probably doesn't not
> exist yet ;)

Probably not :-)

Thanks for the feedback though.

Regards, Dave