[head tinderbox] failure on ia64/ia64

2014-07-05 Thread FreeBSD Tinderbox
TB --- 2014-07-05 17:09:16 - tinderbox 2.22 running on freebsd-current.sentex.ca
TB --- 2014-07-05 17:09:16 - FreeBSD freebsd-current.sentex.ca 9.2-STABLE 
FreeBSD 9.2-STABLE #0 r263721: Tue Mar 25 09:27:39 EDT 2014 
d...@freebsd-current.sentex.ca:/usr/obj/usr/src/sys/GENERIC  amd64
TB --- 2014-07-05 17:09:16 - starting HEAD tinderbox run for ia64/ia64
TB --- 2014-07-05 17:09:16 - cleaning the object tree
TB --- 2014-07-05 17:09:16 - /usr/local/bin/svn stat --no-ignore /src
TB --- 2014-07-05 17:09:44 - At svn revision 268286
TB --- 2014-07-05 17:09:45 - building world
TB --- 2014-07-05 17:09:45 - CROSS_BUILD_TESTING=YES
TB --- 2014-07-05 17:09:45 - MAKEOBJDIRPREFIX=/obj
TB --- 2014-07-05 17:09:45 - MAKESYSPATH=/src/share/mk
TB --- 2014-07-05 17:09:45 - PATH=/usr/bin:/usr/sbin:/bin:/sbin
TB --- 2014-07-05 17:09:45 - SRCCONF=/dev/null
TB --- 2014-07-05 17:09:45 - TARGET=ia64
TB --- 2014-07-05 17:09:45 - TARGET_ARCH=ia64
TB --- 2014-07-05 17:09:45 - TZ=UTC
TB --- 2014-07-05 17:09:45 - __MAKE_CONF=/dev/null
TB --- 2014-07-05 17:09:45 - cd /src
TB --- 2014-07-05 17:09:45 - /usr/bin/make -B buildworld
>>> Building an up-to-date bmake(1)
[...]
cc -O2 -pipe  -DNO_PWD_OVERRIDE -I/src/usr.bin/bmake  -DBMAKE_PATH_MAX=1024 
-DUSE_META -DMAKE_NATIVE -DHAVE_CONFIG_H -DHAVE_CONFIG_H  -DBMAKE_PATH_MAX=1024 
-DUSE_META -DMAKE_NATIVE -DHAVE_CONFIG_H 
-D_PATH_DEFSYSPATH=\".../share/mk:/usr/share/mk\" -I. -I/src/contrib/bmake  
-DMAKE_NATIVE  -std=gnu99 -fstack-protector -Wsystem-headers -Wall 
-Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign-c 
/src/contrib/bmake/lst.lib/lstFindFrom.c
cc -O2 -pipe  -DNO_PWD_OVERRIDE -I/src/usr.bin/bmake  -DBMAKE_PATH_MAX=1024 
-DUSE_META -DMAKE_NATIVE -DHAVE_CONFIG_H -DHAVE_CONFIG_H  -DBMAKE_PATH_MAX=1024 
-DUSE_META -DMAKE_NATIVE -DHAVE_CONFIG_H 
-D_PATH_DEFSYSPATH=\".../share/mk:/usr/share/mk\" -I. -I/src/contrib/bmake  
-DMAKE_NATIVE  -std=gnu99 -fstack-protector -Wsystem-headers -Wall 
-Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign-c 
/src/contrib/bmake/lst.lib/lstFirst.c
cc -O2 -pipe  -DNO_PWD_OVERRIDE -I/src/usr.bin/bmake  -DBMAKE_PATH_MAX=1024 
-DUSE_META -DMAKE_NATIVE -DHAVE_CONFIG_H -DHAVE_CONFIG_H  -DBMAKE_PATH_MAX=1024 
-DUSE_META -DMAKE_NATIVE -DHAVE_CONFIG_H 
-D_PATH_DEFSYSPATH=\".../share/mk:/usr/share/mk\" -I. -I/src/contrib/bmake  
-DMAKE_NATIVE  -std=gnu99 -fstack-protector -Wsystem-headers -Wall 
-Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign-c 
/src/contrib/bmake/lst.lib/lstForEach.c
cc -O2 -pipe  -DNO_PWD_OVERRIDE -I/src/usr.bin/bmake  -DBMAKE_PATH_MAX=1024 
-DUSE_META -DMAKE_NATIVE -DHAVE_CONFIG_H -DHAVE_CONFIG_H  -DBMAKE_PATH_MAX=1024 
-DUSE_META -DMAKE_NATIVE -DHAVE_CONFIG_H 
-D_PATH_DEFSYSPATH=\".../share/mk:/usr/share/mk\" -I. -I/src/contrib/bmake  
-DMAKE_NATIVE  -std=gnu99 -fstack-protector -Wsystem-headers -Wall 
-Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign-c 
/src/contrib/bmake/lst.lib/lstForEachFrom.c
cc -O2 -pipe  -DNO_PWD_OVERRIDE -I/src/usr.bin/bmake  -DBMAKE_PATH_MAX=1024 
-DUSE_META -DMAKE_NATIVE -DHAVE_CONFIG_H -DHAVE_CONFIG_H  -DBMAKE_PATH_MAX=1024 
-DUSE_META -DMAKE_NATIVE -DHAVE_CONFIG_H 
-D_PATH_DEFSYSPATH=\".../share/mk:/usr/share/mk\" -I. -I/src/contrib/bmake  
-DMAKE_NATIVE  -std=gnu99 -fstack-protector -Wsystem-headers -Wall 
-Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign-c 
/src/contrib/bmake/lst.lib/lstInit.c
cc -O2 -pipe  -DNO_PWD_OVERRIDE -I/src/usr.bin/bmake  -DBMAKE_PATH_MAX=1024 
-DUSE_META -DMAKE_NATIVE -DHAVE_CONFIG_H -DHAVE_CONFIG_H  -DBMAKE_PATH_MAX=1024 
-DUSE_META -DMAKE_NATIVE -DHAVE_CONFIG_H 
-D_PATH_DEFSYSPATH=\".../share/mk:/usr/share/mk\" -I. -I/src/contrib/bmake  
-DMAKE_NATIVE  -std=gnu99 -fstack-protector -Wsystem-headers -Wall 
-Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign-c 
/src/contrib/bmake/lst.lib/lstInsert.c
cc -O2 -pipe  -DNO_PWD_OVERRIDE -I/src/usr.bin/bmake  -DBMAKE_PATH_MAX=1024 
-DUSE_META -DMAKE_NATIVE -DHAVE_CONFIG_H -DHAVE_CONFIG_H  -DBMAKE_PATH_MAX=1024 
-DUSE_META -DMAKE_NATIVE -DHAVE_CONFIG_H 
-D_PATH_DEFSYSPATH=\".../share/mk:/usr/share/mk\" -I. -I/src/contrib/bmake  
-DMAKE_NATIVE  -std=gnu99 -fstack-protector -Wsystem-headers -Wall 
-Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign-c 
/src/contrib/bmake/lst.lib/lstIsAtEnd.c
cc -O2 -pipe  -DNO_PWD_OVERRIDE -I/src/usr.bin/bmake  -DBMAKE_PATH_MAX=1024 
-DUSE_META -DMAKE_NATIVE -DHAVE_CONFIG_H -DHAVE_CONFIG_H  -DBMAKE_PA

