rc6-9 fails to build on 32bit (linux 3.4.2, 3.4.4) due to Bad argument size for cmpxchg #814

Closed
chani opened this Issue Jul 9, 2012 · 8 comments

4 participants

@chani

All compiled with spl-rc9 (spl compiles fine) and on linux 3.4.2 (same happens for 3.4.4)

zfs-rc9

make[3]: Entering directory `/usr/src/linux-3.4.2'
  CC [M]  /usr/src/zfs-0.6.0-rc9/module/avl/../../module/avl/avl.o
  CC [M]  /usr/src/zfs-0.6.0-rc9/module/nvpair/../../module/nvpair/nvpair.o
  LD [M]  /usr/src/zfs-0.6.0-rc9/module/avl/zavl.o
  CC [M]  /usr/src/zfs-0.6.0-rc9/module/unicode/../../module/unicode/u8_textprep.o
  CC [M]  /usr/src/zfs-0.6.0-rc9/module/nvpair/../../module/nvpair/nvpair_alloc_spl.o
  CC [M]  /usr/src/zfs-0.6.0-rc9/module/nvpair/../../module/nvpair/nvpair_alloc_fixed.o
  LD [M]  /usr/src/zfs-0.6.0-rc9/module/nvpair/znvpair.o
  CC [M]  /usr/src/zfs-0.6.0-rc9/module/zcommon/../../module/zcommon/zfs_deleg.o
  CC [M]  /usr/src/zfs-0.6.0-rc9/module/unicode/../../module/unicode/uconv.o
  CC [M]  /usr/src/zfs-0.6.0-rc9/module/zcommon/../../module/zcommon/zfs_prop.o
  LD [M]  /usr/src/zfs-0.6.0-rc9/module/unicode/zunicode.o
  CC [M]  /usr/src/zfs-0.6.0-rc9/module/zfs/../../module/zfs/arc.o
  CC [M]  /usr/src/zfs-0.6.0-rc9/module/zcommon/../../module/zcommon/zprop_common.o
  CC [M]  /usr/src/zfs-0.6.0-rc9/module/zcommon/../../module/zcommon/zfs_namecheck.o
  CC [M]  /usr/src/zfs-0.6.0-rc9/module/zcommon/../../module/zcommon/zfs_comutil.o
/usr/src/zfs-0.6.0-rc9/module/zfs/../../module/zfs/arc.c: In function 'buf_hash_insert':
/usr/src/zfs-0.6.0-rc9/module/zfs/../../module/zfs/arc.c:791:80: warning: '__ret' may be used uninitialized in this function [-Wuninitialized]
/usr/src/zfs-0.6.0-rc9/module/zfs/../../module/zfs/arc.c:795:123: warning: '__ret' may be used uninitialized in this function [-Wuninitialized]
/usr/src/zfs-0.6.0-rc9/module/zfs/../../module/zfs/arc.c:791:1875: error: call to '__cmpxchg_wrong_size' declared with attribute error: Bad argument size for cmpxchg
/usr/src/zfs-0.6.0-rc9/module/zfs/../../module/zfs/arc.c:795:1983: error: call to '__cmpxchg_wrong_size' declared with attribute error: Bad argument size for cmpxchg
make[5]: *** [/usr/src/zfs-0.6.0-rc9/module/zfs/../../module/zfs/arc.o] Error 1
make[4]: *** [/usr/src/zfs-0.6.0-rc9/module/zfs] Error 2
make[4]: *** Waiting for unfinished jobs....
  CC [M]  /usr/src/zfs-0.6.0-rc9/module/zcommon/../../module/zcommon/zfs_fletcher.o
  CC [M]  /usr/src/zfs-0.6.0-rc9/module/zcommon/../../module/zcommon/zfs_uio.o
  CC [M]  /usr/src/zfs-0.6.0-rc9/module/zcommon/../../module/zcommon/zpool_prop.o
  LD [M]  /usr/src/zfs-0.6.0-rc9/module/zcommon/zcommon.o
make[3]: *** [_module_/usr/src/zfs-0.6.0-rc9/module] Error 2
make[3]: Leaving directory `/usr/src/linux-3.4.2'
make[2]: *** [modules] Error 2
make[2]: Leaving directory `/usr/src/zfs-0.6.0-rc9/module'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/zfs-0.6.0-rc9'
make: *** [all] Error 2

zfs-rc8

make[3]: Entering directory `/usr/src/linux-3.4.2'
  CC [M]  /usr/src/zfs-0.6.0-rc8/module/avl/../../module/avl/avl.o
  CC [M]  /usr/src/zfs-0.6.0-rc8/module/nvpair/../../module/nvpair/nvpair.o
  LD [M]  /usr/src/zfs-0.6.0-rc8/module/avl/zavl.o
  CC [M]  /usr/src/zfs-0.6.0-rc8/module/unicode/../../module/unicode/u8_textprep.o
  CC [M]  /usr/src/zfs-0.6.0-rc8/module/nvpair/../../module/nvpair/nvpair_alloc_spl.o
  CC [M]  /usr/src/zfs-0.6.0-rc8/module/nvpair/../../module/nvpair/nvpair_alloc_fixed.o
  LD [M]  /usr/src/zfs-0.6.0-rc8/module/nvpair/znvpair.o
  CC [M]  /usr/src/zfs-0.6.0-rc8/module/zcommon/../../module/zcommon/zfs_deleg.o
  CC [M]  /usr/src/zfs-0.6.0-rc8/module/unicode/../../module/unicode/uconv.o
  CC [M]  /usr/src/zfs-0.6.0-rc8/module/zcommon/../../module/zcommon/zfs_prop.o
  LD [M]  /usr/src/zfs-0.6.0-rc8/module/unicode/zunicode.o
  CC [M]  /usr/src/zfs-0.6.0-rc8/module/zfs/../../module/zfs/arc.o
  CC [M]  /usr/src/zfs-0.6.0-rc8/module/zcommon/../../module/zcommon/zprop_common.o
  CC [M]  /usr/src/zfs-0.6.0-rc8/module/zcommon/../../module/zcommon/zfs_namecheck.o
  CC [M]  /usr/src/zfs-0.6.0-rc8/module/zcommon/../../module/zcommon/zfs_comutil.o
