Re: freebsd-5.4-stable panics

2005-10-08 Thread Don Lewis
On  3 Oct, Rob Watt wrote:

 We noticed the patches from Don Lewis, but have not tested them yet. We
 weren't sure if we could just apply those patches against 6.0-BETA5, or
 whether we should wait for them to be MFC'd.

Both HEAD and RELENG_6 have been patched.  I've tested the following
patch for RELENG_5 on a uniprocessor sparc64 box.  I'd appreciate it if
anyone who was running into this problem on RELENG_5 with SMP hardare
could test it before I do the MFC.


Index: sys/kern/kern_proc.c
===
RCS file: /home/ncvs/src/sys/kern/kern_proc.c,v
retrieving revision 1.215.2.6
diff -u -r1.215.2.6 kern_proc.c
--- sys/kern/kern_proc.c22 Mar 2005 13:40:23 -  1.215.2.6
+++ sys/kern/kern_proc.c7 Oct 2005 23:17:26 -
@@ -72,6 +72,8 @@
 
 static void doenterpgrp(struct proc *, struct pgrp *);
 static void orphanpg(struct pgrp *pg);
+static void fill_kinfo_proc_only(struct proc *p, struct kinfo_proc *kp);
+static void fill_kinfo_thread(struct thread *td, struct kinfo_proc *kp);
 static void pgadjustjobc(struct pgrp *pgrp, int entering);
 static void pgdelete(struct pgrp *);
 static int proc_ctor(void *mem, int size, void *arg, int flags);
@@ -601,33 +603,22 @@
}
 }
 #endif /* DDB */
-void
-fill_kinfo_thread(struct thread *td, struct kinfo_proc *kp);
 
 /*
- * Fill in a kinfo_proc structure for the specified process.
+ * Clear kinfo_proc and fill in any information that is common
+ * to all threads in the process.
  * Must be called with the target process locked.
  */
