Re: cvs commit: src/sys/netinet if_ether.c

2003-01-24 Thread Bill Fenner

hsu 2003/01/16 23:59:35 PST

  Modified files:
sys/netinet  if_ether.c 
  Log:
  SMP locking for ARP.

I just got:

lock order reversal
 1st 0xc0436078 arp mutex (arp mutex) @ /usr/src/sys/netinet/if_ether.c:151
 2nd 0xf800a0668ef0 radix node head (radix node head) @ 
/usr/src/sys/net/route.c:549

Unfortunately, witness_ddb wasn't on so I don't have a stack trace.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: sysinstall and serial consoles

2002-12-12 Thread Bill Fenner

I meant sysinstall generating cons25 output.  But there were recently a
lot of terminfo changes that may have caused this.

Oh.  sysinstall asked if I wanted ANSI, vt100, cons25, something else
related to FreeBSD console, or xterm.  Most of those options were wrong,
which is the bug that I think I'm trying to report.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Renumber IPPROTO_DIVERT

2002-12-12 Thread Bill Fenner

Was /etc/protocols maybe simply forgotten in the 10/29/02 change?

Yes.  Does changing it to 258 work?

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



sysinstall and serial consoles

2002-12-11 Thread Bill Fenner

I installed 5.0-RC1 on a Sun Ultra-60 a couple of days ago.
The biggest problem that I ran into was terminal emulation
inside sysinstall.

I normally do most tasks inside screen, so I tried selecting
the vt100 emulation (since that's what screen tries to be).
However, it uses something that screen doesn't emulate, so
the screen was full of OOPS where screen didn't know what
to do.

Fine, that's screen's problem.  I tried ANSI, and had two
problems:
1. There was no reverse video, so it was impossible to determine
which option was selected.
2. Using the arrow keys resulted in sysinstall asking me if
I really wanted to abort the install (presumably it thought I
hit escape).

Ok, so that one might have been screen's problem too, so I'll
just do it outside of screen.  Since I was running tip from
an xterm, I figured it made most sense to choose the xterm
terminal type.  Nope, no luck, it was nice and colorful and
drew the lines, but the menu did not line up so the screen got
pretty much filled with gibberish after a couple of attempts.

Someone said that the problem was the oxtabs stty setting, so
I tried xterm with both oxtabs and -oxtabs and had the same
experience with columns not lining up.

So, I tried ANSI from within the xterm.  That had the same problems
as screen -- no reverse video and arrow keys asked if I wanted to
exit.

So, finally, I tried vt100 from within the xterm.  That worked.

I think it's fairly likely that people will be installing FreeBSD
on headless suns; I think it's fairly likely that most of these
people will go through one or more of the painful iterations that
I went through before happening upon the magic correct combination.

My suggestions:
1. Look into the reverse video problem when selecting ANSI terminal.
2. Look into the escape character problem with arrow keys and ANSI terminal.
3. Remove the xterm option, and call vt100 vt100 or xterm.  (Or fix
   what is wrong with the xterm termcap).

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: sysinstall and serial consoles

2002-12-11 Thread Bill Fenner

screen(1) says Each virtual terminal provides the functions of a DEC
VT100 terminal and, in addition, several control functions from the ISO
6492  ... and ISO 2022 standards 

I took that to mean that it provides a vt100 interface.  That's also
been my experience in the last 8 years of using screen.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Make regression tests and 4.x cross-builds

2002-11-29 Thread Bill Fenner

The sparc64 tinderbox is running a stale world (about 3 months old),
so it's hitting the same problem.

I'm running a not-so-stale world (19 days old) and hitting the same
problem.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Make regression tests and 4.x cross-builds

2002-11-29 Thread Bill Fenner

One of the big problems is that install gives a bogus error
message when it can't unlink /usr/bin/make because it's non-root.
Since there's no way that I'm going to suggest changing
install's behavior this late in the release cycle, can we
at least make buildworld's make target ensure that you're
root, and avoid install's bogus error?

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: crash with network load (in tcp syncache ?)

2002-11-02 Thread Bill Fenner

Terry,

  I think most of your 9k of reasoning is based on the thought that
soreserve() allocates memory.  It doesn't, and never has.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: crash with network load (in tcp syncache ?)

2002-11-02 Thread Bill Fenner

Michal,

  Alan Cox pointed out to me that backing out to using sodealloc()
instead of sotryfree() is probably a better fix anyway - it solves
the panic in more or less the same way as mine, but it backs the code
out to be the same as it's been for years -- a much more well-tested
fix =)  He committed it this morning, so could you please test an
up to date -CURRENT (rev 1.105 of uipc_socket2.c) without my patch?

Thanks,
  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: crash with network load (in tcp syncache ?)

2002-11-02 Thread Bill Fenner

I really don't understand why you keep claiming that the SYN cache
changes anything.  Without the SYN cache, tcp_input() calls
sonewconn(so, 0) on receipt of a SYN; with the SYN cache, tcp_input()
calls some syncache function which calls sonewconn(so, SS_ISCONNECTED)
on receipt of a SYN/ACK.  In either case, it's with the same interrupt
level, etc -- you are in the middle of processing a packet that was
received by tcp_input().

So, you're saying that what we're hitting is a design flaw in 4BSD
and that this problem has been there since day one?

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: crash with network load (in tcp syncache ?)

2002-11-01 Thread Bill Fenner
sonewconn() hands sofree() a self-inconsistent socket -- so-so_head is
set, so so must be on a queue, but sonewconn() hasn't put it on a queue yet.
Please try this patch.

  Bill

Index: uipc_socket2.c
===
RCS file: /home/ncvs/src/sys/kern/uipc_socket2.c,v
retrieving revision 1.104
diff -u -r1.104 uipc_socket2.c
--- uipc_socket2.c  18 Sep 2002 19:44:11 -  1.104
+++ uipc_socket2.c  1 Nov 2002 22:40:52 -
@@ -192,7 +192,7 @@
return ((struct socket *)0);
if ((head-so_options  SO_ACCEPTFILTER) != 0)
connstatus = 0;
-   so-so_head = head;
+   so-so_head = NULL;
so-so_type = head-so_type;
so-so_options = head-so_options ~ SO_ACCEPTCONN;
so-so_linger = head-so_linger;
@@ -209,6 +209,7 @@
return ((struct socket *)0);
}
 
