Send freebsd-current mailing list submissions to
	freebsd-current@freebsd.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.freebsd.org/mailman/listinfo/freebsd-current
or, via email, send a message with subject or body 'help' to
	freebsd-current-request@freebsd.org

You can reach the person managing the list at
	freebsd-current-owner@freebsd.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of freebsd-current digest..."


Today's Topics:

   1. [current tinderbox] failure on ia64/ia64 (FreeBSD Tinderbox)
   2. Re: Bogus signal handler causes kernel panic (5.2.1-p8/i386)
      (Simon Barner)
   3. Re: altq (Dodell)
   4. Cross Platform Kernel Debug possible? (csj)
   5. npxdna causing kernel traps (Static)
   6. gvinum looses drives (Matthias Schuendehuette)
   7. [current tinderbox] failure on powerpc/powerpc (FreeBSD Tinderbox)
   8. Kernel debugging with gdb6 (Lukas Ertl)
   9. Re: npxdna causing kernel traps (Simon Barner)
  10. [current tinderbox] failure on sparc64/sparc64 (FreeBSD Tinderbox)
  11. Error in /usr/src/Makefile.inc1 (Mike Jakubik)
  12. Re: altq (Daniel O'Connor)
  13. Re: npxdna causing kernel traps (Bruce Evans)
  14. Re: strange message appearing in a fresh current (Bruce Evans)
  15. Re: Bogus signal handler causes kernel panic (5.2.1-p8/i386)
      (Bruce Evans)
  16. Re: Stack backtrace (Robert Watson)
  17. Re: strange message appearing in a fresh current (Divacky Roman)
  18. Re: npxdna causing kernel traps (Wolfgang M. Weyand)
  19. Re: [current tinderbox] failure on i386/i386 (David Wolfskill)
  20. ld problem (leafy)
  21. Re: [REVIEW] move tty lock/initial up in the stack
      (Jilles Tjoelker)
  22. Re: [current tinderbox] failure on i386/i386 (Szilveszter Adam)
  23. dlclose problem (Michael Nottebrock)
  24. Re: dlclose problem (Michael Nottebrock)


----------------------------------------------------------------------

Message: 1
Date: Sat, 19 Jun 2004 08:01:43 -0400 (EDT)
From: FreeBSD Tinderbox <tinderbox@freebsd.org>
Subject: [current tinderbox] failure on ia64/ia64
To: FreeBSD Tinderbox <tinderbox@freebsd.org>, <current@freebsd.org>,
	<ia64@freebsd.org>
Message-ID: <20040619120143.5C1ED7306D@freebsd-current.sentex.ca>

TB --- 2004-06-19 11:57:50 - tinderbox 2.3 running on freebsd-current.sentex.c
a
TB --- 2004-06-19 11:57:50 - starting CURRENT tinderbox run for ia64/ia64
TB --- 2004-06-19 11:57:50 - checking out the source tree
TB --- 2004-06-19 11:57:50 - cd /home/tinderbox/sandbox/CURRENT/ia64/ia64
TB --- 2004-06-19 11:57:50 - /usr/bin/cvs -f -R -q -d/home/ncvs update -Pd -A 
src
TB --- 2004-06-19 11:59:39 - building world (CFLAGS=-O2 -pipe)
TB --- 2004-06-19 11:59:39 - cd /home/tinderbox/sandbox/CURRENT/ia64/ia64/src

TB --- 2004-06-19 11:59:39 - /usr/bin/make -B buildworld
>>> Rebuilding the temporary build tree
>>> stage 1.1: legacy release compatibility shims
>>> stage 1.2: bootstrap tools
>>> stage 2.1: cleaning up the object tree
>>> stage 2.2: rebuilding the object tree
>>> stage 2.3: build tools
>>> stage 3: cross tools
[...]
/tinderbox/CURRENT/ia64/ia64/src/contrib/binutils/bfd/cofflink.c: At top level
:
/tinderbox/CURRENT/ia64/ia64/src/contrib/binutils/bfd/cofflink.c:2831: error: 
syntax error before "_bfd_coff_generic_relocate_section"
/tinderbox/CURRENT/ia64/ia64/src/contrib/binutils/bfd/cofflink.c: In function 
`_bfd_coff_generic_relocate_section':
/tinderbox/CURRENT/ia64/ia64/src/contrib/binutils/bfd/cofflink.c:2868: error: 
`FALSE' undeclared (first use in this function)
/tinderbox/CURRENT/ia64/ia64/src/contrib/binutils/bfd/cofflink.c:2941: error: 
structure has no member named `undefined_symbol'
/tinderbox/CURRENT/ia64/ia64/src/contrib/binutils/bfd/cofflink.c:2943: error: 
`TRUE' undeclared (first use in this function)
/tinderbox/CURRENT/ia64/ia64/src/contrib/binutils/bfd/cofflink.c:2951: error: 
structure has no member named `in_reloc_p'
/tinderbox/CURRENT/ia64/ia64/src/contrib/binutils/bfd/cofflink.c:3008: error: 
structure has no member named `reloc_overflow'
*** Error code 1

Stop in /tinderbox/CURRENT/ia64/ia64/src/gnu/usr.bin/binutils/libbfd.
*** Error code 1

Stop in /tinderbox/CURRENT/ia64/ia64/src/gnu/usr.bin/binutils.
*** Error code 1

Stop in /tinderbox/CURRENT/ia64/ia64/src.
*** Error code 1

Stop in /tinderbox/CURRENT/ia64/ia64/src.
*** Error code 1

Stop in /tinderbox/CURRENT/ia64/ia64/src.
TB --- 2004-06-19 12:01:43 - WARNING: /usr/bin/make returned exit code  1 
TB --- 2004-06-19 12:01:43 - ERROR: failed to build world
TB --- 2004-06-19 12:01:43 - tinderbox aborted


------------------------------

Message: 2
Date: Sat, 19 Jun 2004 13:58:53 +0200
From: Simon Barner <barner@in.tum.de>
Subject: Re: Bogus signal handler causes kernel panic (5.2.1-p8/i386)
To: Bruce Evans <bde@zeta.org.au>
Cc: current@freebsd.org
Message-ID: <20040619115853.GA904@zi025.glhnet.mhn.de>
Content-Type: text/plain; charset="us-ascii"

Hi,

I'll call that one patch3.

> Index: machdep.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/i386/i386/machdep.c,v
> retrieving revision 1.590
> diff -u -2 -r1.590 machdep.c
> --- machdep.c	11 Jun 2004 11:16:22 -0000	1.590
> +++ machdep.c	19 Jun 2004 05:27:18 -0000
> @@ -1134,4 +1134,7 @@
>          }
> 
> +	/* XXX drop the FP state correctly, unlike in the next 3 statements. */
> +	fpstate_drop(td);
> +
>  	/*
>  	 * Initialize the math emulator (if any) for the current process.
> %%%

I was not sure whether to back out patch2 (against npx.c) before
applying patch3, so I tried both combinations.

Unfortunately, I have to refer you to the attached stack traces once
again :(

Anyway, thanks a lot for your time and effort!

Simon
-------------- next part --------------
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.

Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd"...
panic: arithmetic trap
panic messages:
---
Fatal trap 6: arithmetic trap while in kernel mode
instruction pointer	= 0x8:0xc061671a
stack pointer	        = 0x10:0xcc43d9e4
frame pointer	        = 0x10:0xcc43d9e4
code segment		= base 0x0, limit 0xfffff, type 0x1b
			= DPL 0, pres 1, def32 1, gran 1
processor eflags	= resume, IOPL = 0
current process		= 694 (a.out)
trap number		= 6
panic: arithmetic trap

syncing disks, buffers remaining... 800 800 800 800 800 800 800 800 800 800 80
0 800 800 800 800 800 800 800 800 800 
giving up on 589 buffers
Uptime: 1m16s
Dumping 192 MB
 16 32 48 64 80 96 112 128 144 160 176
---
Reading symbols from /usr/src/sys/i386/compile/KISTE/modules/usr/src/sys/modul
es/fdescfs/fdescfs.ko.debug...done.
Loaded symbols for /usr/src/sys/i386/compile/KISTE/modules/usr/src/sys/modules
/fdescfs/fdescfs.ko.debug
Reading symbols from /boot/kernel/green_saver.ko...done.
Loaded symbols for /boot/kernel/green_saver.ko
#0  doadump () at ../../../kern/kern_shutdown.c:240
240		dumping++;
(kgdb) bt
#0  doadump () at ../../../kern/kern_shutdown.c:240
#1  0xc04f0cbb in boot (howto=256) at ../../../kern/kern_shutdown.c:372
#2  0xc04f0f91 in panic () at ../../../kern/kern_shutdown.c:550
#3  0xc0611f70 in trap_fatal (frame=0xcc43d9a4, eva=0)
    at ../../../i386/i386/trap.c:821
#4  0xc0611abc in trap (frame=
      {tf_fs = 24, tf_es = 16, tf_ds = 16, tf_edi = 0, tf_esi = -1034840832, t
f_ebp = -867968540, tf_isp = -867968560, tf_ebx = 514, tf_edx = -1034840832, t
f_ecx = -867968368, tf_eax = -867968368, tf_trapno = 6, tf_err = 0, tf_eip = -
1067358438, tf_cs = 8, tf_eflags = 65606, tf_esp = -867968524, tf_ss = -106735
8516})
    at ../../../i386/i386/trap.c:618
#5  0xc0605998 in calltrap () at {standard input}:94
#6  0xc06166cc in npxsetregs (td=0x0, addr=0x0) at ../../../i386/isa/npx.c:963

#7  0xc060bd73 in set_fpcontext (td=0xc2519500, mcp=0x0)
    at ../../../i386/i386/machdep.c:2532
#8  0xc060a76a in sigreturn (td=0xc2519500, uap=0x0)
    at ../../../i386/i386/machdep.c:982
#9  0xc0612253 in syscall (frame=
      {tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = -1077940888, tf_esi = -107
7940880, tf_ebp = -1077940960, tf_isp = -867967628, tf_ebx = 1, tf_edx = 67240
9248, tf_ecx = 13, tf_eax = 417, tf_trapno = 22, tf_err = 2, tf_eip = -1077936
211, tf_cs = 31, tf_eflags = 582, tf_esp = -1077941832, tf_ss = 47})
    at ../../../i386/i386/trap.c:1010
#10 0xc06059ed in Xint0x80_syscall () at {standard input}:136
---Can't read userspace from dump, or kernel process---

(kgdb) bt full
#0  doadump () at ../../../kern/kern_shutdown.c:240
No locals.
#1  0xc04f0cbb in boot (howto=256) at ../../../kern/kern_shutdown.c:372
No locals.
#2  0xc04f0f91 in panic () at ../../../kern/kern_shutdown.c:550
	td = (struct thread *) 0xc2519500
	bootopt = 256
	newpanic = 0
	ap = 0xcc43d94c "g\001e?"
	buf = "arithmetic trap", '\0' <repeats 240 times>
#3  0xc0611f70 in trap_fatal (frame=0xcc43d9a4, eva=0)
    at ../../../i386/i386/trap.c:821
	code = 16
	type = 6
	ss = 16
	esp = 0
	softseg = {ssd_base = 0, ssd_limit = 1048575, ssd_type = 27, 
  ssd_dpl = 0, ssd_p = 1, ssd_xx = 5, ssd_xx1 = 1, ssd_def32 = 1, ssd_gran = 1
}
#4  0xc0611abc in trap (frame=
      {tf_fs = 24, tf_es = 16, tf_ds = 16, tf_edi = 0, tf_esi = -1034840832, t
f_ebp = -867968540, tf_isp = -867968560, tf_ebx = 514, tf_edx = -1034840832, t
f_ecx = -867968368, tf_eax = -867968368, tf_trapno = 6, tf_err = 0, tf_eip = -
1067358438, tf_cs = 8, tf_eflags = 65606, tf_esp = -867968524, tf_ss = -106735
8516})
    at ../../../i386/i386/trap.c:618
---Type <return> to continue, or q <return> to quit---
	td = (struct thread *) 0xc2519500
	p = (struct proc *) 0xc251854c
	sticks = 3260122444
	i = 0
	ucode = 0
	type = 6
	code = 0
	eva = 0
#5  0xc0605998 in calltrap () at {standard input}:94
No locals.
#6  0xc06166cc in npxsetregs (td=0x0, addr=0x0) at ../../../i386/isa/npx.c:963

	s = 514
#7  0xc060bd73 in set_fpcontext (td=0xc2519500, mcp=0x0)
    at ../../../i386/i386/machdep.c:2532
	addr = (union savefpu *) 0xcc43da90
#8  0xc060a76a in sigreturn (td=0xc2519500, uap=0x0)
    at ../../../i386/i386/machdep.c:982
	uc = {uc_sigmask = {__bits = {0, 0, 0, 0}}, uc_mcontext = {
    mc_onstack = 0, mc_gs = 47, mc_fs = 47, mc_es = 47, mc_ds = 47, 
    mc_edi = -1077940888, mc_esi = -1077940880, mc_ebp = -1077940960, 
    mc_isp = -867967628, mc_ebx = 1, mc_edx = 672409248, mc_ecx = 13, 
    mc_eax = 1, mc_trapno = 12, mc_err = 2, mc_eip = 671874187, mc_cs = 31, 
    mc_eflags = 662, mc_esp = -1077941012, mc_ss = 47, mc_len = 640, 
    mc_fpformat = 65537, mc_ownedfp = 131074, mc_spare1 = {0}, mc_fpstate = {

---Type <return> to continue, or q <return> to quit---
      -60801, -65536, -1, 0, 0, 0, -65536, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
      1072726020, 0, -2147483648, 16355, 0, 1071874048, 40544256, -30851378, 

      1744846849, -1351024913, 1072994650, 0 <repeats 101 times>}, 
    mc_spare2 = {0, 0, 0, 0, 0, 0, 0, 0}}, uc_link = 0x0, uc_stack = {
    ss_sp = 0x0, ss_size = 0, ss_flags = 4}, uc_flags = 0, __spare__ = {0, 0, 

    0, 0}}
	p = (struct proc *) 0xc251854c
	regs = (struct trapframe *) 0xcc43dd48
	cs = 0
	eflags = 662
	error = 0
	ret = 0
#9  0xc0612253 in syscall (frame=
      {tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = -1077940888, tf_esi = -107
7940880, tf_ebp = -1077940960, tf_isp = -867967628, tf_ebx = 1, tf_edx = 67240
9248, tf_ecx = 13, tf_eax = 417, tf_trapno = 22, tf_err = 2, tf_eip = -1077936
211, tf_cs = 31, tf_eflags = 582, tf_esp = -1077941832, tf_ss = 47})
    at ../../../i386/i386/trap.c:1010
	params = 0xbfbfe9bc---Can't read userspace from dump, or kernel process---
-------------- next part --------------
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.

Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd"...
panic: arithmetic trap
panic messages:
---
Fatal trap 6: arithmetic trap while in kernel mode
instruction pointer	= 0x8:0xc061671a
stack pointer	        = 0x10:0xcbd139e4
frame pointer	        = 0x10:0xcbd139e4
code segment		= base 0x0, limit 0xfffff, type 0x1b
			= DPL 0, pres 1, def32 1, gran 1
processor eflags	= resume, IOPL = 0
current process		= 655 (a.out)
trap number		= 6
panic: arithmetic trap

syncing disks, buffers remaining... 818 818 817 817 817 817 817 817 817 817 81
7 817 817 817 817 817 817 817 817 817 817 817 
giving up on 598 buffers
Uptime: 1m12s
Dumping 192 MB
 16 32 48 64 80 96 112 128 144 160 176
---
Reading symbols from /usr/src/sys/i386/compile/KISTE/modules/usr/src/sys/modul
es/fdescfs/fdescfs.ko.debug...done.
Loaded symbols for /usr/src/sys/i386/compile/KISTE/modules/usr/src/sys/modules
/fdescfs/fdescfs.ko.debug
Reading symbols from /boot/kernel/green_saver.ko...done.
Loaded symbols for /boot/kernel/green_saver.ko
#0  doadump () at ../../../kern/kern_shutdown.c:240
240		dumping++;
(kgdb) bt
#0  doadump () at ../../../kern/kern_shutdown.c:240
#1  0xc04f0cbb in boot (howto=256) at ../../../kern/kern_shutdown.c:372
#2  0xc04f0f91 in panic () at ../../../kern/kern_shutdown.c:550
#3  0xc0611f70 in trap_fatal (frame=0xcbd139a4, eva=0)
    at ../../../i386/i386/trap.c:821
#4  0xc0611abc in trap (frame=
      {tf_fs = 24, tf_es = 16, tf_ds = 16, tf_edi = 0, tf_esi = -1036587584, t
f_ebp = -875480604, tf_isp = -875480624, tf_ebx = 514, tf_edx = -1036587584, t
f_ecx = -875480432, tf_eax = -875480432, tf_trapno = 6, tf_err = 0, tf_eip = -
1067358438, tf_cs = 8, tf_eflags = 65606, tf_esp = -875480588, tf_ss = -106735
8516})
    at ../../../i386/i386/trap.c:618
#5  0xc0605998 in calltrap () at {standard input}:94
#6  0xc06166cc in npxsetregs (td=0x0, addr=0x0) at ../../../i386/isa/npx.c:954

#7  0xc060bd73 in set_fpcontext (td=0xc236edc0, mcp=0x0)
    at ../../../i386/i386/machdep.c:2532
#8  0xc060a76a in sigreturn (td=0xc236edc0, uap=0x0)
    at ../../../i386/i386/machdep.c:982
#9  0xc0612253 in syscall (frame=
      {tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = -1077940888, tf_esi = -107
7940880, tf_ebp = -1077940960, tf_isp = -875479692, tf_ebx = 1, tf_edx = 67240
9248, tf_ecx = 13, tf_eax = 417, tf_trapno = 22, tf_err = 2, tf_eip = -1077936
211, tf_cs = 31, tf_eflags = 582, tf_esp = -1077941832, tf_ss = 47})
    at ../../../i386/i386/trap.c:1010
#10 0xc06059ed in Xint0x80_syscall () at {standard input}:136
---Can't read userspace from dump, or kernel process---

(kgdb) bt full
#0  doadump () at ../../../kern/kern_shutdown.c:240
No locals.
#1  0xc04f0cbb in boot (howto=256) at ../../../kern/kern_shutdown.c:372
No locals.
#2  0xc04f0f91 in panic () at ../../../kern/kern_shutdown.c:550
	td = (struct thread *) 0xc236edc0
	bootopt = 256
	newpanic = 0
	ap = 0xcbd1394c "g\001e?"
	buf = "arithmetic trap", '\0' <repeats 240 times>
#3  0xc0611f70 in trap_fatal (frame=0xcbd139a4, eva=0)
    at ../../../i386/i386/trap.c:821
	code = 16
	type = 6
	ss = 16
	esp = 0
	softseg = {ssd_base = 0, ssd_limit = 1048575, ssd_type = 27, 
  ssd_dpl = 0, ssd_p = 1, ssd_xx = 0, ssd_xx1 = 0, ssd_def32 = 1, ssd_gran = 1
}
#4  0xc0611abc in trap (frame=
      {tf_fs = 24, tf_es = 16, tf_ds = 16, tf_edi = 0, tf_esi = -1036587584, t
f_ebp = -875480604, tf_isp = -875480624, tf_ebx = 514, tf_edx = -1036587584, t
f_ecx = -875480432, tf_eax = -875480432, tf_trapno = 6, tf_err = 0, tf_eip = -
1067358438, tf_cs = 8, tf_eflags = 65606, tf_esp = -875480588, tf_ss = -106735
8516})
    at ../../../i386/i386/trap.c:618
---Type <return> to continue, or q <return> to quit---
	td = (struct thread *) 0xc236edc0
	p = (struct proc *) 0xc2523000
	sticks = 3260166144
	i = 0
	ucode = 0
	type = 6
	code = 0
	eva = 0
#5  0xc0605998 in calltrap () at {standard input}:94
No locals.
#6  0xc06166cc in npxsetregs (td=0x0, addr=0x0) at ../../../i386/isa/npx.c:954

	s = 514
#7  0xc060bd73 in set_fpcontext (td=0xc236edc0, mcp=0x0)
    at ../../../i386/i386/machdep.c:2532
	addr = (union savefpu *) 0xcbd13a90
#8  0xc060a76a in sigreturn (td=0xc236edc0, uap=0x0)
    at ../../../i386/i386/machdep.c:982
	uc = {uc_sigmask = {__bits = {0, 0, 0, 0}}, uc_mcontext = {
    mc_onstack = 0, mc_gs = 47, mc_fs = 47, mc_es = 47, mc_ds = 47, 
    mc_edi = -1077940888, mc_esi = -1077940880, mc_ebp = -1077940960, 
    mc_isp = -875479692, mc_ebx = 1, mc_edx = 672409248, mc_ecx = 13, 
    mc_eax = 1, mc_trapno = 12, mc_err = 2, mc_eip = 671874187, mc_cs = 31, 
    mc_eflags = 662, mc_esp = -1077941012, mc_ss = 47, mc_len = 640, 
    mc_fpformat = 65537, mc_ownedfp = 131074, mc_spare1 = {0}, mc_fpstate = {

---Type <return> to continue, or q <return> to quit---
      -60801, -65536, -1, 0, 0, 0, -65536, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
      1072726020, 0, -2147483648, 16355, 0, 1071874048, 177295360, -26509676, 

      -805289983, 1914524621, 1072946227, 0 <repeats 101 times>}, mc_spare2 = 
{
      0, 0, 0, 0, 0, 0, 0, 0}}, uc_link = 0x0, uc_stack = {ss_sp = 0x0, 
    ss_size = 0, ss_flags = 4}, uc_flags = 0, __spare__ = {0, 0, 0, 0}}
	p = (struct proc *) 0xc2523000
	regs = (struct trapframe *) 0xcbd13d48
	cs = 0
	eflags = 662
	error = 0
	ret = 0
#9  0xc0612253 in syscall (frame=
      {tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = -1077940888, tf_esi = -107
7940880, tf_ebp = -1077940960, tf_isp = -875479692, tf_ebx = 1, tf_edx = 67240
9248, tf_ecx = 13, tf_eax = 417, tf_trapno = 22, tf_err = 2, tf_eip = -1077936
211, tf_cs = 31, tf_eflags = 582, tf_esp = -1077941832, tf_ss = 47})
    at ../../../i386/i386/trap.c:1010
	params = 0xbfbfe9bc---Can't read userspace from dump, or kernel process---
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: Digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040619/
544fc6d5/attachment-0001.bin

------------------------------

Message: 3
Date: Tue, 15 Jun 2004 15:20:13 -0000
From: "Dodell" <dodell@sitetronics.com>
Subject: Re: altq
To: "asfdqwer xzcvdsf" <brueggma@yahoo.com>,
	"current@freebsd.org"@FreeBSD.ORG
Message-ID: <E1BaDrJ-000Hwo-VE@smp500.sitetronics.com>
Content-Type: text/plain; charset="iso-8859-1";

> Greetings..
>
>  I got really excited when I saw the altq commits
> and cvsuped to the latest tree today.  I
> recompiled my kernel and world with a newly
> added &quot;options ALTQ&quot; and edited my pf.conf file.
> But I got the following error:
>
> &quot;altq not defined on em0&quot;
>
> Did I jump the gun a little, is altq not
> fully functional?  Is there a ALTQ entry
> in the handbook that I missed somewhere?
>
>   Thanks,
>
> # ALTQ
> altq on $ext_if bandwidth 2Mb cbq queue { test }

I think Max said that the interface hooks hadn't
been imported yet -- they'll be imported next if
this current import doesn't cause too many probs.

--Devon


------------------------------

Message: 4
Date: Sat, 19 Jun 2004 13:09:01 +0800
From: "csj" <junsu@delphij.net>
Subject: Cross Platform Kernel Debug possible?
To: <current@freebsd.org>
Message-ID:
	<004201c455bb$8d064460$efdea1d3@fareast.corp.microsoft.com>
Content-Type: text/plain;	charset="gb2312"

-Current will import GDB 6.x soon. Is it possible to run a GDB on Windows to
debug the freebsd kernel though RS232 with this new version?

Thanks,

csujun


------------------------------

Message: 5
Date: Sat, 19 Jun 2004 02:21:38 -0500 (CDT)
From: Static <static@ninja-assassin.com>
Subject: npxdna causing kernel traps
To: current@freebsd.org
Message-ID: <20040619011759.J92183@static.ninja-assassin.com>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

Hello List,

Thought I'd quick bounce this off the list before I submitted a bug 
report.

I have a fresh install of 5.2.1 which i then upgraded to -current.  I'm 
now getting the following message scrolling on the console

kernel trap 22 with interrupts disabled
kernel: npxdna: fpcurthread == curthread X times

Where X is N+1.  Eventually I get a kernel panic and the machine has to be 
rebooted. I get this in a custom kernel as well as GENERIC. This is with 
the src from Midnight CDT. Generic kernel spits out watchdog noticed and 
the network doesn't work both with and without ACPI, but that's for 
another email.

here's my info. The trap info is simliar every time and happens while I'm 
building ports.  The one below is when I was running `make clean`

Thank you

Rob

Info:

Homer# uname -a
FreeBSD Homer.noonelikesyou.net 5.2-CURRENT FreeBSD 5.2-CURRENT #6: Fri 
Jun 18 23:47:42 CDT 2004 
static@Homer.noonelikesyou.net:/usr/src/sys/i386/compile/KERNEL  i386


machine         i386
cpu             I686_CPU
ident           KERNEL

# To statically compile in device wiring instead of /boot/device.hints
#hints          "GENERIC.hints"         # Default places to look for 
devices.

makeoptions     DEBUG=-g                # Build kernel with gdb(1) debug 
symbols

options         SCHED_ULE               # ULE scheduler
options         INET                    # InterNETworking
options         FFS                     # Berkeley Fast Filesystem
options         SOFTUPDATES             # Enable FFS soft updates support
options         UFS_ACL                 # Support for access control lists
options         UFS_DIRHASH             # Improve performance on big 
directories
options         NFSCLIENT               # Network Filesystem Client
options         CD9660                  # ISO 9660 Filesystem
options         PROCFS                  # Process filesystem (requires 
PSEUDOFS)
options         PSEUDOFS                # Pseudo-filesystem framework
options         COMPAT_43               # Compatible with BSD 4.3 [KEEP 
THIS!]
options         COMPAT_FREEBSD4         # Compatible with FreeBSD4
options         KTRACE                  # ktrace(1) support
options         SYSVSHM                 # SYSV-style shared memory
options         SYSVMSG                 # SYSV-style message queues
options         SYSVSEM                 # SYSV-style semaphores
options         _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time 
extensions
options         KBD_INSTALL_CDEV        # install a CDEV entry in /dev
options         AHC_REG_PRETTY_PRINT    # Print register bitfields in 
debug
                                         # output.  Adds ~128k to driver.
options         AHD_REG_PRETTY_PRINT    # Print register bitfields in 
debug
                                         # output.  Adds ~215k to driver.
options         PFIL_HOOKS              # pfil(9) framework

device          isa
device          eisa
device          pci

# Floppy drives
device          fdc

# ATA and ATAPI devices
device          ata
device          atadisk         # ATA disk drives
device          atapicd         # ATAPI CDROM drives
options         ATA_STATIC_ID   # Static device numbering


# atkbdc0 controls both the keyboard and the PS/2 mouse
device          atkbdc          # AT keyboard controller
device          atkbd           # AT keyboard
device          psm             # PS/2 mouse

device          vga             # VGA video card driver

device          splash          # Splash screen and screen saver support

# syscons is the default console driver, resembling an SCO console
device          sc

# Enable this for the pcvt (VT220 compatible) console driver
#device         vt
#options        XSERVER         # support for X server on a vt console
#options        FAT_CURSOR      # start with block cursor

device          agp             # support several AGP chipsets

# Floating point support - do not disable.
device          npx

# Power management support (see NOTES for more options)
#device         apm
# Add suspend/resume support for the i8254.
device          pmtimer


# Serial (COM) ports
device          sio             # 8250, 16[45]50 based serial ports

# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these 
NICs!
device          miibus          # MII bus support
device          xl              # RealTek 8129/8139
device          vr

# Pseudo devices - the number indicates how many units to allocate.
device          random          # Entropy device
device          loop            # Network loopback
device          ether           # Ethernet support
device          tun             # Packet tunnel.
device          pty             # Pseudo-ttys (telnet etc)

# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
device          bpf             # Berkeley packet filter

options         SC_KERNEL_CONS_ATTR="(FG_GREEN|BG_BLACK)"
options         SC_NORM_ATTR="(FG_RED|BG_BLACK)"
options         NETSMB                  #SMB/CIFS requester
options         NETSMBCRYPTO            #encrypted password support for 
SMB
options         LIBMCHAIN               #mbuf management library
options         LIBICONV
options         SMBFS
options         VESA
options         MAXMEM="(256*1024)"
makeoptions     DEBUG=-g                # Build kernel with gdb(1) debug 
symbols
options         DDB                     # Enable the kernel debugger


trap:

Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0x100
fault code              = supervisor read, page not present
instruction pointer     = 0x8:0xc05ce9c4
stack pointer           = 0x10:0xcc598a9c`
frame pointer           = 0x10:0xcc598a9c`
code segment            = base 0x0, limit 0xfffff, type 0x1b
                         = DPL, pres 1, def32 1, gran 1
processor eflags        = resume, IOPL = 0
current process         = 54139 (make)
kernel: type 12 trap, code=0
Stopped at      npxdrop+0x20:   movl    0x100(%eax),%eax

db> trace
npxdrop(cc598d48,cc598ac4,c05c1c68,c1122dc0,48) at npxdrop+0x20
fpstate_drop(c1122dc0,48,c14c0400,cc598b8c,0) at fpstate_drop+0x31
exec_setregs(c1122dc0,80480b8,bfbfebf8,0,20) at exec_setregs+0xf8
kern_execve(c1122dc0,8069644,80695b4,80695c4,0) at kern_execve+0xb81
execve(c1122dc0,cc598d14,c,c1122dc0,3) at execve+0x18
syscall(2f,2f,2f,0,0) at syscall+0x1d0
Xint0x80_syscall() at Xint0x80_syscall+0x1f
--- syscall (0, FreeBSD ELF32, nosys), eip=0x80480b8, esp=0bfbfebf8,ebp =
0 ---
db>examine
npxdrop+0x20
db>print
c05ce9c4


------------------------------

Message: 6
Date: Sat, 19 Jun 2004 12:47:43 +0200
From: Matthias Schuendehuette <msch@snafu.de>
Subject: gvinum looses drives
To: freebsd-current@freebsd.org
Message-ID: <200406191247.43937.msch@snafu.de>
Content-Type: text/plain;  charset="iso-8859-15"

Hi Lukas et al,

I decided to be brave and give geom_vinum a try...

Here the typescript of the test with my comments inserted:

------------------------8><-------------------------------
Script started on Sat Jun 19 12:25:24 2004

root@current - ~
501 # gvinum
gvinum -> list
5 drives:
D testdrive             State: up	/dev/da4	A: 15/2063 MB (0%)
D d1                    State: up	/dev/da0s3	A: 8/4133 MB (0%)
D d2                    State: up	/dev/da1s1	A: 227/4353 MB (5%)
D d3                    State: up	/dev/da2s1	A: 231/4356 MB (5%)
D d4                    State: up	/dev/da3s2	A: 478/4604 MB (10%)

2 volumes:
V mp3dev                State: up	Plexes:       1	Size:       2048 MB
V raid5                 State: up	Plexes:       1	Size:         12 GB

2 plexes:
P mp3dev.p0           C State: up	Subdisks:     1	Size:       2048 MB
P raid5.p0           R5 State: up	Subdisks:     4	Size:         12 GB

5 subdisks:
S mp3dev.p0.s0          State: up	D: testdrive    Size:       2048 MB
S raid5.p0.s3           State: up	D: d4           Size:       4125 MB
S raid5.p0.s2           State: up	D: d3           Size:       4125 MB
S raid5.p0.s1           State: up	D: d2           Size:       4125 MB
S raid5.p0.s0           State: up	D: d1           Size:       4125 MB
gvinum -> quit

# Well, looks good! All items found und "up 'n runnin' "
# Now mount it!

root@current - ~
502 # mount /dev/gvinum/mp3dev /mp3dev
mount: /dev/gvinum/mp3dev: Device not configured

# Oops... what's that?

root@current - ~
503 # gvinum list
5 drives:
D testdrive             State: up	/dev/da4	A: 15/2063 MB (0%)
D d1                    State: up	/dev/da0s3	A: 8/4133 MB (0%)
D d2                    State: up	/dev/da1s1	A: 227/4353 MB (5%)
D d3                    State: up	/dev/da2s1	A: 231/4356 MB (5%)
D d4                    State: up	/dev/da3s2	A: 478/4604 MB (10%)

2 volumes:
V mp3dev                State: down	Plexes:       1	Size:       2048 MB
V raid5                 State: up	Plexes:       1	Size:         12 GB

2 plexes:
P mp3dev.p0           C State: down	Subdisks:     1	Size:       2048 MB
P raid5.p0           R5 State: up	Subdisks:     4	Size:         12 GB

5 subdisks:
S mp3dev.p0.s0          State: stale	D: testdrive    Size:       2048 MB
S raid5.p0.s3           State: up	D: d4           Size:       4125 MB
S raid5.p0.s2           State: up	D: d3           Size:       4125 MB
S raid5.p0.s1           State: up	D: d2           Size:       4125 MB
S raid5.p0.s0           State: up	D: d1           Size:       4125 MB

# Hmm... 'testdrive' is 'up' but 'mp3dev.p0.s0' is 'stale'. As you see 
# below, geom_vinum lost 'testdrive' but tells still that it's 'up'...

root@current - ~
504 # mount /dev/gvinum/raid5 /raid/ 
mount: /dev/gvinum/raid5: Device not configured

# Same here...

root@current - ~
505 # gvinum list
5 drives:
D testdrive             State: up	/dev/da4	A: 15/2063 MB (0%)
D d1                    State: up	/dev/da0s3	A: 8/4133 MB (0%)
D d2                    State: up	/dev/da1s1	A: 227/4353 MB (5%)
D d3                    State: up	/dev/da2s1	A: 231/4356 MB (5%)
D d4                    State: up	/dev/da3s2	A: 478/4604 MB (10%)

2 volumes:
V mp3dev                State: down	Plexes:       1	Size:       2048 MB
V raid5                 State: down	Plexes:       1	Size:         12 GB

2 plexes:
P mp3dev.p0           C State: down	Subdisks:     1	Size:       2048 MB
P raid5.p0           R5 State: down	Subdisks:     4	Size:         12 GB

5 subdisks:
S mp3dev.p0.s0          State: stale	D: testdrive    Size:       2048 MB
S raid5.p0.s3           State: stale	D: d4           Size:       4125 MB
S raid5.p0.s2           State: stale	D: d3           Size:       4125 MB
S raid5.p0.s1           State: stale	D: d2           Size:       4125 MB
S raid5.p0.s0           State: stale	D: d1           Size:       4125 MB

# The drives are 'up' but the subdisks are 'stale'

root@current - ~
507 # tail -n 256 /var/log/messages
Jun 19 12:24:54 current kernel: vinum: unloaded
Jun 19 12:25:39 current kernel: FOO: sd raid5.p0.s3 is up
Jun 19 12:25:39 current kernel: FOO: sd raid5.p0.s2 is up
Jun 19 12:25:40 current kernel: FOO: sd raid5.p0.s1 is up
Jun 19 12:25:40 current kernel: FOO: sd raid5.p0.s0 is up
Jun 19 12:25:40 current kernel: FOO: sd mp3dev.p0.s0 is up
Jun 19 12:26:47 current kernel: gvinum: lost drive 'testdrive'
Jun 19 12:26:47 current kernel: FOO: sd mp3dev.p0.s0 is down
Jun 19 12:26:47 current kernel: FOO: plex mp3dev.p0 is down
Jun 19 12:26:47 current kernel: FOO: sd mp3dev.p0.s0 is stale
Jun 19 12:26:47 current kernel: FOO: plex mp3dev.p0 is down
Jun 19 12:27:28 current kernel: gvinum: lost drive 'd4'
Jun 19 12:27:28 current kernel: FOO: sd raid5.p0.s3 is down
Jun 19 12:27:28 current kernel: FOO: plex raid5.p0 is degraded
Jun 19 12:27:28 current kernel: gvinum: lost drive 'd3'
Jun 19 12:27:28 current kernel: FOO: sd raid5.p0.s2 is down
Jun 19 12:27:28 current kernel: FOO: plex raid5.p0 is down
Jun 19 12:27:28 current kernel: gvinum: lost drive 'd2'
Jun 19 12:27:28 current kernel: FOO: sd raid5.p0.s1 is down
Jun 19 12:27:28 current kernel: FOO: plex raid5.p0 is down
Jun 19 12:27:28 current kernel: gvinum: lost drive 'd1'
Jun 19 12:27:28 current kernel: FOO: sd raid5.p0.s0 is down
Jun 19 12:27:28 current kernel: FOO: plex raid5.p0 is down
Jun 19 12:27:28 current kernel: FOO: sd raid5.p0.s3 is stale
Jun 19 12:27:28 current kernel: FOO: plex raid5.p0 is down
Jun 19 12:27:28 current kernel: FOO: sd raid5.p0.s2 is stale
Jun 19 12:27:28 current kernel: FOO: plex raid5.p0 is down
Jun 19 12:27:28 current kernel: FOO: sd raid5.p0.s1 is stale
Jun 19 12:27:28 current kernel: FOO: plex raid5.p0 is down
Jun 19 12:27:28 current kernel: FOO: sd raid5.p0.s0 is stale
Jun 19 12:27:28 current kernel: FOO: plex raid5.p0 is down

root@current - ~
508 # exit

Script done on Sat Jun 19 12:28:19 2004
------------------------8><-------------------------------

So, I'm quite sure you need additional informations - please tell me 
what.

BTW: Your fix of the unload-preventing geom-bug: will it be commited?
-- 
Ciao/BSD - Matthias

Matthias Schuendehuette	<msch [at] snafu.de>, Berlin (Germany)
PGP-Key at <pgp.mit.edu> and <wwwkeys.de.pgp.net> ID: 0xDDFB0A5F

------------------------------

Message: 7
Date: Sat, 19 Jun 2004 08:06:42 -0400 (EDT)
From: FreeBSD Tinderbox <tinderbox@freebsd.org>
Subject: [current tinderbox] failure on powerpc/powerpc
To: FreeBSD Tinderbox <tinderbox@freebsd.org>, <current@freebsd.org>,
	<powerpc@freebsd.org>
Message-ID: <20040619120642.084447306D@freebsd-current.sentex.ca>

TB --- 2004-06-19 12:01:43 - tinderbox 2.3 running on freebsd-current.sentex.c
a
TB --- 2004-06-19 12:01:43 - starting CURRENT tinderbox run for powerpc/powerp
c
TB --- 2004-06-19 12:01:43 - checking out the source tree
TB --- 2004-06-19 12:01:43 - cd /home/tinderbox/sandbox/CURRENT/powerpc/powerp
c
TB --- 2004-06-19 12:01:43 - /usr/bin/cvs -f -R -q -d/home/ncvs update -Pd -A 
src
TB --- 2004-06-19 12:04:39 - building world (CFLAGS=-O2 -pipe)
TB --- 2004-06-19 12:04:39 - cd /home/tinderbox/sandbox/CURRENT/powerpc/powerp
c/src
TB --- 2004-06-19 12:04:39 - /usr/bin/make -B buildworld
>>> Rebuilding the temporary build tree
>>> stage 1.1: legacy release compatibility shims
>>> stage 1.2: bootstrap tools
>>> stage 2.1: cleaning up the object tree
>>> stage 2.2: rebuilding the object tree
>>> stage 2.3: build tools
>>> stage 3: cross tools
[...]
sed -e 's,!!TRAD_HEADER!!,,g' /tinderbox/CURRENT/powerpc/powerpc/src/gnu/usr.b
in/binutils/libbfd/config.h.fbsd > config.h
echo '#define BFD_VERSION	214920000'	> bfdver.h
echo '#define BFD_VERSION_DATE	20040510'	>> bfdver.h
echo '#define BFD_VERSION_STRING "2.15 [FreeBSD] 2004-05-23"'	>> bfdver.h
rm -f .depend
mkdep -f .depend -a    -I. -I/tinderbox/CURRENT/powerpc/powerpc/src/gnu/usr.bi
n/binutils/libbfd/powerpc -I/tinderbox/CURRENT/powerpc/powerpc/src/gnu/usr.bin
/binutils/libbfd -I/tinderbox/CURRENT/powerpc/powerpc/src/gnu/usr.bin/binutils
/libbfd/../libbfd/powerpc -I/tinderbox/CURRENT/powerpc/powerpc/obj/powerpc/tin
derbox/CURRENT/powerpc/powerpc/src/i386/tinderbox/CURRENT/powerpc/powerpc/src/
gnu/usr.bin/binutils/libbfd/../libbfd -I/tinderbox/CURRENT/powerpc/powerpc/src
/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/include -DDEFAULT_VE
CTOR=bfd_elf32_powerpc_vec -D_GNU_SOURCE -I/tinderbox/CURRENT/powerpc/powerpc/
src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd -DSELECT_ARCH
ITECTURES=" &bfd_powerpc_arch" -DHAVE_bfd_elf32_powerpc_vec -DHAVE_bfd_elf32_p
owerpcle_vec -DHAVE_ppcboot_vec -DSELECT_VECS=" &bfd_elf32_powerpc_vec ,&bfd_e
lf32_powerpcle_vec ,&ppcboot_vec" -I/home/tinderbox/sandbox/CURRENT/powerpc/po
werpc/obj/powerpc/tinderbox/CURRENT/powerpc/powerpc/sr
 c/i386/legacy/usr/include /tinderbox/CURRENT/powerpc/powerpc/src/gnu/usr.bin/
binutils/libbfd/../../../../contrib/binutils/bfd/cpu-powerpc.c /tinderbox/CURR
ENT/powerpc/powerpc/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binuti
ls/bfd/cpu-rs6000.c /tinderbox/CURRENT/powerpc/powerpc/src/gnu/usr.bin/binutil
s/libbfd/../../../../contrib/binutils/bfd/elf32.c /tinderbox/CURRENT/powerpc/p
owerpc/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/elf32-
gen.c /tinderbox/CURRENT/powerpc/powerpc/src/gnu/usr.bin/binutils/libbfd/../..
/../../contrib/binutils/bfd/elf32-ppc.c /tinderbox/CURRENT/powerpc/powerpc/src
/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/elflink.c /tinde
rbox/CURRENT/powerpc/powerpc/src/gnu/usr.bin/binutils/libbfd/../../../../contr
ib/binutils/bfd/ppcboot.c /tinderbox/CURRENT/powerpc/powerpc/src/gnu/usr.bin/b
inutils/libbfd/../../../../contrib/binutils/bfd/archive.c /tinderbox/CURRENT/p
owerpc/powerpc/src/gnu/usr.bin/binutils/libbfd/../../.
 ./../contrib/binutils/bfd/archive64.c /tinderbox/CURRENT/powerpc/powerpc/src/
gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/archures.c /tinde
rbox/CURRENT/powerpc/powerpc/src/gnu/usr.bin/binutils/libbfd/../../../../contr
ib/binutils/bfd/bfd.c /tinderbox/CURRENT/powerpc/powerpc/src/gnu/usr.bin/binut
ils/libbfd/../../../../contrib/binutils/bfd/binary.c /tinderbox/CURRENT/powerp
c/powerpc/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/cac
he.c /tinderbox/CURRENT/powerpc/powerpc/src/gnu/usr.bin/binutils/libbfd/../../
./../contrib/binutils/bfd/coffgen.c /tinderbox/CURRENT/powerpc/powerpc/src/gn
u/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/corefile.c /tinderb
ox/CURRENT/powerpc/powerpc/src/gnu/usr.bin/binutils/libbfd/../../../../contrib
/binutils/bfd/elf.c /tinderbox/CURRENT/powerpc/powerpc/src/gnu/usr.bin/binutil
s/libbfd/../../../../contrib/binutils/bfd/elf-eh-frame.c /tinderbox/CURRENT/po
werpc/powerpc/src/gnu/usr.bin/binutils/libbfd/../../..
 /../contrib/binutils/bfd/elf-strtab.c /tinderbox/CURRENT/powerpc/powerpc/src/
gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/format.c /tinderb
ox/CURRENT/powerpc/powerpc/src/gnu/usr.bin/binutils/libbfd/../../../../contrib
/binutils/bfd/hash.c /tinderbox/CURRENT/powerpc/powerpc/src/gnu/usr.bin/binuti
ls/libbfd/../../../../contrib/binutils/bfd/ihex.c /tinderbox/CURRENT/powerpc/p
owerpc/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/init.c
 /tinderbox/CURRENT/powerpc/powerpc/src/gnu/usr.bin/binutils/libbfd/../../../.
./contrib/binutils/bfd/libbfd.c /tinderbox/CURRENT/powerpc/powerpc/src/gnu/usr
.bin/binutils/libbfd/../../../../contrib/binutils/bfd/linker.c /tinderbox/CURR
ENT/powerpc/powerpc/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binuti
ls/bfd/merge.c /tinderbox/CURRENT/powerpc/powerpc/src/gnu/usr.bin/binutils/lib
bfd/../../../../contrib/binutils/bfd/opncls.c /tinderbox/CURRENT/powerpc/power
pc/src/gnu/usr.bin/binutils/libbfd/../../../../contrib
 /binutils/bfd/reloc.c /tinderbox/CURRENT/powerpc/powerpc/src/gnu/usr.bin/binu
tils/libbfd/../../../../contrib/binutils/bfd/section.c /tinderbox/CURRENT/powe
rpc/powerpc/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/s
rec.c /tinderbox/CURRENT/powerpc/powerpc/src/gnu/usr.bin/binutils/libbfd/../..
/../../contrib/binutils/bfd/stab-syms.c /tinderbox/CURRENT/powerpc/powerpc/src
/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/stabs.c /tinderb
ox/CURRENT/powerpc/powerpc/src/gnu/usr.bin/binutils/libbfd/../../../../contrib
/binutils/bfd/syms.c /tinderbox/CURRENT/powerpc/powerpc/src/gnu/usr.bin/binuti
ls/libbfd/../../../../contrib/binutils/bfd/targets.c /tinderbox/CURRENT/powerp
c/powerpc/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/tek
hex.c /tinderbox/CURRENT/powerpc/powerpc/src/gnu/usr.bin/binutils/libbfd/../..
/../../contrib/binutils/bfd/dwarf1.c /tinderbox/CURRENT/powerpc/powerpc/src/gn
u/usr.bin/binutils/libbfd/../../../../contrib/binutils
 /bfd/dwarf2.c /tinderbox/CURRENT/powerpc/powerpc/src/gnu/usr.bin/binutils/lib
bfd/../../../../contrib/binutils/bfd/bfdio.c /tinderbox/CURRENT/powerpc/powerp
c/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/simple.c
/tinderbox/CURRENT/powerpc/powerpc/src/contrib/binutils/bfd/elf32-ppc.c:34:23:
 elf32-ppc.h: No such file or directory
mkdep: compile failed
*** Error code 1

Stop in /tinderbox/CURRENT/powerpc/powerpc/src/gnu/usr.bin/binutils/libbfd.
*** Error code 1

Stop in /tinderbox/CURRENT/powerpc/powerpc/src/gnu/usr.bin/binutils.
*** Error code 1

Stop in /tinderbox/CURRENT/powerpc/powerpc/src.
*** Error code 1

Stop in /tinderbox/CURRENT/powerpc/powerpc/src.
*** Error code 1

Stop in /tinderbox/CURRENT/powerpc/powerpc/src.
TB --- 2004-06-19 12:06:42 - WARNING: /usr/bin/make returned exit code  1 
TB --- 2004-06-19 12:06:42 - ERROR: failed to build world
TB --- 2004-06-19 12:06:42 - tinderbox aborted


------------------------------

Message: 8
Date: Sat, 19 Jun 2004 14:11:31 +0200 (CEST)
From: Lukas Ertl <le@FreeBSD.org>
Subject: Kernel debugging with gdb6
To: current@FreeBSD.org
Cc: obrien@FreeBSD.org
Message-ID: <20040619140831.Q670@korben.in.tern>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

Hi,

I updated a -current box yesterday and installed the gdb6 package.  Now I 
try to debug a kernel crash dump and get this:

(kgdb) where
#0  doadump () at /usr/src/sys/kern/kern_shutdown.c:236
#1  0xc04dde7c in boot (howto=256) at 
/usr/src/sys/kern/kern_shutdown.c:370
#2  0xc04de1a7 in panic (fmt=0xc063ebc0 "%s")
     at /usr/src/sys/kern/kern_shutdown.c:548
#3  0xc061732a in trap_fatal (frame=0xdb99a818, eva=44)
     at /usr/src/sys/i386/i386/trap.c:815
#4  0xc0617043 in trap_pfault (frame=0xdb99a818, usermode=0, eva=44)
     at /usr/src/sys/i386/i386/trap.c:733
#5  0xc0616cc5 in trap (frame=
       {tf_fs = -1067188200, tf_es = 16, tf_ds = -1066991600, tf_edi = -103244
0448, tf_esi = 0, tf_ebp = -610685776, tf_isp = -610686908, tf_ebx = -10305066
24, tf_edx = 0, tf_ecx = -1033195047, tf_eax = 0, tf_trapno = 12, tf_err = 0, 
tf_eip = -1002626949, tf_cs = 8, tf_eflags = 66118, tf_esp = -1032440416, tf_s
s = -1030506624}) at /usr/src/sys/i386/i386/trap.c:420
#6  0xc060616a in calltrap () at /usr/src/sys/i386/i386/exception.s:140
#7  0xc0640018 in ?? ()
#8  0x00000010 in ?? ()
#9  0xc0670010 in ?? ()
#10 0xc2763580 in ?? ()
#11 0x00000000 in ?? ()
#12 0xdb99acb0 in ?? ()
#13 0xdb99a844 in ?? ()
#14 0xc293b780 in ?? ()
#15 0x00000000 in ?? ()
#16 0xc26ab1d9 in ?? ()
#17 0x00000000 in ?? ()
#18 0x0000000c in ?? ()
#19 0x00000000 in ?? ()
#20 0xc43d207b in ?? ()
#21 0x00000008 in ?? ()
#22 0x00010246 in ?? ()
#23 0xc27635a0 in ?? ()
#24 0xc293b780 in ?? ()
#25 0xc2763580 in ?? ()
#26 0x00000078 in ?? ()
---Type <return> to continue, or q <return> to quit---
#27 0xc04d5172 in free (addr=0xc2763580, type=0xdf939c60)
     at /usr/src/sys/kern/kern_malloc.c:342
#28 0xc43d266f in ?? ()
#29 0xc438da80 in ?? ()
#30 0xdf939c60 in ?? ()
#31 0xc43da6e0 in ?? ()
#32 0xdf939c60 in ?? ()
#33 0x00000000 in ?? ()
#34 0xdb99ace8 in ?? ()
#35 0xc04af346 in g_ctl_req (arg=0xdf939c60, flag=-1002592544)
     at /usr/src/sys/geom/geom_ctl.c:441
Previous frame identical to this frame (corrupt stack?)

cheers,
le

-- 
Lukas Ertl                         http://homepage.univie.ac.at/l.ertl/
le@FreeBSD.org                     http://people.freebsd.org/~le/

------------------------------

Message: 9
Date: Sat, 19 Jun 2004 14:30:11 +0200
From: Simon Barner <barner@in.tum.de>
Subject: Re: npxdna causing kernel traps
To: Static <static@ninja-assassin.com>
Cc: current@freebsd.org
Message-ID: <20040619123011.GA1102@zi025.glhnet.mhn.de>
Content-Type: text/plain; charset="us-ascii"

Hi,

> Thought I'd quick bounce this off the list before I submitted a bug 
> report.
> 
> I have a fresh install of 5.2.1 which i then upgraded to -current.  I'm 
> now getting the following message scrolling on the console
> 
> kernel trap 22 with interrupts disabled
> kernel: npxdna: fpcurthread == curthread X times

This is very likely due to rev. 1.150 of src/sys/i386/isa/npx.c:

http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/i386/isa/npx.c

Try going back to rev. 1.149.

For more background information see here:

http://lists.freebsd.org/pipermail/freebsd-current/2004-June/029205.html
http://www.freebsd.org/cgi/query-pr.cgi?pr=68058

Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: Digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040619/
de729b51/attachment-0001.bin

------------------------------

Message: 10
Date: Sat, 19 Jun 2004 08:48:18 -0400 (EDT)
From: FreeBSD Tinderbox <tinderbox@freebsd.org>
Subject: [current tinderbox] failure on sparc64/sparc64
To: FreeBSD Tinderbox <tinderbox@freebsd.org>, <current@freebsd.org>,
	<sparc64@freebsd.org>
Message-ID: <20040619124818.42E957306D@freebsd-current.sentex.ca>

TB --- 2004-06-19 12:06:42 - tinderbox 2.3 running on freebsd-current.sentex.c
a
TB --- 2004-06-19 12:06:42 - starting CURRENT tinderbox run for sparc64/sparc6
4
TB --- 2004-06-19 12:06:42 - checking out the source tree
TB --- 2004-06-19 12:06:42 - cd /home/tinderbox/sandbox/CURRENT/sparc64/sparc6
4
TB --- 2004-06-19 12:06:42 - /usr/bin/cvs -f -R -q -d/home/ncvs update -Pd -A 
src
TB --- 2004-06-19 12:09:06 - building world (CFLAGS=-O2 -pipe)
TB --- 2004-06-19 12:09:06 - cd /home/tinderbox/sandbox/CURRENT/sparc64/sparc6
4/src
TB --- 2004-06-19 12:09:06 - /usr/bin/make -B buildworld
>>> Rebuilding the temporary build tree
>>> stage 1.1: legacy release compatibility shims
>>> stage 1.2: bootstrap tools
>>> stage 2.1: cleaning up the object tree
>>> stage 2.2: rebuilding the object tree
>>> stage 2.3: build tools
>>> stage 3: cross tools
>>> stage 4.1: building includes
>>> stage 4.2: building libraries
>>> stage 4.3: make dependencies
>>> stage 4.4: building everything
[...]
cc -O2 -pipe  -DHAVE_CONFIG_H -I/tinderbox/CURRENT/sparc64/sparc64/src/gnu/usr
.bin/tar -I/tinderbox/CURRENT/sparc64/sparc64/src/gnu/usr.bin/tar/../../../con
trib/tar/lib -I/tinderbox/CURRENT/sparc64/sparc64/src/gnu/usr.bin/tar/../../..
/contrib/tar/src  -c /tinderbox/CURRENT/sparc64/sparc64/src/contrib/tar/lib/ex
clude.c
cc -O2 -pipe  -DHAVE_CONFIG_H -I/tinderbox/CURRENT/sparc64/sparc64/src/gnu/usr
.bin/tar -I/tinderbox/CURRENT/sparc64/sparc64/src/gnu/usr.bin/tar/../../../con
trib/tar/lib -I/tinderbox/CURRENT/sparc64/sparc64/src/gnu/usr.bin/tar/../../..
/contrib/tar/src  -c /tinderbox/CURRENT/sparc64/sparc64/src/contrib/tar/lib/fu
ll-write.c
cc -O2 -pipe  -DHAVE_CONFIG_H -I/tinderbox/CURRENT/sparc64/sparc64/src/gnu/usr
.bin/tar -I/tinderbox/CURRENT/sparc64/sparc64/src/gnu/usr.bin/tar/../../../con
trib/tar/lib -I/tinderbox/CURRENT/sparc64/sparc64/src/gnu/usr.bin/tar/../../..
/contrib/tar/src  -c /tinderbox/CURRENT/sparc64/sparc64/src/contrib/tar/lib/ge
tdate.c
cc -O2 -pipe  -DHAVE_CONFIG_H -I/tinderbox/CURRENT/sparc64/sparc64/src/gnu/usr
.bin/tar -I/tinderbox/CURRENT/sparc64/sparc64/src/gnu/usr.bin/tar/../../../con
trib/tar/lib -I/tinderbox/CURRENT/sparc64/sparc64/src/gnu/usr.bin/tar/../../..
/contrib/tar/src  -c /tinderbox/CURRENT/sparc64/sparc64/src/contrib/tar/lib/ge
tline.c
cc -O2 -pipe  -DHAVE_CONFIG_H -I/tinderbox/CURRENT/sparc64/sparc64/src/gnu/usr
.bin/tar -I/tinderbox/CURRENT/sparc64/sparc64/src/gnu/usr.bin/tar/../../../con
trib/tar/lib -I/tinderbox/CURRENT/sparc64/sparc64/src/gnu/usr.bin/tar/../../..
/contrib/tar/src  -c /tinderbox/CURRENT/sparc64/sparc64/src/contrib/tar/lib/ge
tstr.c
cc -O2 -pipe  -DHAVE_CONFIG_H -I/tinderbox/CURRENT/sparc64/sparc64/src/gnu/usr
.bin/tar -I/tinderbox/CURRENT/sparc64/sparc64/src/gnu/usr.bin/tar/../../../con
trib/tar/lib -I/tinderbox/CURRENT/sparc64/sparc64/src/gnu/usr.bin/tar/../../..
/contrib/tar/src  -c /tinderbox/CURRENT/sparc64/sparc64/src/contrib/tar/lib/ha
sh.c
{standard input}: Assembler messages:
{standard input}:1283: Error: Illegal operands
*** Error code 1

Stop in /tinderbox/CURRENT/sparc64/sparc64/src/gnu/usr.bin/tar.
*** Error code 1

Stop in /tinderbox/CURRENT/sparc64/sparc64/src/gnu/usr.bin.
*** Error code 1

Stop in /tinderbox/CURRENT/sparc64/sparc64/src/gnu.
*** Error code 1

Stop in /tinderbox/CURRENT/sparc64/sparc64/src.
*** Error code 1

Stop in /tinderbox/CURRENT/sparc64/sparc64/src.
*** Error code 1

Stop in /tinderbox/CURRENT/sparc64/sparc64/src.
TB --- 2004-06-19 12:48:18 - WARNING: /usr/bin/make returned exit code  1 
TB --- 2004-06-19 12:48:18 - ERROR: failed to build world
TB --- 2004-06-19 12:48:18 - tinderbox aborted


------------------------------

Message: 11
Date: Thu, 17 Jun 2004 01:05:27 -0400 (EDT)
From: "Mike Jakubik" <mikej@rogers.com>
Subject: Error in /usr/src/Makefile.inc1
To: freebsd-current@freebsd.org
Message-ID: <59753.192.168.0.195.1087448727.squirrel@192.168.0.195>
Content-Type: text/plain;charset=iso-8859-1

Cvsuped at Thu Jun 17 01:02:37 EDT 2004

---

root@lappy:/usr/src# make buildworld
"Makefile.inc1", line 65: Malformed conditional (${TARGET_ARCH} == "alpha")
"Makefile.inc1", line 65: Need an operator
"Makefile.inc1", line 67: if-less endif
"Makefile.inc1", line 67: Need an operator
make: fatal errors encountered -- cannot continue
*** Error code 1

Stop in /usr/src.



------------------------------

Message: 12
Date: Sat, 19 Jun 2004 22:27:46 +0930
From: "Daniel O'Connor" <doconnor@gsoft.com.au>
Subject: Re: altq
To: freebsd-current@freebsd.org, Dodell <dodell@sitetronics.com>
Cc: asfdqwer xzcvdsf <brueggma@yahoo.com>
Message-ID: <200406192227.46175.doconnor@gsoft.com.au>
Content-Type: Text/Plain;  charset="iso-8859-1"

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 16 Jun 2004 00:50, Dodell wrote:
> > # ALTQ
> > altq on $ext_if bandwidth 2Mb cbq queue { test }
>
> I think Max said that the interface hooks hadn't
> been imported yet -- they'll be imported next if
> this current import doesn't cause too many probs.

There are preliminary patches at
http://people.freebsd.org/~mlaier/

- -- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFA1DhK5ZPcIHs/zowRAt/tAJ4rSZo2tFVUX6vH4GwBXJ8XO7vkmwCfbD1y
aXUxIYfm1rkeyBUW6AjPkTU=
=SGLt
-----END PGP SIGNATURE-----

------------------------------

Message: 13
Date: Sat, 19 Jun 2004 22:59:22 +1000 (EST)
From: Bruce Evans <bde@zeta.org.au>
Subject: Re: npxdna causing kernel traps
To: Static <static@ninja-assassin.com>
Cc: current@freebsd.org
Message-ID: <20040619224926.D1028@gamplex.bde.org>
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Sat, 19 Jun 2004, Static wrote:

> I have a fresh install of 5.2.1 which i then upgraded to -current.  I'm
> now getting the following message scrolling on the console
>
> kernel trap 22 with interrupts disabled
> kernel: npxdna: fpcurthread == curthread X times

Should be fixed in rev.1.592 of i386/machdep.c.  Sorry about that.

> trap:
>
> Fatal trap 12: page fault while in kernel mode
> fault virtual address   = 0x100
> fault code              = supervisor read, page not present
> instruction pointer     = 0x8:0xc05ce9c4
> stack pointer           = 0x10:0xcc598a9c`
> frame pointer           = 0x10:0xcc598a9c`
> code segment            = base 0x0, limit 0xfffff, type 0x1b
>                          = DPL, pres 1, def32 1, gran 1
> processor eflags        = resume, IOPL = 0
> current process         = 54139 (make)
> kernel: type 12 trap, code=0
> Stopped at      npxdrop+0x20:   movl    0x100(%eax),%eax
>
> db> trace
> npxdrop(cc598d48,cc598ac4,c05c1c68,c1122dc0,48) at npxdrop+0x20
> fpstate_drop(c1122dc0,48,c14c0400,cc598b8c,0) at fpstate_drop+0x31
> exec_setregs(c1122dc0,80480b8,bfbfebf8,0,20) at exec_setregs+0xf8
> kern_execve(c1122dc0,8069644,80695b4,80695c4,0) at kern_execve+0xb81
> execve(c1122dc0,cc598d14,c,c1122dc0,3) at execve+0x18
> syscall(2f,2f,2f,0,0) at syscall+0x1d0
> Xint0x80_syscall() at Xint0x80_syscall+0x1f
> --- syscall (0, FreeBSD ELF32, nosys), eip=0x80480b8, esp=0bfbfebf8,ebp =
> 0 ---

This is a side effect of the bug that I suspected but didn't see in
normal operation.  npxdna() fixes up the problem OK except for printing
an error message, but trap() enables interrupts and npxdrop() is depending
on them staying disabled.  Switching context to an ithread is possible and
causes the above null pointer panic.

Bruce

------------------------------

Message: 14
Date: Sat, 19 Jun 2004 23:17:54 +1000 (EST)
From: Bruce Evans <bde@zeta.org.au>
Subject: Re: strange message appearing in a fresh current
To: Divacky Roman <xdivac02@stud.fit.vutbr.cz>
Cc: current@freebsd.org
Message-ID: <20040619230557.H1028@gamplex.bde.org>
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Sat, 19 Jun 2004, Divacky Roman wrote:

> > > built for i686 cpu (amd duron) with -O -pipe
> >
> > Hmm.  Don't Durons have FXSR?  (I686_CPU or CPU_ENABLE_SSE) and not
> > CPU_DISABLE_SSE together with a CPU that supports FXSR should give
> > a configuration that is not affected by the bug.
>
>   Origin = "AuthenticAMD"  Id = 0x631  Stepping = 1
>     Features=0x183f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,C
MOV,PAT,PSE36,MMX,FXSR>
>       AMD Features=0xc0440000<RSVD,AMIE,DSP,3DNow!>
>
> I just set
> cpu             I686_CPU
>
> no CPU_* at all. And the bug is there...

Ah.  It needs SSE in the cpuid too, and your Duron doesn't have it.  I
think Athlons got SSE starting with the XP.

The configuration of this is confusing.  From i386/initcpu.c:

% #if !defined(CPU_ENABLE_SSE) && defined(I686_CPU)
% #define CPU_ENABLE_SSE
% #endif
% #if defined(CPU_DISABLE_SSE)
% #undef CPU_ENABLE_SSE
% #endif

So I686_CPU gives CPU_ENABLE_SSE unless you use CPU_DISABLE_SSE.

% /*
%  * Initialize CR4 (Control register 4) to enable SSE instructions.
%  */
% void
% enable_sse(void)
% {
% #if defined(CPU_ENABLE_SSE)
% 	if ((cpu_feature & CPUID_XMM) && (cpu_feature & CPUID_FXSR)) {
% 		load_cr4(rcr4() | CR4_FXSR | CR4_XMM);
% 		cpu_fxsr = hw_instruction_sse = 1;
% 	}
% #endif
% }

