Issue 18052 - sparc linux crashrep needs code for backtrace.c
Summary: sparc linux crashrep needs code for backtrace.c
Status: CLOSED FIXED
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: 680m15
Hardware: Sun Linux, all
: P3 Trivial (vote)
Target Milestone: OOo 1.1.2
Assignee: sparcmoz
QA Contact: issues@porting
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-09 01:15 UTC by sparcmoz
Modified: 2004-06-21 14:09 UTC (History)
2 users (show)

See Also:
Issue Type: FEATURE
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
sparc linux backtrace.c (8.31 KB, text/plain)
2003-08-09 11:44 UTC, sparcmoz
no flags Details
cvs diff -u at 10 aug incl backtrace (14.08 KB, text/plain)
2003-08-10 02:57 UTC, sparcmoz
no flags Details
backtrace (3.63 KB, patch)
2003-11-30 07:15 UTC, sparcmoz
no flags Details | Diff
linux sparc backtrace patche for 645 (2.90 KB, patch)
2004-05-10 06:11 UTC, sparcmoz
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description sparcmoz 2003-08-09 01:15:12 UTC
crashrep works for sparc linux and says it has reported to sun microsystems.

but there is no backtrace, i assume i need some code in backtrace.c which is
beyond me, i hope some kind person will help me with this?.

also need to stop the reports going to sun?


jim@sun:/tmp$ cat crs.txt
0x8: ????????

jim@sun:/tmp$ cat crx.txt
<errormail:Stack type="Linux">
<errormail:StackInfo pos="0" ip="0x8"/>
</errormail:Stack>

