Re: problem for the VM gurus

1999-06-14 Thread Matthew Dillon

:  VM lookup the page again.  Always.  vm_fault already does this, 
:  in fact.   We would clean up the code and document it to this effect.
:
:  This change would allow us to immediately fix the self-referential
:  deadlocks and I think it would also allow me to fix a similar bug
:  in NFS trivially.
:
:   I should point out here that the process of looking up the pages is a
:significant amount of the overhead of the routines involved. Although
:doing this for just one page is probably sufficiently in the noise as to
:not be a concern.

It would be for only one page and, besides, it *already* relooksup
the page in vm_fault ( to see if the page was ripped out from under the 
caller ), so the overhead on the change would be very near zero.

:  The easiest interim solution is to break write atomicy.  That is,
:  unlock the vnode if the backing store of the uio being written is
:  (A) vnode-pager-backed and (B) not all in-core. 
:
:   Uh, I don't think you can safely do that. I thought one of the reasons
:for locking a vnode for writes is so that the file metadata doesn't change
:underneath you while the write is in progress, but perhaps I'm wrong about
:that.
:
:-DG
:
:David Greenman

The problem can be distilled into the fact that we currently hold an 
exclusive lock *through* a uiomove that might possibly incur read I/O
due to pages not being entirely in core.   The problem does *not* occur
when we are blocked on meta-data I/O ( such as a BMAP operation ) since
meta-data cannot be mmaped.   Under current circumstances we already
lose read atomicy on the source during the write(), but do not lose
write() atomicy.

The simple solution is to give up or downgrade the lock on the 
destination when blocked within the uiomove.  We can pre-fault
the first two pages of the uio to guarentee a minimum write atomicy
I/O size.  I suppose this could be extended to pre-faulting the
first N pages of the uio, where N is chosen to be reasonably large - like
64K, but we could not guarentee arbitrary write atomicy because the user
might decide to write a very large mmap'd buffer ( e.g. megabytes or
gigabytes ) and obviously wiring that many pages just won't work.

The more complex solution is to implement a separate range lock for
I/O that is independant of the vnode lock.  This solution would also
require deadlock detection and restart handling.  Atomicy would be 
maintained from the point of view of the processes running on the machine
but not from the point of view of the physical storage.  Since write
atomicy is already not maintained from the point of view of the physical
storage I don't think this would present a problem.  Due to the
complexity, however, it could not be used as an interim solution.  It
would have to be a permanent solution for the programming time to be
worth it.  Doing range-based deadlock detection and restart handling
properly is not trivial.  It is something that only databases usually 
need to do.

-Matt
Matthew Dillon 
dil...@backplane.com



To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: vn swapfiles deleted while in use

1999-06-14 Thread Matthew Dillon

:What, to the reckoning of the resident populace, would happen if
:somebody were to rm a vnconfig'd swapfile while it was in use?
:
:Thanks,
:joelh

The system still has a reference to the file, even deleted,
so all you would be doing would be removing its directory
entry.

On the otherhand, if you *truncate* the file or unconfigure the
vn node, you will blow the system up when the system tries
to swap something in or out on that file.

-Matt
Matthew Dillon 
dil...@backplane.com

:-- 
:Joel Ray Holveck - jo...@gnu.org
:   Fourth law of programming:
:   Anything that can go wrong wi
:sendmail: segmentation violation - core dumped
:
:
:To Unsubscribe: send mail to majord...@freebsd.org
:with unsubscribe freebsd-hackers in the body of the message
:



To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



[no subject]

1999-06-14 Thread Alex Nordström
unsubscribe freebsd-hackers


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



RE: select(2) breakage

1999-06-14 Thread Ladavac Marino
 -Original Message-
 From: Dag-Erling Smorgrav [SMTP:d...@flood.ping.uio.no]
 Sent: Sunday, June 13, 1999 6:02 PM
 To:   Brian Feldman
 Cc:   Dag-Erling Smorgrav; hack...@freebsd.org
 Subject:  Re: select(2) breakage
 