Here CPUID_XMM is a confusing alias for CPUID_SSE (the identifcation message
only prints "SSE").  So to get cpu_fxsr, you need CPU_ENABLE_SSE or
I686_CPU && !CPU_DISABLE_SSE in the FreeBSD config, and SSE and FXSR in
the hardware.

% 		} else if (strcmp(cpu_vendor, "AuthenticAMD") == 0) {
% #if defined(I686_CPU) && defined(CPU_ATHLON_SSE_HACK)
% 			/*
% 			 * Sometimes the BIOS doesn't enable SSE instructions.
% 			 * According to AMD document 20734, the mobile
% 			 * Duron, the (mobile) Athlon 4 and the Athlon MP
% 			 * support SSE. These correspond to cpu_id 0x66X
% 			 * or 0x67X.
% 			 */
% 			if ((cpu_feature & CPUID_XMM) == 0 &&
% 			    ((cpu_id & ~0xf) == 0x660 ||
% 			     (cpu_id & ~0xf) == 0x670 ||
% 			     (cpu_id & ~0xf) == 0x680)) {
% 				u_int regs[4];
% 				wrmsr(0xC0010015, rdmsr(0xC0010015) & ~0x08000);
% 				do_cpuid(1, regs);
% 				cpu_feature = regs[3];
% 			}
% #endif

And for broken BIOSes, CPU_ATHLON_SSE_HACK is also needed to get SSE.

Bruce

------------------------------

Message: 15
Date: Sat, 19 Jun 2004 23:59:16 +1000 (EST)
From: Bruce Evans <bde@zeta.org.au>
Subject: Re: Bogus signal handler causes kernel panic (5.2.1-p8/i386)
To: Simon Barner <barner@in.tum.de>
Cc: current@freebsd.org
Message-ID: <20040619234133.G1285@gamplex.bde.org>
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Sat, 19 Jun 2004, Simon Barner wrote:

> I'll call that one patch3.
>
> > Index: machdep.c
> > ===================================================================
> > RCS file: /home/ncvs/src/sys/i386/i386/machdep.c,v
> > retrieving revision 1.590
> > diff -u -2 -r1.590 machdep.c
> > --- machdep.c	11 Jun 2004 11:16:22 -0000	1.590
> > +++ machdep.c	19 Jun 2004 05:27:18 -0000
> > @@ -1134,4 +1134,7 @@
> >          }
> >
> > +	/* XXX drop the FP state correctly, unlike in the next 3 statements. */