/usr/src/zfs-0.6.0-rc8/module/zfs/../../module/zfs/arc.c: In function 'buf_hash_insert':
/usr/src/zfs-0.6.0-rc8/module/zfs/../../module/zfs/arc.c:788:80: warning: '__ret' may be used uninitialized in this function [-Wuninitialized]
/usr/src/zfs-0.6.0-rc8/module/zfs/../../module/zfs/arc.c:792:123: warning: '__ret' may be used uninitialized in this function [-Wuninitialized]
/usr/src/zfs-0.6.0-rc8/module/zfs/../../module/zfs/arc.c:788:1875: error: call to '__cmpxchg_wrong_size' declared with attribute error: Bad argument size for cmpxchg
/usr/src/zfs-0.6.0-rc8/module/zfs/../../module/zfs/arc.c:792:1983: error: call to '__cmpxchg_wrong_size' declared with attribute error: Bad argument size for cmpxchg
make[5]: *** [/usr/src/zfs-0.6.0-rc8/module/zfs/../../module/zfs/arc.o] Error 1
make[4]: *** [/usr/src/zfs-0.6.0-rc8/module/zfs] Error 2
make[4]: *** Waiting for unfinished jobs....
  CC [M]  /usr/src/zfs-0.6.0-rc8/module/zcommon/../../module/zcommon/zfs_fletcher.o
  CC [M]  /usr/src/zfs-0.6.0-rc8/module/zcommon/../../module/zcommon/zfs_uio.o
  CC [M]  /usr/src/zfs-0.6.0-rc8/module/zcommon/../../module/zcommon/zpool_prop.o
  LD [M]  /usr/src/zfs-0.6.0-rc8/module/zcommon/zcommon.o
make[3]: *** [_module_/usr/src/zfs-0.6.0-rc8/module] Error 2
make[3]: Leaving directory `/usr/src/linux-3.4.2'
make[2]: *** [modules] Error 2
make[2]: Leaving directory `/usr/src/zfs-0.6.0-rc8/module'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/zfs-0.6.0-rc8'
make: *** [all] Error 2

zfs-rc7

