After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 473561 - Enable gnome-breakpad on solaris
Enable gnome-breakpad on solaris
Status: RESOLVED FIXED
Product: bug-buddy
Classification: Deprecated
Component: general
2.23.x
Other All
: Normal normal
: 2.26
Assigned To: Bug-buddy Maintainers
Bug-buddy Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-09-04 13:16 UTC by Matt Keenan (IRC:MattMan)
Modified: 2008-10-19 13:28 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Enable gnome-breakpad (3.44 KB, patch)
2007-09-04 13:40 UTC, Matt Keenan (IRC:MattMan)
needs-work Details | Review

Description Matt Keenan (IRC:MattMan) 2007-09-04 13:16:23 UTC
Please describe the problem:
At the moment gnome-breakpad will not compile on Solaris a recent patch was submitted to bug-buddy to not use google-breakpad on certain platforms, however
gnome-breakpad uses some of the code from google-breakpad specifically
   google-breakpad/src/google-breakpad/common/breakpad_type.h

And as a result fails to compile on solaris.

Also gnome-breakpad specifically uses gdb, in order for bug-buddy and gnomebreakpad to work on solaris dbx and pstack should be used where gdb is not available.

Steps to reproduce:
Try compiling bug-buddy component from svn.gnome.org trunk

Actual results:
bug-buddy compilation fails in gnome-breakpad

Expected results:
bug-buddy should build and be usable

Does this happen every time?
yes

Other information:
Comment 1 Matt Keenan (IRC:MattMan) 2007-09-04 13:40:11 UTC
Created attachment 94928 [details] [review]
Enable gnome-breakpad

Patch which :
1. Fixes compilation issues with gnome-breakpad on solaris
2. Allows the use of pstack / dbx where gdb is not available on solaris
3. Dosen't rely on elf debugging symbols on solaris in determineing whether to 
   launch bug-buddy or not.
Comment 2 Fernando Herrera 2007-09-04 13:55:58 UTC
Hi Matt, thanks for the patch.

Some comments:

for 1)

Won't it be easy (and more correct) to fix gnome-breakpad compilation issues with something like this?:

if breakpad is not available, don't try to include the exception handler header
Index: gnome-breakpad.cc
===================================================================
--- gnome-breakpad.cc   (revisión: 2384)
+++ gnome-breakpad.cc   (copia de trabajo)
@@ -24,7 +24,9 @@
 #include <config.h>
 
 
+#ifdef ENABLE_GOOGLE_BREAKPAD
 #include "client/linux/handler/exception_handler.h"
+#endif
 
for 2)

How is the ouput of pstack? we should ask the GNOME bugzilla guys if that information is enough for them.

for 3)
what is using Solaris for debugging symbols? Isn't Sun Studio using elf DWARF2?
Comment 3 Matt Keenan (IRC:MattMan) 2007-09-04 14:13:54 UTC
1. Did a quick test with using the #ifdef and it needs to be the following :

+#ifdef ENABLE_GOOGLE_BREAKPAD
 #include "client/linux/handler/exception_handler.h"
+using namespace google_breakpad;
+#else
+#include <string.h>
+#endif


string.h needed as it complains about prototype for strcmp and memset without
it.


2. Here's an example of ptrace output from my running wnck-applet pid 1008 :
  
 $ pstack 1008
1008:   /usr/lib/wnck-applet --oaf-activate-iid=OAFIID:GNOME_Wncklet_Factory -
 fef3e5a7 pollsys  (809d078, d, 0, 0)
 feef4262 poll     (809d078, d, ffffffff) + 52
 fede912f g_main_context_iterate (808f098, 1, 1, 806d5b0) + 397
 fede9768 g_main_loop_run (809a548) + 1b8
 fe4b35b9 bonobo_main (809c308, 809bfb8, fe4eded8, 809c3aa, fb8389b4, 809c388) + 5d
 fe4b1bfc bonobo_generic_factory_main_timeout (809c388, fb8389b4, 809bfb8, 7d0) + ac
 fe4b1b4a bonobo_generic_factory_main (809c388, fb8389b4, 809bfb8) + 26
 fb838b36 panel_applet_factory_main_closure (805a438, 809c308, 8095388) + ee
 fb838bea panel_applet_factory_main (805a438, 809c308, 8055d28, 0) + 3a
 08055ed5 main     (3, 80471a0, 80471b0) + d1
 080559e2 _start   (3, 80472f0, 8047305, 8047335, 0, 8047345) + 7a


So as you can see quite useful, and to be honest I reckon bugzilla guys would
prefer something rather than nothing :)


3. This is something I need to investigate into further, to see if Sun Studio
 does something specific or not, but for the moment I want to ensure that 
a crash dialog at least is shown when a crash occurs.