> > +	fpstate_drop(td);
> > +
> >  	/*
> >  	 * Initialize the math emulator (if any) for the current process.
> > %%%
>
> I was not sure whether to back out patch2 (against npx.c) before
> applying patch3, so I tried both combinations.

You needed this with patch2.  A cleaner version of it has now been committed.


> Unfortunately, I have to refer you to the attached stack traces once
> again :(

Another try:

%%%
Index: npx.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/isa/npx.c,v
retrieving revision 1.151
diff -u -2 -r1.151 npx.c
--- npx.c	18 Jun 2004 02:10:55 -0000	1.151
+++ npx.c	19 Jun 2004 13:44:15 -0000
@@ -945,4 +945,8 @@
 	s = intr_disable();
 	if (td == PCPU_GET(fpcurthread)) {
+#ifdef CPU_ENABLE_SSE
+		if (!cpu_fxsr)
+#endif
+			fnclex();	/* As in npxdrop(). */
 		fpurstor(addr);
 		intr_restore(s);
%%%

I tried too hard to keep the fnclex() out of fpurstor().  It should work
there (patch1), but it it is fairly expensive and fpurstor() is in the
main path for FPU context switching.  The above is in npxsetegs(), which
is called mainly for signal handling (on return).  It needs to set the
state, and it doesn't know anything about the current state except that it
is active, so it (the function) needs to defuse the current state
unconditionally.  Most signal handlers don't use FP, so this is not in a
fast path like FPU context switching.

