From: "Kevin B. Hendricks" <khendricks@ivey.uwo.ca>
To: Bill Fink <billfink@capu.net>,
Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
Cc: linuxppc-dev@lists.linuxppc.org, billfink@capu.net
Subject: Re: xine, ppc and illegal instructions
Date: Sun, 1 Apr 2001 16:02:17 -0400 [thread overview]
Message-ID: <01040116021700.15950@localhost> (raw)
In-Reply-To: <Pine.LNX.4.21.0104011246570.868-100000@gwiz.nasa.atd.net>
Hi,
couple of things:
- was the shared library loaded by dlopen properly built with -fPIC or -fpic?
- could there be a cache flushing bug? When run in gdb if you set some
breakpoints in the shared library, it will flush the icache (to make sure the
breakpoint gets flushed out of data cache and any preloaded instruction are
thrown away) this in turn seems to "fix" the cache flush problem if one
exists.
- can you set ulimit -c unlimited and generate a core file from xine
and post the resulting backtrace.
If it looks empty, try the following:
x/20i $lr -32
in gdb just in case the problem was a branch out into the weeds
(if we are lucky lr will have the return address so that we can
possibly see at least where the bad branch comes from). One way to get
an illegal instruction is to follow a calculated branch into the weeds
(happens sometimes in some C++ code during tailcalls when compiled above -O0).
Kevin
On Sunday 01 April 2001 13:51, Bill Fink wrote:
> Some further investigation on my part and a question for Franz Sirl:
>
> I updated to the latest Paulus rsync kernel (2.4.3-pre8) and the
> latest gcc (2.95.3-2v) and 2.1 glibc (glibc-2.1.3-15g) from Franz,
> but unfortunately none of this helps. xine 0.4.01 still gets
> illegal instructions (sometimes it gets a segmentation fault
> instead). No core dump is produced and it runs basically OK
> when run under control of gdb, so it makes tracking down the
> problem very difficult.
>
> From debug printout, it appears that it is dying in a call to dlopen,
> which is in libdl, which is part of glibc. Here's the tail end of an
> strace of a xine run:
>
> open("/usr/local/install/xine-0.4.01/lib/xine/plugins",
O_RDONLY|O_NONBLOCK|O_DI
> RECTORY) = 7
> fstat(7, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> fcntl(7, F_SETFD, FD_CLOEXEC) = 0
> lseek(7, 0, SEEK_CUR) = 0
> getdents(7, /* 12 entries */, 2980) = 284
> open("/usr/local/install/xine-0.4.01/lib/xine/plugins/input_file.so",
O_RDONLY)
> = 8
> fstat(8, {st_mode=S_IFREG|0755, st_size=17054, ...}) = 0
> read(8, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\t"..., 4096)
= 409
> 6
> mmap(0xfa28000, 70000, PROT_READ|PROT_EXEC, MAP_PRIVATE, 8, 0) = 0xfa28000
> mprotect(0xfa29000, 65904, PROT_NONE) = 0
> mmap(0xfa38000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED, 8,
> 0) = 0xfa38000
> close(8) = 0
> mprotect(0xfa28000, 4096, PROT_READ|PROT_WRITE) = 0
> mprotect(0xfa28000, 4096, PROT_READ|PROT_EXEC) = 0
> --- SIGILL (Illegal instruction) ---
> +++ killed by SIGILL +++
>
> Given that the last system call was an mprotect, I searched the archives
> and discovered that Olaf Hering reported a problem with mprotect on
> January 23 on the linuxppc-dev list, see:
>
> http://lists.linuxppc.org/listarcs/linuxppc-dev/200101/msg00324.html
>
> Olaf provided a patch to fix the problem, which I wasn't totally clear
> exactly what it was against, but I'm assuming it was glibc (I've never
> looked at the glibc source). Assuming it was a glibc patch, it wouldn't
> be in the glibc-2.1.3-15g I downloaded since that was dated January 14.
>
> Now my question for Franz. Do you think the problem/patch reported
> by Olaf is likely related to the apparent dlopen/mprotect problem I'm
> having with the 0.4.01 version of xine (note the 0.3.7 version works
> fine)? Or could it possibly be hardware related? I'm running on a
> G4 which has Altivec, while Henry's system is a G3 IIRC, which I believe
> doesn't have Altivec (or some other hardware difference).
>
> I've pulled down the source for glibc-2.1.3-15g, but before I actually
> try rebuilding it on my system (with or without Olaf's patch), I'd
> appreciate some expert advice about whether it's worth the effort or
> likely to have any effect.
>
> -Thanks
>
> -Bill
>
>
>
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2001-04-01 20:02 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.21.0103262330001.19578-100000@gwiz.nasa.atd.net >
2001-03-27 13:41 ` xine, ppc and illegal instructions Franz Sirl
2001-04-01 17:51 ` Bill Fink
2001-04-01 19:39 ` Michel Dänzer
2001-04-01 21:08 ` Bill Fink
2001-04-01 20:02 ` Kevin B. Hendricks [this message]
2001-04-01 20:12 ` Benjamin Herrenschmidt
2001-04-01 21:24 ` Bill Fink
2001-04-02 11:50 ` Kevin B. Hendricks
2001-03-30 5:26 Henry Worth
2001-03-31 20:16 ` Bill Fink
-- strict thread matches above, loose matches on Subject: below --
2001-03-30 5:20 Henry Worth
2001-03-30 5:29 ` David Edelsohn
2001-03-30 14:59 ` Henry Worth
2001-03-27 5:30 Bill Fink
2001-03-24 19:17 Henry Worth
2001-03-24 6:13 Henry Worth
2001-03-24 4:58 Henry Worth
2001-03-24 10:57 ` Stefan Berndtsson
2001-03-23 23:53 Stefan Berndtsson
2001-03-24 0:09 ` Gregorio Gervasio Jr.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=01040116021700.15950@localhost \
--to=khendricks@ivey.uwo.ca \
--cc=Franz.Sirl-kernel@lauterbach.com \
--cc=billfink@capu.net \
--cc=linuxppc-dev@lists.linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).