+   so-so_head = head;
if (connstatus) {
TAILQ_INSERT_TAIL(head-so_comp, so, so_list);
so-so_state |= SS_COMP;

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: ypbind doesn't work right on freshly installed machines

2002-11-01 Thread Bill Fenner

This is fixed in my WIP on rc.d .  I'm more or less ready for wider
review; I especially need review of the atm and diskless changes.

  Bill

http://people.freebsd.org/~fenner/rc.d.diff

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: ypbind doesn't work right on freshly installed machines

2002-11-01 Thread Bill Fenner

BTW, /etc/rc.network never tried to save you from

rpcbind_enable=NO
nis_client_enable=YES

so it may be a mistake for /etc/rc.d/* to try to.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: ypbind doesn't work right on freshly installed machines

2002-11-01 Thread Bill Fenner

Oops, you're right, I was looking too closely =)

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: crash with network load (in tcp syncache ?)

2002-11-01 Thread Bill Fenner

I think this can still crash (just like my patch); the problem is in
what happens when it fails to allocate memory.  Unless you set one of
the flags, it's still going to panic in the same place, I think, when
you run out of memory.

No.  The flags are only checked when so_head is not NULL.  sonewconn()
was handing sofree() an inconsistent struct so (so_head was set without
being on either queue), i.e. sonewconn() was creating an invalid data
structure.

The call in sonewconn() used to be to sodealloc(), which didn't care
about whether or not the data structure was self-consistent.  The code
was refactored to do reference counting, but the fact that the socket
was inconsistent at that point wasn't noticed until now.

The problem is not at all based on what happens in the allocation or
protocol attach failure cases.  The SYN cache is not involved, this is
a bug in sonewconn(), plain and simple.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



rc.d and sysctl.conf

2002-10-30 Thread Bill Fenner

/etc/rc runs /etc/rc.sysctl twice:

one early, after mounting filesystems, reseeding the random number
generator and adding a swap file, and before running rc.serial, rc.pccard,
rc.network.

one late, after network_pass4 but before raising the securelevel.
This was added in response to

http://www.freebsd.org/cgi/query-pr.cgi?pr=19629   


The update to the /etc/rc.d infrastructure keeps the ability to run
twice, but does not actually run it twice.  I started creating an
/etc/rc.d/sysctl-last that would run /etc/rc.d/sysctl lastload,
but realized that I didn't know how to say where the first/second
call should go.  To strictly follow /etc/rc.d, I could change the
existing /etc/rc.d/sysctl to say BEFORE: serial and add BEFORE:
securelevel to sysctl-last, but I'm not sure this is appropriate given
the meta-checkpoints that we have.

(It also raises the question of if /etc/rc.d/securelevel actually
runs at the right time.  /etc/rc puts it almost at the absolute end,
while rcorder sticks it somewhere in the middle -- number 67 of 102
on my system.)

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



libfetch(3) patch for SSL

2002-10-29 Thread Bill Fenner
Turns out my writev patch for fetch broke SSL, since it could create
iov[0].iov_len = 0, which would cause SSL_write(..,0), which would
return 0, which would look like a short write and cause an error, which
then gets ignored by http.c .  Ignoring the bigger picture of the error
checking, this fix at least gets https: working again by making sure
that _fetch_putln doesn't construct an iov with iov_len == 0.  (Yes,
this is against rev 1.40, post-brouhaha).

  Bill

Index: common.c
===
RCS file: /home/ncvs/src/lib/libfetch/common.c,v
retrieving revision 1.40
diff -u -r1.40 common.c
--- common.c30 Oct 2002 00:17:16 -  1.40
+++ common.c30 Oct 2002 03:06:58 -
@@ -539,13 +539,18 @@
 _fetch_putln(conn_t *conn, const char *str, size_t len)
 {
struct iovec iov[2];
+   int ret;
 
DEBUG(fprintf(stderr,  %s\n, str));
iov[0].iov_base = __DECONST(char *, str);
iov[0].iov_len = len;
iov[1].iov_base = __DECONST(char *, ENDL);
iov[1].iov_len = sizeof ENDL;
-   if (_fetch_writev(conn, iov, 2) == -1)
+   if (len == 0)
+   ret = _fetch_writev(conn, iov[1], 1);
+   else
+   ret = _fetch_writev(conn, iov, 2);
+   if (ret == -1)
return (-1);
return (0);
 }

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: libfetch(3) patch for SSL

2002-10-29 Thread Bill Fenner

I was working on (wlen == 0  iov-iov_cnt != 0) for a while, thinking
that it would work in both cases, even though the logic is a little weird
in the writev case, but it would fail in the race where the connection
closed at the same time as the writev() with the zero length iov_len.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Who broke sort(1) ?

2002-09-24 Thread Bill Fenner


Here's my suggested fix:

stash% pwd
/usr/src/gnu/usr.bin/sort
stash% cvs diff -uN
cvs diff: Diffing .
Index: posixver.c
===
RCS file: posixver.c
diff -N posixver.c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ posixver.c  24 Sep 2002 20:37:22 -
@@ -0,0 +1,8 @@
+/*
+ * Tell GNU sort(1) to implement the obsolete +1 -0 syntax even though
+ * it has been removed from the version of POSIX that the rest of
+ * the system conforms to.
+ */
+int posix2_version(void) {
+   return 0;
+}

If it's too confusing to have files with the same names in
/usr/src/gnu/usr.bin/sort and /usr/src/contrib/gnu-sort/lib this one
could be renamed (e.g. to posixver-notreally.c) with a corresponding
Makefile change.

I am in the middle of a buildworld with this change.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Who broke sort(1) ?

2002-09-24 Thread Bill Fenner


Please, no. They do the right thing.

I guess there are varying definitions of what the right thing is.
I don't think it's widely known that the +/- syntax was obsoleted.
I am vaguely a standards weenie and I didn't know.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Who broke sort(1) ?

2002-09-24 Thread Bill Fenner


Until sh, make, tar, and so on also drop behaviours that are
not specified by POSIX, it's really silly to make sort drop them.

It's not that the +x/-y argument syntax is not specified - it's that
it's specifically disallowed.  (I disagree with that restriction, but
let's at least have the right argument.)

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Who broke sort(1) ?

2002-09-24 Thread Bill Fenner


It's not like people didn't have nine years' advance warning to fix
their scripts.

When's the first time the FreeBSD sort(1) man page mentioned that this
syntax was deprecated?  Can we at least start from there?

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Who broke sort(1) ?

2002-09-24 Thread Bill Fenner


I think a lot of people would be happier if we could maintain backwards
compatability (and document the fact that they're extremely obsolete)
for a few more releases.  Despite the fact that the main UNIX reference
that I use was published in 1984, I don't actually want everything to
stay the same forever.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: kern_timeout.c msg Expensive timeout(9) function: 0xc026f3ec(0xc4067800) 0.006773207

2002-09-10 Thread Bill Fenner


I've seen the scrn_timer() one too:

Expensive timeout(9) function: 0xc049b3f0(0xc0657200) 0.003659743
c049b3f0 t scrn_timer

as well as uma_timeout().

Expensive timeout(9) function: 0xc047c6b0(0) 0.002146136
c047c6b0 t uma_timeout


  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



libpcap vs. up-to-date net/bpf.h Re: i386 tinderbox failure

2002-06-20 Thread Bill Fenner


Ok, so I broke world.  What I don't get is how -- why doesn't the
build use the up to date includes?

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: libpcap vs. up-to-date net/bpf.h Re: i386 tinderbox failure

2002-06-20 Thread Bill Fenner


And the answer is... it only uses the includes if you commit them
to the FreeBSD repository instead of your local repository.

Pointy hat to:  fenner

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



perl wrapper and PATH

2002-06-08 Thread Bill Fenner


I know that the specific mergemaster issues have been addressed, but I
thought this experience pointed out something subtly astonishing, so I
figured I'd point it out.

I ran mergemaster, and the perl wrapper started complaining that I
needed to install perl, so I did pkg_add -r perl.  The port talked
all about use.perl port or use.perl system, but I figured
system was wrapper so I didn't bother running use.perl .  I tried
perl -de 0, and voila, I had perl.  So I ran mergemaster again,
and the wrapper started complaining again that I needed to install
perl.

Turns out that mergemaster sets a restrictive PATH, and the wrapper
(apparently) looks for the real perl in the PATH.  This can be
awfully confusing -- /usr/bin/perl works, but env PATH=/usr/bin perl
doesn't work.

I ran use.perl port, and that gave me a working perl for mergemaster.
Interestingly, use.perl system didn't give me back the perl wrapper;
I'm not sure what I got.  Sigh.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: moused(8): char signed-ness problem with gcc 3.1

2002-05-16 Thread Bill Fenner


Specifically what is the problem?  Given the program below, take the
ISO-C spec and explain the problem.  Or even w/o the spec -- I haven't
been reading this thread.

  int
  main()
  {
 unsigned char i = 127;
 char j;
  
 printf(%d\n, ((char)(i  1)));

This prints -2, which is correct -- (signed char)254 is -2.

 j = ((char)(i  1)) / 2;
 printf(%d\n, j);

This prints 127, which is incorrect.  -2 / 2 is -1.

 j = ((char)(i  1));
 printf(%d\n, j / 2);

This breaks down the previous expression into two halves, and
results in the correct answer of -1.  However, there should
be no difference between
((char)(i  1)) / 2
and
char j = ((char)(i  1); j / 2

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: moused(8): char signed-ness problem with gcc 3.1

2002-05-15 Thread Bill Fenner


gcc 3.1 simply defaults to unsigned chars.  127  1 = 254; 254 / 2 = 127.

My machine is too slow to test this expeditiously, but I'm trying
adding #define DEFAULT_SIGNED_CHAR 1 into freebsd-native.h .

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: moused(8): char signed-ness problem with gcc 3.1

2002-05-15 Thread Bill Fenner


Duh.  Sometimes I wish I had the patience to wait for my tests to complete
before sharing my guesses.  I jumped to a wildly incorrect conclusion; gcc
3.1 still defaults to signed chars.  Sorry for the bizarre misdirection.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: moused(8): char signed-ness problem with gcc 3.1

2002-05-15 Thread Bill Fenner


 So - yes - it seems gcc 3.1 does have a problem...

Indeed - easily determined by breaking down the expression.

So, who's gonna report it to gcc-bugs?  knu?...

int
main()
{
   unsigned char i = 127;
   char j;

   printf(%d\n, ((char)(i  1)));
   j = ((char)(i  1)) / 2;
   printf(%d\n, j);
   j = ((char)(i  1));
   printf(%d\n, j / 2);
   return 0;
}

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Some ports fail on -current because ${BINOWN} and ${BINGRP} seems to be not defined

2002-05-11 Thread Bill Fenner


This is presumably fallout from the /usr/share/mk rearrangement, but
rev 1.306 of /usr/share/mk/bsd.port.mk should fix this.

Oh, hey, are the failing ports all ones that use bsd.port.pre.mk and
bsd.port.post.mk?  I guess bsd.port.pre.mk needs the same fix as
bsd.port.mk does.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: clock drift in -CURRENT

2002-05-01 Thread Bill Fenner


I had the same symptoms (drifting about 2 minutes an hour) on sources
before April 17 or so.  Since then, ntpd has only logged 5 time updates,
as opposed to 3 per hour.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: PAM OpenSSH: two incorrect last login

2002-04-22 Thread Bill Fenner


Might, might not.  ISTR strftime() can't correctly emulate ctime(),
but some other format might be preferrable.  Do you have a format
string handy?

I'd think something like what last does would be good.

d_first = (*nl_langinfo(D_MD_ORDER) == 'd');

...

(void) strftime(ct, sizeof(ct), d_first ?
(yflag ? %a %e %b %Y %R : %a %e %b %R) :
(yflag ? %a %b %e %Y %R : %a %b %e %R), tm);

except you probably want %T instead of %R if you want the seconds.
You could either pretend that yflag was not set (what ache was
suggesting) or set yflag if the year of the last login was not
this year (possibly more useful).

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: PAM OpenSSH: two incorrect last login

2002-04-21 Thread Bill Fenner


While you're in here, does it make sense to use strftime() instead of
printing just a portion of what ctime returns?  This would allow
i18n of the time format if desired (and if the locale is set this
early -- maybe this is just a can of worms =).

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: savecore

2002-04-20 Thread Bill Fenner

Yes, I'm in favor of going back to the simple sequence number too.
I don't understand the advantage of the MD5.

While you're in there, could you put back minfree checking too?
That bit me pretty badly today, with savecore filling up my /var
because it doesn't care about minfree.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Last round of sendmail startup changes in place

2002-04-11 Thread Bill Fenner


Masquerading shouldn't need to be in submit.mc either -- the MTA should do
any masquerading.  The only catch here is for people who may be using
limited masquerading and not masquerading the fully qualified hostname of
submitted mail.

Some broken tests made me think that the MTA wouldn't masquerade the
envelope; checking again the envelope is indeed masqueraded too.
Sorry for the confusion.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Last round of sendmail startup changes in place

2002-04-05 Thread Bill Fenner


BTW, not that this is particularly related to startup scripts, but -- I
found it quite frustrating that due to a transient failure at submission
time, my mail went into /var/spool/clientmqueue, for which you have to
use mailq -Ac, which is pretty much completely undocumented.  It
turned out OK because there was actually a daemon there whose job it
was to process that queue, but from a user experience point of view,
sending mail, having it talk about a transient failure and that it
was queued, and then not having that message show up in mailq was
fairly astonishing (and stress-inducing until I found the other
queue).

Anyway, that was really a long way of saying: should this be documented
somewhere?  Like, prominently in the mailq man page?

And, addressing the initial failure itself: apparently I need to add
O ResolverOptions=WorkAroundBroken and my masquerading options
to submit.cf; are there any plans to add per-host submit.mc handling
(i.e. a SENDMAIL_MC equivalent) to /etc/mail/Makefile?  Is there any
general advice on what MC stuff goes where at this point (e.g. does
the masquerading stuff only go in submit.cf, or should it also be in
sendmail.cf, etc.)

Thanks,
  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: -current lock warning...

2002-03-16 Thread Bill Fenner


 Although I am still getting the following lock problems when I shut
 the system down:

 lock order reversal
  1st 0xc036afc0 allproc @ ../../../kern/vfs_syscalls.c:452
  2nd 0xc7ecce34 filedesc structure @ ../../../kern/vfs_syscalls.c:457

I've been seeing this since Feb 4.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: b_to_q to a clist with no reserved cblocks

2002-03-15 Thread Bill Fenner


I don't know exactly what causes the b_to_q message.  It is most likely
a race in close.  You can first-open tty's that are blocked in last-close,
and having this open succeed is very important for unblocking the close
usi9ng comcontrol /dev/foo drainwait small, but the tty system doesn't
seem to do nearly enough to handle races here.

It happened to me on shutdown, with a serial console.

Mar 15 00:58:10 stash reboot: rebooted by fenner
panic: b_to_q to a clist with no reserved cblocks.

Debugger(panic)
Stopped at  Debugger+0x40:  xorl%eax,%eax
db t
Debugger(c03ebb5b) at Debugger+0x40
panic(c03f18c0) at panic+0x70
b_to_q(c7f9bb14,35,c1361a38,0,c7f9bcc8) at b_to_q+0x35
ttwrite(c1361a00,c7f9bcc8,20011,c04b5e80,c7f9bbb4) at ttwrite+0x34c
siowrite(c04b5e80,c7f9bcc8,20011,c04b5e80,c7f9bb80) at siowrite+0x78
cnwrite(c04b63d0,c7f9bcc8,20011,c04b63d0,35) at cnwrite+0x74
spec_write(c7f9bc20,c7f9bc34,c02b0c23,c7f9bc20,35) at spec_write+0x5d
spec_vnoperate(c7f9bc20,35,c7615500,0,11) at spec_vnoperate+0x15
vn_write(c1392b40,c7f9bcc8,c0a8c980,0,c7615500) at vn_write+0x19f
writev(c7615500,c7f9bd20,8054000,bfbfef64,bfbfef34) at writev+0x19a
syscall(2f,2f,bfbf002f,bfbfef34,bfbfef64) at syscall+0x278
syscall_with_err_pushed() at syscall_with_err_pushed+0x1b
--- syscall (121, FreeBSD ELF, writev), eip = 0x280aae73, esp = 0xbfbfe960, ebp = 
0xbfbfe9cc ---

I have a dump, if it'd help.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Serial break into debugger broken from 'cu' on -CURRENT?

2002-03-10 Thread Bill Fenner



FreeBSD stash.attlabs.att.com 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Fri Mar  8 18:16:53 
PST 2002 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/STASHNOV6  i386

responds to a break from a Cisco terminal server, invoked by
/usr/ports/comms/conserver:

FreeBSD/i386 (stash.attlabs.att.com) (ttyd0)

login: Mar  9 21:35:57 stash savecore: reboot after panic: from debugger
Mar  9 21:36:02 stash savecore: reboot after panic: from debugger
lock order reversal
 1st 0xc0468a40 allproc @ /usr/src/sys/kern/vfs_syscalls.c:452
 2nd 0xc1423734 filedesc structure @ /usr/src/sys/kern/vfs_syscalls.c:457
[halt sent]
Stopped at  siointr1+0xb1:  jmp siointr1+0x1b7
db 

I don't have any directly connected ports, so can't coment on cu.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: controversial fix or some errors breaking LINT

2002-02-27 Thread Bill Fenner


No.  Leave it in, this will benifit us all in the long run.

Until we start hitting the broken/buggy warnings, which will cause
people to write more obfuscated or harder to maintain code in order
to avoid the warnings.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Broken (?) unistd.h

2002-02-26 Thread Bill Fenner

Here's a patch for bind's port/freebsd/include/port_before.h .

--- port_before.h.orig  Tue Feb 26 20:57:35 2002
+++ port_before.h   Tue Feb 26 21:02:18 2002
@@ -15,6 +15,7 @@
 #define SETPWENT_VOID
 #endif
 
+#include sys/param.h
 #include sys/types.h
 
 #define GROUP_R_RETURN struct group *
@@ -26,8 +27,13 @@
 #define GROUP_R_ENT_ARGS void
 #define GROUP_R_OK gptr
 #define GROUP_R_BAD NULL
+#if __FreeBSD_version  500029
 #define GETGROUPLIST_ARGS const char *name, int basegid, int *groups, \
  int *ngroups
+#else
+#define GETGROUPLIST_ARGS const char *name, gid_t basegid, gid_t *groups, \
+ int *ngroups
+#endif
 
 #define HOST_R_RETURN struct hostent *
 #define HOST_R_SET_RETURN void

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: libusb build broken due to structure member renaming

2002-02-25 Thread Bill Fenner


You could use http://people.freebsd.org/~fenner/__FreeBSD_version.html
to find an already-existing value of __FreeBSD_version to test based
on the date of the original change.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Generating host.conf for backward compatibility

2001-11-05 Thread Bill Fenner


Can we move this multi-line stuff above the Doing initial network
setup: echo?  It makes the echo -n stuff printed afterwards
look dumb -- right now, we see:

Doing initial network setup:
Generating /etc/host.conf for compatibility
 hostname domain.

The hostname domain are somewhat orphaned.  Perhaps

Doing initial network setup: host.conf hostname domain.

is sufficient?  If not, let's make it

Generating /etc/host.conf for compatibility
Doing initial network setup: hostname domain.

I'm fine with the host.conf - nsswitch.conf update being a multi-line
message, because it happens once.  Since the nsswitch.conf-host.conf
happens on every boot, I'd like to see it be more integrated into the
boot messages.

I've got patches pending to turn this script into an awk (instead of
gawk) script too, so if someone wants to commit this change I can send
the other changes too, or I can make whatever change we decide is
appropriate.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: panic at shutdown

2001-11-04 Thread Bill Fenner


2. cvsup to r1.96 of tty_cons.c, which should fix this, but due to lack
   of testers and the inability to reproduce it here, is unverified.

I've been testing it, and haven't had any panics, but since the panic
was irregular anyway it's hard to say that it's fixed.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: latest -current broke netscape's name lookup?

2001-11-04 Thread Bill Fenner


awk does not copy input lines to its output unless asked; you can
ask with either an explicit print or an empty action.

Using an input file like:

gibberish
stuff
this doesn't match
here is some garbola
I don't want this file in the ouptut
here's some more stuff
and another line
and another
and another
ooh baby
hosts: files dns
don't print this either

the awk program in /etc/rc.network, without the //{next}, and
changing quit to exit, prints:

# Auto-generated, do not edit
hosts
bind

using either the old gawk or the new awk.

That //{next} may have been necessary during some phase of
script development, but is not necessary now.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Panic at vlan_input()

2001-10-05 Thread Bill Fenner


I think this is a bug in the loadable VLAN code; there's a != which
should be an ==, which results in packets with known tags being
discarded and would result in packets with unknown tags causing a
null pointer dereference.  I'll commit a fix soon as soon as I've
tested it more.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: libutil.so.3: Undefined symbol __stdoutp

2001-09-24 Thread Bill Fenner


Read UPDATING.

Having an old libc.so.4 in /usr/lib is not in UPDATING.  (Perhaps it
should be...)

You have an old libc.so.4.  You can have it updated
automatically by adding COMPAT4X=yes into /etc/make.conf.  For now:

# echo COMPAT4X=yes  /etc/make.conf
# cd /usr/src/lib/compat
# make obj
# make
# make install

and you should be set.

Only if he has a /usr/src/lib/compat/compat4x.i386/Makefile
from between the time that you added the removal of libs from
/usr/lib and ru removed it (about a 3-hour window).  Otherwise,
he'll have to rm /usr/lib/libc.so.4 by hand.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: panic on mount

2001-09-24 Thread Bill Fenner


I also started getting this error with recent kernels (in the last
day or so).

Mounting root from ufs:/dev/ad0s1a
panic: lock (sleep mutex) vnode interlock not locked @ 
/usr/src/sys/kern/vfs_default.c:460
Debugger(panic)
Stopped at  Debugger+0x44:  pushl   %ebx
db t
Debugger(c03c5bbb) at Debugger+0x44
panic(c03c8c40,c03c4b80,c03ccf20,c03cc8a0,1cc) at panic+0x70
witness_unlock(c7765f2c,8,c03cc8a0,1cc,c7765f2c,1,c03c4ba0,f6) at witness_unlock+0x1d0
_mtx_unlock_flags(c7765f2c,0,c03cc8a0,1cc,c0567bd0) at _mtx_unlock_flags+0x59
vop_nolock(c0567be8,c0567bf8,c02920c2,c0567be8,c0567d4c) at vop_nolock+0x24
vop_defaultop(c0567be8) at vop_defaultop+0x15
vn_lock(c7765ec0,20002,c049f7c4,c0567d4c,c1346680) at vn_lock+0xca
ffs_mountfs(c7765ec0,c1351600,c049f7c4,c0446900,c0567d4c) at ffs_mountfs+0x7e
ffs_mount(c1351600,0,0,0,c049f7c4) at ffs_mount+0x67
vfs_mountroot_try(c05447a8,c03cc48c) at vfs_mountroot_try+0x14e
vfs_mountroot(0,564c00,564000,0,c012caac) at vfs_mountroot+0x5a
mi_startup() at mi_startup+0x90
begin() at begin+0x43

I dunno how to get a dump from this point since kern.dumpdev hasn't been
set..

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: libutil.so.3: Undefined symbol __stdoutp

2001-09-24 Thread Bill Fenner


OOPS.  That's what I get for just looking individual bits of the tree.
Of course, ru not only removed the code from the
compat/compat4x.i386/Makefile but also added some to compat/Makefile
to work [better] for everything.

Sorry for any confusion I introduced.

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: postfix fails to start

2001-09-10 Thread Bill Fenner


The testing I've done shows that postfix is buggy in two ways:

- The main() in inet_addr_local.c assumes that the addresses in
addr_list and mask_list are sockaddrs, but this is only true
when using IPv6.  This only affects testing with -DTEST.

- inet_addr_local() calls inet_addr_list_append(..., struct in_addr)
even when -DINET6 when inet_addr_list_append() takes a second argument
of struct sockaddr *.

When I fix the bugs in main() and compile without -DINET6 to avoid
the bug in inet_addr_local(), the test code seems to print the right things.

stash% ./TEST
135.197.10.172/255.255.255.128
127.0.0.1/255.0.0.0
stash% ifconfig -a
dc0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500
...
inet 135.197.10.172 netmask 0xff80 broadcast 135.197.10.255
...
lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST mtu 16384
...
inet 127.0.0.1 netmask 0xff00 
stash% uname -a
FreeBSD stash.attlabs.att.com 5.0-CURRENT FreeBSD 5.0-CURRENT #25: Mon Sep 10 17:03:15 
PDT 2001 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/STASH  i386


  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



RE: Lock order reversals that aren't problematic

2001-07-30 Thread Bill Fenner


...since a lock order reversal means that you can get in a deadlock...

Argh, of course.  It's only not problematic if it's a uniprocessor
and it doesn't take an interrupt at the wrong time.  Sorry for being
dense, I'm still used to spl() =)

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Lock order reversals that aren't problematic

2001-07-26 Thread Bill Fenner


I'm curious what the long-term plan is for witness(4).  For
example, it complains about BPF and device locks being reversed
when BPF takes the device out of promiscuous mode --

lock order reversal
 1st 0xc04c1560 bpf global lock @ /usr/src/sys/net/bpf.c:365
 2nd 0xc1302b88 dc1 @ /usr/src/sys/pci/if_dc.c:3251

This is because when traffic is being handed to bpf from the
device, the device is locked so witness first sees dc1's
lock and then bpf's.  The lock reversal occurs when the socket
is closed; bpfclose() calls bpf_detachd() which calls ifpromisc()
which calls into the device, which obtains its lock, but bpf
is already locked..

It's hard to add this case to the blessed_list, since it
can be any ethernet driver paired with bpf.

Basically, I'm curious if this is a problem that needs to
be solved (i.e. the eventual goal is for witness to never
print any notices) or if this is expected behavior (i.e.
witness is expected to say things and it's up to the developer
to determine if a given thing that witness says is a problem).

Thanks,
  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: current kernel build fails with src/sys/kern/sys_socket.c v 1.34 2001/07/25 20:14:59 fenner

2001-07-25 Thread Bill Fenner


You must have updated in the middle of the commit.  Make sure you have
rev 1.38 of src/sys/net/route.h .

  Bill

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: trafshow doesn't work?

2000-07-20 Thread Bill Fenner


I guess this is

http://www.tcpdump.org/cgi-bin/cvsweb/libpcap/inet.c?r1=1.25r2=1.26

The easiest thing to do is probably cvs import their rev 1.26 of
inet.c .  Shall I do this?

  Bill


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: trafshow doesn't work?

2000-07-20 Thread Bill Fenner


This should be fixed by rev 1.1.1.5 of src/contrib/libpcap/inet.c .

  Bill


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: gratuituous arp for multiple IP addresses

2000-05-07 Thread Bill Fenner


FreeBSD 4.0-RELEASE does the gratuitous ARP when ifconfig'ing an alias:

fenestro# ifconfig de1 1.2.3.5 alias
18:35:47.269471 0:40:5:42:d6:de Broadcast arp 42: arp who-has 1.2.3.5 tell 1.2.3.5

FreeBSD 3.4-STABLE also does:

mango# ifconfig xl0 135.197.2.250 netmask 255.255.255.255 alias
18:39:12.509125 0:10:4b:cc:83:5f Broadcast arp 42: arp who-has 135.197.2.250 tell 
135.197.2.250

I'm not sure what this says; it's entirely possible that there
are conditions under which it doesn't or it fails for some reason.
For example, there was a certain failure mode with sending multicast
leave messages; the packet would be sent to the chip to be sent and then
the multicast filter would be changed causing the chip to reset and lose
the packet that's currently being transmitted.  Adding an alias shouldn't
cause the chip to be reset so that's not likely to be the exact problem,
but perhaps something similar is happening.

  Bill


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: gratuituous arp for multiple IP addresses

2000-05-07 Thread Bill Fenner


By "gratuituous arp" I was really saying "gratuitous arp reply".
The machine needs to send a packet of the type

   arp reply 1.2.3.5 is-at 0:40:5:42:d6:de

The ARP processing specified in RFC 826 says that if you have an entry for
the source IP address you update the hardware address no matter what the
opcode is (i.e. you can update your tables due to a request).  Every IP
stack I've seen implements gratuitous ARP by sending a broadcast request
for itself.  In normal ARP operation, replies are unicast so conceivably
an implementation that doesn't expect a broadcast reply might drop it.
Requests are normally broadcasted, and the ARP processing rules cause
broadcasted requests to update existing tables, so a broadcasted request
is a better choice for a gratuitous arp.

tcpdump hides too much information in an attempt to make things look
pretty; it doesn't show the fact that the MAC information is included
in a gratuitous ARP.

  Bill


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: So, AGAIN, why was tcpdump moved?

2000-03-31 Thread Bill Fenner


Just out of curiosity, why is there an "AGAIN" in the subject line,
since this is the first email I've gotten on the subject?

tcpdump is capable of decrypting ESP, if you give it the key and if it's
linked with libcrypto.  Since IPSEC is part of FreeBSD, and libcrypto
is part of FreeBSD, I figured it would be a nice thing to have.

It didn't occur to me that this would change where tcpdump lived
(i.e.  it seemed like libcrypto was part of FreeBSD) so it wasn't an
explicit choice on my part to move distributions.  I agree that's a bad
side effect.  It's easy to disable the decrypting-ESP feature if the
disadvantage of having it is greater than the advantage.

  Bill


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: So, AGAIN, why was tcpdump moved?

2000-03-31 Thread Bill Fenner


That said, isn't there some way we could build it twice, once for the
crypto dist and once for the bindist?  That would mean that the crypto
distribution copy simply blops over the bin distribution version if
selected and POLA is fully obeyed.

Sounds perfectly reasonable to me.  I'd be happy if someone else wants
to look at this, or I can look at it on the 10th when I get back from
Australia.  This would mean there's a src/secure/usr.sbin/tcpdump that
builds with crypto and src/usr.sbin/tcpdump that builds without?

  Bill


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: openssh question

2000-03-06 Thread Bill Fenner


Second, how does one specify options on the command line?  In ssh
1.2.x, I say ssh -o ForwardX11=yes, but that doesn't work in OpenSSH.
Bug or feature?

Browsing the source, it looks like "ssh -o 'ForwardX11 yes'" should
work.  Both ssh and openssh define -o as:

   -o 'option'
  Can be used to give options in the format  used  in
  the  config  file.   This  is useful for specifying
  options for which there is no separate command-line
  flag.   The option has the same format as a line in
  the configuration file.

However, ssh allows lines in the configuration file to be of the form
"keyword = arguments" but openssh only allows "keyword arguments".
So you're really running into a difference in configuration file
parsing.  Ugh =)

  Bill


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: IPv6: can a link-site (or global) address be configured in rc.conf?

2000-03-06 Thread Bill Fenner


Bruce is right that machines expect to learn their prefixes from their
local router; however if you're just playing around you might want to
set it yourself.  The easiest way I've found to do this is to say that
this machine is a router:

# sysctl -w net.inet6.ip6.forwarding=1
net.inet6.ip6.forwarding: 0 - 1

and then run "prefix" to set a site-local prefix:

# prefix dc0 fec0:0:0:1::
# ifconfig dc0
dc0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500
inet6 fe80::2a0:ccff:fe36:7410%dc0 prefixlen 64  scopeid 0x1
inet6 fec0::1:2a0:ccff:fe36:7410 prefixlen 64 

Of course, if you have global address space too you can assign that prefix
too.

  Bill


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Problems installing FreeBSD 4.0 20000125-CURRENT

2000-01-27 Thread Bill Fenner


Hi,

  I installed 4.0 2125-CURRENT last night on a new box, and had
several problems that I wanted to share:

1. sysinstall forgot to write my hostname to /etc/rc.conf .  I had gone
into the options menu and selected "DHCP"; when I picked my network
interface it looked for and found a DHCP server and popped up the
network configuration box with most of the fields filled in (including
domain name); all I did was type in a hostname.  sysinstall then added
the domain name to the host name and I said "OK", but that hostname
never made it into rc.conf (it booted up calling itself Amnesiac).

2. motd was full of garbage.  I realize now that I should have saved it
but I wasn't really thinking.

3. On the first reboot after installing, the keyboard was in a funny
state.  Some keys would provide multiple characters, some would do none.
Control-alt-del definitely didn't work, so I had to power off and
reboot.  This hasn't repeated itself.

4. X didn't come with /usr/X11R6/lib/aout, so I can't run netscape.
I used the expert install and picked the "Install everything" option
so I assumed I'd get everything =)


On the plus side, being able to use DHCP rocks, and I really like how
it installed the Linux packages when I picked Linux emulation.  And
4.0 seems to work well with this random hardware (emachine 400),
including the onboard sound and random ethernet card (linksys something).

  Bill


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: With feature freeze being in place

2000-01-27 Thread Bill Fenner


Test IPv6 support!  You've all been asking for it, test it.

Is there a quick primer on getting IPv6 up and running?  I built a
kernel with INET6 and the ipsec stuff, and my interfaces now have IPv6
addresses, but no userland apps seem to be able to parse IPv6 addresses,
e.g. "ping ::1" says "no such host".  (This is 4.0-2125-CURRENT).

I searched the -current mail archives but couldn't find anything that
seemed relevant.

Thanks,
  Bill


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: With feature freeze being in place

2000-01-27 Thread Bill Fenner


Also, usual tools, rlogin, rlogind, rsh, rshd, telnet,
telnetd, ftp, ftpd, and inetd are already IPv6 capable.

Hm.  rlogin and rsh attempt to connect, but my inetd isn't listening;
do I have to update inetd.conf to get inetd to listen on IPv6 addresses?

telnet can't parse ::1:

emachine% telnet ::1
::1: Unknown host

ftp prints a very odd message:

emachine% ftp ::1
ftp: No control connection for command.

I guess ftp parsed ::1 as a URL.  What a pain.  I tried putting
"::1 v6-localhost" in /etc/hosts, but telnet and ftp couldn't use
v6-localhost as a name while ping6, traceroute6, rlogin and rsh could.


So far, the only tools I've been able to use to emit v6 packets
are ping6, traceroute6, rlogin and rsh.  I don't have any other
v6 machines on my network, so I've just been using loopback.


Wmmm, maybe I should merge ping and pin6 before code freeze...

I think it'd be very handy for the native ping (and traceroute, if
possible) to be IPv4/IPv6 capable.

  Bill


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Problems installing FreeBSD 4.0 20000125-CURRENT

2000-01-27 Thread Bill Fenner


Right.  I've seen this when I hit Enter rapidly twice at the first
loader prompt.  Doesn't ever happen if I wait for the second
prompt.

That's my impression too -- I've seen it on my laptop when I do
that (sometimes), and I may have hit enter twice rapidly on this
reboot.

  Bill


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



make world log parser

2000-01-11 Thread Bill Fenner


I often want to know where in a "make world" I am, so I wrote this
quick little script.  It breaks out the major sections, like

--
 Cleaning up the elf obj tree
--

and the directory progress indicators, and displays all of the
major sections, the last directory progress indicator, and the
last 5 lines of log.  So you get something like

--
 elf make world started on Tue Jan 11 11:19:42 PST 2000
--
 Cleaning up the temporary elf build tree
--
 Making make
--
 Making mtree
--
 Making hierarchy
--
 Cleaning up the elf obj tree
--
=== gnu/lib/libreadline/history/doc
rm -f history.info history.info.gz history.texi
rm -f .depend /usr/src/gnu/lib/libreadline/history/GPATH 
/usr/src/gnu/lib/libreadline/history/GRTAGS  
/usr/src/gnu/lib/libreadline/history/GSYMS /usr/src/gnu/lib/libreadline/history/GTAGS
=== gnu/lib/libreadline/history/doc
=== gnu/lib/libreadline/history/doc
rm -f history.info history.info.gz history.texi
=== gnu/lib/libreadline/readline
rm -f a.out readline.o vi_mode.o funmap.o keymaps.o parens.o search.o rltty.o 
complete.o bind.o isearch.o display.o signals.o util.o kill.o undo.o macro.o input.o 
callback.o terminal.o nls.o xmalloc.o history.o histexpand.o histfile.o histsearch.o 
shell.o tilde.o  readline.o.tmp vi_mode.o.tmp funmap.o.tmp keymaps.o.tmp parens.o.tmp 
search.o.tmp rltty.o.tmp complete.o.tmp bind.o.tmp isearch.o.tmp display.o.tmp 
signals.o.tmp util.o.tmp kill.o.tmp undo.o.tmp macro.o.tmp input.o.tmp callback.o.tmp 
terminal.o.tmp nls.o.tmp xmalloc.o.tmp history.o.tmp histexpand.o.tmp histfile.o.tmp 
histsearch.o.tmp shell.o.tmp tilde.o.tmp readline.3.gz readline.3.cat.gz

Anyway, I think it's so cool that I'm convinced that someone else
will like it too, so I'm sending it to -current =)

  Bill


 whereintheworld


Re: Heads up! config(8) changes..

1999-04-27 Thread Bill Fenner

  - complain if a device is specified twice (eg: 2 x psm0)

Does this work for pseudo-devices also (i.e. can bin/9931 get closed)?

  Bill


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



Re: Weird piecemeal reads over socketpair() pipe breaks up small writes into even smaller reads.

1999-02-15 Thread Bill Fenner
Isn't it easier to reclassify the bug as uipc_send() wakes up the
reader before it's done appending the data from a write() to the socket
buffer and use my patch?  I don't think it makes sense for uipc_send()
to depend on sorwakeup() not actually waking up anyone in certain
situations.

  Bill

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


Re: Weird piecemeal reads over socketpair() pipe breaks up small writes into even smaller reads.

1999-02-14 Thread Bill Fenner
How about a 1-line fix:

Index: uipc_usrreq.c
===
RCS file: /home/ncvs/src/sys/kern/uipc_usrreq.c,v
retrieving revision 1.37
diff -u -r1.37 uipc_usrreq.c
--- uipc_usrreq.c   1998/10/25 17:44:51 1.37
+++ uipc_usrreq.c   1999/02/15 07:09:12
@@ -348,7 +348,8 @@
unp-unp_conn-unp_mbcnt = rcv-sb_mbcnt;
snd-sb_hiwat -= rcv-sb_cc - unp-unp_conn-unp_cc;
unp-unp_conn-unp_cc = rcv-sb_cc;
-   sorwakeup(so2);
+   if (!(flags  PRUS_MORETOCOME))
+   sorwakeup(so2);
m = 0;
 #undef snd
 #undef rcv

Unfortunately, this apparently unearths a bug in the ?:?:?:
expression in sosend(), so try this diff too.

Index: uipc_socket.c
===
RCS file: /home/ncvs/src/sys/kern/uipc_socket.c,v
retrieving revision 1.51
diff -u -r1.51 uipc_socket.c
--- uipc_socket.c   1999/01/20 17:45:22 1.51
+++ uipc_socket.c   1999/02/15 07:09:25
@@ -388,6 +405,7 @@
register long space, len, resid;
int clen = 0, error, s, dontroute, mlen;
int atomic = sosendallatonce(so) || top;
+   int pru_flags;
 
if (uio)
resid = uio-uio_resid;
@@ -518,21 +536,24 @@
} while (space  0  atomic);
if (dontroute)
so-so_options |= SO_DONTROUTE;
+   pru_flags = 0;
+   if (flags  MSG_OOB)
+   pru_flags |= PRUS_OOB;
+   /*
+* If the user set MSG_EOF, the protocol
+* understands this flag and nothing left to
+* send then set PRUS_EOF.
+*/
+   if ((flags  MSG_EOF) 
+   (so-so_proto-pr_flags  PR_IMPLOPCL) 
+   (resid = 0))
+   pru_flags |= PRUS_EOF;
+   /* If there is more to send set PRUS_MORETOCOME */
+   if (resid  0  space  0)
+   pru_flags |= PRUS_MORETOCOME;
s = splnet();   /* XXX */
error = (*so-so_proto-pr_usrreqs-pru_send)(so,
-   (flags  MSG_OOB) ? PRUS_OOB :
-   /*
-* If the user set MSG_EOF, the protocol
-* understands this flag and nothing left to
-* send then use PRU_SEND_EOF instead of PRU_SEND.
-*/
-   ((flags  MSG_EOF) 
-(so-so_proto-pr_flags  PR_IMPLOPCL) 
-(resid = 0)) ?
-   PRUS_EOF :
-   /* If there is more to send set PRUS_MORETOCOME */
-   (resid  0  space  0) ? PRUS_MORETOCOME : 0,
-   top, addr, control, p);
+   pru_flags, top, addr, control, p);
splx(s);
if (dontroute)
so-so_options = ~SO_DONTROUTE;


  Bill

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