[ML]  To the previous posters:
the port ranges are limited so that the source sockets bound to
any port do not clobber the (pseudo reserved) destination ports (e.g X
server).  You can still bind to a specific port in any range.  This is
the behavior since ages (and can be gleaned from the source; all other
unices behave the same, they just don't let you adjust the ranges :)

/Marino 


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: problem for the VM gurus

1999-06-14 Thread Matthew Dillon
:  A permanent vnode locking fix is many months away because core
:  decided to ask Kirk to fix it, which was news to me at the time.
:  However, I agree with the idea of having Kirk fix VNode locking.
:
:   Actually, core did no such thing. Kirk told me a month or so ago that he
:intended to fix the vnode locking. Not that this is particularly important,
:but people shouldn't get the idea that Kirk's involvement had anything to
:do with core since it did not.
:
:-DG
:
:David Greenman

Let me put it this way:  You didn't bother to inform anyone else who
might have reason to be interested until it came up as an offhand
comment at USENIX.  Perhaps you should consider not keeping such important
events to yourself, eh?  Frankly, I am rather miffed -- if I had known
that Kirk had expressed an interest a month ago I would have been able
to pool our interests earlier.  Instead I've been working in a vacuum
for a month because I didn't know that someone else was considering trying
to solve the problem.   This does not fill me with rosy feelings.

-Matt
Matthew Dillon 
dil...@backplane.com

:Co-founder/Principal Architect, The FreeBSD Project - http://www.freebsd.org
:Creator of high-performance Internet servers - http://www.terasolutions.com
:



To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: hundreds of sockets stuck in TIME_WAIT

1999-06-14 Thread Matthew Dillon

:I noticed on a very high traffic'd webserver, I have just over 4000 sockets
:stuck in the TIME_WAIT state.  Ideally, I want to bend the RFC a bit and
:close the descriptor before it hits that state, or, ignore the 2MSL wait
:when it enters that state.  
:
:I take it there is no sysctl switch to trigger this, so, am I going 
:kernel diving?
:
:-Dan

Just ignore them, that's what we do.  They should not start to
impact on performance until you hit at least 15000 sockets.

-Matt
Matthew Dillon 
dil...@backplane.com


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



RE: High syscall overhead?

1999-06-14 Thread Ladavac Marino
 -Original Message-
 From: John S. Dyson [SMTP:dy...@iquest.net]
 Sent: Saturday, June 12, 1999 6:58 PM
 To:   w...@softweyr.com
 Cc:   cro...@cs.rpi.edu; freebsd-hackers@FreeBSD.ORG
 Subject:  Re: High syscall overhead?
 
 Think of it like this:  since alot of desktops sit in idle loops much
 of the time, perhaps the Linux philosophy has been to improve such
 behavior :-).
 
[ML]  Do you remember the old anecdote about a profiled ATT unix
kernel where they have found out that the kernel spends a lot of time in
one loop and rewritten it in assembly--it turned out it was the IDLE
loop :)

/Marino 


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



RE: Variant symlinks [was Re: symlink question]

1999-06-14 Thread Ladavac Marino
 -Original Message-
 From: Jordan K. Hubbard [SMTP:j...@zippy.cdrom.com]
 Sent: Monday, June 14, 1999 2:32 AM
 Cc:   Chuck Youse; Marc Ramirez; hack...@freebsd.org
 Subject:  Re: Variant symlinks [was Re: symlink question] 
 
  And have /usr/bin point to /binaries/i386/bin or /binaries/mips/bin
 
 And before people jump on me, let me just clarify in advance that I
 was not meaning to imply that Apollo ever used the x86 architecture.
 They didn't.  It was just an example. :)
[ML]  My last Apollo (with an HP badge on it) was an MC 68040
with a whopping 16 Megs of RAM and 1 Gig of disk.  It was running
DomainOS, though :)  Believe me, it was an improvement over MicrovaxII
running Ultrix.  Ah, the olden days...

/Marino

 - Jordan
 
 
 To Unsubscribe: send mail to majord...@freebsd.org
 with unsubscribe freebsd-hackers in the body of the message


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: vn swapfiles deleted while in use

1999-06-14 Thread Dag-Erling Smorgrav
Matthew Dillon dil...@apollo.backplane.com writes:
 On the otherhand, if you *truncate* the file or unconfigure the
 vn node, you will blow the system up when the system tries
 to swap something in or out on that file.

Is there any possibility of adding a reference count to the vn device
so it can't be unconfigured if it's still referenced?

Is there any possibility of implementing a compulsory (as opposed to
advisory) file locking system, so vn swapfiles can't be truncated or
written to by any other process while it's in use?

DES
-- 
Dag-Erling Smorgrav - d...@flood.ping.uio.no


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: problem for the VM gurus

1999-06-14 Thread Dag-Erling Smorgrav
Matthew Dillon dil...@apollo.backplane.com writes:
 :A permanent vnode locking fix is many months away because core
 :decided to ask Kirk to fix it, which was news to me at the time.
 :However, I agree with the idea of having Kirk fix VNode locking.
 :
 :   Actually, core did no such thing. Kirk told me a month or so ago that he
 :intended to fix the vnode locking. Not that this is particularly important,
 :but people shouldn't get the idea that Kirk's involvement had anything to
 :do with core since it did not.
 
 Let me put it this way:  You didn't bother to inform anyone else who
 might have reason to be interested until it came up as an offhand
 comment at USENIX.  Perhaps you should consider not keeping such important
 events to yourself, eh?  Frankly, I am rather miffed -- if I had known
 that Kirk had expressed an interest a month ago I would have been able
 to pool our interests earlier.  Instead I've been working in a vacuum
 for a month because I didn't know that someone else was considering trying
 to solve the problem.   This does not fill me with rosy feelings.

Eivind Eklund has also been working on this. It is my understanding
that he has a working Perl version of vnode_if.sh, and is about
halfway through adding invariants to the locking code to track down
locking errors. He stopped working on it about a month or two ago for
lack of time; I seem to recall that he had managed to get the kernel
to boot and was working on panics (from violated invariants) which
occurred during fsck.

DES
-- 
Dag-Erling Smorgrav - d...@flood.ping.uio.no


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



coarse vs fine-grained locking in SMP systems

1999-06-14 Thread Mike O'Dell

very fine-grain-locked systems often display convoying and
are prone to priority inversion problems.  coarse-grained
systems exhibit all the granularity problems already described.
(the first purdue dual-vax system plowed most of that ground)

we published the best Unix SMP paper I've ever seen in Computing
Systems - from the Amdahl guys who did an SMP version of the kernel
by very clever hacks on SPLx() macros to make them spin locks and
a bit of other clever trickery on the source.  they could take a stock
kernel and SMP everything but the device drivers essentially with
a SED script.

most interesting, they benchmarked it against their laboriously
reworked fine-grained kernel and under heavy multiprogramming loads
it performed better than the fine-grain kernel and essentially
never did materially worse.  and with *many* fewer man-years
of hacking.

it might be worth digging out that paper for a looky.  sorry i
don't have the citation off the top of my head, but i think the
Usenix online index would have it.

-mo


 


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: quota crash my system, how to fix it ?

1999-06-14 Thread Charles Owens
Unknow User ker...@tdnet.com.br said:

 Quota crash my system after quotaoff followed by quotaon!
 I applied a patch (kern/8137), but it did not work!
 Can anybody explain how could i fix this problem.
 here goes the patch i applied:

[ patch deleted ]

I believe the currently accepted solution is to simply never turn the
quota system off and on.  I've seen this conventional wisdom repeated
here on this list and it certainly holds true within my experience.  I
enable the quota system at at boot time (with quotaon) and then never
turn it off.

Maybe four years back someone suggested strongly that edquota should not
be used with the quota system running (I forget his exact argument).
Following this advice I changed my user management scripts to call
quotaoff and quotaon at the appropriate times.  Doing so caused a crash
and reboot a few minutes after these scripts would be run, almost every
time.  I went back to the previous version of my scripts and stabilty
returned.

YMMV, of course.
--
---
-

  Charles N. Owens   Email:  owe...@enc.edu
 http://www.enc.edu/~owensc
  Network  Systems Administrator
  Information Technology Services  Outside of a dog, a book is a man's
  Eastern Nazarene College best friend.  Inside of a dog it's
   too dark to read. - Groucho Marx
-





To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: vn swapfiles deleted while in use

1999-06-14 Thread Joel Ray Holveck
 What, to the reckoning of the resident populace, would happen if
 somebody were to rm a vnconfig'd swapfile while it was in use?
 The system still has a reference to the file, even deleted,
 so all you would be doing would be removing its directory
 entry.

And what happens when the system is shut down?  Would everything
happen nicely then?

Thanks,
joelh

-- 
Joel Ray Holveck - jo...@gnu.org
   Fourth law of programming:
   Anything that can go wrong wi
sendmail: segmentation violation - core dumped


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



NAT Gateway to multiple ISPs

1999-06-14 Thread star

Any ideas on the following ?

  I am setting up a home/office network with NAT filtering gateway
   on a dual-NIC FreeBSD 3.2 box.  No problem so far - I've set
   up several like this on 2.2.8 using natd.

  The new wrinkle is this:  I need to connect to two ISPs
   (DSL  Cable Modem), ideally with automatic failover and
   load balancing when multiple internal PC's are generating
   internet traffic.

  I know that this requires running gated (or routed) to
   receive RIP or OSPF messages from the ISPs, and to select the
   best outgoing ISP's route.

  The key question is: while the routing program probably
   requires a third NIC so that each external link has its own
   device, how can natd handle multiple external internet 
   interfaces.


  I've been searching in several directions:

  1) Using ifconfig alias option to map the two external 
addresses assigned by the two ISPs into the same NIC - would
seem to confuse the routing of outgoing traffic, although I 
have 'aliased' reliably on a fbsd web server (all in the same 
subnet) and have also seen multiple subnets peacefully coexist
on the same physical network.

  2) Somehow get natd or another NAT server to recognise two
outgoing interfaces - this would also seem to confuse the
functioning of the routing program.

  3) Configure an internal pseudo-device (tun ?) or divert 
interface between natd (and the internal NIC) on the inside 
and gated or routed (and the two external NICS) on the 
outside.
This way, natd and the routing program would be completely
isolated and wouldn't need to know that the other existed.

 ISP1 - NIC1
 \
 gated  -  TUN  -  natd  -  NIC3  -  internal net
 /device
 ISP2 - NIC2


   The third seems the best choice, but I haven't seen any
discription of this type of configuration.

   Any advice ?

Thanks very much for your help,

Andy Starratt




To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: coarse vs fine-grained locking in SMP systems

1999-06-14 Thread Jim Bryant
In reply:
 very fine-grain-locked systems often display convoying and
 are prone to priority inversion problems.  coarse-grained
 systems exhibit all the granularity problems already described.
 (the first purdue dual-vax system plowed most of that ground)

Was this a VAX 11/782 or a later machine?

jim
-- 
All opinions expressed are mine, if you|  I will not be pushed, stamped,
think otherwise, then go jump into turbid  |  briefed, debriefed, indexed, or
radioactive waters and yell WAHOO !!!  |  numbered! - #1, The Prisoner
--
Inet: jbry...@tfs.netAX.25: kc5...@wv0t.#neks.ks.usa.noam grid: EM28pw
voice: KC5VDJ - 6  2 Meters AM/FM/SSB, 70cm FM.   http://www.tfs.net/~jbryant
--
HF/6M/2M: IC-706-MkII, 2M: HTX-212, 2M: HTX-202, 70cm: HTX-404, Packet: KPC-3+


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: symlink question

1999-06-14 Thread Marc Ramirez
On Sun, 13 Jun 1999, Chuck Youse wrote:

 Forgive my ignorance, but what exactly is meant by a variant link, and
 what might one be used for?

