[releng_8 tinderbox] failure on amd64/amd64

Andriy Gapon avg at FreeBSD.org
Sat May 19 11:33:33 UTC 2012


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 at 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


More information about the freebsd-stable mailing list