Re: GENERIC make buildkernel error / fails - posix_fadvise

2012-01-22 Thread Doug Barton
On 01/22/2012 11:00, clift...@volcano.org wrote:
> On 12.01.2012 15:52, Doug Barton wrote:
 chflags -R noschg /usr/obj/usr
 rm -rf /usr/obj/usr
>>
>> It's much faster to do:
>>
>> /bin/rm -rf ${obj}/* 2> /dev/null || /bin/chflags -R 0 ${obj}/* &&
>> /bin/rm -rf ${obj}/*
> 
> If I could just add one thing here, for those who might be tempted
> to immediately cut and paste that elegant command line:
> 
> Consider, how does that command evaluate if the shell variable "obj"
> is not set, and you're running that literal string as root?

It wasn't intended that anyone actually do what you're considering. I
assumed that our users are smart enough to know that they have to
substitute the actual value of /usr/obj.


Doug

-- 

It's always a long day; 86400 doesn't fit into a short.

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
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: GENERIC make buildkernel error / fails - posix_fadvise

2012-01-22 Thread Jilles Tjoelker
On Sun, Jan 22, 2012 at 01:00:46PM -0600, clift...@volcano.org wrote:
> On 12.01.2012 15:52, Doug Barton wrote:
> >>> chflags -R noschg /usr/obj/usr
> >>> rm -rf /usr/obj/usr

> > It's much faster to do:

> > /bin/rm -rf ${obj}/* 2> /dev/null || /bin/chflags -R 0 ${obj}/* &&
> > /bin/rm -rf ${obj}/*

> If I could just add one thing here, for those who might be tempted
> to immediately cut and paste that elegant command line:

> Consider, how does that command evaluate if the shell variable "obj"
> is not set, and you're running that literal string as root?

> A: You will very systematically wipe your entire server, starting
> at the root, and doing a second pass to get any protected files you
> missed.

> I'd recommend something safer like approximately this (untested):

>if ["X${obj}" != "X" -a -d ${obj}]; then cd ${obj} && (rest of cmds); 
> fi

> Sorry for the wasted bandwidth, for those to whom it was obvious,
> but anybody who has ever had to clean up after a junior admin's
> attempt to do something a little too clever will appreciate why I'm
> posting this.

An easier way is to replace the first ${obj} with ${obj:?}, causing an
error if obj is unset or null.

One limitation is that it does not work with (t)csh.

> On the efficiency front, for the core file deletion operators, I've
> had good results with this trick (requires Perl and makes use of
> its implicit-operand idioms):

>find ${obj} | perl -nle unlink

> If rm had an option to take files from standard input, or if
> there's another program I'm not aware of which does this, it
> could serve as the right-hand side of this.

This does not handle all possible characters in filenames, such as a
newline. The perlrun manpage suggests something with find's -print0
primary. Alternatively, use find's -unlink primary.

-- 
Jilles Tjoelker
___
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: GENERIC make buildkernel error / fails - posix_fadvise

2012-01-22 Thread cliftonr

On 22.01.2012 13:16, Matthew Seaman wrote:

On 22/01/2012 19:00, clift...@volcano.org wrote:

If rm had an option to take files from standard input, or if
there's another program I'm not aware of which does this, it
could serve as the right-hand side of this.


xargs(1) -- generic solution to taking a list of command arguments 
from

a file or pipe, and building a command line from them.

...

xargs(1) is very commonly used in pipelines with find(1).


Thanks for making it clear that my comment was unclear. :-)

I had meant a program which reads the input file list as xargs
does and operates directly on its operands as xargs does

I'm very familiar with xargs, and have used it in many a shell script.
However, it has the weakness that it will end up doing many invocations
on the executable operand, as it batches up the input into command line
arguments.  I don't know to what extent that overhead would compare to 
the
other sources of overhead discussed earlier, or the overhead of 
executing

a Perl interpreter opcode per input, but I'd guess it's higher.

I think I tried that specific comparison of xargs rm vs. perl -nle 
unlink

once, some years ago, for some kind of temp file cleanup, and found the
latter was faster.  I don't have any numbers though, and if I did 
they'd

be long out of date.
  -- Clifton

--
  Clifton Royston  --  clift...@iandicomputing.com / 
clift...@volcano.org
  Custom programming, network design, systems and network consulting 
services


___
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: GENERIC make buildkernel error / fails - posix_fadvise

2012-01-22 Thread Matthew Seaman
On 22/01/2012 19:00, clift...@volcano.org wrote:
> If rm had an option to take files from standard input, or if
> there's another program I'm not aware of which does this, it
> could serve as the right-hand side of this.

xargs(1) -- generic solution to taking a list of command arguments from
a file or pipe, and building a command line from them.

So, supposing you have a list of files (one per line) you want to delete
in a file called 'goners':

   xargs rm -f < goners

xargs(1) is very commonly used in pipelines with find(1).

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


Re: GENERIC make buildkernel error / fails - posix_fadvise

2012-01-22 Thread cliftonr

On 12.01.2012 15:52, Doug Barton wrote:

chflags -R noschg /usr/obj/usr
rm -rf /usr/obj/usr


It's much faster to do:

/bin/rm -rf ${obj}/* 2> /dev/null || /bin/chflags -R 0 ${obj}/* &&
/bin/rm -rf ${obj}/*


If I could just add one thing here, for those who might be tempted
to immediately cut and paste that elegant command line:

Consider, how does that command evaluate if the shell variable "obj"
is not set, and you're running that literal string as root?

A: You will very systematically wipe your entire server, starting
at the root, and doing a second pass to get any protected files you
missed.

I'd recommend something safer like approximately this (untested):

  if ["X${obj}" != "X" -a -d ${obj}]; then cd ${obj} && (rest of cmds); 
fi


Sorry for the wasted bandwidth, for those to whom it was obvious,
but anybody who has ever had to clean up after a junior admin's
attempt to do something a little too clever will appreciate why I'm
posting this.

On the efficiency front, for the core file deletion operators, I've
had good results with this trick (requires Perl and makes use of
its implicit-operand idioms):

  find ${obj} | perl -nle unlink

If rm had an option to take files from standard input, or if
there's another program I'm not aware of which does this, it
could serve as the right-hand side of this.
  -- Clifton

--
   Clifton Royston  --  clift...@iandicomputing.com / 
clift...@volcano.org
 Custom programming, network design, systems and network consulting 
services


___
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: GENERIC make buildkernel error / fails - posix_fadvise

2012-01-15 Thread Rob Clark
On Sat, 14 Jan 2012 23:37:50 -0800
Jeremy Chadwick  wrote:

> On Sun, Jan 15, 2012 at 02:24:41AM -0500, Rob Clark wrote:
> > On Thu, 12 Jan 2012 08:15:50 -0500
> > John Baldwin  wrote:
> > 
> > > On Wednesday, January 11, 2012 4:11:10 pm Rob Clark wrote:
> > > > System: Dell 600sc
> > > > Currently running: 8.2-RELEASE
> > > > 
> > > > In attempting to update this system to 8-STABLE I did
> > > > what I usually do to update a system (see below).
> > > > make buildworld completes successfully, but make
> > > > buildkernel does not. I usually create a custom
> > > > kernel, but for this system I went with GENERIC as
> > > > is.  
> > > > 
> > > > The error message is: 
> > > > /usr/src/sys/kern/init_sysent.c:568: error: invalid
> > > > application of 'sizeof' to incomplete type 'struct
> > > > posix_fadvise_args' /usr/src/sys/kern/init_sysent.c:568:
> > > > error: 'posix_fadvise' undeclared here (not in a
> > > > function) *** Error code 1
> > > 
> > > This sounds like you have an incomplete tree that only got part of a 
> > > change 
> > > (specifically, /usr/src/sys/sys/sysproto.h seems stale).  Have you tried 
> > > a 
> > > different cvsup mirror?
> > > 
> > > -- 
> > > John Baldwin
> > 
> > Sorry for the late follow-up, just got the system
> > up and running yesterday.  It appears that choosing a
> > different mirror did the trick. 
> 
> Can you please disclose what cvsup mirror you were using?  This kind of
> problem may be affecting other people, so you may want to report it to
> freebsd-h...@freebsd.org to make the maintainer of the mirror aware.
> 
> Otherwise, ""corruption"" (for lack of better term) between what's in
> /var/db/sup and what's on your filesystem is something I've seen before,
> particularly when changing release tags in a supfile.
> 

> | Jeremy Chadwick j...@parodius.com |

Absolutely, the mirror initially used when I
received the error (see above) during "buildkernel"
was: cvsup17.FreeBSD.org

Using cvsup11.FreeBSD.org I had no issues.  Of course,
I am not saying that cvsup17 was at fault here, just
that buildkernel worked following a csup with cvsup11
(in my case anyway).

-- 
Rob Clark 


cc: freebsd-h...@freebsd.org
___
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: GENERIC make buildkernel error / fails - posix_fadvise

2012-01-14 Thread Jeremy Chadwick
On Sun, Jan 15, 2012 at 02:24:41AM -0500, Rob Clark wrote:
> On Thu, 12 Jan 2012 08:15:50 -0500
> John Baldwin  wrote:
> 
> > On Wednesday, January 11, 2012 4:11:10 pm Rob Clark wrote:
> > > System: Dell 600sc
> > > Currently running: 8.2-RELEASE
> > > 
> > > In attempting to update this system to 8-STABLE I did
> > > what I usually do to update a system (see below).
> > > make buildworld completes successfully, but make
> > > buildkernel does not. I usually create a custom
> > > kernel, but for this system I went with GENERIC as
> > > is.  
> > > 
> > > The error message is: 
> > > /usr/src/sys/kern/init_sysent.c:568: error: invalid
> > > application of 'sizeof' to incomplete type 'struct
> > > posix_fadvise_args' /usr/src/sys/kern/init_sysent.c:568:
> > > error: 'posix_fadvise' undeclared here (not in a
> > > function) *** Error code 1
> > 
> > This sounds like you have an incomplete tree that only got part of a change 
> > (specifically, /usr/src/sys/sys/sysproto.h seems stale).  Have you tried a 
> > different cvsup mirror?
> > 
> > -- 
> > John Baldwin
> 
> Sorry for the late follow-up, just got the system
> up and running yesterday.  It appears that choosing a
> different mirror did the trick. 

Can you please disclose what cvsup mirror you were using?  This kind of
problem may be affecting other people, so you may want to report it to
freebsd-h...@freebsd.org to make the maintainer of the mirror aware.

Otherwise, ""corruption"" (for lack of better term) between what's in
/var/db/sup and what's on your filesystem is something I've seen before,
particularly when changing release tags in a supfile.

-- 
| Jeremy Chadwick j...@parodius.com |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, US |
| Making life hard for others since 1977. PGP 4BD6C0CB |

___
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: GENERIC make buildkernel error / fails - posix_fadvise

2012-01-14 Thread Rob Clark
On Thu, 12 Jan 2012 08:15:50 -0500
John Baldwin  wrote:

> On Wednesday, January 11, 2012 4:11:10 pm Rob Clark wrote:
> > System: Dell 600sc
> > Currently running: 8.2-RELEASE
> > 
> > In attempting to update this system to 8-STABLE I did
> > what I usually do to update a system (see below).
> > make buildworld completes successfully, but make
> > buildkernel does not. I usually create a custom
> > kernel, but for this system I went with GENERIC as
> > is.  
> > 
> > The error message is: 
> > /usr/src/sys/kern/init_sysent.c:568: error: invalid
> > application of 'sizeof' to incomplete type 'struct
> > posix_fadvise_args' /usr/src/sys/kern/init_sysent.c:568:
> > error: 'posix_fadvise' undeclared here (not in a
> > function) *** Error code 1
> 
> This sounds like you have an incomplete tree that only got part of a change 
> (specifically, /usr/src/sys/sys/sysproto.h seems stale).  Have you tried a 
> different cvsup mirror?
> 
> -- 
> John Baldwin

Sorry for the late follow-up, just got the system
up and running yesterday.  It appears that choosing a
different mirror did the trick. 

Thanks for all the positive insight from everyone who
responded. I learned some valuable information, and
new ways of doing things along the way.

Have A Great Week!
Rob


-- 
Rob Clark 
___
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: GENERIC make buildkernel error / fails - posix_fadvise

2012-01-13 Thread Andre Goree

On Thu, 12 Jan 2012 21:37:27 -0600, Joe Ennis  wrote:


On Thu, 12 Jan 2012 19:11:54 -0800
Garrett Cooper  wrote:


On Thu, Jan 12, 2012 at 5:52 PM, Doug Barton 
wrote:
>
>>> chflags -R noschg /usr/obj/usr
>>> rm -rf /usr/obj/usr
>
> It's much faster to do:
>
> /bin/rm -rf ${obj}/* 2> /dev/null || /bin/chflags -R 0 ${obj}/* &&
> /bin/rm -rf ${obj}/*




Thanks of the tip!  Should this be run from inside /usr/src or does it  
matter?




+1. And it's faster yet when you can run parallel copies of rm on
different portions of the directory tree (e.g. xargs, find [..] -exec)
as rm is O(n).
Cheers,
-Garrett
___
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"


What I've been doing just before I do a make buildworld/buildkernel
is:

mdmfs -s2g md1 /usr/obj

on a clean /usr/obj . If I need to recompile before a boot, just umount
and recreate.

Provides a little performance boost too.

Regards,



That's a nifty little tip.  I may try that next time.

--
Andre Goree
an...@drenet.info
___
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: GENERIC make buildkernel error / fails - posix_fadvise

2012-01-12 Thread Doug Barton
On 01/12/2012 20:10, Garrett Cooper wrote:
> When I did
> stuff in parallel (have 8 regular cores, 8 SMT cores), the process
> took less than an hour to complete.

Sounds like you should get to work figuring out how to optimize rm to
take advantage of this. :)


Doug

-- 

You can observe a lot just by watching. -- Yogi Berra

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
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: GENERIC make buildkernel error / fails - posix_fadvise

2012-01-12 Thread Garrett Cooper
On Thu, Jan 12, 2012 at 7:23 PM, Stephen Montgomery-Smith
 wrote:
> On 01/12/2012 09:11 PM, Garrett Cooper wrote:
>
>> +1. And it's faster yet when you can run parallel copies of rm on
>> different portions of the directory tree (e.g. xargs, find [..] -exec)
>> as rm is O(n).
>
>
> I have always wondered about that!  I thought that the main bottleneck in
> "rm -r" might be deleting directories which are not in the disk cache, which
> then have to be copied from the disk.  Copying two different parts of the
> disk into cache - well it has to be done one at a time whether the jobs
> asking for the copy of the disk are going concurrently or consecutively.
>
> And perhaps two instances of "rm -r" acting on different parts of the hard
> drive will cause disk thrashing, so that they might even slow each other
> down.

Not really. The problem is limited by the fact that rm(1) needs to
dive into the kernel each time it does an unlink(1) syscall. Per Prof.
McKusick's teaching and the way things are designed from libc to disk
-- the process is artificially like: rm -> syscall -> top-half of the
kernel -> vfs -> filesystem (in my case ZFS) -> geom -> scsi layer ->
storage controller/disk driver. This is super expensive as n becomes
large as the path is long, so the best to amortize the operation is to
run more instances in parallel as there should be a relatively low
chance of there being lock contention (assuming you're not consuming
too many GIANT locks, you don't overprovision your system, etc). See
the loop in .../bin/rm/rm.c:rm_tree(char**) if you're curious where
things have issues.

> But this is all guess work on my part.
>
> If I am wrong, and "rm -r" does work faster when working in parallel on
> different parts,

Yes. Less modifications to directory entries -> less vfs locking
contention and less useless writing back to disk -> better.

> then why doesn't someone write the "rm" command to fork
> copies of itself that work on different parts of large trees?

Perhaps. The point is that my systems can do more work in parallel
with a larger number of rm's in order to improve throughput. I learned
this the hard way when I started deleting a prepopulated directory
with pjd's fstest: it took hours to prune directory entries the O(n)
way by a small fraction (<10% of 4 mil. or 40 mil. files). When I did
stuff in parallel (have 8 regular cores, 8 SMT cores), the process
took less than an hour to complete.

Thanks,
-Garrett
___
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: GENERIC make buildkernel error / fails - posix_fadvise

2012-01-12 Thread Joe Ennis
On Thu, 12 Jan 2012 19:11:54 -0800
Garrett Cooper  wrote:

> On Thu, Jan 12, 2012 at 5:52 PM, Doug Barton 
> wrote:
> >
> >>> chflags -R noschg /usr/obj/usr
> >>> rm -rf /usr/obj/usr
> >
> > It's much faster to do:
> >
> > /bin/rm -rf ${obj}/* 2> /dev/null || /bin/chflags -R 0 ${obj}/* &&
> > /bin/rm -rf ${obj}/*
> 
> +1. And it's faster yet when you can run parallel copies of rm on
> different portions of the directory tree (e.g. xargs, find [..] -exec)
> as rm is O(n).
> Cheers,
> -Garrett
> ___
> 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"

What I've been doing just before I do a make buildworld/buildkernel
is:

mdmfs -s2g md1 /usr/obj

on a clean /usr/obj . If I need to recompile before a boot, just umount
and recreate.

Provides a little performance boost too.

Regards,

--
joe
___
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: GENERIC make buildkernel error / fails - posix_fadvise

2012-01-12 Thread Stephen Montgomery-Smith

On 01/12/2012 09:11 PM, Garrett Cooper wrote:


+1. And it's faster yet when you can run parallel copies of rm on
different portions of the directory tree (e.g. xargs, find [..] -exec)
as rm is O(n).


I have always wondered about that!  I thought that the main bottleneck 
in "rm -r" might be deleting directories which are not in the disk 
cache, which then have to be copied from the disk.  Copying two 
different parts of the disk into cache - well it has to be done one at a 
time whether the jobs asking for the copy of the disk are going 
concurrently or consecutively.


And perhaps two instances of "rm -r" acting on different parts of the 
hard drive will cause disk thrashing, so that they might even slow each 
other down.


But this is all guess work on my part.

If I am wrong, and "rm -r" does work faster when working in parallel on 
different parts, then why doesn't someone write the "rm" command to fork 
copies of itself that work on different parts of large trees?


Stephen
___
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: GENERIC make buildkernel error / fails - posix_fadvise

2012-01-12 Thread Garrett Cooper
On Thu, Jan 12, 2012 at 5:52 PM, Doug Barton  wrote:
>
>>> chflags -R noschg /usr/obj/usr
>>> rm -rf /usr/obj/usr
>
> It's much faster to do:
>
> /bin/rm -rf ${obj}/* 2> /dev/null || /bin/chflags -R 0 ${obj}/* &&
> /bin/rm -rf ${obj}/*

+1. And it's faster yet when you can run parallel copies of rm on
different portions of the directory tree (e.g. xargs, find [..] -exec)
as rm is O(n).
Cheers,
-Garrett
___
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: GENERIC make buildkernel error / fails - posix_fadvise

2012-01-12 Thread Doug Barton

>> chflags -R noschg /usr/obj/usr
>> rm -rf /usr/obj/usr

It's much faster to do:

/bin/rm -rf ${obj}/* 2> /dev/null || /bin/chflags -R 0 ${obj}/* &&
/bin/rm -rf ${obj}/*




-- 

You can observe a lot just by watching. -- Yogi Berra

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
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: GENERIC make buildkernel error / fails - posix_fadvise

2012-01-12 Thread Rob Clark
On Thu, 12 Jan 2012 08:15:50 -0500
John Baldwin  wrote:

> On Wednesday, January 11, 2012 4:11:10 pm Rob Clark wrote:
> > System: Dell 600sc
> > Currently running: 8.2-RELEASE
> > 
> > In attempting to update this system to 8-STABLE I did
> > what I usually do to update a system (see below).
> > make buildworld completes successfully, but make
> > buildkernel does not. I usually create a custom
> > kernel, but for this system I went with GENERIC as
> > is.  
> > 
> > The error message is: 
> > /usr/src/sys/kern/init_sysent.c:568: error: invalid
> > application of 'sizeof' to incomplete type 'struct
> > posix_fadvise_args' /usr/src/sys/kern/init_sysent.c:568:
> > error: 'posix_fadvise' undeclared here (not in a
> > function) *** Error code 1
> 
> This sounds like you have an incomplete tree that only got part of a change 
> (specifically, /usr/src/sys/sys/sysproto.h seems stale).  Have you tried a 
> different cvsup mirror?
> 
> -- 
> John Baldwin

Good point. Didn't try that, I'll give it a go.

Rob

-- 
Rob Clark 
___
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: GENERIC make buildkernel error / fails - posix_fadvise

2012-01-12 Thread Rob Clark
On Wed, 11 Jan 2012 21:52:28 -0600
Andre Goree  wrote:

> On Wed, Jan 11, 2012 at 3:11 PM, Rob Clark  wrote:
> 
> > System: Dell 600sc
> > Currently running: 8.2-RELEASE
> >
> > In attempting to update this system to 8-STABLE I did
> > what I usually do to update a system (see below).
> > make buildworld completes successfully, but make
> > buildkernel does not. I usually create a custom
> > kernel, but for this system I went with GENERIC as
> > is.
> >
> > The error message is:
> > /usr/src/sys/kern/init_sysent.c:568: error: invalid
> > application of 'sizeof' to incomplete type 'struct
> > posix_fadvise_args' /usr/src/sys/kern/init_sysent.c:568:
> > error: 'posix_fadvise' undeclared here (not in a
> > function) *** Error code 1
> >
> > I found this pertaining to
> > posix_fadvise in /usr/src/UPDATING:
> > 20120106:
> > A new VOP_ADVISE() was added to support
> > posix_fadvise(2).  All filesystem modules must be
> > recompiled.
> >
> > Not sure what 'filesystem modules' is or referring to
> > here. Also, am I not already recompiling 'All
> > filesystem modules' during make buildworld?
> >
> > What I did (and usually do):
> > csup -L 2 /root/stable-supfile
> > rm -rf /etc.old cp -Rp /etc /etc.old
> > adjkerntz -i
> > cd /usr/obj
> > chflags -R noschg *
> > rm -rf *
> > cd /usr/src
> > /usr/bin/time -h make buildworld || exit
> >
> > build world finishes successfully.
> >
> > Then:
> > cd /usr/src
> > make buildkernel KERNCONF=GENERIC
> > make installkernel KERNCONF=GENERIC
> >
> > This fails with error:
> > /usr/src/sys/kern/init_sysent.c:568: error: invalid
> > application of 'sizeof' to incomplete type 'struct
> > posix_fadvise_args' /usr/src/sys/kern/init_sysent.c:568:
> > error: 'posix_fadvise' undeclared here (not in a
> > function) *** Error code 1
> >
> > Stop in /usr/obj/usr/src/sys/GENERIC.
> > *** Error code 1
> >
> > Stop in /usr/src.
> > *** Error code 1
> >
> > Stop in /usr/src.
> >
> > Following attempts:
> >
> > Attempt 2:
> > I tried using 'make buildkernel' (without
> > specifying KERNCONF) make buildkernel fails with
> > same error.
> >
> > Attempt 3:
> > Started from the beginning (same process as above)
> > with new csup (sources) -- make buildkernel still
> > failed with same error.
> >
> > Any help here would be greatly appreciated.
> > In way over my head here. I have all logs from all
> > attempts of the above if needed.
> >
> > Thanks,
> > Rob Clark
> > 
> > ___
> > 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"
> >
> 
> 
> Perhaps two 'make cleandir' inside /usr/src will help.
> 
> Run it just after removing everything within /usr/obj.
> 
> FWIW, I usually run this simple bash script before building world on my
> machines:
> 
> #!/bin/bash
> chflags -R noschg /usr/obj/usr
> rm -rf /usr/obj/usr
> cd /usr/src ; make cleandir ; make cleandir
> exit 0

Thanks Andre, I'll make note of that one.

Rob
-- 
Rob Clark 
___
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: GENERIC make buildkernel error / fails - posix_fadvise

2012-01-12 Thread John Baldwin
On Wednesday, January 11, 2012 4:11:10 pm Rob Clark wrote:
> System: Dell 600sc
> Currently running: 8.2-RELEASE
> 
> In attempting to update this system to 8-STABLE I did
> what I usually do to update a system (see below).
> make buildworld completes successfully, but make
> buildkernel does not. I usually create a custom
> kernel, but for this system I went with GENERIC as
> is.  
> 
> The error message is: 
> /usr/src/sys/kern/init_sysent.c:568: error: invalid
> application of 'sizeof' to incomplete type 'struct
> posix_fadvise_args' /usr/src/sys/kern/init_sysent.c:568:
> error: 'posix_fadvise' undeclared here (not in a
> function) *** Error code 1

This sounds like you have an incomplete tree that only got part of a change 
(specifically, /usr/src/sys/sys/sysproto.h seems stale).  Have you tried a 
different cvsup mirror?

-- 
John Baldwin
___
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: GENERIC make buildkernel error / fails - posix_fadvise

2012-01-11 Thread Andre Goree
On Wed, Jan 11, 2012 at 3:11 PM, Rob Clark  wrote:

> System: Dell 600sc
> Currently running: 8.2-RELEASE
>
> In attempting to update this system to 8-STABLE I did
> what I usually do to update a system (see below).
> make buildworld completes successfully, but make
> buildkernel does not. I usually create a custom
> kernel, but for this system I went with GENERIC as
> is.
>
> The error message is:
> /usr/src/sys/kern/init_sysent.c:568: error: invalid
> application of 'sizeof' to incomplete type 'struct
> posix_fadvise_args' /usr/src/sys/kern/init_sysent.c:568:
> error: 'posix_fadvise' undeclared here (not in a
> function) *** Error code 1
>
> I found this pertaining to
> posix_fadvise in /usr/src/UPDATING:
> 20120106:
> A new VOP_ADVISE() was added to support
> posix_fadvise(2).  All filesystem modules must be
> recompiled.
>
> Not sure what 'filesystem modules' is or referring to
> here. Also, am I not already recompiling 'All
> filesystem modules' during make buildworld?
>
> What I did (and usually do):
> csup -L 2 /root/stable-supfile
> rm -rf /etc.old cp -Rp /etc /etc.old
> adjkerntz -i
> cd /usr/obj
> chflags -R noschg *
> rm -rf *
> cd /usr/src
> /usr/bin/time -h make buildworld || exit
>
> build world finishes successfully.
>
> Then:
> cd /usr/src
> make buildkernel KERNCONF=GENERIC
> make installkernel KERNCONF=GENERIC
>
> This fails with error:
> /usr/src/sys/kern/init_sysent.c:568: error: invalid
> application of 'sizeof' to incomplete type 'struct
> posix_fadvise_args' /usr/src/sys/kern/init_sysent.c:568:
> error: 'posix_fadvise' undeclared here (not in a
> function) *** Error code 1
>
> Stop in /usr/obj/usr/src/sys/GENERIC.
> *** Error code 1
>
> Stop in /usr/src.
> *** Error code 1
>
> Stop in /usr/src.
>
> Following attempts:
>
> Attempt 2:
> I tried using 'make buildkernel' (without
> specifying KERNCONF) make buildkernel fails with
> same error.
>
> Attempt 3:
> Started from the beginning (same process as above)
> with new csup (sources) -- make buildkernel still
> failed with same error.
>
> Any help here would be greatly appreciated.
> In way over my head here. I have all logs from all
> attempts of the above if needed.
>
> Thanks,
> Rob Clark
> 
> ___
> 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"
>


Perhaps two 'make cleandir' inside /usr/src will help.

Run it just after removing everything within /usr/obj.

FWIW, I usually run this simple bash script before building world on my
machines:

#!/bin/bash
chflags -R noschg /usr/obj/usr
rm -rf /usr/obj/usr
cd /usr/src ; make cleandir ; make cleandir
exit 0
___
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"


GENERIC make buildkernel error / fails - posix_fadvise

2012-01-11 Thread Rob Clark
System: Dell 600sc
Currently running: 8.2-RELEASE

In attempting to update this system to 8-STABLE I did
what I usually do to update a system (see below).
make buildworld completes successfully, but make
buildkernel does not. I usually create a custom
kernel, but for this system I went with GENERIC as
is.  

The error message is: 
/usr/src/sys/kern/init_sysent.c:568: error: invalid
application of 'sizeof' to incomplete type 'struct
posix_fadvise_args' /usr/src/sys/kern/init_sysent.c:568:
error: 'posix_fadvise' undeclared here (not in a
function) *** Error code 1

I found this pertaining to
posix_fadvise in /usr/src/UPDATING: 
20120106:
A new VOP_ADVISE() was added to support
posix_fadvise(2).  All filesystem modules must be
recompiled.

Not sure what 'filesystem modules' is or referring to
here. Also, am I not already recompiling 'All
filesystem modules' during make buildworld?

What I did (and usually do):
csup -L 2 /root/stable-supfile 
rm -rf /etc.old cp -Rp /etc /etc.old 
adjkerntz -i
cd /usr/obj
chflags -R noschg *
rm -rf *
cd /usr/src
/usr/bin/time -h make buildworld || exit

build world finishes successfully.
 
Then:
cd /usr/src
make buildkernel KERNCONF=GENERIC
make installkernel KERNCONF=GENERIC

This fails with error:
/usr/src/sys/kern/init_sysent.c:568: error: invalid
application of 'sizeof' to incomplete type 'struct
posix_fadvise_args' /usr/src/sys/kern/init_sysent.c:568:
error: 'posix_fadvise' undeclared here (not in a
function) *** Error code 1

Stop in /usr/obj/usr/src/sys/GENERIC.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.

Following attempts:

Attempt 2:
I tried using 'make buildkernel' (without
specifying KERNCONF) make buildkernel fails with
same error.

Attempt 3:
Started from the beginning (same process as above)
with new csup (sources) -- make buildkernel still
failed with same error.

Any help here would be greatly appreciated.
In way over my head here. I have all logs from all
attempts of the above if needed.  

Thanks,
Rob Clark

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