Re: [HEADS-UP] Problem with clang in 9-stable [was: r268244 (stable/9) seems to break "sysctl hw.ncpu"]

2014-07-05 Thread David Chisnall
On 5 Jul 2014, at 14:07, Dimitry Andric  wrote:

> Interestingly, -Wno-uninitialized has been in bsd.sys.mk since r76861,
> and the accompanying comment ("XXX Delete -Wuninitialized by default for
> now -- the compiler doesn't always get it right") has never been
> changed. :-)
> 
> It is probably time to re-enable that warning after 13 years, at least.

It probably only wants enabling for clang.  GCC (at least, GCC 4.2.1) performs 
this analysis based on analyses run by the optimisers and so the warnings are 
dependent on optimisation level.

David

___
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: [HEADS-UP] Problem with clang in 9-stable [was: r268244 (stable/9) seems to break "sysctl hw.ncpu"]

2014-07-05 Thread Dimitry Andric
On 05 Jul 2014, at 14:49, David Chisnall  wrote:
> On 4 Jul 2014, at 19:18, David Wolfskill  wrote:
> 
>> clang -O2 -pipe  -std=gnu99 -Qunused-arguments  -fstack-protector 
>> -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter 
>> -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized 
>> -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int 
>> -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value 
>> -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion  -o 
>> sysctl sysctl.o 
> 
> This compile line is turning off a lot of warnings.  In particular, 
> -Wno-uninitialized and -Wno-parentheses-equality are likely to hide warnings 
> that refer to real errors.

Interestingly, -Wno-uninitialized has been in bsd.sys.mk since r76861,
and the accompanying comment ("XXX Delete -Wuninitialized by default for
now -- the compiler doesn't always get it right") has never been
changed. :-)

It is probably time to re-enable that warning after 13 years, at least.

I'm not so sure about -Wno-parentheses-equality, because that might give
quite a few false positives, especially in old, contributed code.

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [HEADS-UP] Problem with clang in 9-stable [was: r268244 (stable/9) seems to break "sysctl hw.ncpu"]

2014-07-05 Thread David Wolfskill
On Sat, Jul 05, 2014 at 01:49:44PM +0100, David Chisnall wrote:
> On 4 Jul 2014, at 19:18, David Wolfskill  wrote:
> 
> > clang -O2 -pipe  -std=gnu99 -Qunused-arguments  -fstack-protector 
> > -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter 
> > -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized 
> > -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int 
> > -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value 
> > -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion  -o 
> > sysctl sysctl.o 
> 
> This compile line is turning off a lot of warnings.  In particular, 
> -Wno-uninitialized and -Wno-parentheses-equality are likely to hide warnings 
> that refer to real errors.  It sounds like this case was one of them - if 
> these warnings were on then we'd have got a build failure rather than an 
> executable that depended on undefined behaviour.
> 

So I checked src/sbin/sysctl/Makefile first; it's fairly "vanilla":

#   @(#)Makefile8.1 (Berkeley) 6/6/93
# $FreeBSD: stable/9/sbin/sysctl/Makefile 203917 2010-02-15 14:08:06Z
uqs $

PROG=   sysctl
WARNS?= 3
MAN=sysctl.8

.include 

And the -Wno-uninitialized (at least) comes from bsd.sys.mk:

.if ${WARNS} >= 2 && ${WARNS} <= 4
# XXX Delete -Wuninitialized by default for now -- the compiler doesn't
# XXX always get it right.
CWARNFLAGS+=-Wno-uninitialized
.endif # WARNS >=2 && WARNS <= 4

A bit later, we see the origin of -Wno-parentheses-equality:

# Clang has more warnings enabled by default, and when using -Wall, so if WARNS
# is set to low values, these have to be disabled explicitly.
.if ${COMPILER_TYPE} == "clang" && !defined(EARLY_BUILD)
.if ${WARNS} <= 6
CWARNFLAGS+=-Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable
.endif # WARNS <= 6
.if ${WARNS} <= 3
CWARNFLAGS+=-Wno-tautological-compare -Wno-unused-value\
-Wno-parentheses-equality -Wno-unused-function 
-Wno-enum-conversion
.endif # WARNS <= 3
.if ${WARNS} <= 2
CWARNFLAGS+=-Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter
.endif # WARNS <= 2
.if ${WARNS} <= 1
CWARNFLAGS+=-Wno-parentheses
.endif # WARNS <= 1
.if defined(NO_WARRAY_BOUNDS)
CWARNFLAGS+=-Wno-array-bounds
.endif # NO_WARRAY_BOUNDS
.endif # CLANG


I don't know that there's likely to be a huge amount of interest
in addressing the issue for stable/9, but stable/10 looks similar,
and while I see some differences in head, the code in head's
bsd.sys.mk may well be functionally equivalent.

I'm happy to help test if someone wants to put together patches to
(at least) reduce the extent to which we have executables depending
on undefined behavior.

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
Taliban: Evil cowards with guns afraid of truth from a 14-year old girl.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.


pgpclOWC9pp0z.pgp
Description: PGP signature


Re: 10.0-RELEASE BTX halted on DELL R900

2014-07-05 Thread Dimitry Andric
On 05 Jul 2014, at 08:09, Arrigo Marchiori  wrote:
> 
> On Fri, Jul 04, 2014 at 03:37:27PM +0800, wsk wrote:
>> lists
>> I met a BTX halted problem while upgrade Freebsd 9.0-RC3 to 
>> 10.0-Release via freebsd-update.
>> and please check the link below:
>> http://sw.gddsn.org.cn/jopens/test/btx.jpg
>> 
>> BTW: I can booted 10.0-R from DVD-ROM as expected but got same error 
>> message with flash-driver.
> 
> I don't remember if that error message means ``division by zero''.

It certainly looks a lot like it.  The code at cs:eip from the OP's
screenshot disassembles to:

   36217:   f7 35 bc d6 03 00   divl   0x3d6bc
   3621d:   85 ff   test   %edi,%edi
   3621f:   74 05   je 0x36226
   36221:   89 1f   mov%ebx,(%edi)
   36223:   89 4f 04mov%ecx,0x4(%edi)
   36226:   89 c2   mov%eax,%edx
   36228:   e9 c2 00 00 00  jmp0x362ef
   3622d:   66 c7 45 ea 00 00   movw   $0x0,-0x16(%ebp)
   36233:   89 c8   mov%ecx,%eax

This is a piece of code from /usr/src/lib/libstand/qdivrem.c, which is
used to do 64-bit divides.

It would be nice if you could try out this loader binary, which has a
few additional checks for zero sector counts or sizes:

http://www.andric.com/freebsd/loader.edd
SHA256 (loader.edd) = 
89f99500adb3a8feaa84336ce625975bcfdc0f886514ab02de4992859a671aa9

However, this might still mis-detect your disk sizes, obviously.


> Just in case, you could try the patch attached to this bug:
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=176748
> 
> The patch was compiled for 9-STABLE; if it does not apply to the 10.0
> sources, then drop me a line so I can adapt it.

I tried this patch on a few FreeBSD VMs, and each of them stopped being
able to mount the root filesystem because of it.  I don't really know
what the explanation is...

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: keyboard break to debugger broken?

2014-07-05 Thread Daniel Braniss

On Jul 5, 2014, at 1:33 PM, John-Mark Gurney  wrote:

> Peter Jeremy wrote this message on Fri, Jul 04, 2014 at 21:27 +1000:
>> On 2014-Jul-04 02:28:48 -0700, John-Mark Gurney  wrote:
>>> So, I recently tried to break into the debugger w/ the various key
>>> sequences that I know about, and none of them worked... I've tried
>>> CTRL-ESC, ALT-ESC, CTRL-ALT-ESC, CTRL-PRTSCR, ALT-PRTSCR and
>>> CTRL-ALT-PRTSCR, and many other different ones...   I've verified that
>>> I can sysctl debug.kdb.enter=1 to enter the debugger, and the
>>> CTRL-ALT-PAUSE works to suspend the machine, and CTRL-ALT-DEL works
>>> to reboot...
>>> 
>>> Does anyone know if this works?
>> 
>> It works for me on 10.0.  Do you have debug.kdb.break_to_debugger=1
>> and hw.syscons.kbd_debug=1 (if you're using syscons)?
> 
> Turns out I didn't... and you didn't need to...  emaste helped me
> the other night discover this..  Apparently rwatson changed this and
> the docs never got updated...  I saw BREAK_TO_DEBUGGER, bug it was
> documented as being *serial* only, not syscons...
> 
> I've updated NOTES and added an entry for defaults/loader.conf, but
> more docs need to be updated that BREAK_TO_DEBUGGER or the tunable
> or sysctl needs to be set before if works..
> 

I don’t know about 10/11 but 9.3 (and probably late 9.2) introduced console_port
which silently overrides the hint.uart.n.flags=0x10 to set which serial port is
the ‘console’, in my case I have several platforms (mainly sunfire’s from sun) 
that only
have uart1 available.
somehow, i have the feeling that getting the serial console (needed to run 
serial-over-lab) to
work is getting more in the region of magic than technology.
please, some of us really need the serial console to work so that we can rescue 
servers when
all else fails.

thanks,
danny


> -- 
>  John-Mark Gurney Voice: +1 415 225 5579
> 
> "All that I will do, has been done, All that I have, has not."
> ___
> 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"

___
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: keyboard break to debugger broken?

2014-07-05 Thread John-Mark Gurney
Peter Jeremy wrote this message on Fri, Jul 04, 2014 at 21:27 +1000:
> On 2014-Jul-04 02:28:48 -0700, John-Mark Gurney  wrote:
> >So, I recently tried to break into the debugger w/ the various key
> >sequences that I know about, and none of them worked... I've tried
> >CTRL-ESC, ALT-ESC, CTRL-ALT-ESC, CTRL-PRTSCR, ALT-PRTSCR and
> >CTRL-ALT-PRTSCR, and many other different ones...   I've verified that
> >I can sysctl debug.kdb.enter=1 to enter the debugger, and the
> >CTRL-ALT-PAUSE works to suspend the machine, and CTRL-ALT-DEL works
> >to reboot...
> >
> >Does anyone know if this works?
> 
> It works for me on 10.0.  Do you have debug.kdb.break_to_debugger=1
> and hw.syscons.kbd_debug=1 (if you're using syscons)?

Turns out I didn't... and you didn't need to...  emaste helped me
the other night discover this..  Apparently rwatson changed this and
the docs never got updated...  I saw BREAK_TO_DEBUGGER, bug it was
documented as being *serial* only, not syscons...

I've updated NOTES and added an entry for defaults/loader.conf, but
more docs need to be updated that BREAK_TO_DEBUGGER or the tunable
or sysctl needs to be set before if works..

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 "All that I will do, has been done, All that I have, has not."
___
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"