Re: panic: soaccept: !NOFDREF

1999-01-29 Thread Bill Fenner
In message 19990129103757.a...@nagual.pp.ruyou write:
I saw it several times with very recent -current

Is your machine getting a lot of incoming connections? I'd like to
try to replicate this.  If it's a problem for you you can try
reverting rev 1.52 of /sys/kern/uipc_socket.c .

Thanks,
  Bill

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


Re: Network/ARP problem? Maybe pn driver?

1999-01-29 Thread Bill Fenner
Can you run a tcpdump arp on the machine that is having the problem,
as well?  This could help to determine if it's a driver problem (e.g.
if the replies don't show up) or an ARP problem (e.g. if the replies
do show up but arp doesn't use them).

  Bill

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


Re: Network/ARP problem? Maybe pn driver?

1999-01-29 Thread Bill Fenner
Big Clue.  Run tcpdump -p and see if the problem doesn't go away.
(tcpdump puts the card in promiscuous mode, tcpdump -p does not).

  Bill

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


Re: T/TCP in FreeBSD-3.x

1999-01-22 Thread Bill Fenner
In message 36a85ef1.444a...@urc.ac.ru you write:
Why I'm asking about this, is because I recently read an advice in one
of the FreeBSD mailing lists,
about Why my dial-up PPP connection from a FreeBSD box is so slow
comparing with Windows NT
(about ten times slower)?

And the advice was (without explanations): Try to switch off the
TCP_EXTENSIONS in /etc/rc.conf.

Some dialup terminal servers have problems with TCP options; turning
off TCP_EXTENSIONS is the easiest way to handle these terminal servers.

So, is it safe to use T/TCP (at least for Squid) for RELENG_3?
RELENG_2_2?

I asked for more info about the problems they were having with T/TCP
and never got much of an answer; since they don't say what the problem
they were having was it's hard to say whether or not it was resolved.

And what about MBUF size (mentioned at the same page of the Squid FAQ)?
Do I need to patch Squid as it shown at the page?

Recent (as in the last day or so) RELENG_3's should not need this patch;
the bug described has been fixed in another way.

  Bill

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


Re: Today's Make World

1999-01-17 Thread Bill Fenner
In message 199901171000.maa16...@greenpeace.grondar.za Mark Murray wrote:
OK - but losing stdio.h?? :-) That confuses the crap out of me. Anyone
been screwing with build tools?

Uh, the failing command in my log file included -nostdinc; that
does a good job of hiding friends like stdio.h...

  Bill

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


Re: Today's Make World

1999-01-17 Thread Bill Fenner
The one that failed:

cc -c   -nostdinc -O -pipe -DVERSION=\1.03\  -DXS_VERSION=\1.03\ -DPIC -
fpic -I/usr/obj/usr/src/gnu/usr.bin/perl/perl -DPERL_CORE -DLIBC= DynaLoader.c

The one that succeeded:

cc -c-DVERSION=\1.03\  -DXS_VERSION=\1.03\ -DPIC -fpic -I/usr/obj/us
r/src/gnu/usr.bin/perl/perl -DPERL_CORE -DLIBC= DynaLoader.c

which is why I suggested that the -nostdinc caused the problem that
people were seeing.  Now, maybe the -nostdinc belongs there along
with another -I to get the build environment instead of the host
environment, but...

  Bill

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