make[3]: Entering directory `/usr/src/linux-3.4.2'
  CC [M]  /usr/src/zfs-0.6.0-rc7/module/avl/../../module/avl/avl.o
  CC [M]  /usr/src/zfs-0.6.0-rc7/module/nvpair/../../module/nvpair/nvpair.o
  LD [M]  /usr/src/zfs-0.6.0-rc7/module/avl/zavl.o
  CC [M]  /usr/src/zfs-0.6.0-rc7/module/unicode/../../module/unicode/u8_textprep.o
  CC [M]  /usr/src/zfs-0.6.0-rc7/module/nvpair/../../module/nvpair/nvpair_alloc_spl.o
  CC [M]  /usr/src/zfs-0.6.0-rc7/module/nvpair/../../module/nvpair/nvpair_alloc_fixed.o
  LD [M]  /usr/src/zfs-0.6.0-rc7/module/nvpair/znvpair.o
  CC [M]  /usr/src/zfs-0.6.0-rc7/module/zcommon/../../module/zcommon/zfs_deleg.o
  CC [M]  /usr/src/zfs-0.6.0-rc7/module/unicode/../../module/unicode/uconv.o
  CC [M]  /usr/src/zfs-0.6.0-rc7/module/zcommon/../../module/zcommon/zfs_prop.o
  LD [M]  /usr/src/zfs-0.6.0-rc7/module/unicode/zunicode.o
  CC [M]  /usr/src/zfs-0.6.0-rc7/module/zfs/../../module/zfs/arc.o
  CC [M]  /usr/src/zfs-0.6.0-rc7/module/zcommon/../../module/zcommon/zprop_common.o
  CC [M]  /usr/src/zfs-0.6.0-rc7/module/zcommon/../../module/zcommon/zfs_namecheck.o
  CC [M]  /usr/src/zfs-0.6.0-rc7/module/zcommon/../../module/zcommon/zfs_comutil.o
/usr/src/zfs-0.6.0-rc7/module/zfs/../../module/zfs/arc.c: In function 'buf_hash_insert':
/usr/src/zfs-0.6.0-rc7/module/zfs/../../module/zfs/arc.c:788:80: warning: '__ret' may be used uninitialized in this function [-Wuninitialized]
/usr/src/zfs-0.6.0-rc7/module/zfs/../../module/zfs/arc.c:792:123: warning: '__ret' may be used uninitialized in this function [-Wuninitialized]
/usr/src/zfs-0.6.0-rc7/module/zfs/../../module/zfs/arc.c:788:1875: error: call to '__cmpxchg_wrong_size' declared with attribute error: Bad argument size for cmpxchg
/usr/src/zfs-0.6.0-rc7/module/zfs/../../module/zfs/arc.c:792:1983: error: call to '__cmpxchg_wrong_size' declared with attribute error: Bad argument size for cmpxchg
make[5]: *** [/usr/src/zfs-0.6.0-rc7/module/zfs/../../module/zfs/arc.o] Error 1
make[4]: *** [/usr/src/zfs-0.6.0-rc7/module/zfs] Error 2
make[4]: *** Waiting for unfinished jobs....
  CC [M]  /usr/src/zfs-0.6.0-rc7/module/zcommon/../../module/zcommon/zfs_fletcher.o
  CC [M]  /usr/src/zfs-0.6.0-rc7/module/zcommon/../../module/zcommon/zfs_uio.o
  CC [M]  /usr/src/zfs-0.6.0-rc7/module/zcommon/../../module/zcommon/zpool_prop.o
  LD [M]  /usr/src/zfs-0.6.0-rc7/module/zcommon/zcommon.o
make[3]: *** [_module_/usr/src/zfs-0.6.0-rc7/module] Error 2
make[3]: Leaving directory `/usr/src/linux-3.4.2'
make[2]: *** [modules] Error 2
make[2]: Leaving directory `/usr/src/zfs-0.6.0-rc7/module'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/zfs-0.6.0-rc7'
make: *** [all] Error 2

zfs-rc6

make[3]: Entering directory `/usr/src/linux-3.4.2'
  CC [M]  /usr/src/zfs-0.6.0-rc6/module/avl/../../module/avl/avl.o
  CC [M]  /usr/src/zfs-0.6.0-rc6/module/nvpair/../../module/nvpair/nvpair.o
  LD [M]  /usr/src/zfs-0.6.0-rc6/module/avl/zavl.o
  CC [M]  /usr/src/zfs-0.6.0-rc6/module/unicode/../../module/unicode/u8_textprep.o
  CC [M]  /usr/src/zfs-0.6.0-rc6/module/nvpair/../../module/nvpair/nvpair_alloc_spl.o
  CC [M]  /usr/src/zfs-0.6.0-rc6/module/nvpair/../../module/nvpair/nvpair_alloc_fixed.o
  LD [M]  /usr/src/zfs-0.6.0-rc6/module/nvpair/znvpair.o
  CC [M]  /usr/src/zfs-0.6.0-rc6/module/zcommon/../../module/zcommon/zfs_deleg.o
  CC [M]  /usr/src/zfs-0.6.0-rc6/module/zcommon/../../module/zcommon/zfs_prop.o
  CC [M]  /usr/src/zfs-0.6.0-rc6/module/unicode/../../module/unicode/uconv.o
  CC [M]  /usr/src/zfs-0.6.0-rc6/module/zcommon/../../module/zcommon/zprop_common.o
  LD [M]  /usr/src/zfs-0.6.0-rc6/module/unicode/zunicode.o
  CC [M]  /usr/src/zfs-0.6.0-rc6/module/zfs/../../module/zfs/arc.o
  CC [M]  /usr/src/zfs-0.6.0-rc6/module/zcommon/../../module/zcommon/zfs_namecheck.o