I will let you test it before I commit it.

Bruce

------------------------------

Message: 16
Date: Sat, 19 Jun 2004 10:42:03 -0400 (EDT)
From: Robert Watson <rwatson@freebsd.org>
Subject: Re: Stack backtrace
To: grover@ceribus.net
Cc: freebsd-current@freebsd.org
Message-ID:
	<Pine.NEB.3.96L.1040619104022.91351A-100000@fledge.watson.org>
Content-Type: TEXT/PLAIN; charset=US-ASCII


On Fri, 18 Jun 2004 grover@ceribus.net wrote:

> It seems I jumped the gun on having tcp backtrace fixed. Heres what I'm
> seeing now. Also when using nfs or probably any high speed networking it
> makes the console scroll with this stuff. 

These are all the same NFS nit; I have an initial patch for a fix, but it
is actually against -CURRENT from late 2003 that was never merged, so I
need to update and test it.  I'll try to do that this weekend.  Still not
likely the cause of the corruption you're seeing, though.

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert@fledge.watson.org      Senior Research Scientist, McAfee Research


> 
> This is freshly rebuilt using generic kernel configuration. Not using a
> make.conf. Fresh buildworld and installworld. Heres small part of my dmesg
> so you know what sys I have.
> 
> FreeBSD 5.2-CURRENT #0: Fri Jun 18 19:32:27 PDT 2004
>     root@hellhoundxxt:/usr/obj/usr/src/sys/TEST
> WARNING: WITNESS option enabled, expect reduced performance.
> Preloaded elf kernel "/boot/kernel/kernel" at 0xc09f7000.
> Preloaded elf module "/boot/kernel/acpi.ko" at 0xc09f726c.
> Timecounter "i8254" frequency 1193182 Hz quality 0
> CPU: AMD Duron(tm) Processor (1194.92-MHz 686-class CPU)
>   Origin = "AuthenticAMD"  Id = 0x671  Stepping = 1
>   Features=0x383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMO
V,PAT,PSE36,MMX,FXSR,SSE>
>   AMD Features=0xc0480000<MP,AMIE,DSP,3DNow!>
> real memory  = 536805376 (511 MB)
> avail memory = 515616768 (491 MB)
> 
> ------------------------------------------------------------
> 
> malloc(M_WAITOK) of "Mbuf", forcing M_NOWAIT with the following
> non-sleepable locks held:
> exclusive sleep mutex inp (udpinp) r = 0 (0xc1caac84) locked @
> /usr/src/sys/netinet/udp_usrreq.c:402
> Stack backtrace:
> backtrace(1,c1cb3000,c1021b00,0,d4265b2c) at backtrace+0x12
> witness_warn(5,0,c07e3872,c07c8e95) at witness_warn+0x18e
> uma_zalloc_arg(c1021b00,d4265b44,2) at uma_zalloc_arg+0x38
> nfs_realign(d4265b84,28,c08c6ac0,0,c07da427) at nfs_realign+0x92
> nfsrv_rcv(c1ca9c58,c1c9fd80,1) at nfsrv_rcv+0x23d
> sowakeup(c1ca9c58,c1ca9ca8) at sowakeup+0x71
> udp_append(c1caabf4,c1ce500e,c1cb3000,1c,0) at udp_append+0x11f
> udp_input(c1cb3000,14,0,14,e1c8a8c0) at udp_input+0x511
> ip_input(c1cb3000) at ip_input+0x832
> netisr_processqueue(c08ba6f8,c1980c00,c19b3200,d4265d1c,c05da98c) at
> netisr_processqueue+0x6e
> swi_net(0) at swi_net+0x85
> ithread_loop(c19b3200,d4265d48,c19b3200,c05da858,0) at ithread_loop+0x134
> fork_exit(c05da858,c19b3200,d4265d48) at fork_exit+0x98
> fork_trampoline() at fork_trampoline+0x8
> --- trap 0x1, eip = 0, esp = 0xd4265d7c, ebp = 0 ---
> malloc(M_WAITOK) of "Mbuf", forcing M_NOWAIT with the following
> non-sleepable locks held:
> exclusive sleep mutex inp (udpinp) r = 0 (0xc1caac84) locked @
> /usr/src/sys/netinet/udp_usrreq.c:402
> Stack backtrace:
> backtrace(1,c1cb4e00,c1021b00,0,d4265b2c) at backtrace+0x12
> witness_warn(5,0,c07e3872,c07c8e95) at witness_warn+0x18e
> uma_zalloc_arg(c1021b00,d4265b44,2) at uma_zalloc_arg+0x38
> nfs_realign(d4265b84,28,c08c6ac0,0,c07da427) at nfs_realign+0x92
> nfsrv_rcv(c1ca9c58,c1c9fd80,1) at nfsrv_rcv+0x23d
> sowakeup(c1ca9c58,c1ca9ca8) at sowakeup+0x71
> udp_append(c1caabf4,c1cf580e,c1cb4e00,1c,0) at udp_append+0x11f
> udp_input(c1cb4e00,14,0,14,e1c8a8c0) at udp_input+0x511
> ip_input(c1cb4e00) at ip_input+0x832
> netisr_processqueue(c08ba6f8,c1980c00,c19b3200,d4265d1c,c05da98c) at
> netisr_processqueue+0x6e
> swi_net(0) at swi_net+0x85
> ithread_loop(c19b3200,d4265d48,c19b3200,c05da858,0) at ithread_loop+0x134
> fork_exit(c05da858,c19b3200,d4265d48) at fork_exit+0x98
> fork_trampoline() at fork_trampoline+0x8
> --- trap 0x1, eip = 0, esp = 0xd4265d7c, ebp = 0 ---
> malloc(M_WAITOK) of "Mbuf", forcing M_NOWAIT with the following
> non-sleepable locks held:
> exclusive sleep mutex inp (udpinp) r = 0 (0xc1caac84) locked @
> /usr/src/sys/netinet/udp_usrreq.c:402
> Stack backtrace:
> backtrace(1,c1cb3300,c1021b00,0,d4265b2c) at backtrace+0x12
> witness_warn(5,0,c07e3872,c07c8e95) at witness_warn+0x18e
> uma_zalloc_arg(c1021b00,d4265b44,2) at uma_zalloc_arg+0x38
> nfs_realign(d4265b84,28,c08c6ac0,0,c07da427) at nfs_realign+0x92
> nfsrv_rcv(c1ca9c58,c1c9fd80,1) at nfsrv_rcv+0x23d
> sowakeup(c1ca9c58,c1ca9ca8) at sowakeup+0x71
> udp_append(c1caabf4,c1ce380e,c1cb3300,1c,0) at udp_append+0x11f
> udp_input(c1cb3300,14,0,14,e1c8a8c0) at udp_input+0x511
> ip_input(c1cb3300) at ip_input+0x832
> netisr_processqueue(c08ba6f8,c1980c00,c19b3200,d4265d1c,c05da98c) at
> netisr_processqueue+0x6e
> swi_net(0) at swi_net+0x85
> ithread_loop(c19b3200,d4265d48,c19b3200,c05da858,0) at ithread_loop+0x134
> fork_exit(c05da858,c19b3200,d4265d48) at fork_exit+0x98
> fork_trampoline() at fork_trampoline+0x8
> --- trap 0x1, eip = 0, esp = 0xd4265d7c, ebp = 0 ---
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
> 


