Message-ID: <4DTXki$Ba3@bbs.ustc.edu.cn>
Subject: freebsd-current Digest, Vol 71, Issue 4
Date: Tue, 03 Aug 2004 05:25:32 +0000
From: Galoisz.bbs@bbs.ustc.edu.cn (���博士)
Path: 74.82.202.154!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-cn.bbs.comp.unix.mbox.zip!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!83.128.0.12.MISMATCH!news-out2.kabelfoon.nl!83.128.0.10.MISMATCH!newsfeed.kabelfoon.nl!netnews.sdu.edu.cn!USTC
Newsgroups: cn.bbs.comp.unix
Organization: 嫺�����
X-Filename: Unix/M.1091510732.A
Xref: 74.82.202.154 cn.bbs.comp.unix:1415


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. RE: Vinum status (Daniel Eriksson)
   2. Re: ATA driver races with interrupts (Ville-Pertti Keinonen)
   3. Re: nvidia binary drivers no longer work (Paul Mather)
   4. Re: ATA driver races with interrupts (Kenneth Culver)
   5. CXXFLAGS and example make.conf (Paul Mather)
   6. RE: ATA driver races with interrupts (Daniel Eriksson)
   7. RE: Vinum status (Lukas Ertl)
   8. Re: ATA driver races with interrupts (Ville-Pertti Keinonen)
   9. Re: ATA driver races with interrupts (Kenneth Culver)
  10. Re: ATA driver races with interrupts (Ville-Pertti Keinonen)
  11. Re: ATA driver races with interrupts (S?ren Schmidt)
  12. RE: Vinum status (Daniel Eriksson)
  13. Re: ATA driver races with interrupts (Ville-Pertti Keinonen)
  14. buildworld failure on alpha (Peter Jeremy)
  15. Re: ATA driver races with interrupts (Matthew Dillon)
  16. Re: ATA driver races with interrupts (S?ren Schmidt)
  17. thr_spinlock.c and qtorrent (Andreas Heinze)
  18. Solution: thr_spinlock.c and qtorrent (Andreas Heinze)
  19. panic: vr_setcfg (Mike Bristow)
  20. Re: /dev/null doesn't get created (John Baldwin)
  21. Re: /dev/null doesn't get created (John Baldwin)
  22. Re: panic from July 21 kernel (acpi related?) (Mike Hunter)
  23. Re: Unable to build new kernel with old gcc (WAS: RE:
      Buildkernel+ALTQ	error) (Joel M. Baldwin)
  24. Panic in today's current, UFS problem? (Daniel Eriksson)
  25. Buildworld problem, warning: 'yy_flex_realloc' defined but
      not  used (Ganbold)
  26. Re: /dev/null doesn't get created (Jiawei Ye)
  27. Re: /dev/null doesn't get created (Jiawei Ye)
  28. Re: Panic in today's current, UFS problem? (Scott Long)
  29. RE: Panic in today's current, UFS problem? (Daniel Eriksson)
  30. RE: Panic in today's current, UFS problem? (Daniel Eriksson)
  31. Please test /etc/rc.d/sendmail patch (Gregory Neil Shapiro)
  32. Re: processes freezing when writing to gstripe'd device
      (Sam Lawrance)
  33. Re: LPT interruptstorm (Daniel O'Connor)


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

Message: 1
Date: Mon, 2 Aug 2004 19:00:30 +0200
From: "Daniel Eriksson" <daniel_k_eriksson@telia.com>
Subject: RE: Vinum status
To: "'Lukas Ertl'" <le@freebsd.org>
Cc: freebsd-current@freebsd.org
Message-ID:
	<!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAA0VcX9IoJqUaXPS8MjT1PdsKAAAAQAAAA6oFJjKsP1U2xzzwwRo0HTgEAAAAA@telia.com>
	
Content-Type: text/plain;	charset="us-ascii"

Lukas Ertl wrote:

> Yes, I still need to implement some details.  Round-robin 
> reads is one of them.

Could you also verify if sysinstall works for you when gvinum is active? I'm
running gvinum on two machines (one with multiple arrays, both stripes and
mirrors, and the other with one big raid 5 array), and sysinstall fails on
both with a "BARF 257" (seen once) or "BARF 259" (seen all the time) during
the probing phase just before the menu is supposed to come up.

/Daniel Eriksson



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

Message: 2
Date: Mon, 02 Aug 2004 20:08:07 +0300
From: Ville-Pertti Keinonen <will+freebsd-current@will.iki.fi>
Subject: Re: ATA driver races with interrupts
To: freebsd-current@freebsd.org
Cc: S?ren Schmidt<sos@DeepCore.dk>
Message-ID: <410E74F7.1070000@will.iki.fi>
Content-Type: text/plain; charset="us-ascii"

My previous patch makes things more reliable, but it's not good enough...

Attached is an updated version of the patch that clears ATA_EXPECT_INTR 
earlier (in the interrupt handler), which seems to stabilize things better.

I'm definitely not convinced of its correctness, since I'm not sure 
which part of the code is racing against interrupts despite the previous 
version of the patch, but I can no longer cause any failures.

Repeating the problem should be trivial with an unpatched -current with 
PREEMPTION enabled and hardware similar to mine - ASUS K8V Deluxe, two 
SATA disks on the VIA 6420:

..
atapci1: <VIA 6420 SATA150 controller> port 
0xd000-0xd0ff,0xd400-0xd40f,0xd800-0xd803,0xe000-0xe007,0xe400-0xe403,0xe800-0xe807 
irq 20 at device 15.0 on pci0
ata5: at 0xe800 on atapci1
ata6: at 0xe000 on atapci1
..
ad10: 152627MB <SAMSUNG SP1614C> [310101/16/63] at ata5-master SATA150
ad12: 152627MB <SAMSUNG SP1614C> [310101/16/63] at ata6-master SATA150

Partitions from ad10 and ad12 were mounted on /sata1 and /sata2, 
respectively, both containing tens of gigabytes of files.

By issuing

$ find /sata1 -type f -exec md5 '{}' \; & find /sata2 -type f -exec md5 
'{}' \; &

the system would lock up or detach one of the disks in less than 5 seconds.

With the attached version of my patch, it completed successfully.

-------------- next part --------------
Index: ata-all.h
===================================================================
RCS file: /data/freebsd/src/sys/dev/ata/ata-all.h,v
retrieving revision 1.79
diff -u -r1.79 ata-all.h
--- ata-all.h	30 Apr 2004 16:21:34 -0000	1.79
+++ ata-all.h	2 Aug 2004 15:54:50 -0000
@@ -339,6 +339,7 @@
 #define		ATA_48BIT_ACTIVE	0x10
 #define		ATA_IMMEDIATE_MODE	0x20
 #define		ATA_HWGONE		0x40
+#define		ATA_EXPECT_INTR		0x80
 
     struct ata_device		device[2];	/* devices on this channel */
 #define		MASTER			0x00
Index: ata-lowlevel.c
===================================================================
RCS file: /data/freebsd/src/sys/dev/ata/ata-lowlevel.c,v
retrieving revision 1.40
diff -u -r1.40 ata-lowlevel.c
--- ata-lowlevel.c	24 Jul 2004 19:03:28 -0000	1.40
+++ ata-lowlevel.c	2 Aug 2004 16:34:00 -0000
@@ -81,6 +81,7 @@
     }
 
     /* record the request as running */
+    ch->flags &= ~ATA_EXPECT_INTR;
     ch->running = request;
 
     ATA_DEBUG_RQ(request, "transaction");
@@ -140,6 +141,7 @@
 	}
 	
 	/* return and wait for interrupt */
+	ch->flags |= ATA_EXPECT_INTR;
 	return ATA_OP_CONTINUES;
 
     /* ATA DMA data transfer commands */
@@ -169,6 +171,7 @@
 	}
 
 	/* return and wait for interrupt */
+	ch->flags |= ATA_EXPECT_INTR;
 	return ATA_OP_CONTINUES;
 
     /* ATAPI PIO commands */
@@ -225,6 +228,7 @@
 			   ATA_PROTO_ATAPI_12 ? 6 : 8);
 
 	/* return and wait for interrupt */
+	ch->flags |= ATA_EXPECT_INTR;
 	return ATA_OP_CONTINUES;
 
     case ATA_R_ATAPI|ATA_R_DMA:
@@ -290,6 +294,7 @@
 	}
 
 	/* return and wait for interrupt */
+	ch->flags |= ATA_EXPECT_INTR;
 	return ATA_OP_CONTINUES;
     }
 
@@ -308,7 +313,7 @@
     int length;
 
     /* ignore this interrupt if there is no running request */
-    if (!request) 
+    if (!request || !(ch->flags & ATA_EXPECT_INTR))
 	return;
 
     ATA_DEBUG_RQ(request, "interrupt");
@@ -524,6 +529,8 @@
 	break;
     }
 
+    ch->flags &= ~ATA_EXPECT_INTR;
+
     /* if we timed out the unlocking of the ATA channel is done later */
     if (!(request->flags & ATA_R_TIMEOUT)) {
 	ch->running = NULL;

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

Message: 3
Date: Mon, 02 Aug 2004 13:13:17 -0400
From: Paul Mather <paul@gromit.dlib.vt.edu>
Subject: Re: nvidia binary drivers no longer work
To: freebsd-current@freebsd.org
Cc: Michal Varga <varga@stonehenge.sk>
Message-ID: <1091466796.575.9.camel@zappa.Chelsea-Ct.Org>
Content-Type: text/plain

On Sun, 01 Aug 2004 23:07:59 +0200, Michal Varga <varga@stonehenge.sk> wrote:

> Same here, stopped working about three days ago. Athlon 2500+, GeForce 2
> MX400, xorg-server-6.7.0_5, freezes when initializing video card. Open
> source drive works fine as usually.
> 
> The problem seems to be not kernel related, use of two week old kernel
> compiled on a different box didn't solve anything, so i suppose the new
> GCC has something to do with this. Rebuilt nvidia driver with no effect,
> xorg was not rebuilt yet, want to give it a try sometime. If someone
> tried that already, you can save me a lot of time by sending a notice..
> (the system is very unstable after all the latest changes in -current,
> so i suppose i will take 5-6 panics or lockups until i will be able to
> recompile xorg succesfully, if ever..)

I don't think the GCC 3.4.2 import broke it.  I have a -CURRENT
kernel+world built post-import and the nVidia driver still works for
me.  (I did have to rebuilt the nvidia-driver port via "portupgrade -fu"
though: the original installed version locked up my system when starting
X.)  My kernel is dated "Sat Jul 31 23:08:22 EDT 2004," and I think
that's from sources cvsupped sometime late 30th July/early 31st July.

My card probes as follows:

nvidia0: <GeForce FX 5200> mem 0xe0000000-0xe7ffffff,0xec000000-0xecffffff irq 5 at device 0.0 on pci1

pciconf -vl:

nvidia0@pci1:0:0:       class=0x030000 card=0x00000000 chip=0x032210de rev=0xa1 hdr=0x00
    vendor   = 'NVIDIA Corporation'
    device   = 'GeForce FX 5200 [NV34.3]'
    class    = display
    subclass = VGA

The graphics card is installed in a uniprocessor Pentium II-300 system.

Cheers,

Paul.
-- 
e-mail: paul@gromit.dlib.vt.edu

"Without music to decorate it, time is just a bunch of boring production
 deadlines or dates by which bills must be paid."
        --- Frank Vincent Zappa


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

Message: 4
Date: Mon,  2 Aug 2004 13:28:02 -0400
From: Kenneth Culver <culverk@sweetdreamsracing.biz>
Subject: Re: ATA driver races with interrupts
To: Ville-Pertti Keinonen <will+freebsd-current@will.iki.fi>
Cc: freebsd-current@freebsd.org
Message-ID:
	<20040802132802.3d7kgoow0c80ss0s@www.sweetdreamsracing.biz>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"

Quoting Ville-Pertti Keinonen <will+freebsd-current@will.iki.fi>:

> My previous patch makes things more reliable, but it's not good enough...
>
> Attached is an updated version of the patch that clears ATA_EXPECT_INTR
> earlier (in the interrupt handler), which seems to stabilize things better.
>
> I'm definitely not convinced of its correctness, since I'm not sure
> which part of the code is racing against interrupts despite the previous
> version of the patch, but I can no longer cause any failures.
>
> Repeating the problem should be trivial with an unpatched -current with
> PREEMPTION enabled and hardware similar to mine - ASUS K8V Deluxe, two
> SATA disks on the VIA 6420:
>
I have this exact same motherboard, but I'm using the onboard promise 
controller
set up with 2 disks as a raid0, and I'm not having any problems with this
setup. I used the promise controller because from what I've been told, the
promise controllers are very fast in FreeBSD compared to other controllers.

Ken

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

Message: 5
Date: Mon, 02 Aug 2004 13:31:31 -0400
From: Paul Mather <paul@gromit.dlib.vt.edu>
Subject: CXXFLAGS and example make.conf
To: freebsd-current@freebsd.org
Message-ID: <1091467890.575.24.camel@zappa.Chelsea-Ct.Org>
Content-Type: text/plain

One thing I noticed when building a new userland after the GCC 3.4.2
import is that it fails if you have uncommented in your /etc/make.conf
file the CXXFLAGS line in the sample make.conf file (e.g., if you copied
/usr/src/share/examples/etc/make.conf to /etc/make.conf and happened to
uncomment the CXXFLAGS line thinking it was safe/recommended to do so).

In my case, I got this during "make 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
[[...]]
===> gnu/lib/libreadline/readline/doc
===> gnu/lib/libstdc++
c++ -O -pipe -march=pentium2 -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H -I/usr/src/gnu/lib/libstdc++ -I/usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++ -I/usr/src/gnu/lib/libstdc++/../../../contrib/gcc -I/usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/include -fmemoize-lookups -fsave-memoized -fno-implicit-templates -ffunction-sections -fdata-sections  -Wno-deprecated -c /usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/src/allocator.cc
cc1plus: error: unrecognized command line option "-fmemoize-lookups"
cc1plus: error: unrecognized command line option "-fsave-memoized"
*** 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.
<<<<<

It seems that both options in the example line "#CXXFLAGS+=
-fmemoize-lookups -fsave-memoized" are no longer valid in GCC 3.4.2. 
So, I guess they should be changed/removed in the example make.conf. 
(Commenting out CXXFLAGS again in my /etc/make.conf fixed my problem.)

BTW, the only other upgrade problem I had was during "make
installworld".  I got a complaint about "btxld" not being found when
installing boot2.  However, simply running "make installworld" again
after running a "make install" in /usr/src/sys/boot/i386 seemed to solve
the problem and allow installworld to complete successfully.

Cheers,

Paul.
-- 
e-mail: paul@gromit.dlib.vt.edu

"Without music to decorate it, time is just a bunch of boring production
 deadlines or dates by which bills must be paid."
        --- Frank Vincent Zappa


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

Message: 6
Date: Mon, 2 Aug 2004 19:35:41 +0200
From: "Daniel Eriksson" <daniel_k_eriksson@telia.com>
Subject: RE: ATA driver races with interrupts
To: "'Ville-Pertti Keinonen'" <will+freebsd-current@will.iki.fi>,
	<freebsd-current@freebsd.org>
Message-ID:
	<!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAA0VcX9IoJqUaXPS8MjT1PdsKAAAAQAAAAtrV5IQbrQUKQ3LWR5RFP/AEAAAAA@telia.com>
	
Content-Type: text/plain;	charset="iso-8859-1"

Ville-Pertti Keinonen wrote:

> Repeating the problem should be trivial with an unpatched 
> -current with 
> PREEMPTION enabled and hardware similar to mine - ASUS K8V 
> Deluxe, two 
> SATA disks on the VIA 6420:
> 
> ...
> atapci1: <VIA 6420 SATA150 controller> port 
> 0xd000-0xd0ff,0xd400-0xd40f,0xd800-0xd803,0xe000-0xe007,0xe400
> -0xe403,0xe800-0xe807 
> irq 20 at device 15.0 on pci0
> ata5: at 0xe800 on atapci1
> ata6: at 0xe000 on atapci1
> ...
> ad10: 152627MB <SAMSUNG SP1614C> [310101/16/63] at ata5-master SATA150
> ad12: 152627MB <SAMSUNG SP1614C> [310101/16/63] at ata6-master SATA150

This looks exactly like the problems I have had with similar hardware (ASUS
A7V600-X, a KT-600 based mobo with an on-board 6420 controller). With
preemption turned off it sort of worked, but with preemption turned on the
discs would lock up pretty quick just as you described it.

I have just applied the patch and will try it out later tonight once I get
everything recompiled. I'll let you know how it turns out.

/Daniel Eriksson



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

Message: 7
Date: Mon, 2 Aug 2004 19:34:39 +0200 (CEST)
From: Lukas Ertl <le@FreeBSD.org>
Subject: RE: Vinum status
To: Daniel Eriksson <daniel_k_eriksson@telia.com>
Cc: freebsd-current@FreeBSD.org
Message-ID: <20040802193340.R905@korben.in.tern>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

On Mon, 2 Aug 2004, Daniel Eriksson wrote:

> Lukas Ertl wrote:
>
>> Yes, I still need to implement some details.  Round-robin
>> reads is one of them.
>
> Could you also verify if sysinstall works for you when gvinum is active? I'm
> running gvinum on two machines (one with multiple arrays, both stripes and
> mirrors, and the other with one big raid 5 array), and sysinstall fails on
> both with a "BARF 257" (seen once) or "BARF 259" (seen all the time) during
> the probing phase just before the menu is supposed to come up.

This patch should fix it.  You need to recompile libdisk and sysinstall.

---8<---
Index: open_disk.c
===================================================================
RCS file: /usr/local/bsdcvs/src/lib/libdisk/open_disk.c,v
retrieving revision 1.4
diff -u -r1.4 open_disk.c
--- open_disk.c	21 Apr 2004 23:21:13 -0000	1.4
+++ open_disk.c	2 Aug 2004 17:33:08 -0000
@@ -263,6 +263,8 @@
  			; /* nothing */
  		else if (!strcmp(t, "APPLE"))
  			i = Add_Chunk(d, off, len, n, apple, 0, 0, sn);
+		else if (strstr(t, "VINUM") != NULL)
+			; /* nothing */
  		else {
  			printf("BARF 135147712\n", __LINE__);
  			exit(0);
---8<---

cheers,
le

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

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

Message: 8
Date: Mon, 02 Aug 2004 20:36:11 +0300
From: Ville-Pertti Keinonen <will+freebsd-current@will.iki.fi>
Subject: Re: ATA driver races with interrupts
To: Kenneth Culver <culverk@sweetdreamsracing.biz>
Cc: freebsd-current@freebsd.org
Message-ID: <410E7B8B.3080407@will.iki.fi>
Content-Type: text/plain; charset=us-ascii; format=flowed

Kenneth Culver wrote:

> I have this exact same motherboard, but I'm using the onboard promise 
> controller
> set up with 2 disks as a raid0, and I'm not having any problems with this
> setup. I used the promise controller because from what I've been told, 
> the
> promise controllers are very fast in FreeBSD compared to other 
> controllers.

If the two disks appear as one to FreeBSD, the problem probably isn't 
going to show up.

It may also depend on the controller, since the channel registers might 
not satisfy the conditions in ata_generic_interrupt (I didn't bother 
digging up my ATA specs while debugging this), but even if it is a 
controller oddity, I don't think the ATA driver should be sensitive such 
conditions.


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

Message: 9
Date: Mon,  2 Aug 2004 13:49:03 -0400
From: Kenneth Culver <culverk@sweetdreamsracing.biz>
Subject: Re: ATA driver races with interrupts
To: Ville-Pertti Keinonen <will+freebsd-current@will.iki.fi>
Cc: freebsd-current@freebsd.org
Message-ID:
	<20040802134903.lxnkgosco4ccck0s@www.sweetdreamsracing.biz>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"

Quoting Ville-Pertti Keinonen <will+freebsd-current@will.iki.fi>:

> Kenneth Culver wrote:
>
>> I have this exact same motherboard, but I'm using the onboard 
>> promise controller
>> set up with 2 disks as a raid0, and I'm not having any problems with this
>> setup. I used the promise controller because from what I've been told, the
>> promise controllers are very fast in FreeBSD compared to other controllers.
>
> If the two disks appear as one to FreeBSD, the problem probably isn't
> going to show up.
>
> It may also depend on the controller, since the channel registers might
> not satisfy the conditions in ata_generic_interrupt (I didn't bother
> digging up my ATA specs while debugging this), but even if it is a
> controller oddity, I don't think the ATA driver should be sensitive such
> conditions.

OK, I've never tried to access the SATA drives individually, even though they
show up as individual drives as well as showing up as the raid array.

Ken


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

Message: 10
Date: Mon, 02 Aug 2004 20:54:48 +0300
From: Ville-Pertti Keinonen <will+freebsd-current@will.iki.fi>
Subject: Re: ATA driver races with interrupts
To: freebsd-current@freebsd.org
Message-ID: <410E7FE8.1080109@will.iki.fi>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Ville-Pertti Keinonen wrote:

>
> I'm definitely not convinced of its correctness, since I'm not sure 
> which part of the code is 

I've spent too much time away from kernel code.  Now that I think about 
it, obviously it'll break things on systems with edge-triggered 
interrupts, so don't try the patch on old ISA boxes...

I think I need to read more code in order to get back up-to-date with 
the new FreeBSD interrupt mechanisms before trying again.


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

Message: 11
Date: Mon, 02 Aug 2004 20:02:32 +0200
From: S?ren Schmidt<sos@DeepCore.dk>
Subject: Re: ATA driver races with interrupts
To: Ville-Pertti Keinonen <will+freebsd-current@will.iki.fi>
Cc: Kenneth Culver <culverk@sweetdreamsracing.biz>
Message-ID: <410E81B8.1000206@DeepCore.dk>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Ville-Pertti Keinonen wrote:
> Kenneth Culver wrote:
> 
>> I have this exact same motherboard, but I'm using the onboard promise 
>> controller
>> set up with 2 disks as a raid0, and I'm not having any problems with this
>> setup. I used the promise controller because from what I've been told, 
>> the
>> promise controllers are very fast in FreeBSD compared to other 
>> controllers.
> 
> 
> If the two disks appear as one to FreeBSD, the problem probably isn't 
> going to show up.
> 
> It may also depend on the controller, since the channel registers might 
> not satisfy the conditions in ata_generic_interrupt (I didn't bother 
> digging up my ATA specs while debugging this), but even if it is a 
> controller oddity, I don't think the ATA driver should be sensitive such 
> conditions.

There is no good solution to this *unless* the HW has bits to determine 
which channel caused the interrupt. Now all decent controller has this, 
but I have no idea about the VIA since they are not one of those 
companies that hands out docs.

The only way to safeguard is to "serialize" access to the channels as 
I've done on a few oh so broken chipsets...

-- 
-S�ren


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

Message: 12
Date: Mon, 2 Aug 2004 20:15:39 +0200
From: "Daniel Eriksson" <daniel_k_eriksson@telia.com>
Subject: RE: Vinum status
To: "'Lukas Ertl'" <le@FreeBSD.org>
Cc: freebsd-current@FreeBSD.org
Message-ID:
	<!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAA0VcX9IoJqUaXPS8MjT1PdsKAAAAQAAAAFDsybyte90uIxlbwwK9aSwEAAAAA@telia.com>
	
Content-Type: text/plain;	charset="us-ascii"

Lukas Ertl wrote:

> This patch should fix it.  You need to recompile libdisk and 
> sysinstall.

Yes, that makes sysinstall start up properly. Thanks!

I will test it later tonight on two discs(*) so I can verify that it
actually works properly (I'm sure it does).

(*) I just applied the SATA interrupt patch from Ville-Pertti Keinonen, so
hopefully I can get my two 250GB SATA discs working again.

/Daniel Eriksson



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

Message: 13
Date: Mon, 02 Aug 2004 21:19:00 +0300
From: Ville-Pertti Keinonen <will+freebsd-current@will.iki.fi>
Subject: Re: ATA driver races with interrupts
To: S?ren Schmidt<sos@DeepCore.dk>
Cc: freebsd-current@freebsd.org
Message-ID: <410E8594.7070600@will.iki.fi>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

S�ren Schmidt wrote:

> There is no good solution to this *unless* the HW has bits to 
> determine which channel caused the interrupt. Now all decent 
> controller has this, but I have no idea about the VIA since they are 
> not one of those companies that hands out docs.
>
> The only way to safeguard is to "serialize" access to the channels as 
> I've done on a few oh so broken chipsets...

Ok, I see where it should be detected now - in ata_generic_intr, before 
ata_generic_interrupt...

There is an actual test for the interrupt on the channel, so there 
should be no race if the controller works correctly.  Apparently the VIA 
doesn't...

The detection only applies to DMA - is PIO sensitive to unexpected 
interrupts, even on working controllers?  If so, shouldn't there be some 
protection against this?


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

Message: 14
Date: Tue, 3 Aug 2004 05:52:56 +1000
From: Peter Jeremy <PeterJeremy@optushome.com.au>
Subject: buildworld failure on alpha
To: freebsd-current@freebsd.org
Message-ID: <20040802195256.GA6388@cirb503493.alcatel.com.au>
Content-Type: text/plain; charset=us-ascii

After updating to about 0500UT, buildworld on my AS400 failed with:

--------------------------------------------------------------
>>> stage 4.2: building libraries
--------------------------------------------------------------
..
===> lib/libc
..
cc -O -pipe -mcpu=ev45 -mieee -I/home/src5/lib/libc/include -I/home/src5/lib/libc/../../include -I/home/src5/lib/libc/alpha -D__DBINTERFACE_PRIVATE -I/home/src5/lib/libc/../../contrib/gdtoa -DINET6 -I/home/obj/home/src5/lib/libc -DPOSIX_MISTAKE -I/home/src5/lib/libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/home/src5/lib/libc/rpc -DYP -DHESIOD -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -c /home/src5/lib/libc/net/ns_ttl.c
cc -O -pipe -mcpu=ev45 -mieee -I/home/src5/lib/libc/include -I/home/src5/lib/libc/../../include -I/home/src5/lib/libc/alpha -D__DBINTERFACE_PRIVATE -I/home/src5/lib/libc/../../contrib/gdtoa -DINET6 -I/home/obj/home/src5/lib/libc -DPOSIX_MISTAKE -I/home/src5/lib/libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/home/src5/lib/libc/rpc -DYP -DHESIOD -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -c /home/src5/lib/libc/net/nsdispatch.c
mv y.tab.h nsparser.h
mv: y.tab.h: No such file or directory
*** Error code 1

Stop in /home/src5/lib/libc.
*** Error code 1

Anyone else seen this?

I've deleted /usr/obj, updated and am trying again but it will take
some time to know if the problem has gone away.

-- 
Peter Jeremy

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

Message: 15
Date: Mon, 2 Aug 2004 13:00:38 -0700 (PDT)
From: Matthew Dillon <dillon@apollo.backplane.com>
Subject: Re: ATA driver races with interrupts
To: S?ren Schmidt<sos@DeepCore.dk>
Cc: Kenneth Culver <culverk@sweetdreamsracing.biz>
Message-ID: <200408022000.i72K0cWU002698@apollo.backplane.com>

    I should also note that there seems to be an assumption (at least in 4.x)
    that no ATA interrupt will occur once the ATA interrupt is masked.

    The problem with this assumption is that the ATA interrupt could have
    already occured and been queued/delayed due to a mutex, Giant, or other
    mechanism, just prior to the device interrupt being masked.

    It is exactly the same problem that one has with shared device 
    interrupts so hopefully solving the shared device interrupt case will
    also solve the interrupt masking race case.

						-Matt

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

Message: 16
Date: Mon, 02 Aug 2004 22:50:52 +0200
From: S?ren Schmidt<sos@DeepCore.dk>
Subject: Re: ATA driver races with interrupts
To: Ville-Pertti Keinonen <will+freebsd-current@will.iki.fi>
Cc: freebsd-current@freebsd.org
Message-ID: <410EA92C.6090506@DeepCore.dk>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Ville-Pertti Keinonen wrote:
> S�ren Schmidt wrote:
> 
>> There is no good solution to this *unless* the HW has bits to 
>> determine which channel caused the interrupt. Now all decent 
>> controller has this, but I have no idea about the VIA since they are 
>> not one of those companies that hands out docs.
>>
>> The only way to safeguard is to "serialize" access to the channels as 
>> I've done on a few oh so broken chipsets...
> 
> 
> Ok, I see where it should be detected now - in ata_generic_intr, before 
> ata_generic_interrupt...
> 
> There is an actual test for the interrupt on the channel, so there 
> should be no race if the controller works correctly.  Apparently the VIA 
> doesn't...
> 
> The detection only applies to DMA - is PIO sensitive to unexpected 
> interrupts, even on working controllers?  If so, shouldn't there be some 
> protection against this?

If the controller doesn't have a bit saying if the interrupt is for us, 
then its impossible to close the race completely (without the above 
measures in place). However some devices use the DMA interrupt bits even 
in PIO mode (ie HPT does this) but I have no docs on the VIA's on that, 
but its worth a try at least...

-- 
-S�ren


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

Message: 17
Date: Mon, 02 Aug 2004 23:12:22 +0200
From: "Andreas Heinze" <andreasheinze@gmx.de>
Subject: thr_spinlock.c and qtorrent
To: freebsd-current@freebsd.org
Message-ID: <opsb4iiwixwd3nx0@mail.gmx.de>
Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-1

I'm trying to build qtorrent and getting this error:

QScintilla 1.3 is being used.
Checking to see if the qtcanvas module should be built...
Checking to see if the qtnetwork module should be built...
Checking to see if the qttable module should be built...
Checking to see if the qtxml module should be built...
Checking to see if the qtgl module should be built...
Checking to see if the qtui module should be built...
Checking to see if the qtsql module should be built...
Checking to see if the qtext module should be built...
Checking to see if the QAssistantClient class is available...
Creating features file...
Fatal error 'Spinlock called when not threaded.' at line 83 in file  
/usr/src/lib/libpthread/thread/thr_spinlock.c (errno = 0)
Abort trap (core dumped)
Error: There was an error creating the features file.
*** Error code 1

what's wrong??

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

Message: 18
Date: Mon, 02 Aug 2004 23:24:26 +0200
From: "Andreas Heinze" <andreasheinze@gmx.de>
Subject: Solution: thr_spinlock.c and qtorrent
To: freebsd-current@freebsd.org
Message-ID: <opsb4i20ktwd3nx0@mail.gmx.de>
Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-1

> Fatal error 'Spinlock called when not threaded.' at line 83 in file  
> /usr/src/lib/libpthread/thread/thr_spinlock.c (errno = 0)
> Abort trap (core dumped)
> Error: There was an error creating the features file.
> *** Error code 1
>
> what's wrong??

create the file:
  /etc/libmap.conf

and add these two lines:
libpthread.so.1         libc_r.so.5
libpthread.so           libc_r.so

that's all ...


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

Message: 19
Date: Mon, 2 Aug 2004 22:42:25 +0100
From: Mike Bristow <mike@urgle.com>
Subject: panic: vr_setcfg
To: freebsd-current@freebsd.org
Cc: bms@freebsd.org
Message-ID: <20040802214225.GA35626@urgle.com>
Content-Type: text/plain; charset=us-ascii

Hi,

I updated my machine at home to -current over the weekend, and it
panics just after the rc scripts configure vr0 (I think):

vr0: flags=8843<UP,BROADCAST,RUNNNING.SIMPLEX,MULTICAST> mtu 1500
        inet ...
        inet6 ....
        ether ....
panic: mutex vr0 not owned at /usr/src/sys/pci/if_vr.c:571
cpuid=1;
KDB: enter: panic
[thread 100077]
Stopped at      kdb_enter+0x30: leave

db> trace
kdb_enter(...)
panic(...)
_mtx_assert(...)
vr_setcfg(...)
vr_miibus_statchg(...)
miibus_statchg(...)
mii_phy_update(...)
amphy_service(...)
mii_pollstat(...)
vr_ifmedia_sts(...)
ifmedia_ioctl(...)
vr_ioctl(...)
ifhwioctl(...)
ifioctl(...)
soo_ioctl(...)
ioctl(...)
syscakk(...)
Xint0x80_syscall(...)
db> 


the usual excuses of "I copied the panic by hand" apply; it doesn't
Just Give me a crashdumnp, I'll try and figure out how to get a
crashdump & more useful debugging but that might take me a while;
I thought I'd throw the above out in the hope that it'd be enough
for people to work out what's going on - I /think/ I can sorta follow
it, but I don't know where the mutex should be aquired - yet :)

The version of if_vr.c that I moved from is 1.85; I haven't done 
any investigation as to when the problem was introduced.  

I'm running SMP:  I suspect that matters.


Cheers,
Mike

-- 
You dont have to be illiterate to use the Internet, but it help's.


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

Message: 20
Date: Mon, 2 Aug 2004 18:38:44 -0400
From: John Baldwin <jhb@FreeBSD.org>
Subject: Re: /dev/null doesn't get created
To: freebsd-current@FreeBSD.org, dlt@mebtel.net
Cc: current@FreeBSD.org
Message-ID: <200408021838.44384.jhb@FreeBSD.org>
Content-Type: text/plain;  charset="iso-8859-1"

On Sunday 01 August 2004 05:09 pm, Derek Tattersall wrote:
> * Mark Murray (mark@grondar.org) [040801 17:03]:
> > From: Mark Murray <mark@grondar.org>
> > Message-Id: <200408011825.i71IPZgG018406@grimreaper.grondar.org>
> > To: dlt@mebtel.net
> > Cc: current@FreeBSD.ORG
> > Subject: Re: /dev/null doesn't get created
> > Date: Sun, 01 Aug 2004 19:25:34 +0100
> >
> > Derek Tattersall writes:
> > > CURRENT as of this morning dint'create /dev/null.  My previous
> > > CURRENT, from July 25 created it fine so all was well.Can anybody
> > > offer me a clue as to what this is all about?  I tried to figure out
> > > what causes /dev/null to get created, but was unsuccessful.
> >
> > BOOBOO of mine. Please always check src/UPDATING for clues :-)
> >
> > M
> > --
> > Mark Murray
> > iumop ap!sdn w,I idlaH
>
> Well I appear to have cvsup'ed just before you added the text to
> UPDATING.  Oh well.  That brings up an interesting question: Under
> what circumstances would it be advantageous to not compile the drivers
> into the kernel, but leave them as modules and load from
> /boot/loader.conf?  I haven't had any luck imagining why you would
> want to leave them as modules.

It's a preference thing.  I pretty much never use modules myself (things 
compiled into the kernel are more optimized, mutex and atomic ops are inlined 
rather than function calls for example) unless doing development on a device 
driver in which case I leave the device driver as a single module.

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org

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

Message: 21
Date: Mon, 2 Aug 2004 18:38:44 -0400
From: John Baldwin <jhb@FreeBSD.org>
Subject: Re: /dev/null doesn't get created
To: freebsd-current@FreeBSD.org, dlt@mebtel.net
Cc: current@FreeBSD.org
Message-ID: <200408021838.44384.jhb@FreeBSD.org>
Content-Type: text/plain;  charset="iso-8859-1"

On Sunday 01 August 2004 05:09 pm, Derek Tattersall wrote:
> * Mark Murray (mark@grondar.org) [040801 17:03]:
> > From: Mark Murray <mark@grondar.org>
> > Message-Id: <200408011825.i71IPZgG018406@grimreaper.grondar.org>
> > To: dlt@mebtel.net
> > Cc: current@FreeBSD.ORG
> > Subject: Re: /dev/null doesn't get created
> > Date: Sun, 01 Aug 2004 19:25:34 +0100
> >
> > Derek Tattersall writes:
> > > CURRENT as of this morning dint'create /dev/null.  My previous
> > > CURRENT, from July 25 created it fine so all was well.Can anybody
> > > offer me a clue as to what this is all about?  I tried to figure out
> > > what causes /dev/null to get created, but was unsuccessful.
> >
> > BOOBOO of mine. Please always check src/UPDATING for clues :-)
> >
> > M
> > --
> > Mark Murray
> > iumop ap!sdn w,I idlaH
>
> Well I appear to have cvsup'ed just before you added the text to
> UPDATING.  Oh well.  That brings up an interesting question: Under
> what circumstances would it be advantageous to not compile the drivers
> into the kernel, but leave them as modules and load from
> /boot/loader.conf?  I haven't had any luck imagining why you would
> want to leave them as modules.