Hope this info helps..
Comment 4 Matt Keenan (IRC:MattMan) 2007-11-20 14:07:46 UTC
Get a chance to review this bug further ?
Comment 5 André Klapper 2008-07-14 18:39:12 UTC
FER: PING.
Comment 6 André Klapper 2008-08-31 21:36:25 UTC
Uargh, no feedback... Matt, is this still an issue?
Comment 7 Cosimo Cecchi 2008-09-01 13:35:17 UTC
Matt, could you please split the pstack patch (which seems to be the same of bug 473559) from the other issues?

1. The typedefs in breakpad_types.h seem to have been already committed to trunk.
2. The #ifdefs also seem to have been committed to trunk some time ago.
3. This change seems quite harmless

+#if defined(sun) && defined(__SVR4)
+	if (bugbuddy && (gdb || pstack)) {
+#else
 	if (bugbuddy && gdb && has_debug_symbols) {
+#endif /* defined(sun) && defined(__SVR4) */

but I wonder what elf_has_debug_symbols would return on Solaris (reading from the libelf source code it seems that Solaris is a supported target) and in case it does not work, if there's an other way to gather the same information.

So, as far as my understanding goes, if the elf bit wouldn't be needed, this patch would be exactly the same as the one in bug 473559.
Comment 8 Matt Keenan (IRC:MattMan) 2008-09-01 15:09:25 UTC
Andre/Cosimo, 

Thanks for the feedback.

Off the three points that the original patch affected.

> 1. Fixes compilation issues with gnome-breakpad on solaris

This as pointed out by Cosimo has indeed been applied to head so this is
fixed.

> 2. Allows the use of pstack / dbx where gdb is not available on solaris
> 3. Dosen't rely on elf debugging symbols on solaris in determineing whether 
>    to launch bug-buddy or not.

These two points are indeed an addendum to bug 473559, I've verified that
the elf symbol point is not an issue on Solaris, and should work regardless
of OS.

So here's What I am proposing :
1. Close this bug out as fixed.
2. I will update the patch for bug 473559 which will contain the complete
   set of changes required for using pstack, both in bug-buddy and 
   gnomebreakpad.
  
Does this make sense ?
Comment 9 Cosimo Cecchi 2008-09-03 00:18:49 UTC
Matt, thanks for the follow-up.
Let's close this bug then and move the pstack discussion on the other report.
Comment 10 Matt Keenan (IRC:MattMan) 2008-09-03 08:46:17 UTC
Cosimo, 

Actually there is one further small issue with google-breakpad on Solaris

in configure.in for bug-buddy :

    GOOGLE_BREAKPAD_SUPPORTED_OS="no"
    case $target_os in
        solaris*)
        solaris=yes
        GOOGLE_BREAKPAD_SUPPORTED_OS="yes"
        ;;
        linux*)
        linux=yes
        GOOGLE_BREAKPAD_SUPPORTED_OS="yes"
        ;;
    esac


For the version of google-breakpad code that is currently included in bug-buddy
this is incorrect, for Solaris it should read "no".

However if the google-breakpad code were updated to the latest release, then
this could remain as "yes", as the latest google-breakpad code has been fixed
to work on Solaris.

Any chance to could get this changed to "no" for 2.24 ?

Or do you want me to log a new bug report ?

cheers

Matt
Comment 11 Cosimo Cecchi 2008-09-03 09:11:42 UTC
I will try to look at this before hard code freeze.
The plan could be removing Solaris from the supported os list from 2.24 and syncing the google-breakpad code, readding Solaris to the list, after branching. Is this good for you?
Comment 12 Matt Keenan (IRC:MattMan) 2008-09-03 09:23:48 UTC
This sounds perfect.

e.g. 
  - For 2.24, set GOOGLE_BREAKPAD_SUPPORTED_OS="no" for Solaris
  - Post 2.24, when branched for 2.25/26 development, sync google-breakpad
    code, and re-add solaris Support.

thanks Cosimo

Matt 
Comment 13 Cosimo Cecchi 2008-09-11 09:35:01 UTC
Matt, I just branched bug-buddy for gnome-2-24 and disabled solaris from the supported platforms in that branch.
Leaving the bug opened for the other part of the fix.

2008-09-11  Cosimo Cecchi  <cosimoc@gnome.org>

	* configure.in: disable Solaris from the list of supported
	google-breakpad platforms for 2.24. See bug #473561.
Comment 14 Matt Keenan (IRC:MattMan) 2008-09-11 10:27:07 UTC
Great thanks Cosimo
Comment 15 Cosimo Cecchi 2008-10-19 13:28:29 UTC
I updated trunk to use r290 of google-breakpad. Testing and feedback is welcome (in separate bug reports). Closing here as FIXED.

2008-10-19  Cosimo Cecchi  <cosimoc@gnome.org>

	* */*: Update google-breakpad to r290.