Re: nomenclature for conf files

2012-11-12 Thread Chris Rees
On 12 Nov 2012 05:20, "Kurt Buff"  wrote:
>
> On Sun, Nov 11, 2012 at 9:12 PM, Zoran Kolic  wrote:
> > It might sound stupid, but I'd like to know if there's
> > any difference. Are those 3 line the same?
> >
> > WITH_KMS=YES
> > WITH_KMS="YES"
> > WITH_KMS=yes
>
> With regard to their use in /etc/rc.conf, no, absolutely not.
>
> In general, from my experience, only the second one will work.
>
> This might, or might not, be true for other uses, but rc.conf is
> pretty picky about this.

All three are fine in make.conf and rc.conf

The issue with rc.conf is when people put spaces around the = sign.

Chris
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: nomenclature for conf files

2012-11-12 Thread Paul Schenkeveld
On Mon, Nov 12, 2012 at 08:29:27AM +, Chris Rees wrote:
> On 12 Nov 2012 05:20, "Kurt Buff"  wrote:
> >
> > On Sun, Nov 11, 2012 at 9:12 PM, Zoran Kolic  wrote:
> > > It might sound stupid, but I'd like to know if there's
> > > any difference. Are those 3 line the same?
> > >
> > > WITH_KMS=YES
> > > WITH_KMS="YES"
> > > WITH_KMS=yes
> >
> > With regard to their use in /etc/rc.conf, no, absolutely not.
> >
> > In general, from my experience, only the second one will work.
> >
> > This might, or might not, be true for other uses, but rc.conf is
> > pretty picky about this.
> 
> All three are fine in make.conf and rc.conf
> 
> The issue with rc.conf is when people put spaces around the = sign.
> 
> Chris

Indeed /etc/rc (executed by /bin/sh) accepts all three forms because
quotes are optional in /bin/sh and /etc/rc.subr (sourced by /etc/rc)
matches the value against "[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1".

Also, the FreeBSD makefiles and sources test all WITH_* variables with
.ifdef or #ifdef so the value doesn't matter and can even be empty.
White space around the = is permitted too (but not in rc.conf!).

However, things are different when people start using tools to maintain
rc.conf/make.conf.  If not written with the above in mind, these tools
may have problems parsing these files.

It's good practice to be consistent and use a canonical form that
matches the documentation or example files as this is probably the
syntax that is guarenteed to not confuse such tools.  In other words:
"Be conservative in what you send [write], liberal in what you accept".

HTH

Paul Schenkeveld
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: nomenclature for conf files

2012-11-12 Thread Chris Rees
On 12 Nov 2012 08:55, "Paul Schenkeveld"  wrote:
>
> On Mon, Nov 12, 2012 at 08:29:27AM +, Chris Rees wrote:
> > On 12 Nov 2012 05:20, "Kurt Buff"  wrote:
> > >
> > > On Sun, Nov 11, 2012 at 9:12 PM, Zoran Kolic  wrote:
> > > > It might sound stupid, but I'd like to know if there's
> > > > any difference. Are those 3 line the same?
> > > >
> > > > WITH_KMS=YES
> > > > WITH_KMS="YES"
> > > > WITH_KMS=yes
> > >
> > > With regard to their use in /etc/rc.conf, no, absolutely not.
> > >
> > > In general, from my experience, only the second one will work.
> > >
> > > This might, or might not, be true for other uses, but rc.conf is
> > > pretty picky about this.
> >
> > All three are fine in make.conf and rc.conf
> >
> > The issue with rc.conf is when people put spaces around the = sign.
> >
> > Chris
>
> Indeed /etc/rc (executed by /bin/sh) accepts all three forms because
> quotes are optional in /bin/sh and /etc/rc.subr (sourced by /etc/rc)
> matches the value against "[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1".
>
> Also, the FreeBSD makefiles and sources test all WITH_* variables with
> .ifdef or #ifdef so the value doesn't matter and can even be empty.
> White space around the = is permitted too (but not in rc.conf!).
>
> However, things are different when people start using tools to maintain
> rc.conf/make.conf.  If not written with the above in mind, these tools
> may have problems parsing these files.
>
> It's good practice to be consistent and use a canonical form that
> matches the documentation or example files as this is probably the
> syntax that is guarenteed to not confuse such tools.  In other words:
> "Be conservative in what you send [write], liberal in what you accept".

Doesn't sound like a very good tool if it can't handle quoting and capital
letters, but I accept the principle.