/usr/src/zfs-0.6.0-rc6/module/zfs/../../module/zfs/arc.c: In function 'buf_hash_insert':
/usr/src/zfs-0.6.0-rc6/module/zfs/../../module/zfs/arc.c:746:80: warning: '__ret' may be used uninitialized in this function [-Wuninitialized]
/usr/src/zfs-0.6.0-rc6/module/zfs/../../module/zfs/arc.c:750:123: warning: '__ret' may be used uninitialized in this function [-Wuninitialized]
/usr/src/zfs-0.6.0-rc6/module/zfs/../../module/zfs/arc.c:746:1875: error: call to '__cmpxchg_wrong_size' declared with attribute error: Bad argument size for cmpxchg
/usr/src/zfs-0.6.0-rc6/module/zfs/../../module/zfs/arc.c:750:1983: error: call to '__cmpxchg_wrong_size' declared with attribute error: Bad argument size for cmpxchg
make[5]: *** [/usr/src/zfs-0.6.0-rc6/module/zfs/../../module/zfs/arc.o] Error 1
make[4]: *** [/usr/src/zfs-0.6.0-rc6/module/zfs] Error 2
make[4]: *** Waiting for unfinished jobs....
  CC [M]  /usr/src/zfs-0.6.0-rc6/module/zcommon/../../module/zcommon/zfs_comutil.o
  CC [M]  /usr/src/zfs-0.6.0-rc6/module/zcommon/../../module/zcommon/zfs_fletcher.o
  CC [M]  /usr/src/zfs-0.6.0-rc6/module/zcommon/../../module/zcommon/zfs_uio.o
  CC [M]  /usr/src/zfs-0.6.0-rc6/module/zcommon/../../module/zcommon/zpool_prop.o
  LD [M]  /usr/src/zfs-0.6.0-rc6/module/zcommon/zcommon.o
make[3]: *** [_module_/usr/src/zfs-0.6.0-rc6/module] Error 2
make[3]: Leaving directory `/usr/src/linux-3.4.2'
make[2]: *** [modules] Error 2
make[2]: Leaving directory `/usr/src/zfs-0.6.0-rc6/module'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/zfs-0.6.0-rc6'
make: *** [all] Error 2
*uname* --------
Linux lunar 3.4.2 #1 SMP Mon Jul 9 21:16:30 CEST 2012 i686 i686 i386 GNU/Linux

configure

checking metadata... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /var/lib/lunar/compilers/ld
checking if the linker (/var/lib/lunar/compilers/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert i686-pc-linux-gnu file names to i686-pc-linux-gnu format... func_convert_file_noop
checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /var/lib/lunar/compilers/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... cpp
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/var/lib/lunar/compilers/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking dependency style of gcc... gcc3
checking zfs author... Sun Microsystems/Oracle, Lawrence Livermore National Laboratory
checking zfs license... CDDL
checking linux distribution... lunar
checking default package type... tgz
checking default init directory... /etc/init.d
checking default init script type... lunar
checking whether rpm is available... no
checking whether rpmbuild is available... no
checking whether dpkg is available... no
checking whether dpkg-buildpackage is available... no
checking whether alien is available... no
checking zfs config... all
checking for -Wno-unused-but-set-variable support... yes
checking kernel source directory... /usr/src/linux-3.4.2
checking kernel build directory... /usr/src/linux-3.4.2
checking kernel file name for module symbols... Module.symvers
checking spl source directory... /usr/src/spl-0.6.0-rc9
checking spl build directory... /usr/src/spl-0.6.0-rc9
checking spl source version... 0.6.0-rc9
checking spl file name for module symbols... Module.symvers
checking whether Linux was built with CONFIG_PREEMPT... no
checking whether Linux was built with CONFIG_DEBUG_LOCK_ALLOC... no
checking block device operation prototypes... struct block_device
checking whether kernel defines fmode_t... yes
checking whether kernel defines KOBJ_NAME_LEN... no
checking whether symbol blkdev_get_by_path is exported... yes
checking whether symbol open_bdev_exclusive is exported... no
checking whether invalidate_bdev() wants 1 arg... yes
checking whether bdev_logical_block_size() is available... yes
checking whether bio_empty_barrier() is defined... no
checking whether BIO_RW_FAILFAST is defined... no
checking whether BIO_RW_FAILFAST_* are defined... no
checking whether REQ_FAILFAST_MASK is defined... yes
checking whether bio_end_io_t wants 2 args... yes
checking whether BIO_RW_SYNC is defined... no
checking whether BIO_RW_SYNCIO is defined... no
checking whether REQ_SYNC is defined... yes
checking whether blk_end_request() is available... yes
checking whether blk_end_request() is GPL-only... no
checking whether blk_queue_flush() is available... yes
checking whether blk_queue_flush() is GPL-only... yes
checking whether blk_queue_max_hw_sectors() is available... yes
checking whether blk_queue_max_segments() is available... yes
checking whether blk_queue_physical_block_size() is available... yes
checking whether blk_queue_io_opt() is available... yes
checking whether blk_queue_nonrot() is available... yes
checking whether blk_queue_discard() is available... yes
checking whether blk_fetch_request() is available... yes
checking whether blk_requeue_request() is available... yes
checking whether blk_rq_bytes() is available... yes
checking whether blk_rq_bytes() is GPL-only... no
checking whether blk_rq_pos() is available... yes
checking whether blk_rq_sectors() is available... yes
checking whether get_disk_ro() is available... yes
checking whether rq_is_sync() is available... yes
checking whether rq_for_each_segment() is available... yes
checking whether super_block uses const struct xattr_hander... yes
checking whether xattr_handler->get() wants dentry... yes
checking whether xattr_handler->set() wants dentry... yes
checking whether sops->show_options() wants dentry... yes
checking whether fops->fsync() wants... range
checking whether sops->evict_inode() exists... yes
checking whether sops->nr_cached_objects() exists... yes
checking whether sops->free_cached_objects() exists... yes
checking whether fops->fallocate() exists... yes
checking whether iops->fallocate() exists... no
checking whether iops->create()/mkdir()/mknod() take umode_t... yes
checking whether dops->d_automount() exists... yes
checking whether symbol insert_inode_locked is exported... yes
checking whether symbol d_make_root is exported... yes
checking whether symbol d_obtain_alias is exported... yes
checking whether symbol check_disk_size_change is exported... yes
checking whether symbol truncate_setsize is exported... yes
checking whether security_inode_init_security wants 6 args... no
checking whether security_inode_init_security wants callback... yes
checking whether symbol mount_nodev is exported... yes
checking whether super_block has s_shrink... yes
checking whether super_block has s_bdi... yes
checking whether symbol bdi_setup_and_register is exported... yes
checking whether set_nlink() is available... yes
checking for target asm dir... asm-i386
checking for ioctl()... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for compress2 in -lz... yes
checking for uncompress in -lz... yes
checking for crc32 in -lz... yes
checking uuid/uuid.h usability... yes
checking uuid/uuid.h presence... yes
checking for uuid/uuid.h... yes
checking for uuid_generate in -luuid... yes
checking for uuid_is_null in -luuid... yes
checking for blkid_get_cache in -lblkid... yes
checking for blkid zfs support... no
checking selinux/selinux.h usability... no
checking selinux/selinux.h presence... no
checking for selinux/selinux.h... no
checking for -Wframe-larger-than= support... yes
checking whether pthread stack includes guard... no
checking whether debugging is enabled... no
checking whether dmu tx validation is enabled... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating dracut/Makefile
config.status: creating dracut/90zfs/Makefile
config.status: creating udev/Makefile
config.status: creating udev/rules.d/Makefile
config.status: creating etc/Makefile
config.status: creating etc/init.d/Makefile
config.status: creating etc/zfs/Makefile
config.status: creating man/Makefile
config.status: creating man/man5/Makefile
config.status: creating man/man8/Makefile
config.status: creating lib/Makefile
config.status: creating lib/libspl/Makefile
config.status: creating lib/libspl/asm-generic/Makefile
config.status: creating lib/libspl/asm-i386/Makefile
config.status: creating lib/libspl/asm-x86_64/Makefile
config.status: creating lib/libspl/include/Makefile
config.status: creating lib/libspl/include/ia32/Makefile
config.status: creating lib/libspl/include/ia32/sys/Makefile
config.status: creating lib/libspl/include/rpc/Makefile
config.status: creating lib/libspl/include/sys/Makefile
config.status: creating lib/libspl/include/sys/sysevent/Makefile
config.status: creating lib/libspl/include/sys/dktp/Makefile
config.status: creating lib/libspl/include/util/Makefile
config.status: creating lib/libavl/Makefile
config.status: creating lib/libefi/Makefile
config.status: creating lib/libnvpair/Makefile
config.status: creating lib/libunicode/Makefile
config.status: creating lib/libuutil/Makefile
config.status: creating lib/libzpool/Makefile
config.status: creating lib/libzfs/Makefile
config.status: creating lib/libshare/Makefile
config.status: creating cmd/Makefile
config.status: creating cmd/zdb/Makefile
config.status: creating cmd/zfs/Makefile
config.status: creating cmd/zinject/Makefile
config.status: creating cmd/zpool/Makefile
config.status: creating cmd/ztest/Makefile
config.status: creating cmd/zpios/Makefile
config.status: creating cmd/mount_zfs/Makefile
config.status: creating cmd/zpool_layout/Makefile
config.status: creating cmd/zvol_id/Makefile
config.status: creating cmd/zpool_id/Makefile
config.status: creating cmd/vdev_id/Makefile
config.status: creating module/Makefile
config.status: creating module/avl/Makefile
config.status: creating module/nvpair/Makefile
config.status: creating module/unicode/Makefile
config.status: creating module/zcommon/Makefile
config.status: creating module/zfs/Makefile
config.status: creating module/zpios/Makefile
config.status: creating include/Makefile
config.status: creating include/linux/Makefile
config.status: creating include/sys/Makefile
config.status: creating include/sys/fs/Makefile
config.status: creating include/sys/fm/Makefile
config.status: creating include/sys/fm/fs/Makefile
config.status: creating scripts/Makefile
config.status: creating scripts/zpios-profile/Makefile
config.status: creating scripts/zpios-test/Makefile
config.status: creating scripts/zpool-config/Makefile
config.status: creating scripts/zpool-layout/Makefile
config.status: creating scripts/common.sh
config.status: creating zfs.spec
config.status: creating zfs-modules.spec
config.status: creating PKGBUILD-zfs
config.status: creating PKGBUILD-zfs-modules
config.status: creating zfs-script-config.sh
config.status: creating zfs_config.h
config.status: executing depfiles commands
config.status: executing libtool commands
Maybe that error comes from SPL wrongly setup? In zfs' configure is nothing about cmpxchg, in the spl one i can see:
checking whether atomic types use spinlocks... no
checking whether kernel defines atomic64_t... yes
checking whether kernel defines atomic64_cmpxchg... no
checking whether kernel defines atomic64_xchg... yes

Should I provide the whole compile log of spl?

@behlendorf
ZFS on Linux member

Can you try the following, it should help although I suspect it won't resolve the entire issue.

diff --git a/module/zfs/arc.c b/module/zfs/arc.c
index 7aa23ca..bbdc5a1 100644
--- a/module/zfs/arc.c
+++ b/module/zfs/arc.c
@@ -767,7 +767,7 @@ buf_hash_insert(arc_buf_hdr_t *buf, kmutex_t **lockp)
        uint64_t idx = BUF_HASH_INDEX(buf->b_spa, &buf->b_dva, buf->b_birth);
        kmutex_t *hash_lock = BUF_HASH_LOCK(idx);
        arc_buf_hdr_t *fbuf;
-       uint32_t i;
+       uint64_t i;
 
        ASSERT(!HDR_IN_HASH_TABLE(buf));
        *lockp = hash_lock;

Alternately, building the spl with ./configure --enable-atomic-spinlocks should help.

@chani

Hey,

--enable-atomic-spinlocks solves the compilation issue; zfs compiles fine now. Thanks a lot. Should I still try the patch? Could you give me some description when atomic-spinlocks are needed and what that is?

@behlendorf
ZFS on Linux member

When the --enable-atomic-spinlocks option is enabled an alternate set of 64-bit atomic operators is used. They aren't quite as fast as the native kernel versions but they are exceptionally portable which is helpful for alternate architectures or in this case a 32-bit kernel. There appears to be an issue with the cmpxcng operator so this works around it until we can determine exactly what's wrong and fix it.

@ryao
ZFS on Linux member

For the record, this issue also affects 3.5.0.

@fsvm88

Shows up on 3.6.9 also

@ryao
ZFS on Linux member

This was reported in Gentoo's bug tracker:

https://bugs.gentoo.org/show_bug.cgi?id=450646

Would people who are suffering form this please post their kernel .config and build.log? It seems the only certain systems are affected, but I do not know why.

@fsvm88

I haven't got a build log unfortunately, this happened around the 17th of December, while I was trying to rebuild my liveCDs.This is the .config for the kernel that failed. It's a vanilla kernel except for the reiser4 patches. If you want an ebuild to test it you can fetch the 3.6.10 from my overlay at rsync://matrix.faskatech.net/neo2-overlay

http://pastebin.com/fE70cEgR

I will try to reproduce this bug after mid-february, when I'll have some more time.

[edit: the pasted .config has been renamed to 3.6.10, that's why it shows "3.6.8-reiser4". It has been used to build the 3.6.10 kernel that failed. I do remember well that disabling zfs-kmod emerge during the build produced no error output.]

@behlendorf behlendorf added a commit to zfsonlinux/spl that referenced this issue Feb 5, 2013
@behlendorf behlendorf Fix atomic64_* autoconf checks
The SPL_AC_ATOMIC_SPINLOCK, SPL_AC_TYPE_ATOMIC64_CMPXCHG, and
SPL_AC_TYPE_ATOMIC64_XCHG were all directly including the
'asm/atomic.h' header.  As of Linux 3.4 this header was removed
which results in a build failure.

The right thing to do is include 'linux/atomic.h' however we
can't safely do this because it doesn't exist in 2.6.26 kernels.
Therefore, we include 'linux/fs.h' which in turn includes the
correct atomic header regardless of the kernel version.

When these incorrect APIs are used in ZFS the following build
failure results.

  arc.c:791:80: warning: '__ret' may be used uninitialized
  in this function [-Wuninitialized]
  arc.c:791:1875: error: call to '__cmpxchg_wrong_size'
  declared with attribute error: Bad argument size for cmpxchg

Since this is all Linux 2.6.24 compatibility code there's
an argument to be made that it should be removed because
kernels this old are not supported.  However, because we're
so close to a release I'm going to leave it in place for now.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes zfsonlinux/zfs#814
Closes zfsonlinux/zfs#1254
dd3678f
@behlendorf
ZFS on Linux member
@behlendorf behlendorf closed this Feb 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment