Re: Preemptiveness of FreeBSD threads

2000-01-18 Thread Reinier Bezuidenhout

> >OK, with everyones help (well, waiting for the right time of day ;-)),
> I
> >was able to reproduce this.  The initial threads last active time was
> >not getting initialized to a sane value, causing negative
> computations
> >of the threads timeslice depending on what time of day it was.  Funny
> >thing was that I added this change several times, but each time I
> somehow
> >convinced myself that it wasn't needed.
> 
> >Try this patch - you may have to hand apply it as my sources are not
> >yet up to date with the last round of changes that Jason made.
> 
> >Dan Eischen
> >[EMAIL PROTECTED]

Will this patch be patched back to RELENG_3 too ?? We have quite a few
applications that use threads :)

Reinier



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



please to subscribe my email address

2000-01-18 Thread Mahyus

subscribe





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



Re: please to subscribe my email address

2000-01-18 Thread ROGIER MULHUIJZEN

Please RTFM at
http://www.freebsd.org/handbook/eresources.html#ERESOURCES-MAIL

 DocWilco

>>> Mahyus <[EMAIL PROTECTED]> 01/18 1:18 PM >>>
subscribe





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


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



Re: Preemptiveness of FreeBSD threads

2000-01-18 Thread Daniel Eischen

Alexander Litvin wrote:
> > Try this patch - you may have to hand apply it as my sources are not
> > yet up to date with the last round of changes that Jason made.
> 
> > Dan Eischen
> > [EMAIL PROTECTED]
> 
> [patch skipped]
> 
> Yep, that seems to be it. No moon-dependent irregularities ;)
> 
> Thanks!

OK, it's been committed.

Dan Eischen
[EMAIL PROTECTED]


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



Re: Preemptiveness of FreeBSD threads

2000-01-18 Thread Daniel Eischen

Reinier Bezuidenhout wrote:
> > >OK, with everyones help (well, waiting for the right time of day ;-)),
> > I
> > >was able to reproduce this.  The initial threads last active time was
> > >not getting initialized to a sane value, causing negative
> > computations
> > >of the threads timeslice depending on what time of day it was.  Funny
> > >thing was that I added this change several times, but each time I
> > somehow
> > >convinced myself that it wasn't needed.
> > 
> > >Try this patch - you may have to hand apply it as my sources are not
> > >yet up to date with the last round of changes that Jason made.
> > 
> > >Dan Eischen
> > >[EMAIL PROTECTED]
> 
> Will this patch be patched back to RELENG_3 too ?? We have quite a few
> applications that use threads :)

In a week or two.  I just committed the fix to -current, and the rule
is to wait a week or two before MFC.

Dan Eischen
[EMAIL PROTECTED]


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



Re: Preemptiveness of FreeBSD threads

2000-01-18 Thread Brian Beattie

On Tue, 18 Jan 2000, Daniel Eischen wrote:

> In a week or two.  I just committed the fix to -current, and the rule
> is to wait a week or two before MFC.

MFC?

Could somebody expand this TLA for me, I'm sure it will be obvious once I
see it, thanks

Brian Beattie| The only problem with
[EMAIL PROTECTED]  | winning the rat race ...
www.aracnet.com/~beattie | in the end you're still a rat



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



Re: Preemptiveness of FreeBSD threads

2000-01-18 Thread Nadav Eiron



On Tue, 18 Jan 2000, Brian Beattie wrote:

> On Tue, 18 Jan 2000, Daniel Eischen wrote:
> 
> > In a week or two.  I just committed the fix to -current, and the rule
> > is to wait a week or two before MFC.
> 
> MFC?
> 
> Could somebody expand this TLA for me, I'm sure it will be obvious once I
> see it, thanks

http://www.freebsd.org/FAQ/misc.html#AEN3577

> 
> Brian Beattie| The only problem with
> [EMAIL PROTECTED]  | winning the rat race ...
> www.aracnet.com/~beattie | in the end you're still a rat
> 
> 

Nadav



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



high load, nothing happening? (LONG)

2000-01-18 Thread spork

Hi,

I'm trying my luck over here at -hackers, I already posted to -questions
and -isp without any resolution.  I'm including my original post and below
that a summary of some responses and my answers...  The bulk of the
recent answers seem to say "you should see a load of 3.0 on a machine with
500 processes", but I don't quite agree as I have other similar machines
that are in production that don't even approach a load of 1.0 with 3-400
processes.  I can only assume something is wrong somewhere...  You all are
my last hope...

[begin orginal post]
We just built a large webserver machine (PII-450, 896MB RAM, 30-odd G of
Mylex RAID, 3.3-R) that constantly runs a load of from 1 to 3, even though
it's not doing anything (still sitting as a staging server).  The initial
startup is also very slow; after about 40 of the servers start there's
about a 15 second pause, then another 40, pause, etc...

This box is running about 170 virtual hosts (and a full class C
of addresses aliased to fxp0) under Apache 1.3.9, with each vhost running
as it's own user and starting 3 servers at startup, so there are a large
*number* of processes, but no swapping with about half a gig of RAM left
free.

I have maxusers at 512, NMBCLUSTERS at 4096, and the following sysctl
adjustments:

kern.maxproc: 8212
kern.maxfiles: 10  kern.maxfilesperproc: 16424
kern.maxprocperuid: 8211   kern.ipc.somaxconn: 512

This is all gathered from various "tuning for a big webserver" posts from
the various FBSD lists.

systat, vmstat, iostat all look normal, and I've not seen any curious
entries in the logs.

So that's the info, my questions are "why the load", and "is that OK"?
Something seems wrong here, but I'm at a loss.  

Any ideas where to start looking?

[followup #1]

> What does top(1) report?  

last pid: 23684;  load averages:  3.74,  1.96,  1.46 up 7+21:10:15 10:35:38
449 processes: 1 running, 448 sleeping
CPU states: 0.0% user, 0.0% nice, 2.7% system, 0.0% interrupt, 97.3% idle
Mem: 62M Active, 355M Inact, 45M Wired, 8350K Buf, 418M Free
Swap: 784M Total, 784M Free

  PID USERNAME PRI NICE  SIZERES STATETIME   WCPUCPU COMMAND
23684 root  30   0  1976K   944K RUN  0:00  3.08%  0.29% top
  904 root   2 -12  1036K   720K select   0:31  0.00%  0.00% xntpd
 4163 root   2   0  1468K  1096K select   0:13  0.00%  0.00%
httpd-apache_1
 3399 root   2   0  1468K  1096K select   0:13  0.00%  0.00%
httpd-apache_1   

[followup #2]

> that value for NMBCLUSTERS is going to be lower than what maxusers at 
> 512sets it to, try 16384 or leave it up to maxusers. 

[followup #3]
 
> Humthat could certainly contribute to load. Have you checked vmstat
  (he's referring to the number of processes)
> to see what the system calls are like (frequency that is).

Nothing's blocked, and the other numbers look very similar to much smaller
boxes doing nothing:

procs   memory   page  disksfaults   cpu
r b w  avm   fre   flt re pi po fr sr da0 fd0 pa0 in  sy  cs  us sy id
0 0 0 106760426976  2  0  0  0  2  0   0   0   0  230 474 155  0 0  99
0 0 0 106760426976  4  0  0  0  0  0   0   0   0  233 408 136  0 2  98
0 0 0 106760426976  3  0  0  0  0  0   0   0   0  235 408 136  0 2  98

[followup #4]

> what 
> you are asking why high load ???
> don;t you see you have 500 processes on your box ??
> it's normal to have 3 of load average if you got 500 processes!

Here's a snippet from a shell/web server that is doing actual work.  It
has less memory, a slower processor and a number of interactive users.
The load however rarely climbs above 1.0 unless a process goes runaway:

last pid: 25042;  load averages:  0.38, 0.35, 0.63 13:26:43
301 processes: 1 running, 300 sleeping
CPU states: 0.4% user, 0.0% nice, 0.8% system, 0.8% interrupt, 98.1% idle
Mem: 119M Active, 44M Inact, 36M Wired, 34M Cache, 6027K Buf, 17M Free
Swap: 640M Total, 37M Used, 603M Free, 6% Inuse

  PID USERNAME PRI NICE SIZERES STATETIME   WCPUCPU COMMAND
25040 root 28   0   844K  1120K RUN  0:00  1.89%  0.34% top
24823 freddy2   0  4180K  2964K select   0:00  0.23%  0.23% pine4.21
24919 byman 3   0   796K  1040K ttyin0:00  0.04%  0.04% tcsh
24537 inch_hom  2   0   640K   872K sbwait   0:00  0.04%  0.04%httpd-1.3.3-us

So I'd kind of assume I wouldn't see a radical difference between a
machine with 500 idle processes and one that's running 300 and is in
active use...  

So if anyone even has a similarly configured box, I'd love to hear from
you.  I feel something is wrong here, but I can't find it...

Thanks,

Charles




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



Re: high load, nothing happening? (LONG)

2000-01-18 Thread Dan Nelson

In the last episode (Jan 18), spork said:
> I'm trying my luck over here at -hackers, I already posted to
> -questions and -isp without any resolution.  I'm including my
> original post and below that a summary of some responses and my
> answers...  The bulk of the recent answers seem to say "you should
> see a load of 3.0 on a machine with 500 processes", but I don't quite
> agree as I have other similar machines that are in production that
> don't even approach a load of 1.0 with 3-400 processes.  I can only
> assume something is wrong somewhere...  You all are my last hope...

Considering that top is reporting

CPU states: 0.0% user, 0.0% nice, 2.7% system, 0.0% interrupt, 97.3% idle

I'm not sure what the problem is.  You're 97% idle.  Maybe the hosted
web sites on this machine are slightly more active than the ones on the
other box.  You could always manually panic the box and see what those
three processes on the run queue are, but it doesn't seem to be worth
the effort.

> [begin orginal post]
> We just built a large webserver machine (PII-450, 896MB RAM, 30-odd G of
> Mylex RAID, 3.3-R) that constantly runs a load of from 1 to 3, even though
> it's not doing anything (still sitting as a staging server).  The initial
> startup is also very slow; after about 40 of the servers start there's
> about a 15 second pause, then another 40, pause, etc...

15 second pause as the system does what?  Hit ^T to see what the
currently running process on the console is, tcpdump the network link
and see if you're hanging on a DNS lookup, run "top < /dev/ttyv2 > /dev/ttyv2&"
at the top of /etc/rc and see if something's hogging cpu.

> 449 processes: 1 running, 448 sleeping
> CPU states: 0.0% user, 0.0% nice, 2.7% system, 0.0% interrupt, 97.3% idle
> Mem: 62M Active, 355M Inact, 45M Wired, 8350K Buf, 418M Free
> Swap: 784M Total, 784M Free
>
>   PID USERNAME PRI NICE  SIZERES STATETIME   WCPUCPU COMMAND
> 23684 root  30   0  1976K   944K RUN  0:00  3.08%  0.29% top
>   904 root   2 -12  1036K   720K select   0:31  0.00%  0.00% xntpd
>  4163 root   2   0  1468K  1096K select   0:13  0.00%  0.00% httpd-apache_1
>  3399 root   2   0  1468K  1096K select   0:13  0.00%  0.00% httpd-apache_1

> Here's a snippet from a shell/web server that is doing actual work.  It
> has less memory, a slower processor and a number of interactive users.
> The load however rarely climbs above 1.0 unless a process goes runaway:
>
> last pid: 25042;  load averages:  0.38, 0.35, 0.63 13:26:43
> 301 processes: 1 running, 300 sleeping
> CPU states: 0.4% user, 0.0% nice, 0.8% system, 0.8% interrupt, 98.1% idle
> Mem: 119M Active, 44M Inact, 36M Wired, 34M Cache, 6027K Buf, 17M Free
> Swap: 640M Total, 37M Used, 603M Free, 6% Inuse
>
>   PID USERNAME PRI NICE SIZERES STATETIME   WCPUCPU COMMAND
> 25040 root 28   0   844K  1120K RUN  0:00  1.89%  0.34% top
> 24823 freddy2   0  4180K  2964K select   0:00  0.23%  0.23% pine4.21
> 24919 byman 3   0   796K  1040K ttyin0:00  0.04%  0.04% tcsh
> 24537 inch_hom  2   0   640K   872K sbwait   0:00  0.04%  0.04% httpd-1.3.3-us

You're running a different httpd here.  Try moving the binary from this
machine over to the other one and see if the loadavg drops.


-- 
Dan Nelson
[EMAIL PROTECTED]


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



RE: The stack size for a process?

2000-01-18 Thread Charles Randall

From: Jason Evans [mailto:[EMAIL PROTECTED]]
>Thread stacks have a default size of 64kB.

As you know, stack size can be explicitly set using
pthread_attr_setstacksize().

However, note that Solaris uses a pthread stack size of 1 MB. Porter beware.

>libc_r now uses growable stacks with "guard pages" between stacks
>to try to catch stack overflow.

In this case, is there a message printed to the console or syslog that tells
the programmer/sysadmin what's happening?

Charles


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



Re: high load, nothing happening? (LONG)

2000-01-18 Thread spork


On Tue, 18 Jan 2000, Dan Nelson wrote:
> In the last episode (Jan 18), spork said:

> I'm not sure what the problem is.  You're 97% idle.  Maybe the hosted
> web sites on this machine are slightly more active than the ones on the
> other box.  You could always manually panic the box and see what those
> three processes on the run queue are, but it doesn't seem to be worth
> the effort.

That's another thing, the box is idle as we've yet to move it into
production.  Out of curiousity, how does one make a machine panic
manually?

I'll investigate throwing another httpd on there as well to see what
happens...

Thanks,

Charles
 
> > [begin orginal post]
> > We just built a large webserver machine (PII-450, 896MB RAM, 30-odd G of
> > Mylex RAID, 3.3-R) that constantly runs a load of from 1 to 3, even though
> > it's not doing anything (still sitting as a staging server).  The initial
> > startup is also very slow; after about 40 of the servers start there's
> > about a 15 second pause, then another 40, pause, etc...
> 
> 15 second pause as the system does what?  Hit ^T to see what the
> currently running process on the console is, tcpdump the network link
> and see if you're hanging on a DNS lookup, run "top < /dev/ttyv2 > /dev/ttyv2&"
> at the top of /etc/rc and see if something's hogging cpu.
> 
> > 449 processes: 1 running, 448 sleeping
> > CPU states: 0.0% user, 0.0% nice, 2.7% system, 0.0% interrupt, 97.3% idle
> > Mem: 62M Active, 355M Inact, 45M Wired, 8350K Buf, 418M Free
> > Swap: 784M Total, 784M Free
> >
> >   PID USERNAME PRI NICE  SIZERES STATETIME   WCPUCPU COMMAND
> > 23684 root  30   0  1976K   944K RUN  0:00  3.08%  0.29% top
> >   904 root   2 -12  1036K   720K select   0:31  0.00%  0.00% xntpd
> >  4163 root   2   0  1468K  1096K select   0:13  0.00%  0.00% httpd-apache_1
> >  3399 root   2   0  1468K  1096K select   0:13  0.00%  0.00% httpd-apache_1
> 
> > Here's a snippet from a shell/web server that is doing actual work.  It
> > has less memory, a slower processor and a number of interactive users.
> > The load however rarely climbs above 1.0 unless a process goes runaway:
> >
> > last pid: 25042;  load averages:  0.38, 0.35, 0.63 13:26:43
> > 301 processes: 1 running, 300 sleeping
> > CPU states: 0.4% user, 0.0% nice, 0.8% system, 0.8% interrupt, 98.1% idle
> > Mem: 119M Active, 44M Inact, 36M Wired, 34M Cache, 6027K Buf, 17M Free
> > Swap: 640M Total, 37M Used, 603M Free, 6% Inuse
> >
> >   PID USERNAME PRI NICE SIZERES STATETIME   WCPUCPU COMMAND
> > 25040 root 28   0   844K  1120K RUN  0:00  1.89%  0.34% top
> > 24823 freddy2   0  4180K  2964K select   0:00  0.23%  0.23% pine4.21
> > 24919 byman 3   0   796K  1040K ttyin0:00  0.04%  0.04% tcsh
> > 24537 inch_hom  2   0   640K   872K sbwait   0:00  0.04%  0.04% httpd-1.3.3-us
> 
> You're running a different httpd here.  Try moving the binary from this
> machine over to the other one and see if the loadavg drops.
> 
> 
> -- 
>   Dan Nelson
>   [EMAIL PROTECTED]
> 
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-hackers" in the body of the message
> 



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



Re: high load, nothing happening? (LONG)

2000-01-18 Thread Dan Nelson

In the last episode (Jan 18), spork said:
> 
> On Tue, 18 Jan 2000, Dan Nelson wrote:
> > In the last episode (Jan 18), spork said:
> 
> > I'm not sure what the problem is.  You're 97% idle.  Maybe the hosted
> > web sites on this machine are slightly more active than the ones on the
> > other box.  You could always manually panic the box and see what those
> > three processes on the run queue are, but it doesn't seem to be worth
> > the effort.
> 
> That's another thing, the box is idle as we've yet to move it into
> production.  Out of curiousity, how does one make a machine panic
> manually?

CTRL-ALT-ESC, and at the prompt type in 'panic'.  You'll need DDB
compiled into the kernel, and crashdumps enabled.

-- 
Dan Nelson
[EMAIL PROTECTED]


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



Re: "very dangerously dedicated mode" is

2000-01-18 Thread Ken Bolingbroke


I've always been able to 'fix' dangerously dedicated IDE disks by running
DOS's fdisk with the /mbr switch.  That overwrites the MBR, and at least
puts it back into a state friendly with other operating systems...

Ken Bolingbroke
[EMAIL PROTECTED]


On Sat, 15 Jan 2000, Jamie Bowden wrote:

> On Fri, 14 Jan 2000, Jim Shankland wrote:
> 
> :By the way, I also struck out with DOS fdisk:  it took one look
> :at the garbage partition table, and wedged.  I'll be trying a
> :Linux rescue disk next.  If that fails, too, then I seem to
> :have generated a 1-Gigabyte hockey puck (you didn't think I
> :was trying this with a new disk, did you)?
> 
> If it were SCSI I'd say plug it in to the nearest adaptec controller and
> low level it (I fixed a drive one of my SGI's ate like this), but it's
> IDE.  You might want to give NT or OS/2 a whack at it if you've got them
> laying around.  There are programs to let you low level IDE drives out
> there, I believe they're mostly DOS based though, so that probably doesn't
> help.
> 
> Jamie Bowden
> 
> -- 
> 
> "Of course, that's sort of like asking how other than Marketing, 
> Microsoft is different from any other software company..."
> Kenneth G. Cavness
> 
> 
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-hackers" in the body of the message
> 



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



Re: interesting results from softupdates/postmark test (was Re:softupdates and debug.max_softdeps)

2000-01-18 Thread Tom

On Sat, 1 Jan 2000, Kirk McKusick wrote:

> Delta 1.40 to ffs_softdep.c (12/16/1999) fixes the `hanging
> while holding a lock' problem. It should be propagated to the
> 3.X branch.
> 
> I have been working on a number of performance improvements to
> soft updates that will hopefully assist in the postmark 
> benchmarks. Hopefully they will be ready to incorporate in
> the next week or so. I'll send them to you (Matt) when I am
> convinced that they are at least semantically correct to try
> out.
> 
>   Kirk

  Well, I just cvsup'ed my copy of 3.4-stable, and I found that
ffs_softdep.c is at:

 *
 *  from: @(#)ffs_softdep.c 9.36 (McKusick) 5/6/99
 * $FreeBSD: src/sys/contrib/softupdates/ffs_softdep.c,v 1.34.2.3
1999/08/29 16:22:08 peter Exp $
 */


  So I guess, ffs_softdep.c in -stable doesn't have the patch you did in
December, because there have been no commits since August.  Is anyone able
to commit this change back to -stable?


Tom
Uniserve



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



Re: freebsd-hackers-digest V4 #730

2000-01-18 Thread Dballsz

Where is a good place for me to place an advertisement for "intrusion 
testers"?  We are in no way connected with any law enforcement or Government 
agency.  We are a computer investigations firm in Florida and have an urgent 
need for some of these individuals.  We are a global company with a D&N 
number if you would like to check us out.

Kellie Carlisle, President
Advanced Computer Investigations and Services
407.566.0504 or 407.973-4939



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



Re: freebsd-hackers-digest V4 #730

2000-01-18 Thread Ben Rosengart

On Tue, 18 Jan 2000 [EMAIL PROTECTED] wrote:

> Where is a good place for me to place an advertisement for "intrusion 
> testers"?  We are in no way connected with any law enforcement or Government 
> agency.  We are a computer investigations firm in Florida and have an urgent 
> need for some of these individuals.  We are a global company with a D&N 
> number if you would like to check us out.

[EMAIL PROTECTED]

--
 Ben Rosengart

UNIX Systems Engineer, Skunk Group
StarMedia Network, Inc.



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



Re: freebsd-hackers-digest V4 #730

2000-01-18 Thread Chuck Robey

On Tue, 18 Jan 2000 [EMAIL PROTECTED] wrote:

> Where is a good place for me to place an advertisement for "intrusion 
> testers"?  We are in no way connected with any law enforcement or Government 
> agency.  We are a computer investigations firm in Florida and have an urgent 
> need for some of these individuals.  We are a global company with a D&N 
> number if you would like to check us out.
> 
> Kellie Carlisle, President
> Advanced Computer Investigations and Services
> 407.566.0504 or 407.973-4939

I think [EMAIL PROTECTED] is the correct venue for offers like
that.

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


Chuck Robey| Interests include C & Java programming,
New Year's Resolution:  I  | electronics, communications, and
will not sphroxify gullible| signal processing.
people into looking up | I run picnic.mat.net: FreeBSD-current(i386) and
fictitious words in the|  jaunt.mat.net : FreeBSD-current(Alpha)|
dictionary.|




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



locked accounts and adduser

2000-01-18 Thread Ben Rosengart

I thought it would be nice if one could create locked accounts with
adduser.  So I asked my nice Perl-hacking coworker Evan Leon to come up
with a patch.

Enter password []: 
Use an empty password or lock the password? lock no [yes]: lock

...

# grep user /etc/master.passwd 
user:*:1001:1001::0:0:Joe User:/home/user:/bin/sh

The patch is attached.  Anyone like it?  Any chance it could be
committed?  I find it useful in two situations:

1) Sometimes I want to install someone's public key instead of giving
   them a password.  That way, I don't need a secure channel over which
   to communicate the password.
2) Other times, I'm going to be pasting a hashed password directly into
   the master.passwd file, and this is a convenient way of locking the
   account until I do that.

Another idea I have is to allow adduser to accept a hashed password
instead of a plaintext one.  Perhaps if this goes over well, Evan and I
will work on that next.

--
 Ben Rosengart

UNIX Systems Engineer, Skunk Group
StarMedia Network, Inc.



--- /usr/sbin/adduser   Thu Jan 13 12:20:38 2000
+++ adduser Tue Jan 18 16:57:05 2000
@@ -649,13 +649,17 @@
last if $password eq $newpass;
print "They didn't match, please try again\n";
}
-   elsif (&confirm_yn("Use an empty password?", "yes")) {
-   last;
-   }
+else {
+   $lockpass = &confirm_list("Use an empty password or lock the password?", 
+0, "yes", "no", "lock");
+   if ($lockpass ne "no") {
+last;
+   }
+}
+}  
+if ($lockpass == "lock") {
+  $password = "*"; 
 }
-
-return $password;
-}
+}   
 
 
 sub new_users {
@@ -703,7 +707,12 @@
$new_users_ok = 1;
 
$cryptpwd = "";
-   $cryptpwd = crypt($password, &salt) if $password ne "";
+if ($passwd == "*") {
+  $cryptpwd = "*";
+} 
+else {
+  $cryptpwd = crypt($password, &salt) if $password ne "";
+}
# obscure perl bug
$new_entry = "$name\:" . "$cryptpwd" .
"\:$u_id\:$g_id\:$class\:0:0:$fullname:$userhome:$sh";
@@ -1392,3 +1401,5 @@
 &new_users; # add new users
 
 #end
+
+



pw bug

2000-01-18 Thread Jaye Mathisen


Running a relatively recent 3.4-STABLE:

  If you use the -V option to specify an alternate master.passwd/conf file
location, then the -m option apparently doesn't work.

  I get users added to my alt pw file, but no home dir creation.

  Removing the -V /altdir option adds them to /etc/master.passwd, and
creates the home dir.

  If anybody spots in the code where this is taking place, I would love
to see a fix...  It's probably so obvious I am skipping over it.



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



Re: high load, nothing happening? (LONG)

2000-01-18 Thread spork


On Tue, 18 Jan 2000, Dan Nelson wrote:

> > That's another thing, the box is idle as we've yet to move it into
> > production.  Out of curiousity, how does one make a machine panic
> > manually?
> 
> CTRL-ALT-ESC, and at the prompt type in 'panic'.  You'll need DDB
> compiled into the kernel, and crashdumps enabled.

By now, you should know my next question...  What am I looking at?  I
built a kernel with "config -g" and the debugger option and made it panic
while sitting at a load of 3.0...  Following the handbook instructions, I
see this:

(kgdb) where
#0  boot (howto=256) at ../../kern/kern_shutdown.c:285
#1  0xc014f085 in panic (fmt=0xc0225638 "from debugger")
at ../../kern/kern_shutdown.c:446
#2  0xc0129565 in db_panic (addr=-1071629621, have_addr=0, count=-1,
modif=0xc023f7b4 "") at ../../ddb/db_command.c:432
#3  0xc0129505 in db_command (last_cmdp=0xc0242128, cmd_table=0xc0241f88,
aux_cmd_tablep=0xc0255d28) at ../../ddb/db_command.c:332
#4  0xc01295ca in db_command_loop () at ../../ddb/db_command.c:454
#5  0xc012ba43 in db_trap (type=3, code=0) at ../../ddb/db_trap.c:71
#6  0xc02038a6 in kdb_trap (type=3, code=0, regs=0xc023f8a4)
at ../../i386/i386/db_interface.c:157
#7  0xc020e058 in trap (frame={tf_es = 16, tf_ds = 16, tf_edi =
-1071682944,
  tf_esi = 134, tf_ebp = -1071384344, tf_isp = -1071384372, tf_ebx =
0,
  tf_edx = -1071414972, tf_ecx = -1072984320, tf_eax = 38, tf_trapno =
3,
  tf_err = 0, tf_eip = -1071629621, tf_cs = 8, tf_eflags = 582,
  tf_esp = -1071414988, tf_ss = -1071426239}) at
../../i386/i386/trap.c:548
#8  0xc0203acb in Debugger (msg=0xc0235541 "manual escape to debugger")
at ../../i386/i386/db_interface.c:317
#9  0xc01ff03c in scgetc (kbd=0xc026739c, flags=2)
at ../../dev/syscons/syscons.c:3947
#10 0xc01f9ff0 in sckbdevent (thiskbd=0xc026739c, event=0, arg=0x0)
at ../../dev/syscons/syscons.c:844  

where do I go from here?  What's this telling me?  I assume this procedure
was to see what the three "waiting" processes were and what they were
doing at the time?

Thanks,

Charles
 
> -- 
>   Dan Nelson
>   [EMAIL PROTECTED]
> 
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-hackers" in the body of the message
> 



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



Re: high load, nothing happening? (LONG)

2000-01-18 Thread Matthew Dillon

:> CTRL-ALT-ESC, and at the prompt type in 'panic'.  You'll need DDB
:> compiled into the kernel, and crashdumps enabled.
:
:By now, you should know my next question...  What am I looking at?  I
:built a kernel with "config -g" and the debugger option and made it panic
:while sitting at a load of 3.0...  Following the handbook instructions, I
:see this:

A backtrace is not likely to be useful, but a 'ps' (from DDB) may be.

It might also be useful to leave 'systat -vm 1' and 'vmstat 1' running
to see if the system is doing any paging or other significant work at 
the time of the high load.

-Matt



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



Re: high load, nothing happening? (LONG)

2000-01-18 Thread Dan Nelson

In the last episode (Jan 18), spork said:
> On Tue, 18 Jan 2000, Dan Nelson wrote:
> > CTRL-ALT-ESC, and at the prompt type in 'panic'.  You'll need DDB
> > compiled into the kernel, and crashdumps enabled.
> 
> By now, you should know my next question...  What am I looking at?  I
> built a kernel with "config -g" and the debugger option and made it
> panic while sitting at a load of 3.0...  Following the handbook
> instructions, I see this:

The handbook instructions are for kernel-generated panics; for a manual
panic like yours, the stack is unimportant.  The easiest way to see
which processes are active is to run this:

(kgdb) source /usr/src/sys/modules/vinum/.gdbinit.kernel
(kgdb) ps

And look at the 'stat' column.  Any processes with a stat of 1 or 2 are
in the 'runnable' queue, which is what loadav measures.  There should
be 3 or so processes in that state.

And in response to anyone saying "Why did you tell him to panic the
machine?  Why not just have him run ps": I could, but with all those
apache processes lying around possibly forking children, I wanted a
static picture of the system that wouldn't change from email to email :)

-- 
Dan Nelson
[EMAIL PROTECTED]


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



Re: how to allocate an alined address for a device?

2000-01-18 Thread Warner Losh

In message <[EMAIL PROTECTED]> YAMAMOTO Shigeru writes:
: In a CardBus system, a start address of status register must be aligned on
: 4KB boundaries.
: Such kind of address alignment is required at mapping meory window,
: expansion ROM and etc.

True.

: I think we use bus_alloc_resource() to map a memory on a device.
: But it seems me that bus_alloc_resource() never guarantees to allocate an
: aligned address.
: 
: How to allocate an aligned address to map a memory on a device?

In a cardbus system, one would force the alignment in the card bus
bridge.  It would reject those things that aren't aligned in a sane
manner for cardbus.  It would try again to get a different range, if
possible, or would reject the attempt.

It would be nice if there was some way to have the underlying system,
but there is no way to do that right now.

Does this mean you are working on a cardbus thing?  If so, please
contact me off the list...

Warner


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



IEEE-488: looking for junk :-)

2000-01-18 Thread Poul-Henning Kamp



I have managed to snatch up a pair of PCIIA compatible IEEE488
cards locally and I have found a HP59401A HP-IB analyser for $60
at eBay :-) so I'll go over the two pieces of code we have for
FreeBSD and look at the linux stuff and come up with some code over
spring/summer.

Should any of you stumble into any IEEE-488/HP-IB/GP-IB stuff
gathering stuff on your way, I'll dispose of it for a good cause.

PC cards, ISA and PCI are of course top priority, but even just a
couple of 2m long cables or more devices to test against would help me.

I will issue a separate call for testers when I have something they
can test, but let me know if any of you have lists of wanted features.

Poul-Henning

--
Poul-Henning Kamp FreeBSD coreteam member
[EMAIL PROTECTED]   "Real hackers run -current on their laptop."
FreeBSD -- It will take a long time before progress goes too far!




Re: pw bug

2000-01-18 Thread Steve Ames

/usr/src/usr.sbin/pw/pw_user.c line 736 of the file on my system:

$FreeBSD: src/usr.sbin/pw/pw_user.c,v 1.34 2000/01/15 00:20:21 davidn Exp

The line in question:

if (!PWALTDIR() && getarg(args, 'm') != NULL && pwd->pw_dir && *pwd->pw_dir == '/' && 
pwd->pw_dir[1]) {

The conditional !PWALTDIR() looks like the culprit. It may also be there
for some reason...

This is under 4.0-CURRENT but I'd guess you'll fine the same code somewhere
in your file.

-Steve

On Tue, Jan 18, 2000 at 02:19:40PM -0800, Jaye Mathisen wrote:
> 
> Running a relatively recent 3.4-STABLE:
> 
>   If you use the -V option to specify an alternate master.passwd/conf file
> location, then the -m option apparently doesn't work.
> 
>   I get users added to my alt pw file, but no home dir creation.
> 
>   Removing the -V /altdir option adds them to /etc/master.passwd, and
> creates the home dir.
> 
>   If anybody spots in the code where this is taking place, I would love
> to see a fix...  It's probably so obvious I am skipping over it.
> 
> 
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-hackers" in the body of the message


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



RE: The stack size for a process?

2000-01-18 Thread visi0n



Where i can get info about it ?

===
visi0n
AUX Technologies
[www.aux-tech.org]

On Tue, 18 Jan 2000, Charles Randall wrote:

> From: Jason Evans [mailto:[EMAIL PROTECTED]]
> >Thread stacks have a default size of 64kB.
> 
> As you know, stack size can be explicitly set using
> pthread_attr_setstacksize().
> 
> However, note that Solaris uses a pthread stack size of 1 MB. Porter beware.
> 
> >libc_r now uses growable stacks with "guard pages" between stacks
> >to try to catch stack overflow.
> 
> In this case, is there a message printed to the console or syslog that tells
> the programmer/sysadmin what's happening?
> 
> Charles
> 
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-hackers" in the body of the message
> 



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



Harlan Stenn:

2000-01-18 Thread stenn

Can anybody comment on whether or not this is a good patch?
--- Forwarded Message

From: Harlan Stenn <[EMAIL PROTECTED]>
Date: Wed, 19 Jan 2000 00:24:32 -0500
X-Mailer: Mail User's Shell (7.2.5 10/14/92)
To: [EMAIL PROTECTED]
Message-ID:  <[EMAIL PROTECTED]>

From: David Schwartz <[EMAIL PROTECTED]>
Subject: Request for fix in NTPv4, patch attached
Newsgroups: comp.protocols.time.ntp
Date: Tue, 18 Jan 2000 16:16:14 -0800
Organization: Posted via Supernews, http://www.supernews.com
Path: 
news.udel.edu!news.eecis.udel.edu!netnews.com!newsfeed.berkeley.edu!remarQ70!rQdQ!supernews.com!remarQ.com!news.supernews.com!not-for-mail
Lines: 20
Message-ID: <[EMAIL PROTECTED]>
X-Complaints-To: [EMAIL PROTECTED]
X-Mailer: Mozilla 4.7 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Xref: news.udel.edu comp.protocols.time.ntp:12686


Can I please get this fix applied? Who do I need to email and bitch to?

- --- ntp_proto_orig.cTue Jan 18 16:12:01 2000
+++ ntp_proto.c Tue Jan 18 16:14:09 2000
@@ -1501,7 +1501,7 @@
poll_update(peer_list[i], peer_list[i]->hpoll);
if (peer_list[i]->stratum == peer_list[0]->stratum) {
leap_consensus |= peer_list[i]->leap;
- -   if (peer_list[i]->refclktype == REFCLK_ATOM_PPS)
+   if (peer_list[i]->sstclktype == CTL_SST_TS_ATOM)
typepps = peer_list[i];
if (peer_list[i] == sys_peer)
typesystem = peer_list[i];

The REFCLK_ATOM_PPS is not necessarily the only clock that is PPS
capable. Others might be, and they will set their sstclktype to
CTL_SST_TS_ATOM, but they can't change their refclktype.

DS

--- End of Forwarded Message



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



Re: freebsd-hackers-digest V4 #730

2000-01-18 Thread Wes Peters

Chuck Robey wrote:
> 
> On Tue, 18 Jan 2000 [EMAIL PROTECTED] wrote:
> 
> > Where is a good place for me to place an advertisement for "intrusion
> > testers"?  We are in no way connected with any law enforcement or Government
> > agency.  We are a computer investigations firm in Florida and have an urgent
> > need for some of these individuals.  We are a global company with a D&N
> > number if you would like to check us out.
> >
> > Kellie Carlisle, President
> > Advanced Computer Investigations and Services
> > 407.566.0504 or 407.973-4939
> 
> I think [EMAIL PROTECTED] is the correct venue for offers like
> that.

daily.daemonnews.org might be a good spot, too.  It may get MORE coverage
than you're looking for.  ;^)

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

Wes Peters Softweyr LLC
[EMAIL PROTECTED]   http://softweyr.com/


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



Re: Harlan Stenn:

2000-01-18 Thread Sheldon Hearn



On Wed, 19 Jan 2000 00:35:37 EST, [EMAIL PROTECTED] wrote:

> Can anybody comment on whether or not this is a good patch?

Nope, but I _can_ suggest that you send it to the right place. :-)

Please see the Patching Procedures section of the NTP web page:

http://www.eecis.udel.edu/~ntp/ntp_spool/html/patches.htm

Thanks,
Sheldon.


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



Re: high load, nothing happening? (LONG)

2000-01-18 Thread Charles Sprickman

On Tue, 18 Jan 2000, Matthew Dillon wrote:

> A backtrace is not likely to be useful, but a 'ps' (from DDB) may be.
> 
> It might also be useful to leave 'systat -vm 1' and 'vmstat 1' running
> to see if the system is doing any paging or other significant work at 
> the time of the high load.

I'd done that for a day or so back a while ago.  Looked for paging, any
weird amounts of interrupts, etc.  Never saw anything spike.  I had the
same thing running in a window next to it on my workstation, and my
workstation was consistently doing more work, more swapping (linux
netscape with flash plugin = 80+ MB), more interrupts on lesser hardware
with the load rarely hitting 1.0+...

I'll poke around with DDB more tomorrow and see what I can see in the ps
output there...

Thanks,

Charles
 
>   -Matt
> 



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



Re: high load, nothing happening? (LONG)

2000-01-18 Thread Charles Sprickman


On Tue, 18 Jan 2000, Dan Nelson wrote:

> The handbook instructions are for kernel-generated panics; for a manual
> panic like yours, the stack is unimportant.  The easiest way to see
> which processes are active is to run this:
> 
> (kgdb) source /usr/src/sys/modules/vinum/.gdbinit.kernel

Interesting, what's this do?

> (kgdb) ps

> And look at the 'stat' column.  Any processes with a stat of 1 or 2 are
> in the 'runnable' queue, which is what loadav measures.  There should
> be 3 or so processes in that state.

Did that, and every process had a stat of "3".
 
> And in response to anyone saying "Why did you tell him to panic the
> machine?  Why not just have him run ps": I could, but with all those
> apache processes lying around possibly forking children, I wanted a
> static picture of the system that wouldn't change from email to email :)

More importantly, this machine is just sitting here waiting to be put in
production, so I'm more than willing to play around with it like this
while I still can...  Thanks for the ongoing help, I've never touched a
debugger before, and this has been educational so far.  I'm coming off a
week or two of playing with NT machines, and it's nice to at least be able
to gather some info about what the machine is doing with OS-supplied
tools, which is something I found very difficult to do in NT GUI-land.

Thanks,

Charles

> 



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