-void
-fill_kinfo_proc(struct proc *p, struct kinfo_proc *kp)
-{
-   fill_kinfo_thread(FIRST_THREAD_IN_PROC(p), kp);
-}
-
-void
-fill_kinfo_thread(struct thread *td, struct kinfo_proc *kp)
+static void
+fill_kinfo_proc_only(struct proc *p, struct kinfo_proc *kp)
 {
-   struct proc *p;
struct thread *td0;
-   struct ksegrp *kg;
struct tty *tp;
struct session *sp;
struct timeval tv;
struct ucred *cred;
struct sigacts *ps;
 
-   p = td-td_proc;
-
bzero(kp, sizeof(*kp));
 
kp-ki_structsize = sizeof(*kp);
@@ -685,7 +676,8 @@
kp-ki_tsize = vm-vm_tsize;
kp-ki_dsize = vm-vm_dsize;
kp-ki_ssize = vm-vm_ssize;
-   }
+   } else if (p-p_state != PRS_ZOMBIE)
+   kp-ki_stat = SZOMB;
if ((p-p_sflag  PS_INMEM)  p-p_stats) {
kp-ki_start = p-p_stats-p_start;
timevaladd(kp-ki_start, boottime);
@@ -704,71 +696,6 @@
kp-ki_nice = p-p_nice;
bintime2timeval(p-p_runtime, tv);
kp-ki_runtime = tv.tv_sec * (u_int64_t)100 + tv.tv_usec;
-   if (p-p_state != PRS_ZOMBIE) {
-#if 0
-   if (td == NULL) {
-   /* XXXKSE: This should never happen. */
-   printf(fill_kinfo_proc(): pid %d has no threads!\n,
-   p-p_pid);
-   mtx_unlock_spin(sched_lock);
-   return;
-   }
-#endif
-   if (td-td_wmesg != NULL) {
-   strlcpy(kp-ki_wmesg, td-td_wmesg,
-   sizeof(kp-ki_wmesg));
-   }
-   if (TD_ON_LOCK(td)) {
-   kp-ki_kiflag |= KI_LOCKBLOCK;
-   strlcpy(kp-ki_lockname, td-td_lockname,
-   sizeof(kp-ki_lockname));
-   }
-
-   if (p-p_state == PRS_NORMAL) { /*  XXXKSE very approximate */
-   if (TD_ON_RUNQ(td) ||
-   TD_CAN_RUN(td) ||
-   TD_IS_RUNNING(td)) {
-   kp-ki_stat = SRUN;
-   } else if (P_SHOULDSTOP(p)) {
-   kp-ki_stat = SSTOP;
-   } else if (TD_IS_SLEEPING(td)) {
-   kp-ki_stat = SSLEEP;
-   } else if (TD_ON_LOCK(td)) {
-   kp-ki_stat = SLOCK;
-   } else {
-   kp-ki_stat = SWAIT;
-   }
-   } else {
-   kp-ki_stat = SIDL;
-   }
-
-   kg = td-td_ksegrp;
-
-   /* things in the KSE GROUP */
-   kp-ki_estcpu = kg-kg_estcpu;
-   kp-ki_slptime = kg-kg_slptime;
-   kp-ki_pri.pri_user = kg-kg_user_pri;
-   kp-ki_pri.pri_class = kg-kg_pri_class;
-
-   /* Things in the thread */
-   kp-ki_wchan = td-td_wchan;
-   kp-ki_pri.pri_level = td-td_priority;
-   kp-ki_pri.pri_native = td-td_base_pri;
-   kp-ki_lastcpu = td-td_lastcpu;
-   kp-ki_oncpu = td-td_oncpu;
-   kp-ki_tdflags = td-td_flags;
-   kp-ki_tid = td-td_tid;
-   kp-ki_numthreads = p-p_numthreads;
-   

SENDMAIL_MC making world

2005-10-08 Thread Yar Tikhiy
All,

I'd like to set SENDMAIL_MC in my /etc/make.conf files conditionally
so that it is not set when I'm making {build,install}world.  I
upgrade several machines over NFS from a single build server, and
of course installworld breaks if SENDMAIL_MC differs from what was
set during buildworld.  At the same time, I'd like to have SENDMAIL_MC
set for the rest of the time on the machines because `hostname` is
not a suitable way to construct the .mc names on them due to local
setup peculiarities.  Any ideas how to achieve this effect?

-- 
Yar
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: SENDMAIL_MC making world

2005-10-08 Thread Maxim Konovalov
On Sat, 8 Oct 2005, 17:47+0400, Yar Tikhiy wrote:

 All,

 I'd like to set SENDMAIL_MC in my /etc/make.conf files conditionally
 so that it is not set when I'm making {build,install}world.  I
 upgrade several machines over NFS from a single build server, and
 of course installworld breaks if SENDMAIL_MC differs from what was
 set during buildworld.  At the same time, I'd like to have SENDMAIL_MC
 set for the rest of the time on the machines because `hostname` is
 not a suitable way to construct the .mc names on them due to local
 setup peculiarities.  Any ideas how to achieve this effect?

It is possible to override make.conf location via __MAKE_CONF variable
and use different make.conf at the build,installworld stages.
Perhaps that suits your needs.

-- 
Maxim Konovalov
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: problems with disk geometry

2005-10-08 Thread Kamal R. Prasad
I found out that my samsung 1604N hard disk can be partitioned  
without any problem (it is now the primary master with a dvd drive as  
slave).

.
The problem lies with disklabel. If I use 'A' option in the  
sysinstall program's label section,.
it expects to find in /dev ad0s1a, ad0s2a etc.. but these don't show  
up in /dev and the labelling procedure fails. Can someone tell me how  
to fix this or if this is a bug in this release of freebsd?


thanks
-kamal


On 06-Oct-05, at 9:57 PM, Gayn Winters wrote:


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kamal
R. Prasad
Sent: Thursday, October 06, 2005 8:56 AM
To: freebsd-hackers@freebsd.org
Subject: problems with disk geometry


hello,

  Im trying to install FreeBSD 6.0 beta5 on a samsung SP1604N hard
disk of about 160 GB.
The installer complains that it has a problem with the disk
geometry.
The exact message is given below:-
--
A geometry of 310101/16/63 is incorrect for ad1. Using a more likely
geometry. If this geometry is incorrect.. pl. consult the
hardware guide
---
fdisk goes through the process of creating the reqd slices
and when I
try to commit the new partition table -it says it cannot write to /
dev/ad1.

Can someone tell me how to get past this problem?

thanks
-kamal



I doubt it is your disk geometry.  You will probably need to provide a
little more information.  I assume you've got another OS on /dev/ 
ad0 and
that you are letting sysinstall put 6.0 onto /dev/ad1 as a  
(dangerously)

dedicated drive?  What does the BIOS report?  How old are the machine
and its BIOS?  What does fdisk say when run either standalone or from
the first OS?

-gayn





Kamal R. Prasad
UNIX systems consultant
http://www.kamalprasad.com/
[EMAIL PROTECTED]



___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: struct timeval: why is tv_sec long?

2005-10-08 Thread Joerg Sonnenberger
On Sat, Oct 08, 2005 at 06:54:22AM +1000, Peter Jeremy wrote:
 On Fri, 2005-Oct-07 20:17:43 +0200, Andreas Kohn wrote:
 As SUSv2 wants tv_sec to be time_t[1], would it be possible to change
 this to time_t on all but alpha? I guess alpha will not receive a switch
 to long anymore[2]. 
 
 tv_sec and time_t are int on Alpha for compatability with Tru64.  Since
 the Alpha is now a dead architecture and no longer a tier-1 FreeBSD
 platform, it's unlikely anyone will expend the effort to change them.

If that is the only reason, make it use time_t and add a fake field on
Alpha before or after it (not sure of the byte order) to keep the alignment.

Joerg
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: struct timeval: why is tv_sec long?

2005-10-08 Thread Andreas Kohn
Hi,

On Sat, 2005-10-08 at 06:54 +1000, Peter Jeremy wrote:
 On Fri, 2005-Oct-07 20:17:43 +0200, Andreas Kohn wrote:
 As SUSv2 wants tv_sec to be time_t[1], would it be possible to change
 this to time_t on all but alpha? I guess alpha will not receive a switch
 to long anymore[2]. 
 
 tv_sec and time_t are int on Alpha for compatability with Tru64.  Since
 the Alpha is now a dead architecture and no longer a tier-1 FreeBSD
 platform, it's unlikely anyone will expend the effort to change them.

That's what I was implying, yes. So, is there any reason left (except
perhaps envious looks from the alpha guys :D) not to change it? 
Shall I open up a PR on this?

The only thing I'm currently wondering if it would be better to do 
--- sys/_timeval.h
#ifdef __alpha__
long tv_sec;
#else
time_t tv_sec;
#endif
---,

or creating a machine/_timeval.h.
#ifdef __alpha__ would probably okay, there are more files in sys/ that
do that.

I think this is an important issue, as it currently makes code not
compile on FreeBSD that uses standard interfaces. 

Attached is a patch to at least update gettimeofday(2) with the fact
that tv_usec is suseconds_t, and add a BUGS section to note the problem
with tv_sec. I was unsure whether to add the reasoning behind the
problem (alpha, tru64), so I left that out.

Best regards,
Andreas

-- 
TalisA was macht man eigentlich auf einer linux-gamer lan ? hl server
aufsetzen und freuen ? *duck* ^^
Index: gettimeofday.2
===
RCS file: /storage/freebsd/cvs/src/lib/libc/sys/gettimeofday.2,v
retrieving revision 1.25
diff -u -r1.25 gettimeofday.2
--- gettimeofday.2	2 Jul 2004 23:52:13 -	1.25
+++ gettimeofday.2	8 Oct 2005 16:27:40 -
@@ -82,8 +82,8 @@
 .Pp
 .Bd -literal
 struct timeval {
-	long	tv_sec;		/* seconds since Jan. 1, 1970 */
-	long	tv_usec;	/* and microseconds */
+	long		tv_sec;		/* seconds since Jan. 1, 1970 */
+	suseconds_t	tv_usec;	/* and microseconds */
 };
 
 struct timezone {
@@ -133,3 +133,5 @@
 .Fn gettimeofday
 system call appeared in
 .Bx 4.2 .
+.Sh BUGS
+The tv_sec member of struct timeval should be a time_t.


signature.asc
Description: This is a digitally signed message part


hosts.allow

2005-10-08 Thread Chuck Robey
I shouldn't write this while I'm frustrated.  I just hope it doesn't 
leak out, I know I tend to do that.


I'm having trouble getting my mounts to work with my newly attached 
Zaurus, to my trusty FreeBSD server.  I have gotten past several 
problems, began googling error messages, and hit the /etc/hosts.allow 
file.  Here I've hit a problem.  The file, both the internals of it 
(which is a mass of examples with nearly no explanations) and the man 
page, are either circular definitions, or missing ones, grossly 
missing.  One glaring example, in the man page, the single most commonly 
used token is ALL but even though it's used more than any other token, 
it's not defined, even slightly.  What does ALL mean?


Hmm, howcome security info, which is the most important, is always the 
worst documented, and set up with the most complicated syntax?


If you MUST use examples, they should only be used to illustrate items 
that have explanations, they should never ever be used as the primary 
explanation.  I can't figure out how to use /etc/hosts.allow.  I'm not 
sure if it is, or is not, affecting my rpcbind.


Well, you be the judge, did I let my frustration out of the bag this time?

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Debugging an unknown reboot (disk / io related)

2005-10-08 Thread Kris Kennaway
On Wed, Aug 31, 2005 at 06:03:13PM +0100, Steven Hartland wrote:
 When running a large rsync on one of our machines here it
 constantly ditches and reboots leaving no traces in the logs
 or anything. It looks like it could be a driver error but with
 no crash log or panic message to go on I dont know where
 to start.

This kind of question is asked frequently.  If your machine isn't
panicking (check the system console, and make sure you're not running
X there), it usually means you have failing or marginal hardware that
is unable to keep up with peak loads.  Try replacing your power
supply, or putting it behind a UPS that can condition the power if
your AC supply is dirty or unstable.

Kris

pgpOD5Gm0ev1C.pgp
Description: PGP signature


RE: hosts.allow

2005-10-08 Thread Rob MacGregor
On Saturday, October 08, 2005 8:45 PM, Chuck Robey  unleashed the infinite
monkeys and produced:

 One glaring example, in the man page, the single most commonly
 used token is ALL but even though it's used more than any other token,
 it's not defined, even slightly.  What does ALL mean?

Quoting the hosts_access man page:

ALLThe universal wildcard, always matches.

 I can't figure out how to use /etc/hosts.allow.  I'm not
 sure if it is, or is not, affecting my rpcbind.

The man page for rpcbind suggests it should, and you can find out (again, from
the man page):

-l  Turn on libwrap connection logging.

-- 
 Rob | Oh my God! They killed init! You bastards!

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: hosts.allow

2005-10-08 Thread Paul Halliday
My guess, and this is a wild one, would be:

All \All\, a. [OE. al, pl. alle, AS. eal, pl. ealle,
 Northumbrian alle, akin to D.  OHG. al, Ger. all, Icel.
 allr. Dan. al, Sw. all, Goth. alls; and perh. to Ir. and
 Gael. uile, W. oll.]
 1. The whole quantity, extent, duration, amount, quality, or
degree of; the whole; the whole number of; any whatever;
every; as, all the wheat; all the land; all the year; all
the strength; all happiness; all abundance; loss of all
power; beyond all doubt; you will see us all (or all of
us).
[1913 Webster]

So,

Service(s) : Host(s) : Action

ALL(services(s)) : ALL (Hosts(s)) : Action


On 10/8/05, Chuck Robey [EMAIL PROTECTED] wrote:
 I shouldn't write this while I'm frustrated.  I just hope it doesn't
 leak out, I know I tend to do that.

 I'm having trouble getting my mounts to work with my newly attached
 Zaurus, to my trusty FreeBSD server.  I have gotten past several
 problems, began googling error messages, and hit the /etc/hosts.allow
 file.  Here I've hit a problem.  The file, both the internals of it
 (which is a mass of examples with nearly no explanations) and the man
 page, are either circular definitions, or missing ones, grossly
 missing.  One glaring example, in the man page, the single most commonly
 used token is ALL but even though it's used more than any other token,
 it's not defined, even slightly.  What does ALL mean?

 Hmm, howcome security info, which is the most important, is always the
 worst documented, and set up with the most complicated syntax?

 If you MUST use examples, they should only be used to illustrate items
 that have explanations, they should never ever be used as the primary
 explanation.  I can't figure out how to use /etc/hosts.allow.  I'm not
 sure if it is, or is not, affecting my rpcbind.

 Well, you be the judge, did I let my frustration out of the bag this time?

 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to [EMAIL PROTECTED]



--
_
Paul Halliday
http://pintumbler.com/

Diplomacy is the art of saying Nice doggie! till you can find a rock.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


mount permissions problems

2005-10-08 Thread Chuck Robey

I could sure use some help here.

I have this Zaurus pda, running OpenBSD (FreeBSD doesn't run on arm, 
last I looked), and I have just gotten usb networking to work.  I am 
trying to get nfs mounts to work, and I have very nearly got it working, 
except for one problem: permissions.


For example, I have a /usr3/local that I want to mount as /usr/ports on 
the Zaurus.  When I do that (and it does mount), if I try to touch 
garbage, it comes back and tells me Permission denied.  I can't get 
around this.  The mount isn't ro, in fact, when I do the mount -v, I get:


april.chuckr.org:/usr3/osrc/ports on /usr/ports type nfs (rw, ctime=Sat 
Oct  8 10:23:49 2005, v3, tcp, hard, wsize=8192, rsize=8192, 
rdirsize=8192, timeo=100, retrans=10, maxgrouplist=16, readahead=1, 
acregmin=5, acregmax=60, acdirmin=5, acdirmax=60)


Showmount -e on FreeBSD shows the right network (I was going to post it, 
but I chickened out, it's got too much stuff I don't want publicized, I 
have static IPs).



How come I can't get permissions fixed?
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: mount permissions problems

2005-10-08 Thread albi
On Sat, 08 Oct 2005 17:10:08 -0400
Chuck Robey [EMAIL PROTECTED] wrote:

 I have this Zaurus pda, running OpenBSD (FreeBSD doesn't run on arm, 
 last I looked), and I have just gotten usb networking to work.  I am 
 trying to get nfs mounts to work, and I have very nearly got it working, 
 except for one problem: permissions.
 
 For example, I have a /usr3/local that I want to mount as /usr/ports on 
 the Zaurus.  When I do that (and it does mount), if I try to touch 
 garbage, it comes back and tells me Permission denied.  I can't get 
 around this.  The mount isn't ro, in fact, when I do the mount -v, I get:
 
 april.chuckr.org:/usr3/osrc/ports on /usr/ports type nfs (rw, ctime=Sat 
 Oct  8 10:23:49 2005, v3, tcp, hard, wsize=8192, rsize=8192, 
 rdirsize=8192, timeo=100, retrans=10, maxgrouplist=16, readahead=1, 
 acregmin=5, acregmax=60, acdirmin=5, acdirmax=60)

you didn't say whether you tried as a normal user or root, for normal
users you should use the same uid and gid on both machines, for root
you need to appropriate syntax on the nfs-server (you could show that
part of /etc/exports changing your ip-addresses)

HTH

-- 
grtjs, albi
gpg-key: lynx -dump http://scii.nl/~albi/gpg.asc | gpg --import
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: mount permissions problems

2005-10-08 Thread Rob MacGregor
On Saturday, October 08, 2005 10:10 PM, Chuck Robey  unleashed the infinite
monkeys and produced:

 I could sure use some help here.
 
 I have this Zaurus pda, running OpenBSD (FreeBSD doesn't run on arm,
 last I looked), and I have just gotten usb networking to work.  I am
 trying to get nfs mounts to work, and I have very nearly got it working,
 except for one problem: permissions.
 
 For example, I have a /usr3/local that I want to mount as /usr/ports on
 the Zaurus.  When I do that (and it does mount), if I try to touch
 garbage, it comes back and tells me Permission denied.  I can't get
 around this.

Keep in mind that the root user isn't mapped across an NFS mount by default:

 In the absence of -maproot and -mapall options, remote accesses by root
 will result in using a credential of -2:-2.  All other users will be
 mapped to their remote credential.

If you want a remote system to have root access to the file system you *MUST*
explicity configure this.

-- 
 Rob | Oh my God! They killed init! You bastards!

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: hosts.allow

2005-10-08 Thread Matthew D. Fuller
On Sat, Oct 08, 2005 at 03:45:23PM -0400 I heard the voice of
Chuck Robey, and lo! it spake thus:
 
 I'm not sure if it is, or is not, affecting my rpcbind.

Someone else pointed out hosts_access(5).  I just wanted to point out
that unless you did something to it, it's probably not.  The file is
run through first-match, and the first non-comment line in the default
file is:

ALL : ALL : allow



-- 
Matthew Fuller (MF4839)   |  [EMAIL PROTECTED]
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
   On the Internet, nobody can hear you scream.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: mount permissions problems

2005-10-08 Thread Peter Jeremy
On Sat, 2005-Oct-08 17:10:08 -0400, Chuck Robey wrote:
For example, I have a /usr3/local that I want to mount as /usr/ports on 
the Zaurus.  When I do that (and it does mount), if I try to touch 
garbage, it comes back and tells me Permission denied.

Are you doing this as root or as an ordinary user?  If the former, do
you have '-maproot=root' for /usr3/local in april:/etc/exports?  If
the latter does the user have permission to write to /usr/ports?

 The mount isn't ro,

I think that mount on the client will report rw even if the server
only exports ro.

Showmount -e on FreeBSD shows the right network (I was going to post it, 
but I chickened out, it's got too much stuff I don't want publicized, I 
have static IPs).

You can always s/your.real.ip/some.dummy.ip/g

-- 
Peter Jeremy
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]