In my fantasy world, a variant symlink is kind of a way of putting a
search path into a symbolic link, so that if you had an environment
variable E=a:b:c, and you had a symbolic link created with

ln -s /some/where/\${E}/foo bar

when you execute a command like 

more bar/baz.txt

it would look for /some/where/a/foo/bax.txt, then
/some/where/b/foo/baz.txt, then /some/where/c/foo/baz.txt.

It's akin to what the unionfs tries to do, but it doesn't care about
creating total transparency, and it doesn't mask directories, and changes
to one process's search order don't affect other process's search orders,
so you don't have to do all those machinations with loopback mounts and
things like that.  It's much more along the lines of VMS's logicals, if
yoy know of those.

As for uses, in my fantasy world, I personally would be using it for
system testing where I have a rather large base system which gets modified
per customer.  export CUSTOMER=foo; gosystem would be so nice...

Marc.


 
 Chuck Youse
 Director of Systems
 cyo...@cybersites.com
 
 -Original Message-
 From: Marc Ramirez mr...@gbtb.com
 To: hack...@freebsd.org hack...@freebsd.org
 Date: Sunday, June 13, 1999 1:12 PM
 Subject: symlink question
 
 
 
 Sorry if I'm bothering you busy folk unnecessarily...
 
 If I wanted to add variant symlinks, would that just require modifications
 to namei, or is that way too simplistic?
 
 Thanks,
 Marc.
 
 --
 Marc Ramirez - Owner Great Big Throbbing Brains
 mr...@gbtb.com http://www.gbtb.com
 Our brains throb, so yours won't have to!
 
 
 
 To Unsubscribe: send mail to majord...@freebsd.org
 with unsubscribe freebsd-hackers in the body of the message
 
 
 
 
 To Unsubscribe: send mail to majord...@freebsd.org
 with unsubscribe freebsd-hackers in the body of the message
 


--
Marc Ramirez - OwnerGreat Big Throbbing Brains
mr...@gbtb.com  http://www.gbtb.com
Our brains throb, so yours won't have to!



To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: Variant symlinks [was Re: symlink question]

1999-06-14 Thread Marc Ramirez
On Sun, 13 Jun 1999, Jordan K. Hubbard wrote:

  Forgive my ignorance, but what exactly is meant by a variant link, and
  what might one be used for?
 
 Gee, it's refreshing to see someone other than myself bringing this
 subject up. :)

Well, I'd like to add versioning, too, but _that's_ hard! 

:)

Marc.

--
Marc Ramirez - OwnerGreat Big Throbbing Brains
mr...@gbtb.com  http://www.gbtb.com
Our brains throb, so yours won't have to!



To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



do softupdates work on SMP -stable and -current now?

1999-06-14 Thread Roger Hardiman
Hi,
I remember reading in the mailing lists how softupdates
were unreliable on SMP 3.x and -current machines about 6-8 months
ago.

Is this all fixed now for SMP machines?

I've been using softupdates on a uni-processor 3.2-stable machine
and it works well. I wanted to try it on my two
SMP machines (one has 3.2-stable, one has -current)

Bye
Roger
-- 
Roger Hardiman| Telepresence Research Group
ro...@cs.strath.ac.uk | DMEM, University of Strathclyde
tel: 0141 548 2897| Glasgow, Scotland, G1 1XJ, UK
fax: 0141 552 0557| http://telepresence.dmem.strath.ac.uk


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: do softupdates work on SMP -stable and -current now?

1999-06-14 Thread David E. Cross
I certainly hope they are working under SMP I am running
a 4-way Pentium-III xeon box using vinum and softupdates.  so far it has
been a champ.

--
David Cross   | email: cro...@cs.rpi.edu 
Systems Administrator/Research Programmer | Web: http://www.cs.rpi.edu/~crossd 
Rensselaer Polytechnic Institute, | Ph: 518.276.2860
Department of Computer Science| Fax: 518.276.4033
I speak only for myself.  | WinNT:Linux::Linux:FreeBSD


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: do softupdates work on SMP -stable and -current now?

1999-06-14 Thread Karl Pielorz
Roger Hardiman wrote:

 Hi,
 I remember reading in the mailing lists how softupdates
 were unreliable on SMP 3.x and -current machines about 6-8 months
 ago.
 
 Is this all fixed now for SMP machines?
 
 I've been using softupdates on a uni-processor 3.2-stable machine
 and it works well. I wanted to try it on my two
 SMP machines (one has 3.2-stable, one has -current)

We have a couple of large(ish) systems (both dual P2/Pro's) running Vinum and
softupdates, and I've not seen any problems... One was up until recently 3.1,
there both 4.0-current now...

-Karl


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: do softupdates work on SMP -stable and -current now?

1999-06-14 Thread Roger Hardiman
Well, following up to my own post, 3 people have reported
no problems with softupdates on their SMP machines.

One was softupdates only
2 were softupdates and vimun together.

Thanks for everyones prompt replies.
Right, back to those PicoBSD commits.

Bye
Roger


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



3.2-STABLE panic #17 (NFS -- additional informatio)

1999-06-14 Thread David E. Cross
Ok, now that I have hopefully gotten the criticial people's attention, I 
will proceed with the details:

1: My test program can only reproduce this with NFSv3/UDP from a recently
patched Solaris system to a FreeBSD server.  I have not tested older
Solaris patches, I suspect that they will not cause the panic.

2: Recent packet traces of the NFS traffic reveals that it is likely *NOT*
unlink that is causing the problem.  I now have 6 packet traces and all fail
within a couple of packets of the NFS server responding to a create request
with ERROR: File exists (that is TCPDUMP terminoligy).  Looking through
the create call, I think I can see it, but it is tough.

2a: only ever *one* ERROR: File exists has ever been seen per a single crash.

3: Based on #1 and #2 I can surmise that other OSs will eventually trip this, 
but the access pattern is sufficiently different that my test program will not
do it.

4: It is not a concurancy issue as far as I can tell.  I wrapped all of 
nfssrv_create() (or whatever it is called) in a spl_softclock(), splx() pairing
and I could still cause the panic.

5: I tried compiling with MAX_PERF which in effect comments out the panic, 
this caused all access to the directory to result in (D)iskwait, with WCHAN of
inode.  Effectively bringing the NFS server down, but without the advantage
of having the machine come back by itself.

I am still digging arround, but this is significantly above my head.  It is
great fun, and I wouldn't mind continuing except this is becoming a difficult
issue.  We have backed everything down to NFSv2, but existing mounts are
difficult to get rid of.

--
David Cross   | email: cro...@cs.rpi.edu 
Systems Administrator/Research Programmer | Web: http://www.cs.rpi.edu/~crossd 
Rensselaer Polytechnic Institute, | Ph: 518.276.2860
Department of Computer Science| Fax: 518.276.4033
I speak only for myself.  | WinNT:Linux::Linux:FreeBSD


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: 3.2-STABLE panic #17 (NFS -- additional informatio)

1999-06-14 Thread Mike Smith
 I am still digging arround, but this is significantly above my head.  It is
 great fun, and I wouldn't mind continuing except this is becoming a difficult
 issue.  We have backed everything down to NFSv2, but existing mounts are
 difficult to get rid of.

It's a difficult issue no matter who you are, and you seem to be in the
ideal situation; you have the ability to reproduce the problem,
motivation to fix it, you appear to have enough clue to understand
what's going on, and you're enjoying it.

I'd have to say you're the perfect guy for the problem.  And thanks for 
pursuing it this far already!


-- 
\\  The mind's the standard   \\  Mike Smith
\\  of the man.   \\  msm...@freebsd.org
\\-- Joseph Merrick   \\  msm...@cdrom.com




To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: vn swapfiles deleted while in use

1999-06-14 Thread Matthew Dillon

: vn node, you will blow the system up when the system tries
: to swap something in or out on that file.
:
:Is there any possibility of adding a reference count to the vn device
:so it can't be unconfigured if it's still referenced?
:
:Is there any possibility of implementing a compulsory (as opposed to
:advisory) file locking system, so vn swapfiles can't be truncated or
:written to by any other process while it's in use?
:
:DES

Sure.  We could probably do the same thing we do for active binaries.
It's pretty low on my list, though.

-Matt
Matthew Dillon 
dil...@backplane.com

:-- 
:Dag-Erling Smorgrav - d...@flood.ping.uio.no
:
:
:To Unsubscribe: send mail to majord...@freebsd.org
:with unsubscribe freebsd-hackers in the body of the message
:



To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: symlink question

1999-06-14 Thread Wes Peters
Chuck Youse wrote:
 
 Forgive my ignorance, but what exactly is meant by a variant link, and
 what might one be used for?

A symlink that has a variable name embedded in it.  It can be quite
useful at times; consider a symlink such as: /usr/local/bin/bash - 
/usr/local/{karch}/bin/bash, where {karch} can be automagically
expanded into i.e. i386-FreeBSD3.1 or sparc-NetBSD1.4 or hppa-hpux10.

-- 
   Where am I, and what am I doing in this handbasket?

Wes Peters Softweyr LLC
http://www.softweyr.com/~softweyr  w...@softweyr.com


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



3.2-STABLE, panic #end. Problem found..

1999-06-14 Thread David E. Cross
I think I found the problem, and I have a pseudo-fix... (the machine nolonger
crashes).

This is a bleeding edge development, I have not had time to refine this code
any.  The problem is that nfs_create for NFSv3 does not release the lock
for vp with a vput() before it exits.  My crude patch follows (read
hacked, with an axe).

--
David Cross   | email: cro...@cs.rpi.edu 
Systems Administrator/Research Programmer | Web: http://www.cs.rpi.edu/~crossd 
Rensselaer Polytechnic Institute, | Ph: 518.276.2860
Department of Computer Science| Fax: 518.276.4033
I speak only for myself.  | WinNT:Linux::Linux:FreeBSD


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



oops, here's the patch

1999-06-14 Thread David E. Cross
*** nfs_serv.c  Tue Jun  8 15:53:11 1999
--- /cs/crossd/nfs_serv.c   Mon Jun 14 16:05:45 1999
***
*** 1343,1348 
--- 1343,1349 
fhandle_t *fhp;
u_quad_t frev, tempsize;
u_char cverf[NFSX_V3CREATEVERF];
+   int eexistdebug=0;
  
  #ifndef nolint
rdev = 0;
***
*** 1380,1385 
--- 1381,1387 
case NFSV3CREATE_GUARDED:
if (nd.ni_vp) {
error = EEXIST;
+   eexistdebug=1;
break;
}
case NFSV3CREATE_UNCHECKED:
***
*** 1489,1497 
vrele(nd.ni_startdir);
zfree(namei_zone, nd.ni_cnd.cn_pnbuf);
vp = nd.ni_vp;
!   if (nd.ni_dvp == vp)
vrele(nd.ni_dvp);
!   else
vput(nd.ni_dvp);
VOP_ABORTOP(nd.ni_dvp, nd.ni_cnd);
if (vap-va_size != -1) {
--- 1491,1499 
vrele(nd.ni_startdir);
zfree(namei_zone, nd.ni_cnd.cn_pnbuf);
vp = nd.ni_vp;
!   if (nd.ni_dvp == vp) 
vrele(nd.ni_dvp);
!   else 
vput(nd.ni_dvp);
VOP_ABORTOP(nd.ni_dvp, nd.ni_cnd);
if (vap-va_size != -1) {
***
*** 1505,1513 
error = VOP_SETATTR(vp, vap, cred,
 procp);
}
!   if (error)
vput(vp);
}
}
if (!error) {
bzero((caddr_t)fhp, sizeof(nfh));
--- 1507,1516 
error = VOP_SETATTR(vp, vap, cred,
 procp);
}
!   if (error) 
vput(vp);
}
+   if (eexistdebug)  vput(vp);
}
if (!error) {
bzero((caddr_t)fhp, sizeof(nfh));


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



pppd + pam + radius (3) [getting crazy]

1999-06-14 Thread Paulo Fragoso
Hi,

I've solved (I think) modules auth failures in pppd using PAM (compiled
with -DUSE_PAM). It's work after one modification:

--- ../pppd-orig/auth.c Sat Jun 20 15:02:08 1998
+++ auth.c  Mon Jun 14 17:42:16 1999
@@ -867,7 +867,6 @@
  */
 pam_error = pam_authenticate (pamh, PAM_SILENT);
 if (pam_error == PAM_SUCCESS) {
-pam_error = pam_acct_mgmt (pamh, PAM_SILENT);
 
/* start a session for this user. Session closed when link ends.
*/
if (pam_error == PAM_SUCCESS)

Now I can log in my system authenticating via radius on another machine.
I'm using radiusd-cistron-1.5.4.3 but this server isn't working fine. My
radlast is empty. Why is happening? What the best version of radiusd to
use?

Please!!!, can anyone help me? I getting crazy :-)

Paulo.

--
  ... Overall we've found FreeBSD to excel in performace, stability,
technical support, and of course price. Two years after discovering
FreeBSD, we have yet to find a reason why we switch to anything else
-David Filo, Yahoo!



To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



umapfs...

1999-06-14 Thread David E. Cross
I have been looking at the code for UMAPfs... I am trying to understand 
conceptually why it is so unstable...  It looks straightforward enough as
simply passing the calls it receives on to the FS below it, almost like it
didn't exist at all.  Why does this cause problems?  Isn't the only difference
between a UMAP/UNION FS and a native FS an additional stack frame in the
kernel?

(As I am starting to wrap up this FS adventure, I am looking to start another:)

--
David Cross   | email: cro...@cs.rpi.edu 
Systems Administrator/Research Programmer | Web: http://www.cs.rpi.edu/~crossd 
Rensselaer Polytechnic Institute, | Ph: 518.276.2860
Department of Computer Science| Fax: 518.276.4033
I speak only for myself.  | WinNT:Linux::Linux:FreeBSD


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: coarse vs fine-grained locking in SMP systems

1999-06-14 Thread Mike O'Dell
it was on a Purdue Dual Vax 11/780
much later DEC sold the 782 which was a
commercially produced version of the 
Purdue Dual VAX 11/780 which was built
from one machine and a bunch of spares.
George Goble produced the parts list to
order from DEC Spares to build your own.
several got built.

-mo


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: oops, here's the patch

1999-06-14 Thread Matthew Dillon
Oh man that routine is complex!  I'm looking at it closely
and I think you are right, except I think you may have
introduced a minor bug in fixing the other bug.  Here is the code and
the last bit of your modification for reference:

if (vap-va_size != -1) {
error = nfsrv_access(vp, VWRITE, cred,
(nd.ni_cnd.cn_flags  RDONLY), procp, 0);
if (!error) {
nqsrv_getl(vp, ND_WRITE);
tempsize = vap-va_size;
VATTR_NULL(vap);
vap-va_size = tempsize;
error = VOP_SETATTR(vp, vap, cred,
 procp);
}
if (error)
vput(vp);
}
if (eexistdebug)  vput(vp);  your addition

However, if the inside of the first conditional generates an error, the vp
may be vput twice.  What I recommend is this for the last bit:

if (vap-va_size != -1) {
...
if (error) {
vput(vp);
vp = NULL;   my addition
}
}
if (eexistdebug  vp)   also check vp != NULL
vput(vp);

It would be good if someone else could look over this routine and
double-check David's find and his solution with my modification.  Have
we handled all the cases?

David, this is a great bug find!

-Matt
Matthew Dillon 
dil...@backplane.com



To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: NAT Gateway to multiple ISPs

