nanobsd build failure 'WITHOUT_CASPER=YES' r259661 and earlier

2013-12-20 Thread Stefan Hegnauer
When using 'WITHOUT_CAPSICUM=YES', 'WITHOUT_CASPER=YES' my nanobsd builds in
a Virtualbox VM (i386, march=geode, GENERIC without debug+Witness et. al.)
fail buildworld for any revision from at least r259518-r259661; like so
(this example is r259661):

 

 ...

=== lib/clang/libllvmsupport (obj,depend,all,install)

/usr/obj/nanobsd.sstream//usr/src/tmp/usr/src/lib/clang/libllvmsupport
created for /usr/src/lib/clang/libllvmsupport

rm -f .depend

mkdep -f .depend -a
-I/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/include
-I/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/tools/clang/includ
e -I/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support -I.
-I/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/../../lib/clang/in
clude -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS
-D__STDC_CONSTANT_MACROS
-DLLVM_DEFAULT_TARGET_TRIPLE=\i386-unknown-freebsd11.0\
-DLLVM_HOST_TRIPLE=\i386-unknown-freebsd11.0\ -DDEFAULT_SYSROOT=\\
-DNDEBUG -I/usr/obj/nanobsd.sstream//usr/src/tmp/legacy/usr/include
-std=gnu99
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/ConvertU
TF.c
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/regcomp.
c
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/regerror
.c
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/regexec.
c
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/regfree.
c
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/regstrlc
py.c

mkdep -f .depend -a
-I/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/include
-I/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/tools/clang/includ
e -I/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support -I.
-I/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/../../lib/clang/in
clude -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS
-D__STDC_CONSTANT_MACROS
-DLLVM_DEFAULT_TARGET_TRIPLE=\i386-unknown-freebsd11.0\
-DLLVM_HOST_TRIPLE=\i386-unknown-freebsd11.0\ -DDEFAULT_SYSROOT=\\
-DNDEBUG -I/usr/obj/nanobsd.sstream//usr/src/tmp/legacy/usr/include
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/APFloat.
cpp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/APInt.cp
p
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/APSInt.c
pp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/Allocato
r.cpp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/Atomic.c
pp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/BlockFre
quency.cpp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/BranchPr
obability.cpp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/CommandL
ine.cpp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/Constant
Range.cpp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/ConvertU
TFWrapper.cpp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/CrashRec
overyContext.cpp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/DAGDelta
Algorithm.cpp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/Debug.cp
p
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/DeltaAlg
orithm.cpp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/Dwarf.cp
p
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/DynamicL
ibrary.cpp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/Errno.cp
p
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/ErrorHan
dling.cpp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/FileOutp
utBuffer.cpp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/FoldingS
et.cpp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/Formatte
dStream.cpp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/GraphWri
ter.cpp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/Hashing.
cpp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/Host.cpp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/IncludeF
ile.cpp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/IntEqCla
sses.cpp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/Interval
Map.cpp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/Intrusiv
eRefCntPtr.cpp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/IsInf.cp
p
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/IsNAN.cp
p
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/Locale.c
pp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/LockFile
Manager.cpp
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/ManagedS
tatic.cpp

PR bin/185052 filed (was: RE: nanobsd build failure 'WITHOUT_CASPER=YES' r259661 and earlier)

2013-12-20 Thread Stefan Hegnauer
Hi there, 

thanks for your support. PR 185052 is filed and should be visible soon -
please let me know if I can help in any way (more info, testing, whatever).

Thanks again
Stefan

 From: adrian.ch...@gmail.com [mailto:adrian.ch...@gmail.com] On Behalf
 Of Adrian Chadd
 Sent: Friday, December 20, 2013 9:52 PM
 To: Stefan Hegnauer
 Cc: freebsd-current
 Subject: Re: nanobsd build failure 'WITHOUT_CASPER=YES' r259661 and
 earlier
 
 Hi,
 
 Please file a PR and then ask the developer (pjd@) very nicely to take
 a look at it.
 
 Thanks,
 
 
 -adrian
 
 
 On 20 December 2013 12:45, Stefan Hegnauer stefan.hegna...@gmx.ch
 wrote:
  When using 'WITHOUT_CAPSICUM=YES', 'WITHOUT_CASPER=YES' my nanobsd
 builds in
  a Virtualbox VM (i386, march=geode, GENERIC without debug+Witness et.
 al.)
  fail buildworld for any revision from at least r259518-r259661; like
 so
  (this example is r259661):
 
 
 
   ...
 
  === lib/clang/libllvmsupport (obj,depend,all,install)
 
 
 /usr/obj/nanobsd.sstream//usr/src/tmp/usr/src/lib/clang/libllvmsupport
  created for /usr/src/lib/clang/libllvmsupport
 


snip - see PR for details ...


 
  make: stopped in /usr/src
 
 
 
  Note that this is with PMAKE=-j1, i.e. single threaded build (same
 happens
  with standard PMAKE=-j3 but slightly less intuitive to see where it
 fails)
 
 
 
  Removing WITHOUT_CASPER=YES in the build instructions cures the
 problem (!),
  however I fail to see why I should include it for an embedded device
  (pcengines.ch Alix boards, several different versions).
 
  Also, with the error reported above I have the impression it is not
 exactly
  intuitive that you have to include CASPER (and not CAPSICUM) to
 eliminate
  the failure?
 
  Any pointers/hints/solutions?
 
 
 
  Sorry for the rant  thanks
 
  Stefan
 


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


nanobsd / dd problem?

2013-12-08 Thread Stefan Hegnauer
Hi,

 

I am using freebsd-current (FreeBSD BUILDMASTER 11.0-CURRENT FreeBSD
11.0-CURRENT #0 r259095: Sun Dec  8 10:20:40 CET 2013
root@BUILDMASTER:/usr/obj/usr/src/sys/ASUS  i386) in a VirtualBox as a build
machine for nanobsd images to be used on pc-engines.ch alix boards. The only
difference to GENERIC is the inclusion of 'march=geode' and disabling of
most debugging switches (malloc, Witness etc). Worked like a charm in the
past.

 

Since late summer - sorry, no exact date / svn revision - nanobsd.sh fails
at the last stage when building the disk image, e.g. with

...

00:00:25 ### log: /usr/obj/nanobsd.alixpf//_.di

#

 

Looking a bit closer it seems that dd(1) returns with an I/O error whenever
the input is a file created with mdconfig(8):

# dd if=/dev/zero of=somebackingfile bs=1k count=5k

# mdconfig -f somebackingfile -u md0

# newfs -U /dev/md0

# dd if=/dev/md0 of=/dev/null

dd: /dev/md0: Input/output error

10241+0 records in

10241+0 records out

5243392 bytes transferred in 3.240345 secs (1618159 bytes/sec)

 

The outputfile in nanobsd.sh seems to be error-free.

Anyone else seen similar behaviour? How to proceed/fix it?

 

Thanks

Stefan

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


RE: nanobsd / dd problem?

2013-12-08 Thread Stefan Hegnauer
On Monday, December 09, 2013 at 5:43 AM Konstantin Belousov wrote:


 On Sun, Dec 08, 2013 at 06:31:36PM +0100, Stefan Hegnauer wrote:
  Hi,
 
 
 
  I am using freebsd-current (FreeBSD BUILDMASTER 11.0-CURRENT FreeBSD
  11.0-CURRENT #0 r259095: Sun Dec  8 10:20:40 CET 2013
  root@BUILDMASTER:/usr/obj/usr/src/sys/ASUS  i386) in a VirtualBox as
 a build
  machine for nanobsd images to be used on pc-engines.ch alix boards.
 The only
  difference to GENERIC is the inclusion of 'march=geode' and disabling
 of
  most debugging switches (malloc, Witness etc). Worked like a charm in
 the
  past.
 
 
 
  Since late summer - sorry, no exact date / svn revision - nanobsd.sh
 fails
  at the last stage when building the disk image, e.g. with
 
  ...
 
  00:00:25 ### log: /usr/obj/nanobsd.alixpf//_.di
 
  #
 
 
 
  Looking a bit closer it seems that dd(1) returns with an I/O error
 whenever
  the input is a file created with mdconfig(8):
 
  # dd if=/dev/zero of=somebackingfile bs=1k count=5k
 
  # mdconfig -f somebackingfile -u md0
 
  # newfs -U /dev/md0
 
  # dd if=/dev/md0 of=/dev/null
 
  dd: /dev/md0: Input/output error
 
  10241+0 records in
 
  10241+0 records out
 
  5243392 bytes transferred in 3.240345 secs (1618159 bytes/sec)
 
 
 
  The outputfile in nanobsd.sh seems to be error-free.
 It should be one block larger than the right size.
 \
 
  Anyone else seen similar behaviour? How to proceed/fix it?
 
 
 The following patch should clear the error.
 
 The issue is that kern_physio() incorrectly detects EOF due to
 incorrect
 calculation of bio bio_resid after the bio_length was clipped by the
 'excess' code in g_io_check(). Both bio_length and bio_resid appear
 to be 0 in the pre-last dd transfer, which starts exactly and the
 mediasize, and kern_physio() thinks that it transferred one more block
 than was transferred.
 
 I _suspect_ that it was caused by 'excess' code moving in r256880,
 but I am really not in the right condition to analyze it.  If somebody
 could try the same dd experiment to confirm or deny my suspicion, it
 would be useful.
 
 The patch below should be a right thing to do anyway.
 
 diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
 index c23a74b..b7c4d60 100644
 --- a/sys/kern/vfs_bio.c
 +++ b/sys/kern/vfs_bio.c
 @@ -3679,7 +3679,6 @@ bufdonebio(struct bio *bip)
 
   bp = bip-bio_caller2;
   bp-b_resid = bp-b_bcount - bip-bio_completed;
 - bp-b_resid = bip-bio_resid;   /* XXX: remove */
   bp-b_ioflags = bip-bio_flags;
   bp-b_error = bip-bio_error;
   if (bp-b_error)

Works for me - please commit!
Thanks a lot!

-Stefan

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