Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: does anyone else get a core dump from ldconfig when booting amd64-current?
On Sun, Jan 25, 2009 at 02:28:03AM +0000, Christos Zoulas wrote:
> In article <20090125012631.GA84416%medusa.sis.pasteur.fr@localhost>,
> Nicolas Joly <njoly%pasteur.fr@localhost> wrote:
> >On Sun, Jan 25, 2009 at 12:45:14AM +0000, Christos Zoulas wrote:
[...]
> >njoly@lanfeust [~]> ktrace -di ./dummy
> >zsh: bus error (core dumped) ktrace -di ./dummy
> >[...]
> > 521 1 dummy CALL netbsd32_open(0xffffd490,0,0)
> > 521 1 dummy NAMI "/emul/netbsd32/usr/lib/i386/libc.so.12"
> > 521 1 dummy NAMI "/usr/lib/i386/libc.so.12"
> > 521 1 dummy RET netbsd32_open 3
> > 521 1 dummy CALL netbsd32___fstat50(3,0xffffd3d0)
> > 521 1 dummy RET netbsd32___fstat50 0
> > 521 1 dummy CALL netbsd32_close(3)
> > 521 1 dummy RET netbsd32_close 0
> > 521 1 dummy PSIG SIGBUS SIG_DFL: code=SI_USER sent by
> >pid=-67194868, uid=0)
> > 521 1 dummy NAMI "dummy.core"
>
> Yes, I saw this. My theory is that the information that it gets from
> stat is broken, and it does not load libc, but instead closes the fd.
> I found the bug in the stat conversion and I committed a fix but I
> doubt that this is the problem.
This is an alignment problem, with netbsd32_{timespec,timeval}
structures ... Looks like the amd64 kernel use 64bit aligment, while
`cc -m32' compiled programs expect 32bit aligned objects. The kernel
structure is then larger than the userland expected one. Kaboom !!!
Not sure if this is a correct fix, but packing the netbsd32 structures
make all of this work again.
--
Nicolas Joly
Biological Software and Databanks.
Institut Pasteur, Paris.
Index: sys/compat/netbsd32/netbsd32.h
===================================================================
RCS file: /cvsroot/src/sys/compat/netbsd32/netbsd32.h,v
retrieving revision 1.79
diff -u -p -r1.79 netbsd32.h
--- sys/compat/netbsd32/netbsd32.h 11 Jan 2009 02:45:49 -0000 1.79
+++ sys/compat/netbsd32/netbsd32.h 27 Jan 2009 16:34:06 -0000
@@ -182,7 +182,7 @@ typedef netbsd32_pointer_t netbsd32_time
struct netbsd32_timespec {
netbsd32_time_t tv_sec; /* seconds */
netbsd32_long tv_nsec; /* and nanoseconds */
-};
+} __packed;
typedef netbsd32_pointer_t netbsd32_timeval50p_t;
struct netbsd32_timeval50 {
@@ -194,7 +194,7 @@ typedef netbsd32_pointer_t netbsd32_time
struct netbsd32_timeval {
netbsd32_time_t tv_sec; /* seconds */
netbsd32_long tv_usec; /* and microseconds */
-};
+} __packed;
typedef netbsd32_pointer_t netbsd32_timezonep_t;
struct netbsd32_timezone {
Home |
Main Index |
Thread Index |
Old Index