jim@sun:/tmp$ cat file.txt
<***stacks***>
0x8: ????????
</***stacks***>
<***maps***>
0000000000010000-0000000000062000 r-xp 0000000000000000 03:02 655572    
/home/jim/OpenOffice.org1.1/program/soffice.bin
<snip>
00000000784a4000-00000000784ac000 rwxp 0000000000000000 03:02 654296    
/home/jim/OpenOffice.org1.1/program/libmcnttype.so
00000000784ac000-000000007859c000 rwxp 0000000000000000 00:00 0
00000000786c6000-0000000078726000 rwxp 0000000000800000 00:00 0
00000000efff4000-00000000f0000000 rwxp ffffffffffff6000 00:00 0
</***maps***>

Thank you for the OpenOffice.org Error Report
From: Sun Microsystems Quality Feedback <quality_feedback_NOSPAM@sun.com>
To: jim@amarooas.com.au

Dear User,

Thank you for sending the error report generated by the OpenOffice.org error
report tool. Your error report has been received and will be evaluated.

Please do not reply to this automatically generated response.

Sincerely,
Your OpenOffice.org Team
Comment 1 sparcmoz 2003-08-09 02:00:31 UTC
please note this output means dladdr failed in signal.c
0x8: ????????
Comment 2 sparcmoz 2003-08-09 11:42:59 UTC
I got the struct frame from gnu mailing list, other things from my
/usr/include and copied the solaris code in backtrace.c..

jim@sun:/tmp$ cat file6KWuRb
<***stacks***>
0x70cdde60: /home/jim/OpenOffice.org1.1/program/libsal.so.3 + 0x25e60
0x712fe57c: /lib/libpthread.so.0 + 0xa57c
0x715a2fc0: /lib/libc.so.6 + 0x32fc0
0x778987ec: /home/jim/OpenOffice.org1.1/program/libsc645ls.so +
0x7687ec (_ZN13ScInterpreter9InterpretEv + 0x2bd4)
0x777ab700: /home/jim/OpenOffice.org1.1/program/libsc645ls.so +
0x67b700 (_ZN13ScFormulaCell9InterpretEv + 0x5b4)

attaching my backtrace.c

also patched backtrace.h thus:
#if defined (SOLARIS) || (FREEBSD) || (LINUX)

i know this needs cleaing up but it works. need proper names in the
backtrace if some way??
 
Comment 3 sparcmoz 2003-08-09 11:44:32 UTC
Created attachment 8364 [details]
sparc linux backtrace.c
Comment 4 sparcmoz 2003-08-10 02:57:29 UTC
Created attachment 8373 [details]
cvs diff -u at 10 aug incl backtrace
Comment 5 Martin Hollmichel 2003-10-23 17:16:34 UTC
reassigned, hennes please review and comment.
Comment 6 sparcmoz 2003-10-23 22:11:32 UTC
My problem is I could not find any frame.h in linux?

I copied frame.h into the unchanged solaris code and I am getting
crash reports OK using this patch now with cws_srx645_ooo111fix1
Comment 7 hennes.rohling 2003-10-27 11:19:13 UTC
Accepted.
Comment 8 hennes.rohling 2003-11-07 15:24:52 UTC
.
Comment 9 sparcmoz 2003-11-30 07:13:56 UTC
Hi, i made some progress with linux sparc backtrace.

To get Dl_info from dlfcn.h it is necessary to #define _GNU_SOURCE.
This will cause the compiler to define __USE_GNU which is needed to
access the required type in dlfcn.h.

There is still no frame.h on linux sparc, so i have included a struct
in backtrace.h which includes the necessary parts only, after
reviewing http://gcc.gnu.org/ml/java-patches/2000-q2/msg00115.html

The attached patches made in sal by cvs diff -u > sal.diff
cd sal
patch -p0 < sal.diff

Test results below:

jim@sun:~/OpenOffice.org680$ ./soffice &
[1] 1731
jim@sun:~/OpenOffice.org680$ kill -10 1731
jim@sun:~/OpenOffice.org680$ sh: line 1:
/usr/local/o2_src/solver/680/unxlngs.pro/bin/crash_report: Permission
denied


Fatal exception: Signal 10
Stack:
/home/jim/OpenOffice.org680/program/libsal.so.3+0x24f3c[0x70cd8f3c]
/lib/libpthread.so.0+0xa878[0x712ea878]
/lib/libc.so.6+0x32f10[0x71596f10]
/home/jim/OpenOffice.org680/program/libvcl680ls.so+0x27e3d0(_ZN7SalXLib5YieldEh+0x14c)[0x702aa3d0]
/home/jim/OpenOffice.org680/program/libvcl680ls.so+0xca56c(_ZN11Application5YieldEv+0x70)[0x700f656c]
/home/jim/OpenOffice.org680/program/libvcl680ls.so+0xca454(_ZN11Application7ExecuteEv+0x34)[0x700f6454]
/home/jim/OpenOffice.org680/program/soffice.bin+0x1a674(_ZN7desktop7Desktop4MainEv+0xca8)[0x2a674]
/home/jim/OpenOffice.org680/program/libvcl680ls.so+0xcf0c4(_Z6SVMainv+0x4c)[0x700fb0c4]
/home/jim/OpenOffice.org680/program/libvcl680ls.so+0x27d26c(main+0x30)[0x702a926c]
/lib/libc.so.6+0x1cd84(__libc_start_main+0xf0)[0x71580d84]
/home/jim/OpenOffice.org680/program/soffice.bin+0x150b4(_start+0x2c)[0x250b4]

[1]+  Aborted                 ./soffice
jim@sun:~/OpenOffice.org680$
Comment 10 sparcmoz 2003-11-30 07:15:57 UTC
Created attachment 11640 [details]
backtrace
Comment 11 foskey 2003-12-17 12:30:44 UTC
Committed to cws_src680_ooo20031216,  the patches are sparc specific.
Comment 12 sparcmoz 2003-12-31 11:00:52 UTC
patches are in cws_src680_ooo20031216 -  closing
Comment 13 sparcmoz 2004-05-04 13:31:29 UTC
Found a new crash in 112fix1, need to put this backtrace.c into 113
Comment 14 sparcmoz 2004-05-04 13:32:24 UTC
I know how to do this now, and have priveleges, so i shall own it.
Comment 15 sparcmoz 2004-05-04 13:33:01 UTC
re-assign
Comment 16 sparcmoz 2004-05-10 06:08:14 UTC
patches for backtrace.c and backtrace.h proposed for committing into
cws_srx645_ooo112fix2, copied from 680. But I need finish building and test first.
Comment 17 sparcmoz 2004-05-10 06:11:36 UTC
Created attachment 15115 [details]
linux sparc backtrace patche for 645
Comment 18 sparcmoz 2004-05-15 07:43:04 UTC
committed to 112fix2
Comment 19 sparcmoz 2004-06-09 11:46:23 UTC
verified and closed
Comment 20 sparcmoz 2004-06-09 11:47:00 UTC
closed
Comment 21 sander_traveling 2004-06-21 14:09:33 UTC
setting back to 1.1.2