Quotes in Makefiles are often harmful, so good practice IMO is to only use
them when necessary.

Chris
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: nomenclature for conf files

2012-11-12 Thread Paul Schenkeveld
On Mon, Nov 12, 2012 at 10:24:57AM +, Chris Rees wrote:
> On 12 Nov 2012 08:55, "Paul Schenkeveld"  wrote:
> >
> > On Mon, Nov 12, 2012 at 08:29:27AM +, Chris Rees wrote:
> > > On 12 Nov 2012 05:20, "Kurt Buff"  wrote:
> > > >
> > > > On Sun, Nov 11, 2012 at 9:12 PM, Zoran Kolic  wrote:
> > > > > It might sound stupid, but I'd like to know if there's
> > > > > any difference. Are those 3 line the same?
> > > > >
> > > > > WITH_KMS=YES
> > > > > WITH_KMS="YES"
> > > > > WITH_KMS=yes
> > > >
> > > > With regard to their use in /etc/rc.conf, no, absolutely not.
> > > >
> > > > In general, from my experience, only the second one will work.
> > > >
> > > > This might, or might not, be true for other uses, but rc.conf is
> > > > pretty picky about this.
> > >
> > > All three are fine in make.conf and rc.conf
> > >
> > > The issue with rc.conf is when people put spaces around the = sign.
> > >
> > > Chris
> >
> > Indeed /etc/rc (executed by /bin/sh) accepts all three forms because
> > quotes are optional in /bin/sh and /etc/rc.subr (sourced by /etc/rc)
> > matches the value against "[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1".
> >
> > Also, the FreeBSD makefiles and sources test all WITH_* variables with
> > .ifdef or #ifdef so the value doesn't matter and can even be empty.
> > White space around the = is permitted too (but not in rc.conf!).
> >
> > However, things are different when people start using tools to maintain
> > rc.conf/make.conf.  If not written with the above in mind, these tools
> > may have problems parsing these files.
> >
> > It's good practice to be consistent and use a canonical form that
> > matches the documentation or example files as this is probably the
> > syntax that is guarenteed to not confuse such tools.  In other words:
> > "Be conservative in what you send [write], liberal in what you accept".
> 
> Doesn't sound like a very good tool if it can't handle quoting and capital
> letters, but I accept the principle.
> 
> Chris

I wouldn't want to verify all home-grown scripts written by sysadmins
around the Internet though.

> Quotes in Makefiles are often harmful, so good practice IMO is to only use
> them when necessary.

For Makefiles yes, quotes are not part of the assignment syntax but
appear in the expansion of the macros so be careful.  For sh compatible
config files better use them for clarity and parsability although I
realize that then differences between " and ' come into play too.

HTH

Paul Schenkeveld
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: ZFS corruption due to lack of space?

2012-11-12 Thread Julian H. Stacey
Peter Jeremy wrote:
> On 2012-Nov-02 09:30:04 -, Steven Hartland  wr=
> ote:
> >From: "Peter Jeremy" 
> >> Many years ago, I wrote a simple utility that fills a raw disk with
> >> a pseudo-random sequence and then verifies it.  This sort of tool
> >
> >Sounds useful, got a link?
> 
> Sorry, no.  I never released it.  But writing something like it is
> quite easy.

I wrote

http://berklix.com/~jhs/src/bsd/jhs/bin/public/testblock/

There's no pseudo random, but sufficient for my media test needs,
There's a bunch of similar tools in ports/
(but I wrote mine before FreeBSD existed so I've never looked).

Cheers,
Julian
-- 
Julian Stacey, BSD Unix Linux C Sys Eng Consultant, Munich http://berklix.com
 Reply below not above, like a play script.  Indent old text with "> ".
 Send plain text. Not: HTML, multipart/alternative, base64, quoted-printable.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: Panic during kernel boot, igb-init related? (8.3-RELEASE)

2012-11-12 Thread Charles Owens

On 11/1/12 2:25 AM, Eugene Grosbein wrote:

31.10.2012 23:58, Charles Owens пишет:

Hello,

We're seeing boot-time panics in about 4% of cases when upgrading from
FreeBSD 8.1 to 8.3-RELEASE (i386).  This problem is subtle enough that
it escaped detection during our regular testing cycle... now with over
100 systems upgraded we're convinced there's a real issue.  Our kernel
config is essentially PAE (ie. static modules ... with a few drivers
added/removed).  The hardware is Intel Server System SR1625UR.

This appears to match a finding discussed in these threads, having to do
with timing of initialization of the igb(4)-based NICs (if I'm
understanding it properly):

http://lists.freebsd.org/pipermail/freebsd-stable/2011-May/062596.html
http://lists.freebsd.org/pipermail/freebsd-stable/2011-June/062949.html
http://lists.freebsd.org/pipermail/freebsd-stable/2011-September/063867.html
http://lists.freebsd.org/pipermail/freebsd-stable/2011-September/063958.html


These threads include some potential patches and possibility of
commit/MFC... but it isn't clear that there was ever final resolution
(and MFC to 8-stable).  I've cc'd a few folks from back then.

A real challenge here is the frequency of occurrence. As mentioned, it
only hit's a fraction of our systems.  When it _does_ hit, the system
may enter a reboot loop for days and then mysteriously break out of
it... and thereafter seem to work fine.

I'd be very grateful for any help.  Some questions:

   * Was there ever a final "blessed" patch?
   o if so, will it apply to RELENG_8_3?
   * Is there anything that could be said that might help us with
 reproducing-the-problem / testing / validating-a-fix?


Panic message is --

panic: m_getzone: m_getjcl: invalid cluster type
cpuid = 0
KDB: stack backtrace:
#0 0xc059c717 at kdb_backtrace+0x47
#1 0xc056caf7 at panic+0x117
#2 0xc03c979e at igb_refresh_mbufs+0x25e
#3 0xc03c9f98 at igb_rxeof+0x638
#4 0xc03ca135 at igb_msix_que+0x105
#5 0xc0541e2b at intr_event_execute_handlers+0x13b
#6 0xc05434eb at ithread_loop+0x6b
#7 0xc053efb7 at fork_exit+0x97
#8 0xc0806744 at fork_trampoline+0x8

Thanks very much,

Charles

Take a look at http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/172113 that 
contains
simple workaround in followup message not involving any patching, and the fix.

Eugene Grosbein



Eugene, thanks very much for the pointer.  This is definitely what we 
were looking for! -- Charles



Charles Owens
Great Bay Software, Inc.


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

Re: nomenclature for conf files

2012-11-12 Thread Kurt Buff
On Mon, Nov 12, 2012 at 12:29 AM, Chris Rees  wrote:
>
> On 12 Nov 2012 05:20, "Kurt Buff"  wrote:
>>
>> On Sun, Nov 11, 2012 at 9:12 PM, Zoran Kolic  wrote:
>> > It might sound stupid, but I'd like to know if there's
>> > any difference. Are those 3 line the same?
>> >
>> > WITH_KMS=YES
>> > WITH_KMS="YES"
>> > WITH_KMS=yes
>>
>> With regard to their use in /etc/rc.conf, no, absolutely not.
>>
>> In general, from my experience, only the second one will work.
>>
>> This might, or might not, be true for other uses, but rc.conf is
>> pretty picky about this.
>
> All three are fine in make.conf and rc.conf
>
> The issue with rc.conf is when people put spaces around the = sign.
>
> Chris

This has not been my experience - but I will experiment soon and see
if I can verify.

Kurt
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: nomenclature for conf files

2012-11-12 Thread Chris Rees
On 12 Nov 2012 15:35, "Kurt Buff"  wrote:
>
> On Mon, Nov 12, 2012 at 12:29 AM, Chris Rees  wrote:
> >
> > On 12 Nov 2012 05:20, "Kurt Buff"  wrote:
> >>
> >> On Sun, Nov 11, 2012 at 9:12 PM, Zoran Kolic  wrote:
> >> > It might sound stupid, but I'd like to know if there's
> >> > any difference. Are those 3 line the same?
> >> >
> >> > WITH_KMS=YES
> >> > WITH_KMS="YES"
> >> > WITH_KMS=yes
> >>
> >> With regard to their use in /etc/rc.conf, no, absolutely not.
> >>
> >> In general, from my experience, only the second one will work.
> >>
> >> This might, or might not, be true for other uses, but rc.conf is
> >> pretty picky about this.
> >
> > All three are fine in make.conf and rc.conf
> >
> > The issue with rc.conf is when people put spaces around the = sign.
> >
> > Chris
>
> This has not been my experience - but I will experiment soon and see
> if I can verify.

Anything that complains about any of those syntaxes is a bug.  Please file
a PR if you find any examples.

Chris
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"