1999-06-14 Thread Wes Peters
s...@iwl.net wrote:
 
 Any ideas on the following ?
 
   I am setting up a home/office network with NAT filtering gateway
on a dual-NIC FreeBSD 3.2 box.  No problem so far - I've set
up several like this on 2.2.8 using natd.
 
   The new wrinkle is this:  I need to connect to two ISPs
(DSL  Cable Modem), ideally with automatic failover and
load balancing when multiple internal PC's are generating
internet traffic.
 
   I know that this requires running gated (or routed) to
receive RIP or OSPF messages from the ISPs, and to select the
best outgoing ISP's route.
 
   The key question is: while the routing program probably
requires a third NIC so that each external link has its own
device, how can natd handle multiple external internet
interfaces.

You could certainly (and easily) do it with *two* FreeBSD boxes:

 +--+  +--+
Cable --|  Router  |  | Firewall |
 |  Gated+  ||  natd+   |-- internal network
  DSL --| FreeBSD  |  | FreeBSD  |
 +--+  +--+

I'm not sure it is possible to virtualize the connection between the
router and firewall above.  Perhaps with a clever (ab)use of the
bridging code.

-- 
   Where am I, and what am I doing in this handbasket?

Wes Peters Softweyr LLC
http://www.softweyr.com/~softweyr  w...@softweyr.com


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: vn swapfiles deleted while in use

1999-06-14 Thread Matthew Dillon

:
: What, to the reckoning of the resident populace, would happen if
: somebody were to rm a vnconfig'd swapfile while it was in use?
: The system still has a reference to the file, even deleted,
: so all you would be doing would be removing its directory
: entry.
:
:And what happens when the system is shut down?  Would everything
:happen nicely then?
:
:Thanks,
:joelh

I have no idea.  I seem to recall a bug report indicating that the
system sometimes shutsdown unclean due to the VN mount maintaining
its lock on the file.

-Matt
Matthew Dillon 
dil...@backplane.com

:-- 
:Joel Ray Holveck - jo...@gnu.org
:   Fourth law of programming:
:   Anything that can go wrong wi
:sendmail: segmentation violation - core dumped
:
:
:To Unsubscribe: send mail to majord...@freebsd.org
:with unsubscribe freebsd-hackers in the body of the message
:



To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: NAT Gateway to multiple ISPs

1999-06-14 Thread Brian Somers
 
 Any ideas on the following ?
 
   I am setting up a home/office network with NAT filtering gateway
on a dual-NIC FreeBSD 3.2 box.  No problem so far - I've set
up several like this on 2.2.8 using natd.
 
   The new wrinkle is this:  I need to connect to two ISPs
(DSL  Cable Modem), ideally with automatic failover and
load balancing when multiple internal PC's are generating
internet traffic.
 
   I know that this requires running gated (or routed) to
receive RIP or OSPF messages from the ISPs, and to select the
best outgoing ISP's route.
 
   The key question is: while the routing program probably
requires a third NIC so that each external link has its own
device, how can natd handle multiple external internet 
interfaces.
[.]
   3) Configure an internal pseudo-device (tun ?) or divert 
 interface between natd (and the internal NIC) on the inside 
 and gated or routed (and the two external NICS) on the 
 outside.
 This way, natd and the routing program would be completely
 isolated and wouldn't need to know that the other existed.
 
  ISP1 - NIC1
  \
  gated  -  TUN  -  natd  -  NIC3  -  internal net
  /device
  ISP2 - NIC2
 
 
The third seems the best choice, but I haven't seen any
 discription of this type of configuration.

Except of course for the working example I mailed you on June 9 and 
committed to src/share/examples/ppp.

Any advice ?
 
 Thanks very much for your help,
 
 Andy Starratt

-- 
Brian br...@awfulhak.orgbr...@freebsd.org
  http://www.Awfulhak.org   br...@openbsd.org
Don't _EVER_ lose your sense of humour !  br...@uk.freebsd.org




To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Why not let sys/stat.h include sys/types.h?

1999-06-14 Thread Ming-I Hsieh
Anyone can tell me why the ``sys/stat.h'' don't include ``sys/types''!
It will cause some imcompatible between FreeBSD and some others UN*X.
Thanks!



To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



RE: Why not let sys/stat.h include sys/types.h?

1999-06-14 Thread Daniel O'Connor

On 15-Jun-99 Ming-I Hsieh wrote:
  Anyone can tell me why the ``sys/stat.h'' don't include ``sys/types''!
  It will cause some imcompatible between FreeBSD and some others UN*X.

Because you're supposed to know what you need when you use certain things..

As the stat(2) man page says, you need to include both sys/types.h and
sys/stat.h

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


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: Matt's Commit status (was Re: 3.2-stable, panic #12)

1999-06-14 Thread John Birrell
Jordan K. Hubbard wrote:
 Excellent.  Let's assume then that all the core folk who are there,
 plus any committers who have an interest in the issue (since core has
 to listen to its developers' opinions too or we can no longer honestly
 claim to represent their interests), will be getting together during
 the week to discuss this issue along with perhaps some general
 technical discussion of your work and your future plans.  It would
 be a shame (not to mention stupid) to waste this opportunity.

For the benefit of those of us who weren't at USENIX, can we please
have a summary of what was discussed/decided?

-- 
John Birrell - j...@cimlogic.com.au; j...@freebsd.org 
http://www.cimlogic.com.au/
CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



re: david cross's NFS panic fix

1999-06-14 Thread David Scheidt
On Mon, 14 Jun 1999, Matthew Dillon wrote:

 Ack, you may have opened up a can of worms here.  I don't even think

I don't think it is fair to say he opened a can of worms.  He found it, but 
it was clearly open to begin with.  He had the misfortune to stumble across 
it.  Since he has tracked it down, it needs to be quashed, right?

(note, CC's trimmed, subject changed, and redirected back into -hackers,
which this has wondered out of.)

David Scheidt



To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: re: david cross's NFS panic fix

1999-06-14 Thread Matthew Dillon

:
:On Mon, 14 Jun 1999, Matthew Dillon wrote:
:
: Ack, you may have opened up a can of worms here.  I don't even think
:
:I don't think it is fair to say he opened a can of worms.  He found it, but 
:it was clearly open to begin with.  He had the misfortune to stumble across 
:it.  Since he has tracked it down, it needs to be quashed, right?
:
:(note, CC's trimmed, subject changed, and redirected back into -hackers,
:which this has wondered out of.)
:
:David Scheidt

Oh yes, it needs to be squashed.  I meant that comment in a good way :-)

-Matt
Matthew Dillon 
dil...@backplane.com


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



NFSv3 fixes...

1999-06-14 Thread David E. Cross
Sorry about that everyone, I 'repl'ied to the wrong message.

 Ack, you may have opened up a can of worms here.  I don't even think
 that nfs_namei() does the right thing when it returns an error... it
 doesn't look like it clears the ndp-ni_vp either in some error cases.
Who, me?  Open a can of worms?  ;)

 We are going to have to instrument the code - basically means NULLing
 out ni_vp and any local vnode pointer when the vnode in question is
 released so we can keep track of it and putting KASSERT()s in strategic
 places.  nfs_namei() in nfs/nfs_subs.c and just about all the subroutines
 defined in nfs/nfs_serv.c.

That was along the lines of my thoughts too... it became painfully obvious
that this sort of bug could be (and probably is) everywhere in the nfs
server code.  I will be happy to follow your lead on this (honored one
may say).  I am hoping to have some time to deal with this tonight, but I did
just get my CD-RW drive.  We should probably take the time to document the
code some more while we are at it... simple things like commenting what
braces go to what would have greatly eased my trace through the code :)

--
David Cross
The source will be with you, always.


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: Variant symlinks [was Re: symlink question]

1999-06-14 Thread Warner Losh
In message pine.bsf.3.96.990614120238.366e-100...@server.ghostgbtb.com Marc 
Ramirez writes:
: Well, I'd like to add versioning, too, but _that's_ hard! 

Versioning wouldn't be too hard to add to a filesystem.  Name lookup
would be impacted.  The act of creating a new version would just be
the creat(2) system call, or open with the O_CREAT bit set (and maybe
with the O_TRUNC bit too).  However, adding utilities to deal with all
these new versions might take a lot of time since various versioning
schemes have been implemented in userland over the years (all the foo~ 
or foo~3~ files from us emacs users, for example).

I don't know if it would be worth it to actually do this, but it would 
make an interesting kernel hacking project for someone wishing to
learn about the vfs layer.

Warner


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: Why not let sys/stat.h include sys/types.h?

1999-06-14 Thread Warner Losh
In message 3765b7dc.e87ad...@wm28.csie.ncu.edu.tw Ming-I Hsieh writes:
: Anyone can tell me why the ``sys/stat.h'' don't include ``sys/types''!
: It will cause some imcompatible between FreeBSD and some others UN*X.

Because it isn't supposed to.

STAT(2)   FreeBSD System Calls Manual  STAT(2)
...
 #include sys/types.h
 #include sys/stat.h
 int
 stat(const char *path, struct stat *sb)
...

I believe that posix and/or ANSI-C (now ISO-C, soon to be C9x)
requires that name space polution be limited in what sys/stat.h can
cause to be defined.

Warner


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: Matt's Commit status (was Re: 3.2-stable, panic #12)

1999-06-14 Thread Jordan K. Hubbard
 For the benefit of those of us who weren't at USENIX, can we please
 have a summary of what was discussed/decided?

Nothing was [deliberately] decided but much was discussed.  As soon as
one of us lands back home in some reasonable state, a summary will be
posted.  I've yet to do this myself and will be on the road for the
rest of the week as well. :|

- Jordan


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: apmd for FreeBSD

1999-06-14 Thread Warner Losh
In message 199906101257.vaa16...@tasogare.imasy.or.jp Mitsuru IWASAKI writes:
: apmd(8):
: http://home.jp.freebsd.org/~iwasaki/apm/19990610/apmd-usr.sbin.tar.gz

With the patched include files, this compiles and appears to work on
-current.

: 3.2-RELEASE kernel patch:
: http://home.jp.freebsd.org/~iwasaki/apm/19990610/apmd-sys-R320.diff.gz

I've applied the patches to my -current system.  I had to apply two by
hand, and then it just compiled and appeared to work with no ill
effects on my desktop.

Good job.  Now to testing on my laptop

Warner

P.S. I've put my diffs vs -current at
http://www.freebsd.org/~imp/apmd-sys-current.diff.gz


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message