------------------------------

Message: 17
Date: Sat, 19 Jun 2004 17:00:07 +0200
From: Divacky Roman <xdivac02@stud.fit.vutbr.cz>
Subject: Re: strange message appearing in a fresh current
To: Bruce Evans <bde@zeta.org.au>
Cc: current@freebsd.org
Message-ID: <20040619150007.GA3387@stud.fit.vutbr.cz>
Content-Type: text/plain; charset=us-ascii

so what should I do to get rid off the bug? I dont understand what are
you trying to tell me... thnx :)

On Sat, Jun 19, 2004 at 11:17:54PM +1000, Bruce Evans wrote:
> On Sat, 19 Jun 2004, Divacky Roman wrote:
> 
> > > > built for i686 cpu (amd duron) with -O -pipe
> > >
> > > Hmm.  Don't Durons have FXSR?  (I686_CPU or CPU_ENABLE_SSE) and not
> > > CPU_DISABLE_SSE together with a CPU that supports FXSR should give
> > > a configuration that is not affected by the bug.
> >
> >   Origin = "AuthenticAMD"  Id = 0x631  Stepping = 1
> >     Features=0x183f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA
,CMOV,PAT,PSE36,MMX,FXSR>
> >       AMD Features=0xc0440000<RSVD,AMIE,DSP,3DNow!>
> >
> > I just set
> > cpu             I686_CPU
> >
> > no CPU_* at all. And the bug is there...
> 
> Ah.  It needs SSE in the cpuid too, and your Duron doesn't have it.  I
> think Athlons got SSE starting with the XP.
> 
> The configuration of this is confusing.  From i386/initcpu.c:
> 
> % #if !defined(CPU_ENABLE_SSE) && defined(I686_CPU)
> % #define CPU_ENABLE_SSE
> % #endif
> % #if defined(CPU_DISABLE_SSE)
> % #undef CPU_ENABLE_SSE
> % #endif
> 
> So I686_CPU gives CPU_ENABLE_SSE unless you use CPU_DISABLE_SSE.
> 
> % /*
> %  * Initialize CR4 (Control register 4) to enable SSE instructions.
> %  */
> % void
> % enable_sse(void)
> % {
> % #if defined(CPU_ENABLE_SSE)
> % 	if ((cpu_feature & CPUID_XMM) && (cpu_feature & CPUID_FXSR)) {
> % 		load_cr4(rcr4() | CR4_FXSR | CR4_XMM);
> % 		cpu_fxsr = hw_instruction_sse = 1;
> % 	}
> % #endif
> % }
> 
> Here CPUID_XMM is a confusing alias for CPUID_SSE (the identifcation message

> only prints "SSE").  So to get cpu_fxsr, you need CPU_ENABLE_SSE or
> I686_CPU && !CPU_DISABLE_SSE in the FreeBSD config, and SSE and FXSR in
> the hardware.
> 
> % 		} else if (strcmp(cpu_vendor, "AuthenticAMD") == 0) {
> % #if defined(I686_CPU) && defined(CPU_ATHLON_SSE_HACK)
> % 			/*
> % 			 * Sometimes the BIOS doesn't enable SSE instructions.
> % 			 * According to AMD document 20734, the mobile
> % 			 * Duron, the (mobile) Athlon 4 and the Athlon MP
> % 			 * support SSE. These correspond to cpu_id 0x66X
> % 			 * or 0x67X.
> % 			 */
> % 			if ((cpu_feature & CPUID_XMM) == 0 &&
> % 			    ((cpu_id & ~0xf) == 0x660 ||
> % 			     (cpu_id & ~0xf) == 0x670 ||
> % 			     (cpu_id & ~0xf) == 0x680)) {
> % 				u_int regs[4];
> % 				wrmsr(0xC0010015, rdmsr(0xC0010015) & ~0x08000);
> % 				do_cpuid(1, regs);
> % 				cpu_feature = regs[3];
> % 			}
> % #endif
> 
> And for broken BIOSes, CPU_ATHLON_SSE_HACK is also needed to get SSE.
> 
> Bruce

------------------------------

Message: 18
Date: Sat, 19 Jun 2004 17:09:05 +0200
From: "Wolfgang M. Weyand" <wolfgang@weyand-hg.de>
Subject: Re: npxdna causing kernel traps
To: freebsd-current@freebsd.org
Message-ID: <1087657744.5725.2.camel@hubhg01.weyand-hg.de>
Content-Type: text/plain

On Sat, 2004-06-19 at 14:59, Bruce Evans wrote:
> On Sat, 19 Jun 2004, Static wrote:
> 
> > I have a fresh install of 5.2.1 which i then upgraded to -current.  I'm
> > now getting the following message scrolling on the console
> >
> > kernel trap 22 with interrupts disabled
> > kernel: npxdna: fpcurthread == curthread X times
> 
> Should be fixed in rev.1.592 of i386/machdep.c.  Sorry about that.

JFTR, I applied the patch you posted earlier today and it fixed the
problem for me.


------------------------------

Message: 19
Date: Sat, 19 Jun 2004 08:33:26 -0700 (PDT)
From: David Wolfskill <david@catwhisker.org>
Subject: Re: [current tinderbox] failure on i386/i386
To: current@freebsd.org
Message-ID: <200406191533.i5JFXQf2002970@bunrab.catwhisker.org>

Hmmm... looks as if I'm getting the same failure here, and I don't see
a commit or patch posted to -current@ intended to fix it yet (though I
could well be overlooking something):

>>> Rebuilding the temporary build tree
>>> stage 1.1: legacy release compatibility shims
>>> stage 1.2: bootstrap tools
>>> stage 2.2: rebuilding the object tree
>>> stage 2.3: build tools
>>> stage 3: cross tools
>>> stage 4.1: building includes
>>> stage 4.2: building libraries
..
===> gnu/lib/libreadline/readline/doc
..
===> gnu/lib/libstdc++
..
c++ -O -pipe -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H -I/usr/src/gnu/lib/libstdc++ -I/u
sr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++ -I/usr/src/gnu/l
ib/libstdc++/../../../contrib/gcc -fno-implicit-templates -ffunction-sections 
-fdata-sections -Wno-deprecated -c /usr/src/contrib/libstdc++/libsupc++/tinfo2
.cc
c++ -O -pipe -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H -I/usr/src/gnu/lib/libstdc++ -I/u
sr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++ -I/usr/src/gnu/l
ib/libstdc++/../../../contrib/gcc -fno-implicit-templates -ffunction-sections 
-fdata-sections -Wno-deprecated -c /usr/src/contrib/libstdc++/libsupc++/vec.cc

cc -O -pipe  -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H -I/usr/src/gnu/lib/libstdc++ -I/u
sr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++ -I/usr/src/gnu/l
ib/libstdc++/../../../contrib/gcc  -c /usr/src/contrib/gcc/cp-demangle.c
cc -O -pipe  -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H -I/usr/src/gnu/lib/libstdc++ -I/u
sr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++ -I/usr/src/gnu/l
ib/libstdc++/../../../contrib/gcc  -c /usr/src/contrib/gcc/dyn-string.c
building static stdc++ library
ranlib libstdc++.a
c++ -fpic -DPIC -O -pipe -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H -I/usr/src/gnu/lib/li
bstdc++ -I/usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++ -I/u
sr/src/gnu/lib/libstdc++/../../../contrib/gcc -fno-implicit-templates -ffuncti
on-sections -fdata-sections -Wno-deprecated -c /usr/src/contrib/libstdc++/src/
fstream-inst.cc -o fstream-inst.So
{standard input}: Assembler messages:
{standard input}:6586: Error: junk `(%ecx)' after expression
{standard input}:6718: Error: junk `(%ecx)' after expression
{standard input}:7764: Error: junk `(%ecx)' after expression
{standard input}:7896: Error: junk `(%ecx)' after expression
{standard input}:8928: Error: junk `(%ecx)' after expression
{standard input}:9058: Error: junk `(%ecx)' after expression
{standard input}:10090: Error: junk `(%ecx)' after expression
{standard input}:10220: Error: junk `(%ecx)' after expression
{standard input}:11749: Error: junk `(%ecx)' after expression
{standard input}:11763: Error: junk `(%ecx)' after expression
{standard input}:11949: Error: junk `(%ecx)' after expression
{standard input}:11963: Error: junk `(%ecx)' after expression
{standard input}:13492: Error: junk `(%ecx)' after expression
{standard input}:13506: Error: junk `(%ecx)' after expression
{standard input}:13692: Error: junk `(%ecx)' after expression
{standard input}:13706: Error: junk `(%ecx)' after expression
{standard input}:14329: Error: junk `(%ecx)' after expression
{standard input}:14343: Error: junk `(%ecx)' after expression
{standard input}:14437: Error: junk `(%ecx)' after expression
{standard input}:14451: Error: junk `(%ecx)' after expression
{standard input}:14543: Error: junk `(%ecx)' after expression
{standard input}:14557: Error: junk `(%ecx)' after expression
{standard input}:14651: Error: junk `(%ecx)' after expression
{standard input}:14665: Error: junk `(%ecx)' after expression
*** Error code 1

Stop in /usr/src/gnu/lib/libstdc++.
*** Error code 1

Stop in /usr/src/gnu/lib.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
freebeast(5.2-C)[2] 

Some additional information -- this is on my SMP "build machine":

freebeast(5.2-C)[2] uname -a
FreeBSD freebeast.catwhisker.org 5.2-CURRENT FreeBSD 5.2-CURRENT #226: Fri Jun
 18 08:29:45 PDT 2004     root@freebeast.catwhisker.org:/common/S4/obj/usr/src
/sys/FREEBEAST  i386
freebeast(5.2-C)[3] tail /var/log/cvsup-history.log
CVSup begin from cvsup14.freebsd.org at Thu Jun 17 03:47:02 PDT 2004
CVSup ended from cvsup14.freebsd.org at Thu Jun 17 03:52:26 PDT 2004
CVSup begin from cvsup14.freebsd.org at Fri Jun 18 01:47:02 PDT 2004
CVSup ended from cvsup14.freebsd.org at Fri Jun 18 01:53:11 PDT 2004
CVSup begin from cvsup14.freebsd.org at Fri Jun 18 03:47:03 PDT 2004
CVSup ended from cvsup14.freebsd.org at Fri Jun 18 03:52:11 PDT 2004
CVSup begin from cvsup14.freebsd.org at Sat Jun 19 01:47:02 PDT 2004
CVSup ended from cvsup14.freebsd.org at Sat Jun 19 01:54:39 PDT 2004
CVSup begin from cvsup12.freebsd.org at Sat Jun 19 03:47:15 PDT 2004
CVSup ended from cvsup12.freebsd.org at Sat Jun 19 03:53:05 PDT 2004
freebeast(5.2-C)[4] 

Clues?

Thanks,
david
-- 
David H. Wolfskill				david@catwhisker.org
I do not "unsubscribe" from email "services" to which I have not explicitly
subscribed.  Rather, I block spammers' access to SMTP servers I control,
and encourage others who are in a position to do so to do likewise.

------------------------------

Message: 20
Date: Sat, 19 Jun 2004 23:41:50 +0800
From: leafy <leafy@leafy.idv.tw>
Subject: ld problem
To: freebsd-current@freebsd.org
Message-ID: <20040619154150.GA79735@chihiro.leafy.idv.tw>
Content-Type: text/plain; charset=big5

/usr/bin/ld: warning: libexpat.so.5, needed by 
/usr/X11R6/lib/libfontconfig.so, not found (try using -rpath or 
-rpath-link)

I get this when trying to upgrade gconf2 port.

ldd /usr/X11R6/lib/libfontconfig.so
/usr/X11R6/lib/libfontconfig.so:
        libfreetype.so.9 => /usr/local/lib/libfreetype.so.9 (0x28180000)
        libz.so.2 => /lib/libz.so.2 (0x281e7000)
        libexpat.so.5 => /usr/local/lib/libexpat.so.5 (0x281f4000)

ls -l /usr/local/lib/libexpat.so.5
-rwxr-xr-x  1 root  wheel  157509  5 30 16:01 
/usr/local/lib/libexpat.so.5*

Is there something I can do to rectify this?

Jiawei
-- 
"Without the userland, the kernel is useless."
               --inspired by The Tao of Programming

------------------------------

Message: 21
Date: Sat, 19 Jun 2004 17:55:57 +0200
From: Jilles Tjoelker <jilles@stack.nl>
Subject: Re: [REVIEW] move tty lock/initial up in the stack
To: Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc: current@freebsd.org
Message-ID: <20040619155557.GA96090@stack.nl>
Content-Type: text/plain; charset=us-ascii

On Sat, Jun 19, 2004 at 10:15:58AM +0200, Poul-Henning Kamp wrote:
> It adds two new flags to stty(1): -i and -l to manipulate the initial
> and lock states and eliminates the tty[il]d# and cua[il]a# devices.

> Subsequently I would like to move the tty/cua split up as well.

> Index: bin/stty/stty.c
> ===================================================================
> RCS file: /home/ncvs/src/bin/stty/stty.c,v
> retrieving revision 1.22
> diff -u -r1.22 stty.c
> --- bin/stty/stty.c	6 Apr 2004 20:06:53 -0000	1.22
> +++ bin/stty/stty.c	18 Jun 2004 11:36:57 -0000
> @@ -60,15 +60,17 @@
..
>  	while (optind < argc &&
>  	    strspn(argv[optind], "-aefg") == strlen(argv[optind]) &&

This needs to be changed to "-aefgil". This is possible because there
are no arguments starting with "-" and containing only "[aefgil]" in the
rest.

(This also means you can't do "-f/dev/ttyxxx".)

> -	    (ch = getopt(argc, argv, "aef:g")) != -1)
> +	    (ch = getopt(argc, argv, "aef:gil")) != -1)
>  		switch(ch) {
>  		case 'a':		/* undocumented: POSIX compatibility */

Not really related, but stty -a has been properly documented for a long
time ;-)

-- 
Jilles Tjoelker

------------------------------

Message: 22
Date: Sat, 19 Jun 2004 18:17:22 +0200
From: Szilveszter Adam <sziszi@bsd.hu>
Subject: Re: [current tinderbox] failure on i386/i386
To: current@freebsd.org
Message-ID: <20040619161722.GA48163@momo.buza.adamsfamily.xx>
Content-Type: text/plain; charset=us-ascii

Hello David,

On Sat, Jun 19, 2004 at 08:33:26AM -0700, David Wolfskill wrote:
> Hmmm... looks as if I'm getting the same failure here, and I don't see
> a commit or patch posted to -current@ intended to fix it yet (though I
> could well be overlooking something):

Yes, I am seeing this as well. It was caused by the change to 
src/contrib/gcc/config/i386/i386.c recently. If you back that out, it
should work again.

We will know more when David comes back.

-- 
Regards:

Szilveszter ADAM
Budapest
Hungary

------------------------------

Message: 23
Date: Sat, 19 Jun 2004 18:20:26 +0200
From: Michael Nottebrock <michaelnottebrock@gmx.net>
Subject: dlclose problem
To: freebsd-current@FreeBSD.org
Cc: Frerich Raabe <raabe@kde.org>
Message-ID: <200406191820.26499.michaelnottebrock@gmx.net>
Content-Type: text/plain; charset="us-ascii"

Attached is a small testcase made by Frerich Raabe (cc'd) which segfaults on 

-STABLE and 5.2.1-R but not on -CURRENT as of June 17th - I can't find what's 

changed in libc that prevents the segfault though. Any clues?

Frerich had this to say about the problem and testcase (it originally surfaced
 
in KDE/Qt):

> I think this is a flaw in the dlclose() code of the C library. The KDE
> styles are implemented as plugins (read: shared libraries) and allocate
> memory on the free store, and initialize static variables.
>
> The problem is that dlclose() does not seem to destruct those statics
> properly though, but silently succeeds. Then the main program triggers a
> segmentation fault as it tries to call __tfc_0 (an internal g++ function
> AFAICS) in the plugin - but the plugin has been unloaded already.
>
> IMHO the true fix would be to fix the C library.
>
> I attached a simple testcase which demonstrates the problem using nothing
> standard C and C++ library calls, so you don't have to install KDE to 
> reproduce this crash. Note that making "s" (in plugin.cc) a normal (auto) 
> variable and not static does not trigger the crash.

-- 
   ,_,   | Michael Nottebrock               | lofi@freebsd.org
 (/^ ^\) | FreeBSD - The Power to Serve     | http://www.freebsd.org
   \u/   | K Desktop Environment on FreeBSD | http://freebsd.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: signature
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040619/
f1e53328/attachment-0001.bin

------------------------------

Message: 24
Date: Sat, 19 Jun 2004 18:43:26 +0200
From: Michael Nottebrock <michaelnottebrock@gmx.net>
Subject: Re: dlclose problem
To: freebsd-current@FreeBSD.org
Cc: Frerich Raabe <raabe@kde.org>
Message-ID: <200406191843.26708.michaelnottebrock@gmx.net>
Content-Type: text/plain; charset="iso-8859-1"

On Saturday 19 June 2004 18:20, Michael Nottebrock wrote:
> Attached is a small testcase made by Frerich Raabe 

Since the mailinglist strips tarballs, here is the case uncompressed.

-- 
   ,_,   | Michael Nottebrock               | lofi@freebsd.org
 (/^ ^\) | FreeBSD - The Power to Serve     | http://www.freebsd.org
   \u/   | K Desktop Environment on FreeBSD | http://freebsd.kde.org
-------------- next part --------------
all: plugin.o dltest

clean:
	rm -f dltest plugin.o

plugin.o:
	g++ -shared -o plugin.o plugin.cc

dltest:
	g++ -Wl,--export-dynamic -o dltest dltest.cc
-------------- next part --------------
#include <dlfcn.h>

#include <iostream>

using namespace std;

int main()
{
	typedef void( *PluginFunction )();

	void *pluginHandle = dlopen( "./plugin.o", RTLD_LAZY );
	if ( !pluginHandle ) {
		cerr << dlerror() << endl;
		return 1;
	}

	PluginFunction pluginFunction = ( PluginFunction )dlsym( pluginHandle, "entry
" );

	const char *error = dlerror();
	if ( error ) {
		cerr << error << endl;
		return 1;
	}

	pluginFunction();

	dlclose( pluginHandle );
}

-------------- next part --------------
#include <string>
#include <iostream>
using namespace std;

extern "C" {

void entry()
{
	static std::string s;

	s = "Hi";

	cout << "Plugin says " << s << endl;
}

}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: signature
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040619/
11eea438/attachment.bin

------------------------------

_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"

End of freebsd-current Digest, Vol 65, Issue 21
***********************************************


--
Evariste Galois:
    �����呛��樱������蔷������,����直前......
�� ��源:������� bbs.ustc.edu.cn��[FROM: 210.45.72.234]