It's a preference thing.  I pretty much never use modules myself (things 
compiled into the kernel are more optimized, mutex and atomic ops are inlined 
rather than function calls for example) unless doing development on a device 
driver in which case I leave the device driver as a single module.

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org

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

Message: 22
Date: Mon, 2 Aug 2004 17:09:12 -0700
From: Mike Hunter <mhunter@ack.Berkeley.EDU>
Subject: Re: panic from July 21 kernel (acpi related?)
To: Doug White <dwhite@gumbysoft.com>
Cc: freebsd-current@freebsd.org
Message-ID: <20040803000912.GA5753@ack.Berkeley.EDU>
Content-Type: text/plain; charset=us-ascii

On Jul 30, "Doug White" wrote:

> On Thu, 29 Jul 2004, Mike Hunter wrote:
> 
> > > If it has 2, try plugging each into the machine directly.
> >
> > I don't know what you mean by this.  When I've run with the external
> > keyboard and mouse, I do plug in directly (I don't have a docking
> > station.)
> >
> 
> Plug both keyboard and mouse into the onboard ports as opposed to plugging
> the mouse into the keyboard and the keyboard into the machine.

Sorry for the misunderstanding; that's what I have always done, my
keyboard doesn't have an input.

> > I don't believe it's truly a power problem, because it works fine under
> > windows XP and knoppix linux.  I've never had it crash when plugging in a
> > USB device, and this crash seems to happen right before it wants to give
> > me the login prompt, so it seems like if it were truly a power issue I'd
> > have problems in these circumstances.
> 
> Not necessarily, it depends on how the OS is configuring the ACPI CPU
> states. At the log prompt is a big CPU load and disk i/o spurt and it
> might drain the system enough, but linux & windows access patterns don't
> happend to draw enough juice at one point to cause the memory error.
> 
> Otherwise it must be a chipset config issue or a quirk in the controller
> which would have to be debugged with the hardware in hand. Definitely not
> a problem that would be debuggable over email.

I did some googling for the name of the function it's crashing in and
found this guy (also owner of a dell laptop):

http://lists.freebsd.org/pipermail/freebsd-current/2004-February/020942.html

Looks like the same crash.  He claims it's ata+acpi related; which I can
believe; and his symptoms persisted with our without acpi disabled (true
for me too.)

My dmesg has this funny error message in it, btw

ata1-slave: FAILURE - ATAPI_IDENTIFY no interrupt
ata1-master: FAILURE - ATAPI_RESET no interrupt

Is that safe to ignore?

Mike

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

Message: 23
Date: Mon, 02 Aug 2004 17:31:06 -0700
From: "Joel M. Baldwin" <qumqats@outel.org>
Subject: Re: Unable to build new kernel with old gcc (WAS: RE:
	Buildkernel+ALTQ	error)
Cc: freebsd-current@freebsd.org
Message-ID: <593441233.1091467866@[192.168.1.20]>
Content-Type: text/plain; charset=us-ascii; format=flowed


It would be NICE if something about this was in UPDATING.

(hint! hint! (maybe NOW I'll be able to buildworld (off running to find version 1.54)))

--On Monday, August 02, 2004 11:45 AM +0400 Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru> wrote:

> You are building new kernel with old (Gcc 3.3.3) gcc that does not support this flags.
>
> You have to go back to rev. 1.54 of sys/conf/kern.pre.mk to build your kernel with gcc 3.3.3.
>
>> -----Original Message-----
>> From: Dan Cojocar [mailto:dan.cojocar@gmail.com]
>> Sent: Monday, August 02, 2004 11:35 AM
>> To: Max Laier
>> Cc: freebsd-current@freebsd.org
>> Subject: Re: Buildkernel+ALTQ error
>>
>> Hello,
>>
>> Sorry for this delay, but i was offline :(
>>
>> I made a cvsup today, and now i get another error:
>>
>> cc -c -O -pipe -march=athlon-xp -Wall -Wredundant-decls
>> -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes
>> -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -g
>> -nostdinc -I- -I. -I/usr/src/sys -I/usr/src/sys/contrib/dev/acpica
>> -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/ipfilter
>> -I/usr/src/sys/contrib/pf -I/usr/src/sys/contrib/dev/ath
>> -I/usr/src/sys/contrib/dev/ath/freebsd -I/usr/src/sys/contrib/ngatm
>> -D_KERNEL -include opt_global.h -finline-limit=8000 --param
>> inline-unit-growth=100 --param large-function-growth=1000
>> -mno-align-long-strings -mpreferred-stack-boundary=2 -ffreestanding
>> /usr/src/sys/i386/i386/genassym.c
>> cc1: error: invalid parameter `inline-unit-growth'
>> cc1: error: invalid parameter `large-function-growth'
>> *** Error code 1
>>
>> On Sat, 31 Jul 2004 04:06:36 +0200, Max Laier
>> <max@love2party.net> wrote:
>> > On Thursday 29 July 2004 15:57, you wrote:
>> > > Hello,
>> > >
>> > > I get the following error when building kernel with altq:
>> >
>> > Haven't heard back from you and couldn't reproduce either.
>> Is it safe to
>> > assert is was a temporary problem with your
>> buildenvironment due to the gcc
>> > 3.4 update? Please give me a ping if it is persistent, though.
>> >
>> > --
>> > /"\  Best regards,                      | mlaier@freebsd.org
>> > \ /  Max Laier                          | ICQ #67774661
>> >  X   http://pf4freebsd.love2party.net/  | mlaier@EFnet
>> > / \  ASCII Ribbon Campaign              | Against HTML Mail and News
>> >
>> >


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

Message: 24
Date: Tue, 3 Aug 2004 02:45:45 +0200
From: "Daniel Eriksson" <daniel_k_eriksson@telia.com>
Subject: Panic in today's current, UFS problem?
To: "'freebsd current'" <current@freebsd.org>
Message-ID:
	<!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAA0VcX9IoJqUaXPS8MjT1PdsKAAAAQAAAA5PQ1jek5/EqvRvENdXMWUAEAAAAA@telia.com>
	
Content-Type: text/plain; charset="us-ascii"


I was trying out the new patch from Ville-Pertti Keinonen that might fix my
interrupt storm problems with SATA when I ran into a panic. The dmesg is
attached.

OS: CURRENT, 2004.08.02.16.00.00
    + VIA/SATA patch from Ville-Pertti Keinonen
(http://docs.freebsd.org/cgi/getmsg.cgi?fetch=505643+0+current/freebsd-curre
nt)
    + libdisk patch from Lukas Ertl
(http://docs.freebsd.org/cgi/getmsg.cgi?fetch=526964+0+current/freebsd-curre
nt)


What I did:
1. fdisk/label two 250GB discs hooked up to the on-board SATA controller
(using sysinstall)
2. copy ~20GB of data to both discs
3. successfully run the stress-test mentioned in Ville-Pertti Keinonen's
mail (above)
4. unmount both discs
5. run "atacontrol create RAID0 128 ad20 ad22" (the two SATA discs)
6. fdisk/label the striped array (using sysinstall, forcing it to UFS1)
7. mount the new partition, and create three empty dirs
8. *boom*

The panic:
----------
panic: initiate_write_filepage: dir inum 0 != new 1254481
KDB: enter: panic
[thread 100029]
Stopped at      kdb_enter+0x30: leave
db> trace
kdb_enter(c075f5bf,c07be420,c076e0eb,dbca7b64,100) at kdb_enter+0x30
panic(c076e0eb,c076e0d3,0,132451,c3010980) at panic+0xcc
initiate_write_filepage(c3010980,cf18b440,200200a4,0,cf18b440) at
initiate_write_filepage+0x8c
softdep_disk_io_initiation(cf18b440,dbca7bd0,cf18b440,c2b1da50,dbca7c00) at
softdep_disk_io_initiation+0x5c
softdep_disk_prewrite(c2b1da50,cf18b440,cf18b440,c4028108,dbca7bf0) at
softdep_disk_prewrite+0x82
ufs_strategy(dbca7c28,dbca7c44,c05abfa7,dbca7c28,1) at ufs_strategy+0x113
ufs_vnoperate(dbca7c28,1,dbca7c48,1000040,80012) at ufs_vnoperate+0x18
ibwrite(cf18b440,dbca7c5c,c05ac968,cf18b440,dbca7ca0) at ibwrite+0x557
bwrite(cf18b440,dbca7ca0,c06b3b6e,cf18b440,80012) at bwrite+0x15
bawrite(cf18b440,80012,0,c26e99a0,4) at bawrite+0x18
ffs_fsync(dbca7cdc,30002,c26e99a0,0,0) at ffs_fsync+0x31e
sched_sync(0,dbca7d48,0,0,0) at sched_sync+0x45d
fork_exit(c05bfa40,0,dbca7d48) at fork_exit+0x80
fork_trampoline() at fork_trampoline+0x8
--- trap 0x1, eip = 0, esp = 0xdbca7d7c, ebp = 0 ---


Misc info:
----------
geom_vinum used (raid-0 and raid-1 arrays)
ataraid used (raid-0 arrays)
compiled with "CPUTYPE?=athlon-xp" but no CFLAGS/COPTFLAGS

/Daniel Eriksson
-------------- next part --------------
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2004 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD 5.2-CURRENT #0: Mon Aug  2 20:44:56 CEST 2004
    daniel@fortify.satra.zapto.org:/usr/obj/usr/src/sys/FORTIFY
WARNING: Kernel preemption is disabled, expect reduced performance.
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Athlon(TM) XP 2500+ (1999.78-MHz 686-class CPU)
  Origin = "AuthenticAMD"  Id = 0x6a0  Stepping = 0
  Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
  AMD Features=0xc0400000<AMIE,DSP,3DNow!>
real memory  = 1342156800 (1279 MB)
avail memory = 1305059328 (1244 MB)
npx0: [FAST]
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <Host to PCI bridge> at pcibus 0 on motherboard
pir0: <PCI Interrupt Routing Table: 11 Entries> on motherboard
$PIR: BIOS IRQ 14 for 0.15.INTA is not valid for link 0x6
pci0: <PCI bus> on pcib0
agp0: <VIA 8377 (Apollo KT400/KT400A/KT600) host to PCI bridge> mem 0xf8000000-0xfbffffff at device 0.0 on pci0
pcib1: <PCIBIOS PCI-PCI bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
pci1: <display, VGA> at device 0.0 (no driver attached)
atapci0: <HighPoint HPT374 (channel 0+1) UDMA133 controller> port 0xb400-0xb4ff,0xb800-0xb803,0xd000-0xd007,0xd400-0xd403,0xd800-0xd807 irq 11 at device 10.0 on pci0
ata2: at 0xd800 on atapci0
ata3: at 0xd000 on atapci0
atapci1: <HighPoint HPT374 (channel 2+3) UDMA133 controller> port 0x9800-0x98ff,0xa000-0xa003,0xa400-0xa407,0xa800-0xa803,0xb000-0xb007 irq 11 at device 10.1 on pci0
ata4: at 0xb000 on atapci1
ata5: at 0xa400 on atapci1
ahc0: <Adaptec 29160 Ultra160 SCSI adapter> port 0x9400-0x94ff mem 0xed800000-0xed800fff irq 3 at device 12.0 on pci0
ahc0: [GIANT-LOCKED]
aic7892: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs
atapci2: <HighPoint HPT374 (channel 0+1) UDMA133 controller> port 0x7800-0x78ff,0x8000-0x8003,0x8400-0x8407,0x8800-0x8803,0x9000-0x9007 irq 10 at device 14.0 on pci0
ata6: at 0x9000 on atapci2
ata7: at 0x8400 on atapci2
atapci3: <HighPoint HPT374 (channel 2+3) UDMA133 controller> port 0x6000-0x60ff,0x6400-0x6403,0x6800-0x6807,0x7000-0x7003,0x7400-0x7407 irq 10 at device 14.1 on pci0
ata8: at 0x7400 on atapci3
ata9: at 0x6800 on atapci3
atapci4: <VIA 6420 SATA150 controller> port 0x4000-0x40ff,0x4400-0x440f,0x4800-0x4803,0x5000-0x5007,0x5400-0x5403,0x5800-0x5807 irq 5 at device 15.0 on pci0
ata10: at 0x5800 on atapci4
ata11: at 0x5000 on atapci4
atapci5: <VIA 8237 UDMA133 controller> port 0x3800-0x380f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 irq 7 at device 15.1 on pci0
ata0: at 0x1f0 irq 14 on atapci5
ata1: at 0x170 irq 15 on atapci5
uhci0: <VIA 83C572 USB controller> port 0x3400-0x341f irq 7 at device 16.0 on pci0
uhci0: [GIANT-LOCKED]
usb0: <VIA 83C572 USB controller> on uhci0
usb0: USB revision 1.0
uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1: <VIA 83C572 USB controller> port 0x3000-0x301f irq 7 at device 16.1 on pci0
uhci1: [GIANT-LOCKED]
usb1: <VIA 83C572 USB controller> on uhci1
usb1: USB revision 1.0
uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2: <VIA 83C572 USB controller> port 0x2800-0x281f irq 5 at device 16.2 on pci0
uhci2: [GIANT-LOCKED]
usb2: <VIA 83C572 USB controller> on uhci2
usb2: USB revision 1.0
uhub2: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
uhci3: <VIA 83C572 USB controller> port 0x2400-0x241f irq 5 at device 16.3 on pci0
uhci3: [GIANT-LOCKED]
usb3: <VIA 83C572 USB controller> on uhci3
usb3: USB revision 1.0
uhub3: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub3: 2 ports with 2 removable, self powered
ehci0: <VIA VT6202 USB 2.0 controller> mem 0xed000000-0xed0000ff irq 9 at device 16.4 on pci0
ehci0: [GIANT-LOCKED]
ehci_pci_attach: companion usb0
ehci_pci_attach: companion usb1
ehci_pci_attach: companion usb2
ehci_pci_attach: companion usb3
usb4: EHCI version 1.0
usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3
usb4: <VIA VT6202 USB 2.0 controller> on ehci0
usb4: USB revision 2.0
uhub4: VIA EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub4: 8 ports with 8 removable, self powered
isab0: <PCI-ISA bridge> at device 17.0 on pci0
isa0: <ISA bus> on isab0
vr0: <VIA VT6102 Rhine II 10/100BaseTX> port 0x2000-0x20ff mem 0xec800000-0xec8000ff irq 7 at device 18.0 on pci0
miibus0: <MII bus> on vr0
rlphy0: <RTL8201L 10/100 media interface> on miibus0
rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
vr0: Ethernet address: 00:0e:a6:1f:29:1e
vr0: [GIANT-LOCKED]
re0: <RealTek 8110S Single-chip Gigabit Ethernet> port 0x1800-0x18ff mem 0xec000000-0xec0000ff irq 12 at device 19.0 on pci0
miibus1: <MII bus> on re0
rgephy0: <RTL8169S/8110S media interface> on miibus1
rgephy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, 1000baseTX-FDX, auto
re0: Ethernet address: 00:50:fc:f8:c6:81
re0: [GIANT-LOCKED]
cpu0 on motherboard
orm0: <ISA Option ROM> at iomem 0xc0000-0xcafff on isa0
pmtimer0 on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x64,0x60 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
fdc0: <Enhanced floppy controller (i82077, NE72065 or clone)> at port 0x3f7,0x3f0-0x3f5 irq 6 drq 2 on isa0
fdc0: FIFO enabled, 8 bytes threshold
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x100>
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A, console
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
unknown: <PNP0501> can't assign resources (port)
unknown: <PNP0700> can't assign resources (port)
unknown: <PNP0303> can't assign resources (port)
Timecounter "TSC" frequency 1999781807 Hz quality 800
Timecounters tick every 1.000 msec
ipfw2 initialized, divert enabled, rule-based forwarding enabled, default to accept, logging unlimited
ad0: 114473MB <ST3120022A> [232581/16/63] at ata0-master UDMA100
ad1: 114473MB <ST3120022A> [232581/16/63] at ata0-slave UDMA100
ad2: 117800MB <IC35L120AVV207-0> [239340/16/63] at ata1-master UDMA100
ad3: 117800MB <IC35L120AVV207-0> [239340/16/63] at ata1-slave UDMA100
ad4: 238475MB <WDC WD2500JB-00FUA0> [484521/16/63] at ata2-master UDMA100
ad5: 238475MB <WDC WD2500JB-00FUA0> [484521/16/63] at ata2-slave UDMA100
ad6: 239372MB <Maxtor 4A250J0> [486344/16/63] at ata3-master UDMA133
ad7: 239372MB <Maxtor 5A250J0> [486344/16/63] at ata3-slave UDMA133
ad8: 194481MB <Maxtor 6Y200P0> [395136/16/63] at ata4-master UDMA133
ad9: 194481MB <Maxtor 6Y200P0> [395136/16/63] at ata4-slave UDMA133
ad10: 194481MB <Maxtor 6Y200P0> [395136/16/63] at ata5-master UDMA133
ad11: 239372MB <Maxtor 7Y250P0> [486344/16/63] at ata5-slave UDMA133
ad12: 117800MB <IC35L120AVV207-0> [239340/16/63] at ata6-master UDMA100
ad13: 117800MB <HDS722512VLAT20> [239340/16/63] at ata6-slave UDMA100
ad14: 117246MB <Maxtor 6Y120L0> [238216/16/63] at ata7-master UDMA133
ad15: 117246MB <Maxtor 6Y120L0> [238216/16/63] at ata7-slave UDMA133
ad16: 114473MB <WDC WD1200JB-00DUA3> [232581/16/63] at ata8-master UDMA100
ad18: 26059MB <Maxtor 92732U8> [52946/16/63] at ata9-master UDMA66
ad20: 238475MB <WDC WD2500JD-00FYB0> [484521/16/63] at ata10-master SATA150
ad22: 239372MB <Maxtor 7Y250M0> [486344/16/63] at ata11-master SATA150
ar0: 476950MB <ATA RAID0 array> [60802/255/63] status: READY subdisks:
 disk0 READY on ad4 at ata2-master
 disk1 READY on ad5 at ata2-slave
ar1: 478744MB <ATA RAID0 array> [61031/255/63] status: READY subdisks:
 disk0 READY on ad6 at ata3-master
 disk1 READY on ad7 at ata3-slave
ar2: 388962MB <ATA RAID0 array> [49585/255/63] status: READY subdisks:
 disk0 READY on ad9 at ata4-slave
 disk1 READY on ad8 at ata4-master
ar3: 228946MB <ATA RAID0 array> [29186/255/63] status: READY subdisks:
 disk0 READY on ad15 at ata7-slave
 disk1 READY on ad16 at ata8-master
Waiting 5 seconds for SCSI devices to settle
sa0 at ahc0 bus 0 target 5 lun 0
sa0: <Seagate STT20000N 6A51> Removable Sequential Access SCSI-2 device 
sa0: 10.000MB/s transfers (10.000MHz, offset 15)
da0 at ahc0 bus 0 target 10 lun 0
da0: <IBM DDYS-T36950N S93E> Fixed Direct Access SCSI-3 device 
da0: 160.000MB/s transfers (80.000MHz, offset 63, 16bit), Tagged Queueing Enabled
da0: 35003MB (71687340 512 byte sectors: 255H 63S/T 4462C)
da1 at ahc0 bus 0 target 11 lun 0
da1: <IBM IC35L036UWD210-0 S5CQ> Fixed Direct Access SCSI-3 device 
da1: 160.000MB/s transfers (80.000MHz, offset 63, 16bit), Tagged Queueing Enabled
da1: 35003MB (71687340 512 byte sectors: 255H 63S/T 4462C)
da2 at ahc0 bus 0 target 12 lun 0
da2: <IBM DDYS-T36950N S93E> Fixed Direct Access SCSI-3 device 
da2: 160.000MB/s transfers (80.000MHz, offset 63, 16bit), Tagged Queueing Enabled
da2: 35003MB (71687340 512 byte sectors: 255H 63S/T 4462C)
da3 at ahc0 bus 0 target 13 lun 0
da3: <IBM DDYS-T36950N S93E> Fixed Direct Access SCSI-3 device 
da3: 160.000MB/s transfers (80.000MHz, offset 63, 16bit), Tagged Queueing Enabled
da3: 35003MB (71687340 512 byte sectors: 255H 63S/T 4462C)
Mounting root from ufs:/dev/ad0s1a

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

Message: 25
Date: Tue, 03 Aug 2004 10:10:32 +0900
From: Ganbold <ganbold@micom.mng.net>
Subject: Buildworld problem, warning: 'yy_flex_realloc' defined but
	not  used
To: freebsd-current@freebsd.org
Message-ID: <6.1.2.0.2.20040803100853.0beb24f0@202.179.0.80>
Content-Type: text/plain; charset="us-ascii"; format=flowed

I have following problem when building world.

cc -O -pipe  -I/usr/src/lib/libc/include -I/usr/src/lib/libc/../../include 
-I/usr/src/lib/libc/i386 -D__DBINTERFACE_PRIVATE 
-I/usr/src/lib/libc/../../contrib/gdtoa -DINET6 -I/usr/obj/usr/src/lib/libc 
-DPOSIX_MISTAKE -I/usr/src/lib/libc/locale -DBROKEN_DES -DPORTMAP 
-DDES_BUILTIN -I/usr/src/lib/libc/rpc -DYP -DHESIOD -Wsystem-headers 
-Werror -Wall -Wno-format-y2k -Wno-uninitialized -c nslexer.c
/dev/stdout: In function `_nsyylex':
/dev/stdout:711: warning: label `find_rule' defined but not used
/usr/src/lib/libc/net/nslexer.l: At top level:
/dev/stdout:1678: warning: 'yy_flex_realloc' defined but not used
*** Error code 1

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

Stop in /usr/src/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.


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

Message: 26
Date: Tue, 3 Aug 2004 09:22:28 +0800
From: Jiawei Ye <leafy7382@gmail.com>
Subject: Re: /dev/null doesn't get created
To: John Baldwin <jhb@freebsd.org>
Cc: dlt@mebtel.net
Message-ID: <c21e92e2040802182278b2876c@mail.gmail.com>
Content-Type: text/plain; charset=US-ASCII

On Mon, 2 Aug 2004 18:38:44 -0400, John Baldwin <jhb@freebsd.org> wrote:
> It's a preference thing.  I pretty much never use modules myself (things
> compiled into the kernel are more optimized, mutex and atomic ops are inlined
> rather than function calls for example) unless doing development on a device
> driver in which case I leave the device driver as a single module.
> 
> --
> John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
> "Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
Quite a number of modules are loaded on-the-fly, is there any
particular reason for io/null/mem not to be?

Jiawei Ye

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

Message: 27
Date: Tue, 3 Aug 2004 09:22:28 +0800
From: Jiawei Ye <leafy7382@gmail.com>
Subject: Re: /dev/null doesn't get created
To: John Baldwin <jhb@freebsd.org>
Cc: dlt@mebtel.net
Message-ID: <c21e92e2040802182278b2876c@mail.gmail.com>
Content-Type: text/plain; charset=US-ASCII

On Mon, 2 Aug 2004 18:38:44 -0400, John Baldwin <jhb@freebsd.org> wrote:
> It's a preference thing.  I pretty much never use modules myself (things
> compiled into the kernel are more optimized, mutex and atomic ops are inlined
> rather than function calls for example) unless doing development on a device
> driver in which case I leave the device driver as a single module.
> 
> --
> John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
> "Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
Quite a number of modules are loaded on-the-fly, is there any
particular reason for io/null/mem not to be?

Jiawei Ye

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

Message: 28
Date: Mon, 02 Aug 2004 19:30:48 -0600
From: Scott Long <scottl@freebsd.org>
Subject: Re: Panic in today's current, UFS problem?
To: Daniel Eriksson <daniel_k_eriksson@telia.com>
Cc: 'freebsd current' <current@freebsd.org>
Message-ID: <410EEAC8.8010900@freebsd.org>
Content-Type: text/plain; charset=us-ascii; format=flowed

Daniel Eriksson wrote:

> I was trying out the new patch from Ville-Pertti Keinonen that might fix my
> interrupt storm problems with SATA when I ran into a panic. The dmesg is
> attached.
> 
> OS: CURRENT, 2004.08.02.16.00.00
>     + VIA/SATA patch from Ville-Pertti Keinonen
> (http://docs.freebsd.org/cgi/getmsg.cgi?fetch=505643+0+current/freebsd-curre
> nt)
>     + libdisk patch from Lukas Ertl
> (http://docs.freebsd.org/cgi/getmsg.cgi?fetch=526964+0+current/freebsd-curre
> nt)
> 
> 
> What I did:
> 1. fdisk/label two 250GB discs hooked up to the on-board SATA controller
> (using sysinstall)
> 2. copy ~20GB of data to both discs

Is this step necessary in order to produce the panic?

> 3. successfully run the stress-test mentioned in Ville-Pertti Keinonen's
> mail (above)

Is this step necessary also?

> 4. unmount both discs
> 5. run "atacontrol create RAID0 128 ad20 ad22" (the two SATA discs)
> 6. fdisk/label the striped array (using sysinstall, forcing it to UFS1)
> 7. mount the new partition, and create three empty dirs
> 8. *boom*
> 

How reproducable is this, and does it always panic in the same spot? 
There is definitely some sort of buffer corruption going on, and either 
it's happening in the buffer/cache layer or it's a bad DMA from the
drive.

Scott

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

Message: 29
Date: Tue, 3 Aug 2004 03:51:44 +0200
From: "Daniel Eriksson" <daniel_k_eriksson@telia.com>
Subject: RE: Panic in today's current, UFS problem?
To: "'Scott Long'" <scottl@freebsd.org>
Cc: 'freebsd current' <current@freebsd.org>
Message-ID:
	<!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAA0VcX9IoJqUaXPS8MjT1PdsKAAAAQAAAAWq8251TAokWWTJuIdaScLgEAAAAA@telia.com>
	
Content-Type: text/plain;	charset="us-ascii"

Scott Long wrote:

>> What I did:
>> 1. fdisk/label two 250GB discs hooked up to the on-board SATA 
>> controller (using sysinstall) 2. copy ~20GB of data to both discs
>
> Is this step necessary in order to produce the panic?

I have no idea.

>> 3. successfully run the stress-test mentioned in Ville-Pertti 
>> Keinonen's mail (above)
>
> Is this step necessary also?

Again, no idea.

>> 4. unmount both discs
>> 5. run "atacontrol create RAID0 128 ad20 ad22" (the two SATA discs) 6. 
>> fdisk/label the striped array (using sysinstall, forcing it to UFS1) 
>> 7. mount the new partition, and create three empty dirs 8. *boom*
>> 
>
> How reproducable is this, and does it always panic in the same spot? 
> There is definitely some sort of buffer corruption going on, and either 
> it's happening in the buffer/cache layer or it's a bad DMA from the drive.

Considering how much problems I've had with this machine lately I would not
at all be suprised if the error is somewhere else. The machine is
unfortunately a production machine, and trying to reproduce panics (with the
risks associated with that, such as corrupted user data) is not really an
option.

What I've done now is restart the server and run a newfs on the ataraid
array of the two SATA discs. I'm in the process of copying 400+GB of data
onto that array, and will run some more stress-tests to verify its
stability. So far (200GB into the copy-operation) everything looks good.

/Daniel Eriksson



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

Message: 30
Date: Tue, 3 Aug 2004 03:54:24 +0200
From: "Daniel Eriksson" <daniel_k_eriksson@telia.com>
Subject: RE: Panic in today's current, UFS problem?
To: "'Scott Long'" <scottl@freebsd.org>
Cc: 'freebsd current' <current@freebsd.org>
Message-ID:
	<!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAA0VcX9IoJqUaXPS8MjT1PdsKAAAAQAAAAg2IK5SxOZUSPQ8EleWkRQwEAAAAA@telia.com>
	
Content-Type: text/plain;	charset="us-ascii"


By the way, is there anything else I can do from ddb other than 'trace' to
provide more information if this should ever happen again.

/Daniel Eriksson



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

Message: 31
Date: Mon, 2 Aug 2004 20:10:19 -0700
From: Gregory Neil Shapiro <gshapiro@freebsd.org>
Subject: Please test /etc/rc.d/sendmail patch
To: freebsd-current@freebsd.org
Message-ID: <20040803031019.GN32424@horsey.gshapiro.net>
Content-Type: text/plain; charset=us-ascii

It turns out /etc/rc.d/sendmail has been broken for quite a while.
Nobody really noticed until the sendmail 8.13 import because older
versions let multiple daemons on different sockets run.  The patch
below fixes the problem and restores the old, correct behavior. It
also removes the map rebuild code because the code doesn't pay
attention to SENDMAIL_MAP_TYPE and may rebuild maps without the
admin being ready for the maps to be rebuilt (i.e., it should not
be automatic).

I would like to commit this ASAP so please test as soon as possible
and let me know how it goes.  Also, if there are any rcNG experts out
there, can someone tell me why "Starting sendmail" is only printed
if sendmail_enable=YES and not in the sedmail_submit_enable=YES or
sendmail_outbound_enable=YES cases (yet the daemons still get started
properly)?

--- etc/rc.d/sendmail	17 Apr 2004 19:09:09 -0000	1.11
+++ etc/rc.d/sendmail	3 Aug 2004 02:26:11 -0000
@@ -33,6 +33,17 @@
 	;;
 esac
 
+# If sendmail_enable=yes, don't need submit or outbound daemon
+if checkyesno sendmail_enable; then
+	sendmail_submit_enable="NO"
+	sendmail_outbound_enable="NO"
+fi
+
+# If sendmail_submit_enable=yes, don't need outbound daemon
+if checkyesno sendmail_submit_enable; then
+	sendmail_outbound_enable="NO"
+fi
+
 sendmail_precmd()
 {
 	# Die if there's pre-8.10 custom configuration file.  This check is
@@ -58,16 +69,6 @@
 	    "${name}: /etc/mail/aliases.db not present, generating"
 			/usr/bin/newaliases
 	fi
-
-	# check couple of common db files, too
-	for f in genericstable virtusertable domaintable mailertable; do
-		if [ -r "/etc/mail/$f" -a \
-		    "/etc/mail/$f" -nt "/etc/mail/$f.db" ]; then
-			echo \
-    "${name}: /etc/mail/$f newer than /etc/mail/$f.db, regenerating"
-			/usr/sbin/makemap hash /etc/mail/$f < /etc/mail/$f
-		fi
-	done
 }
 
 run_rc_command "$1"

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

Message: 32
Date: Tue, 03 Aug 2004 13:39:02 +1000
From: Sam Lawrance <boris@brooknet.com.au>
Subject: Re: processes freezing when writing to gstripe'd device
To: Pawel Jakub Dawidek <pjd@FreeBSD.org>
Cc: freebsd-current@FreeBSD.org
Message-ID: <1091504341.729.25.camel@dirk.no.domain>
Content-Type: text/plain

> +> I am observing processes performing operations on a gstripe device
> +> freeze in state 'bufwait'. An 'rm' process is stuck right now. The rest
> +> of the system is fine.
> +> 
> +> What's the best way to look in to this? I can't attach to rm with gdb
> +> (it just ends up waiting for something). I can drop to kdb, but have no
> +> idea where to go from there.
> 
> You could use 'ps' command from DDB to which processes are alseep.
> Then you can run 'tr <PID>' where <PID> is PID of sleeping process.
> Look for processes related somehow to this problem.
> 
> It'll be also great if you can provide exact procedure which will also
> me to reproduce this problem.

Okay, I updated to current as of yesterday and still seeing the same
problem. I'm new to these bits of the kernel but it looks like a locking
problem. This is what I am doing:

dd if=/dev/zero of=sd0 count=20480
cp sd0 sd1
mdconfig -a -t vnode -f sd0
mdconfig -a -t vnode -f sd1
gstripe label bork md0 md1
newfs /dev/stripe/bork
mkdir teststripe
mount /dev/stripe/bork teststripe
cd teststripe

Now I repeatedly 'cvs checkout' and 'rm -rf' the FreeBSD src tree.
Usually it freezes during the first checkout.

Siginfo shows:

load:1.14  cmd: cvs 801 [biowr] 0.33u 3.35s 14% 2840k

A trace of the frozen cvs process 801 shows:

KDB: enter: manual escape to debugger
[thread 100006]
Stopped at      kdb_enter+0x2b: nop
db> tr 801
sched_switch(c1a87580,0) at sched_switch+0x12b
mi_switch(1,0) at mi_switch+0x24d
sleepq_switch(c63ee500,d0c83814,c06030e9,c63ee500,0) at
sleepq_switch+0xe0
sleepq_wait(c63ee500,0,0,0,c07f3ab7) at sleepq_wait+0xb
msleep(c63ee500,c08ddd80,4c,c07f40d1,0) at msleep+0x375
bwait(c63ee500,4c,c07f40d1) at bwait+0x47
bufwait(c63ee500,c088f1a0,c1cd6318,c63ee500,0) at bufwait+0x2d
ibwrite(c63ee500,d0c838d8,c071906e,c63ee500,a00) at ibwrite+0x3e2
bwrite(c63ee500,a00,0,ee,c19b1834) at bwrite+0x32
ffs_update(c19c3738,1,0,c19b808c,c19c3738) at ffs_update+0x302
ufs_makeinode(81a4,c199f840,d0c83bf8,d0c83c0c) at ufs_makeinode+0x3a3
ufs_create(d0c83a74,d0c83b30,c0655238,d0c83a74,c08b8c00) at
ufs_create+0x26
ufs_vnoperate(d0c83a74) at ufs_vnoperate+0x13
vn_open_cred(d0c83be4,d0c83ce4,1a4,c1d47700,8) at vn_open_cred+0x174
vn_open(d0c83be4,d0c83ce4,1a4,8,c08ad240) at vn_open+0x1e
kern_open(c1a87580,8199430,0,602,1b6) at kern_open+0xd2
open(c1a87580,d0c83d14,3,1be,292) at open+0x18
syscall(2f,bfbf002f,bfbf002f,8,2836c7f8) at syscall+0x217
Xint0x80_syscall() at Xint0x80_syscall+0x1f
--- syscall (5, FreeBSD ELF32, open), eip = 0x282e2437, esp =
0xbfbfdd7c, ebp = 0xbfbfdda8 ---

If I try to rm -rf src, that process also ends up waiting:

sched_switch(c1a879a0,0) at sched_switch+0x12b
mi_switch(1,0) at mi_switch+0x24d
sleepq_switch(c199f8ec,d0c8ca58,c06030e9,c199f8ec,0) at
sleepq_switch+0xe0
sleepq_wait(c199f8ec,0,0,0,c199f840) at sleepq_wait+0xb
msleep(c199f8ec,c08ad898,50,c07f34e1,0) at msleep+0x375
acquire(d0c8cab0,1000040,600,c1a879a0,0) at acquire+0x9e
lockmgr(c199f8ec,1010002,c199f840,c1a879a0,10002) at lockmgr+0x37e
ufs_lock(d0c8cadc,d0c8caf8,c06563a5,d0c8cadc,c088f0a0) at ufs_lock+0x3c
ufs_vnoperate(d0c8cadc) at ufs_vnoperate+0x13
vn_lock(c199f840,10002,c1a879a0,c1cda000,c1cda000) at vn_lock+0xc5
vget(c199f840,2,c1a879a0,139a,c1a879a0) at vget+0xc9
vfs_cache_lookup(d0c8cbb4,d0c8cbd0,c0646613,d0c8cbb4,c1a879a0) at
vfs_cache_lookup+0x1c9
ufs_vnoperate(d0c8cbb4) at ufs_vnoperate+0x13
lookup(d0c8cc30,c1a879a0,c197d948,0,c07f51e9) at lookup+0x2cf
namei(d0c8cc30,8051aa8,0,0,c16e2c60) at namei+0x1f0
lstat(c1a879a0,d0c8cd14,2,7,292) at lstat+0x4a
syscall(2f,2f,2f,8051a00,8051a48) at syscall+0x217
Xint0x80_syscall() at Xint0x80_syscall+0x1f
--- syscall (190, FreeBSD ELF32, lstat), eip = 0x280cb757, esp =
0xbfbfe74c, ebp = 0xbfbfe7e8 ---

I'll keep poking around - if you have any further suggestions or need
other information, fire away.

Regards
Sam.



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

Message: 33
Date: Tue, 3 Aug 2004 13:58:55 +0930
From: "Daniel O'Connor" <doconnor@gsoft.com.au>
Subject: Re: LPT interruptstorm
To: freebsd-current@freebsd.org
Cc: Ian FREISLICH <if@hetzner.co.za>
Message-ID: <200408031358.56010.doconnor@gsoft.com.au>
Content-Type: text/plain; charset="iso-8859-1"

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

On Mon, 2 Aug 2004 21:19, Ian FREISLICH wrote:
> suggested 'lptcontrol -e', but every time I've tried that (even
> with lpd stopped) I get 'lptcontrol: open: Device busy'.  I'm not
> sure what keeps the printer port open other than lpd.

For some reason you can't open /dev/lpt* when something isn't driving the BUSY 
line on the parallel port :(

Actually I just read the code some more :)
You could try

lptcontrol -d /dev/lpt0.ctl -X

lpt0.ctl has the bypass flag (0x80) set in the minor number which prevents 
lptopen() from trying to talk to the hardware (see
/usr/src/sys/dev/ppbus/lpt.c:478)

I think lptcontrol could do with this diff (attached)

- -- 
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)

iD8DBQFBDxSH5ZPcIHs/zowRAjYSAJ9Fqj/TdYJugQ7ynvOgr7i7zlnc/ACgqkNE
amxGtLQ7oVW8bo5sZWMfpHU=
=BUWq
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lpt-ctl.diff
Type: text/x-diff
Size: 1883 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040803/1fddab2d/lpt-ctl.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 71, Issue 4
**********************************************


--
Evariste Galois:
    �����呛��樱������蔷������,����直前......


�� ��源:������� bbs.ustc.edu.cn [FROM: 210.45.72.234]