Segmentation fault with boincmgr 5.10.28

Message boards : BOINC client : Segmentation fault with boincmgr 5.10.28
Message board moderation

To post messages, you must log in.

AuthorMessage
Michael Roberts
Avatar

Send message
Joined: 30 Aug 05
Posts: 5
Germany
Message 15299 - Posted: 8 Feb 2008, 23:51:56 UTC
Last modified: 8 Feb 2008, 23:55:31 UTC

Now that I have Suse 10.3 64-bit running on a nice new machine, I tried again to install BOINC from the current linux release boinc_ubuntu_5.10.28_x86_64-pc-linux-gnu.sh. It works mostly fine, but there is a segmentation error when I close the advanced view:
SIGSEGV: segmentation violation
Stack trace (3 frames):
./boincmgr[0x525b49]
/lib64/libpthread.so.0[0x2b3754ffdfb0]
[0x117e0a0]

Exiting...

[1]- Exit 193 ./run_manager

Checking further with a local build, I find that CAdvancedFrame::UpdateRefreshTimerInterval is called from within the class destructor, and the timer object is referenced after it has been destroyed:
(gdb) bt
#0 0x0000000000429571 in CAdvancedFrame::UpdateRefreshTimerInterval (this=0xfc2040,
iCurrentNotebookPage=0) at AdvancedFrame.cpp:2114
#1 0x0000000000429631 in CAdvancedFrame::OnNotebookSelectionChanged (this=0xfc2040,
event=@0x7fffc132f080) at AdvancedFrame.cpp:2023
#2 0x00000000006faaba in wxEvtHandler::ProcessEventIfMatches ()
#3 0x00000000006fb20c in wxEventHashTable::HandleEvent ()
#4 0x00000000006fb4f4 in wxEvtHandler::ProcessEvent ()
#5 0x000000000061aa46 in wxWindowBase::TryParent ()
#6 0x00000000006fb4ad in wxEvtHandler::ProcessEvent ()
#7 0x000000000061aa46 in wxWindowBase::TryParent ()
#8 0x00000000006fb4ad in wxEvtHandler::ProcessEvent ()
#9 0x00000000005f9307 in wxNotebookBase::SendPageChangedEvent ()
#10 0x00002af9ea86bd2f in g_closure_invoke () from /usr/lib64/libgobject-2.0.so.0
#11 0x00002af9ea87e7c8 in ?? () from /usr/lib64/libgobject-2.0.so.0
#12 0x00002af9ea87fc55 in g_signal_emit_valist () from /usr/lib64/libgobject-2.0.so.0
#13 0x00002af9ea880043 in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
#14 0x00002af9e9afad5c in ?? () from /usr/lib64/libgtk-x11-2.0.so.0
#15 0x00002af9ea86bd2f in g_closure_invoke () from /usr/lib64/libgobject-2.0.so.0
#16 0x00002af9ea87dec3 in ?? () from /usr/lib64/libgobject-2.0.so.0
#17 0x00002af9ea87fc55 in g_signal_emit_valist () from /usr/lib64/libgobject-2.0.so.0
#18 0x00002af9ea880043 in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
#19 0x00000000005c0e9d in wxNotebook::DoRemovePage ()
#20 0x00000000005d08fd in wxBookCtrlBase::DeletePage ()
#21 0x00000000005c0f05 in wxNotebook::DeleteAllPages ()
#22 0x0000000000427cf4 in CAdvancedFrame::DeleteNotebook (this=0xfc2040) at AdvancedFrame.cpp:768
#23 0x0000000000433082 in ~CAdvancedFrame (this=0xfc2040) at AdvancedFrame.cpp:302
#24 0x00000000005cf2f4 in wxAppBase::DeletePendingObjects ()
#25 0x00000000005cf8c6 in wxAppBase::ProcessIdle ()
#26 0x0000000000577cb6 in wxapp_idle_callback ()
#27 0x00002af9eb0e7204 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#28 0x00002af9eb0ea4fd in ?? () from /usr/lib64/libglib-2.0.so.0
#29 0x00002af9eb0ea7f7 in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0
#30 0x00002af9e9adb263 in gtk_main () from /usr/lib64/libgtk-x11-2.0.so.0
#31 0x0000000000637ee0 in wxEventLoop::Run ()
#32 0x00000000005cf734 in wxAppBase::MainLoop ()
#33 0x00000000006b5900 in wxEntry ()
#34 0x0000000000440cf2 in main (argc=1, argv=0xbb6d80) at BOINCGUIApp.cpp:71
(gdb)

