Date: Tue, 14 Dec 2004 15:15:41 -0800 From: Sean McNeil <sean@mcneil.com> To: Ruslan Ermilov <ru@FreeBSD.org> Cc: David O'Brien <obrien@FreeBSD.org> Subject: Re: ports/emulators/linux_base on amd64 Message-ID: <1103066141.2041.4.camel@server.mcneil.com> In-Reply-To: <1103062382.46568.1.camel@server.mcneil.com> References: <20041214182153.GA80721@ip.net.ua> <1103049246.21655.3.camel@server.mcneil.com> <20041214215415.GB29362@ip.net.ua> <1103062382.46568.1.camel@server.mcneil.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On Tue, 2004-12-14 at 14:13 -0800, Sean McNeil wrote:
> On Tue, 2004-12-14 at 23:54 +0200, Ruslan Ermilov wrote:
> > On Tue, Dec 14, 2004 at 10:34:06AM -0800, Sean McNeil wrote:
> > [...]
> > > rpm scripts should also be fixed. It seems like a bug in the rpm port
> > > that no one has addressed.
> > >
> > rpm port is not guilty -- running the postinstall script
> > manually on amd64 returns 1, but on i386 it returns 0:
> >
> > Script started on Tue Dec 14 23:10:31 2004
> > hammer# /compat/linux/bin/sh
> > sh-2.04# uname -srm
> > Linux 2.4.2 amd64
> > sh-2.04# /usr/sbin/glibc_post_upgrade
> > sh-2.04# echo $?
> > 1
> > Script done on Tue Dec 14 23:10:53 2004
>
> Yes, I just got to this point. Thanks for the confirmation. I'm trying
> to find sources to glibc_post_upgrade to take a look.
Here is what I have so far....
The source looks like this:
#ifdef ARCH_386
/* Work around rpm bug */
char *remove_file[] = {
"/lib/i686/libc-" VERSION ".so",
"/lib/i686/libm-" VERSION ".so",
"/lib/i686/libpthread-" PVERSION ".so",
"/lib/i686/libc.so.6",
"/lib/i686/libm.so.6",
"/lib/i686/libpthread.so.0",
NULL };
int i;
for (i = 0; remove_file[i]; i++)
unlink (remove_file[i]);
#endif
pid = vfork ();
if (pid == 0) {
execl ("/sbin/ldconfig", "/sbin/ldconfig", NULL);
_exit (1);
} else if (pid < 0) {
_exit (1);
}
if (waitpid (0, &status, 0) != pid || !WIFEXITED (status)) {
_exit (1);
}
if (WEXITSTATUS (status))
_exit (WEXITSTATUS (status));
ktrace shows:
2018 ktrace RET ktrace 0
2018 ktrace CALL
execve(0x7fffffffee0f,0x7fffffffec60,0x7fffffffec70)
2018 ktrace NAMI "/compat/linux/usr/sbin/glibc_post_upgrade"
2018 glibc_post_upgrade RET execve 0
2018 glibc_post_upgrade CALL unlink(0x8048788)
2018 glibc_post_upgrade NAMI "/compat/linux/lib/i686/libc-2.2.4.so"
2018 glibc_post_upgrade NAMI "/lib/i686/libc-2.2.4.so"
2018 glibc_post_upgrade RET unlink JUSTRETURN
2018 glibc_post_upgrade CALL unlink(0x80487a0)
2018 glibc_post_upgrade NAMI "/compat/linux/lib/i686/libm-2.2.4.so"
2018 glibc_post_upgrade NAMI "/lib/i686/libm-2.2.4.so"
2018 glibc_post_upgrade RET unlink JUSTRETURN
2018 glibc_post_upgrade CALL unlink(0x80487b8)
2018 glibc_post_upgrade NAMI
"/compat/linux/lib/i686/libpthread-0.9.so"
2018 glibc_post_upgrade NAMI "/lib/i686/libpthread-0.9.so"
2018 glibc_post_upgrade RET unlink JUSTRETURN
2018 glibc_post_upgrade CALL unlink(0x80487d4)
2018 glibc_post_upgrade NAMI "/compat/linux/lib/i686/libc.so.6"
2018 glibc_post_upgrade NAMI "/lib/i686/libc.so.6"
2018 glibc_post_upgrade RET unlink JUSTRETURN
2018 glibc_post_upgrade CALL unlink(0x80487e8)
2018 glibc_post_upgrade NAMI "/compat/linux/lib/i686/libm.so.6"
2018 glibc_post_upgrade NAMI "/lib/i686/libm.so.6"
2018 glibc_post_upgrade RET unlink JUSTRETURN
2018 glibc_post_upgrade CALL unlink(0x80487fc)
2018 glibc_post_upgrade NAMI "/compat/linux/lib/i686/libpthread.so.0"
2018 glibc_post_upgrade NAMI "/lib/i686/libpthread.so.0"
2018 glibc_post_upgrade RET unlink JUSTRETURN
2018 glibc_post_upgrade CALL lstat
2018 glibc_post_upgrade RET lstat 2019/0x7e3
2018 glibc_post_upgrade CALL old.sendmsg(0,0xffffdb8c,0,0)
2018 glibc_post_upgrade RET old.sendmsg 2019/0x7e3
2018 glibc_post_upgrade CALL exit(0x1)
Looks like there is a mismatch in kernel entry points here.
lstat instead of vfork and old.sendmsg instead of (maybe) waitpid.
Does ktrace work with linux abi?
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)
iD8DBQBBv3QdyQsGN30uGE4RAvT5AJ9JgjIGREG9xAmrUXHKXgRp33i9RACePwZw
pbDTkIB4Xws/C62xm4tw0yI=
=Jfar
-----END PGP SIGNATURE-----
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1103066141.2041.4.camel>
