Issue 56097

Summary: lost backtrace on GNU/Linux Sparc
Product: porting Reporter: sparcmoz <sparcmoz>
Component: codeAssignee: AOO issues mailing list <issues>
Status: ACCEPTED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues
Version: OOO 2.0 Beta2   
Target Milestone: AOO Later   
Hardware: Sun   
OS: Linux, all   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description sparcmoz 2005-10-16 14:17:39 UTC
Building with gcc4/gcj4 on GNU Linux Sparc, the file restore and error report
features work OK when the program is killed by a signal 10 but there is no
backtrace. The backtrace window for sending, is completely blank - ie no headers
or anything.

The files such as .crash* are no longer written. The m120 .crash* files (incl
backtrace reports) were still sitting there when 133 crashed. After deleting
those files they are not written by re-installation or by crashing. 
Installation is by non-root user from RPMS using install_linux.sh script.

Things to do:

(a) check in case configuration options needed at building
(b) review code changes since m120 in sal/osl/unx and crashrep
Comment 1 sparcmoz 2005-10-16 21:47:46 UTC
set target
Comment 2 sparcmoz 2005-10-30 09:01:42 UTC
More things to do:
(c) look at signal.c, we are not including backtrace.h!
execinfo.h is included from /usr/include/execinfo.h and there is a backtrace
function in glibc
jim@sun:/lib$ nm -D libc.so.6 | grep backtrace
000d9694 W backtrace
000d9694 T __backtrace
000d9730 T __backtrace_symbols
000d9730 W backtrace_symbols
000d9a60 T __backtrace_symbols_fd
000d9a60 W backtrace_symbols_fd
jim@sun:/lib$
So need to consider are we be using the backtrace backtrace.c or from libc?
could try linking in libc, and/or including backtrace.h. Have a look at the
solaris implementation.


Comment 3 sparcmoz 2005-11-09 13:19:30 UTC
backtrace is working again on linux sparc in m137, i dont know if these are
necessary but it is sufficient to 
configure with --enable-crashdump=STATIC --enable-symbols=SMALL 
and this patch

Index: osl/unx/signal.c
===================================================================
RCS file: /cvs/porting/sal/osl/unx/signal.c,v
retrieving revision 1.28
diff -u -r1.28 signal.c
--- osl/unx/signal.c    8 Sep 2005 15:00:57 -0000       1.28
+++ osl/unx/signal.c    9 Nov 2005 13:16:04 -0000
@@ -40,7 +40,11 @@
 #define MAX_STACK_FRAMES 256

 #ifdef LINUX
+#if defined ( SPARC )
+#include "backtrace.h"
+#else
 #include <execinfo.h>
+#endif
 #define INCLUDE_BACKTRACE
 #define STACKTYPE "Linux"
 #endif
Comment 4 pavel 2005-11-23 07:57:57 UTC
retarget to next version
Comment 5 pavel 2006-01-24 18:13:58 UTC
Hi,

I'll retarget this issue to OOoLater. If you have the solution sooned, feel free
to set proper target.

Thanks.
Comment 6 sparcmoz 2006-03-24 10:06:32 UTC
A possible solution from cmc, will need check in m161
"Even if it is explicitly enabled from configure, then in scp2 the
ErrorReportServer profile value is unset unless the env variable
BUILD_SPECIAL is set. So there are a few hoops to be jumped through
if an outside developer want to enable the crash reporter." See
http://www.openoffice.org/servlets/ReadMsg?list=dev&msgNo=16375