Re: Bug#200215: some debug info... gdb and strace broken on casals?
On Thu, Sep 18, 2003 at 08:20:28AM -0700, Ryan Murray wrote:
> > It is a glibc bug. The 'struct msqid_ds' definition doesn't match the
> > kernel one. I believe the appended patch fixes it, but haven't tested
> > it yet.
> >
> > Btw, this means IPC is mostly broken ATM, which is probably causing
> > those autobuilder timeouts. I observe hanging make processes eating
> > cpu time on unstable.
>
> It has nothing to do with buildd timeouts.
>
> > 2003-09-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
> >
> > * sysdeps/unix/sysv/linux/mips/bits/msq.h (msqid_ds): Add missing
> > padding.
> >
> >
> > Index: sysdeps/unix/sysv/linux/mips/bits/msq.h
> > ===================================================================
> > RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/bits/msq.h,v
> > retrieving revision 1.1
> > diff -u -p -r1.1 msq.h
> > --- sysdeps/unix/sysv/linux/mips/bits/msq.h 26 Aug 2002 01:49:55 -0000 1.1
> > +++ sysdeps/unix/sysv/linux/mips/bits/msq.h 18 Sep 2003 10:24:45 -0000
> > @@ -39,15 +39,24 @@ struct msqid_ds
> > {
> > struct ipc_perm msg_perm; /* structure describing operation permission */
> > __time_t msg_stime; /* time of last msgsnd command */
> > +#if __WORDSIZE == 32
> > + unsigned long int __unused1;
> > +#endif
> > __time_t msg_rtime; /* time of last msgrcv command */
> > +#if __WORDSIZE == 32
> > + unsigned long int __unused2;
> > +#endif
> > __time_t msg_ctime; /* time of last change */
> > +#if __WORDSIZE == 32
> > + unsigned long int __unused3;
> > +#endif
> > unsigned long int __msg_cbytes; /* current number of bytes on queue */
> > msgqnum_t msg_qnum; /* number of messages currently on queue */
> > msglen_t msg_qbytes; /* max number of bytes allowed on queue */
> > __pid_t msg_lspid; /* pid of last msgsnd() */
> > __pid_t msg_lrpid; /* pid of last msgrcv() */
> > - unsigned long int __unused1;
> > - unsigned long int __unused2;
> > + unsigned long int __unused4;
> > + unsigned long int __unused5;
> > };
> >
> > #ifdef __USE_MISC
>
> The minimum kernel version needs to be raised to 2.4.19 for this change,
> as the structure changed in kernel space between 2.4.18 and 2.4.19, causing
> the problem.
The original reason for the kernel change was a bug report from Atushi
Nemoto about a mismatch of the and libc msqid_ds. It seems there are
already libcs with this patch in circulation which at least Atushi and
me seemed to have; I don't know why this isn't in the official libc ...
Adding Atushi to the cc list; maybe he can shed some light on this.
Ralf
Reply to: