Date: Wed, 22 Oct 2003 16:07:41 -0400 (EDT) From: Andre Guibert de Bruet <andy@siliconlandmark.com> To: Dan Nelson <dnelson@allantgroup.com> Cc: freebsd-current@freebsd.org Subject: Re: i386_set_ldt warnings Message-ID: <20031022160537.B73466@alpha.siliconlandmark.com> In-Reply-To: <20031022165558.GN55642@dan.emsphone.com> References: <200310221542.h9MFg3Jb017328@www.kukulies.org> <Pine.GSO.4.10.10310221206030.26544-100000@pcnet5.pcnet.com> <20031022164340.GA97877@troutmask.apl.washington.edu> <20031022165558.GN55642@dan.emsphone.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 22 Oct 2003, Dan Nelson wrote:
> In the last episode (Oct 22), Steve Kargl said:
> > On Wed, Oct 22, 2003 at 12:09:43PM -0400, Daniel Eischen wrote:
> > > On Wed, 22 Oct 2003, C. Kukulies wrote:
> > > > Some (kde) applications now have a warning appear in xconsole:
> > > >
> > > > Warning: pid 595 used static ldt allocation.
> > > > See the i386_set_ldt man page for more info
> > >
> > > Let me guess. You are using Nividia-supplied drivers/libraries?
> >
> > I see similar messages on the console and I do not have a nvidia
> > card. By the time I find the message the process has terminated, so
> > I have no way of translating the PID into an actual executable name.
>
> That's cause whoever coded the warning forgot to print the executable
> name in the error message. Try this patch:
>
> Index: sys_machdep.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/i386/i386/sys_machdep.c,v
> retrieving revision 1.91
> diff -u -r1.91 sys_machdep.c
> --- sys_machdep.c 7 Sep 2003 05:23:28 -0000 1.91
> +++ sys_machdep.c 22 Oct 2003 16:52:49 -0000
> @@ -464,8 +464,8 @@
> if (!(uap->start == LDT_AUTO_ALLOC && uap->num == 1)) {
> /* complain a for a while if using old methods */
> if (ldt_warnings++ < NUM_LDT_WARNINGS) {
> - printf("Warning: pid %d used static ldt allocation.\n",
> - td->td_proc->p_pid);
> + printf("Warning: pid %d (%s) used static ldt allocation.\n",
> + td->td_proc->p_pid, td->td_proc->p_comm);
> printf("See the i386_set_ldt man page for more info\n");
> }
> /* verify range of descriptors to modify */
This could also be accomplished by enabling process accounting and
grepping the output of lastcomm. But yes, this patch is most welcome
nonetheless. :)
Regards,
> Andre Guibert de Bruet | Enterprise Software Consultant >
> Silicon Landmark, LLC. | http://siliconlandmark.com/ >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031022160537.B73466>
