GNOME Bugzilla – Bug 473561
Enable gnome-breakpad on solaris
Last modified: 2008-10-19 13:28:29 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:
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.
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?
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..
Get a chance to review this bug further ?
FER: PING.
Uargh, no feedback... Matt, is this still an issue?
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.
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 ?
Matt, thanks for the follow-up. Let's close this bug then and move the pstack discussion on the other report.
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
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?
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
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.
Great thanks Cosimo
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.