From owner-freebsd-stable@FreeBSD.ORG Sat May 19 11:33:33 2012 Return-Path: Delivered-To: stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5F1D106566B; Sat, 19 May 2012 11:33:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id DF3308FC0C; Sat, 19 May 2012 11:33:32 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA02380; Sat, 19 May 2012 14:33:31 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1SVhuc-000BOh-PV; Sat, 19 May 2012 14:33:30 +0300 Message-ID: <4FB78509.6070408@FreeBSD.org> Date: Sat, 19 May 2012 14:33:29 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120503 Thunderbird/12.0.1 MIME-Version: 1.0 To: stable@FreeBSD.org, Sean Bruno References: <201205191010.q4JAATFS009057@freebsd-legacy2.sentex.ca> In-Reply-To: <201205191010.q4JAATFS009057@freebsd-legacy2.sentex.ca> X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Cc: Subject: Re: [releng_8 tinderbox] failure on amd64/amd64 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 11:33:33 -0000 on 19/05/2012 13:10 FreeBSD Tinderbox said the following: > TB --- 2012-05-19 09:24:53 - tinderbox 2.9 running on freebsd-legacy2.sentex.ca > TB --- 2012-05-19 09:24:53 - FreeBSD freebsd-legacy2.sentex.ca 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 > TB --- 2012-05-19 09:24:53 - starting RELENG_8 tinderbox run for amd64/amd64 > TB --- 2012-05-19 09:24:53 - cleaning the object tree > TB --- 2012-05-19 09:25:01 - cvsupping the source tree > TB --- 2012-05-19 09:25:01 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/RELENG_8/amd64/amd64/supfile > TB --- 2012-05-19 09:25:14 - building world > TB --- 2012-05-19 09:25:14 - CROSS_BUILD_TESTING=YES > TB --- 2012-05-19 09:25:14 - MAKEOBJDIRPREFIX=/obj > TB --- 2012-05-19 09:25:14 - PATH=/usr/bin:/usr/sbin:/bin:/sbin > TB --- 2012-05-19 09:25:14 - SRCCONF=/dev/null > TB --- 2012-05-19 09:25:14 - TARGET=amd64 > TB --- 2012-05-19 09:25:14 - TARGET_ARCH=amd64 > TB --- 2012-05-19 09:25:14 - TZ=UTC > TB --- 2012-05-19 09:25:14 - __MAKE_CONF=/dev/null > TB --- 2012-05-19 09:25:14 - cd /src > TB --- 2012-05-19 09:25:14 - /usr/bin/make -B buildworld >>>> World build started on Sat May 19 09:25:14 UTC 2012 >>>> Rebuilding the temporary build tree >>>> stage 1.1: legacy release compatibility shims >>>> stage 1.2: bootstrap tools >>>> stage 2.1: cleaning up the object tree >>>> stage 2.2: rebuilding the object tree >>>> stage 2.3: build tools >>>> stage 3: cross tools >>>> stage 4.1: building includes >>>> stage 4.2: building libraries >>>> stage 4.3: make dependencies >>>> stage 4.4: building everything > [...] > gzip -cn /src/usr.sbin/mergemaster/mergemaster.8 > mergemaster.8.gz > ===> usr.sbin/mfiutil (all) > cc -O2 -pipe -fno-builtin-strftime -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -c /src/usr.sbin/mfiutil/mfiutil.c > cc -O2 -pipe -fno-builtin-strftime -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -c /src/usr.sbin/mfiutil/mfi_cmd.c > cc -O2 -pipe -fno-builtin-strftime -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -c /src/usr.sbin/mfiutil/mfi_config.c > cc1: warnings being treated as errors > /src/usr.sbin/mfiutil/mfi_config.c: In function 'parse_array': > /src/usr.sbin/mfiutil/mfi_config.c:307: warning: comparison is always true due to limited range of data type > *** Error code 1 > The failing code: #define MFI_ARRAY_SIZE 288 #define MAX_DRIVES_PER_ARRAY \ ((MFI_ARRAY_SIZE - sizeof(struct mfi_array)) / 8) At present sizeof(struct mfi_array) is exactly 288. I guess that this is the offending commit: r235625 MFC of head thunderbolt support for mfi(4). It seems that this particular snippet is related to the problem: +#define MFI_MAX_ROW_SIZE 32 struct mfi_array { uint64_t size; uint8_t num_drives; @@ -1106,7 +1292,7 @@ uint8_t pd; uint8_t slot; } encl; - } pd[0]; + } pd[MFI_MAX_ROW_SIZE]; } __packed; I think that with this change MAX_DRIVES_PER_ARRAY should become MFI_MAX_ROW_SIZE? Index: mfi_config.c =================================================================== --- mfi_config.c (revision 235646) +++ mfi_config.c (working copy) @@ -212,8 +212,7 @@ MFI_COMMAND(top, clear, clear_config); #define MFI_ARRAY_SIZE 288 -#define MAX_DRIVES_PER_ARRAY \ - ((MFI_ARRAY_SIZE - sizeof(struct mfi_array)) / 8) +#define MAX_DRIVES_PER_ARRAY MFI_MAX_ROW_SIZE #define RT_RAID0 0 #define RT_RAID1 1 @@ -305,7 +304,7 @@ /* Validate the number of drives for this array. */ if (count >= MAX_DRIVES_PER_ARRAY) { - warnx("Too many drives for a single array: max is %zu", + warnx("Too many drives for a single array: max is %u", MAX_DRIVES_PER_ARRAY); return (EINVAL); } -- Andriy Gapon