I have fixed that locally by setting the corresponding pointers to NULL after the timers are deleted (all three for consistency) and checking the offending pointer for validity before it is used. Here are the changes to clientgui/AdvancedFrame.cpp:

~/software/boinc/boinc_core_release_5_10_28/clientgui> diff AdvancedFrame.cpp.~1~ AdvancedFrame.cpp
285a286
>         m_pRefreshStateTimer = NULL;
290a292
>         m_pFrameRenderTimer = NULL;
295a298
>         m_pFrameListPanelRenderTimer = NULL;
2114c2117
<         if (m_pFrameListPanelRenderTimer->IsRunning()) {
---
>         if (m_pFrameListPanelRenderTimer != NULL && m_pFrameListPanelRenderTimer->IsRunning()) {

The corresponding changes are also relevant for version 5.10.41
ID: 15299 · Report as offensive
Nicolas

Send message
Joined: 19 Jan 07
Posts: 1179
Argentina
Message 15303 - Posted: 9 Feb 2008, 0:54:14 UTC - in response to Message 15299.  

I have fixed that locally by setting the corresponding pointers to NULL after the timers are deleted (all three for consistency) and checking the offending pointer for validity before it is used. Here are the changes to clientgui/AdvancedFrame.cpp:

[snip]

The corresponding changes are also relevant for version 5.10.41

I had trouble applying your patch. The first three applied without indentation, and the fourth line refused to patch at all. Then I found it was because the forum removed spaces! Apparently [code] doesn't keep spaces, [pre] does. But [pre] leaves empty lines in the middle. Great! We have no decent forum tag for posting code...

Anyway, here's the same in unified diff format: http://www.pastebin.ca/896870. It applies over trunk, instead of the 5.10.28 tag.

If you contribute more patches in the future (which are really welcome! BOINC has a developer deficit), please use the unified format. If you used SVN to get the sourcecode, you don't even need to keep a backup, SVN already does that for you. Just go to the top 'boinc' directory, and type 'svn diff'.

ID: 15303 · Report as offensive
Michael Roberts
Avatar

Send message
Joined: 30 Aug 05
Posts: 5
Germany
Message 15306 - Posted: 9 Feb 2008, 1:08:46 UTC - in response to Message 15303.  

I had trouble applying your patch. ...

Anyway, here's the same in unified diff format: http://www.pastebin.ca/896870. It applies over trunk, instead of the 5.10.28 tag.

If you contribute more patches in the future (which are really welcome! BOINC has a developer deficit), please use the unified format. If you used SVN to get the sourcecode, you don't even need to keep a backup, SVN already does that for you. Just go to the top 'boinc' directory, and type 'svn diff'.

Thanks for the quick response. I will look at svn diff and have noted www.pastebin.ca for future use.

Perhaps we need a trac ticket for "pre and code tags need fixing"?
ID: 15306 · Report as offensive
Nicolas

Send message
Joined: 19 Jan 07
Posts: 1179
Argentina
Message 15310 - Posted: 9 Feb 2008, 1:47:21 UTC - in response to Message 15306.  

Perhaps we need a trac ticket for "pre and code tags need fixing"?

I'm not sure if it's a problem on the forum code everywhere, or just something on this forum.
ID: 15310 · Report as offensive
Michael Roberts
Avatar

Send message
Joined: 30 Aug 05
Posts: 5
Germany
Message 15312 - Posted: 9 Feb 2008, 2:19:35 UTC - in response to Message 15310.  

Perhaps we need a trac ticket for "pre and code tags need fixing"?

I'm not sure if it's a problem on the forum code everywhere, or just something on this forum.

I think it's a general problem. I have just posted this text over at einstein@home, and we see the spacing problems you noticed - also the placement of a blank line before the quote/code/pre block is inconsistent.
ID: 15312 · Report as offensive
Rom Walton
Project developer
Avatar

Send message
Joined: 26 Aug 05
Posts: 164
Message 15586 - Posted: 26 Feb 2008, 3:32:39 UTC - in response to Message 15299.  

Now that I have Suse 10.3 64-bit running on a nice new machine, I tried again to install BOINC from the current linux release boinc_ubuntu_5.10.28_x86_64-pc-linux-gnu.sh. It works mostly fine, but there is a segmentation error when I close the advanced view:
SIGSEGV: segmentation violation
Stack trace (3 frames):
./boincmgr[0x525b49]
/lib64/libpthread.so.0[0x2b3754ffdfb0]
[0x117e0a0]

Exiting...

[1]- Exit 193 ./run_manager

Checking further with a local build, I find that CAdvancedFrame::UpdateRefreshTimerInterval is called from within the class destructor, and the timer object is referenced after it has been destroyed:
(gdb) bt
#0 0x0000000000429571 in CAdvancedFrame::UpdateRefreshTimerInterval (this=0xfc2040,
iCurrentNotebookPage=0) at AdvancedFrame.cpp:2114
#1 0x0000000000429631 in CAdvancedFrame::OnNotebookSelectionChanged (this=0xfc2040,
event=@0x7fffc132f080) at AdvancedFrame.cpp:2023
#2 0x00000000006faaba in wxEvtHandler::ProcessEventIfMatches ()
#3 0x00000000006fb20c in wxEventHashTable::HandleEvent ()
#4 0x00000000006fb4f4 in wxEvtHandler::ProcessEvent ()
#5 0x000000000061aa46 in wxWindowBase::TryParent ()
#6 0x00000000006fb4ad in wxEvtHandler::ProcessEvent ()
#7 0x000000000061aa46 in wxWindowBase::TryParent ()
#8 0x00000000006fb4ad in wxEvtHandler::ProcessEvent ()
#9 0x00000000005f9307 in wxNotebookBase::SendPageChangedEvent ()
#10 0x00002af9ea86bd2f in g_closure_invoke () from /usr/lib64/libgobject-2.0.so.0
#11 0x00002af9ea87e7c8 in ?? () from /usr/lib64/libgobject-2.0.so.0
#12 0x00002af9ea87fc55 in g_signal_emit_valist () from /usr/lib64/libgobject-2.0.so.0
#13 0x00002af9ea880043 in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
#14 0x00002af9e9afad5c in ?? () from /usr/lib64/libgtk-x11-2.0.so.0
#15 0x00002af9ea86bd2f in g_closure_invoke () from /usr/lib64/libgobject-2.0.so.0
#16 0x00002af9ea87dec3 in ?? () from /usr/lib64/libgobject-2.0.so.0
#17 0x00002af9ea87fc55 in g_signal_emit_valist () from /usr/lib64/libgobject-2.0.so.0
#18 0x00002af9ea880043 in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
#19 0x00000000005c0e9d in wxNotebook::DoRemovePage ()
#20 0x00000000005d08fd in wxBookCtrlBase::DeletePage ()
#21 0x00000000005c0f05 in wxNotebook::DeleteAllPages ()
#22 0x0000000000427cf4 in CAdvancedFrame::DeleteNotebook (this=0xfc2040) at AdvancedFrame.cpp:768
#23 0x0000000000433082 in ~CAdvancedFrame (this=0xfc2040) at AdvancedFrame.cpp:302
#24 0x00000000005cf2f4 in wxAppBase::DeletePendingObjects ()
#25 0x00000000005cf8c6 in wxAppBase::ProcessIdle ()
#26 0x0000000000577cb6 in wxapp_idle_callback ()
#27 0x00002af9eb0e7204 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#28 0x00002af9eb0ea4fd in ?? () from /usr/lib64/libglib-2.0.so.0
#29 0x00002af9eb0ea7f7 in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0
#30 0x00002af9e9adb263 in gtk_main () from /usr/lib64/libgtk-x11-2.0.so.0
#31 0x0000000000637ee0 in wxEventLoop::Run ()
#32 0x00000000005cf734 in wxAppBase::MainLoop ()
#33 0x00000000006b5900 in wxEntry ()
#34 0x0000000000440cf2 in main (argc=1, argv=0xbb6d80) at BOINCGUIApp.cpp:71
(gdb)

I have fixed that locally by setting the corresponding pointers to NULL after the timers are deleted (all three for consistency) and checking the offending pointer for validity before it is used. Here are the changes to clientgui/AdvancedFrame.cpp:

~/software/boinc/boinc_core_release_5_10_28/clientgui> diff AdvancedFrame.cpp.~1~ AdvancedFrame.cpp
285a286
>         m_pRefreshStateTimer = NULL;
290a292
>         m_pFrameRenderTimer = NULL;
295a298
>         m_pFrameListPanelRenderTimer = NULL;
2114c2117
<         if (m_pFrameListPanelRenderTimer->IsRunning()) {
---
>         if (m_pFrameListPanelRenderTimer != NULL && m_pFrameListPanelRenderTimer->IsRunning()) {

The corresponding changes are also relevant for version 5.10.41


I have commited this patch

----- Rom
BOINC Development Team, U.C. Berkeley
My Blog
ID: 15586 · Report as offensive

Message boards : BOINC client : Segmentation fault with boincmgr 5.10.28

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.