Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 431880 - sys-fs/zfs-0.6.0_rc10 - Memory allocation issues
Summary: sys-fs/zfs-0.6.0_rc10 - Memory allocation issues
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Richard Yao (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-18 16:48 UTC by Reto Gantenbein (ganto)
Modified: 2012-09-30 16:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Kernel Configuration (config-3.5.2-gentoo-dom0,75.72 KB, text/plain)
2012-08-18 16:50 UTC, Reto Gantenbein (ganto)
Details
PCI devices/drivers (lspci,4.08 KB, text/plain)
2012-08-18 16:51 UTC, Reto Gantenbein (ganto)
Details
USB Devices (lsusb,36.27 KB, text/plain)
2012-08-18 16:55 UTC, Reto Gantenbein (ganto)
Details
Network Adapter Offload Settings (ethtool,958 bytes, text/plain)
2012-08-18 16:57 UTC, Reto Gantenbein (ganto)
Details
/proc/zoneinfo (zoneinfo,2.63 KB, text/plain)
2012-08-18 17:11 UTC, Reto Gantenbein (ganto)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Reto Gantenbein (ganto) 2012-08-18 16:48:07 UTC
Hi everybody

I'm using zfs-0.6.0_rc10 and receive some memory allocation errors (see below) when copying a larger number of files to a ZFS file system residing on a external USB hard drive. I'm running gentoo-sources-3.5.2 configured as a Xen dom0. The ZFS file system is mounted via zfs init script on the dom0 server.

kernel: z_wr_iss/0: page allocation failure: order:0, mode:0x1
20
kernel: Pid: 3020, comm: z_wr_iss/0 Tainted: P           O 3.5.2-gentoo-dom0 #1
kernel: Call Trace:
kernel: <IRQ>  [<ffffffff810b30ea>] warn_alloc_failed+0x108/0x11d
kernel: [<ffffffff8146d638>] ? nf_iterate+0x43/0x78
kernel: [<ffffffff8151b44e>] ? _raw_spin_unlock_irqrestore+0x14/0x16
kernel: [<ffffffff810b5d65>] __alloc_pages_nodemask+0x714/0x775
kernel: [<ffffffff81006faa>] ? xen_vcpuop_set_next_event+0x52/0x64
kernel: [<ffffffff8144817b>] netdev_alloc_frag+0x50/0xeb
kernel: [<ffffffff81449b45>] __netdev_alloc_skb+0x3f/0xbc
kernel: [<ffffffffa00721a5>] rtl8169_poll+0x25e/0x517 [r8169]
kernel: [<ffffffff81454129>] net_rx_action+0xa8/0x194
kernel: [<ffffffff8109ec38>] ? handle_irq_event+0x3e/0x52
kernel: [<ffffffff81051624>] __do_softirq+0x8b/0x11b
kernel: [<ffffffff812e15d7>] ? __xen_evtchn_do_upcall+0x1a6/0x1e3
kernel: [<ffffffff8151d19c>] call_softirq+0x1c/0x30
kernel: [<ffffffff8100c022>] do_softirq+0x41/0x7f
kernel: [<ffffffff81051874>] irq_exit+0x44/0x9c
kernel: [<ffffffff812e31a6>] xen_evtchn_do_upcall+0x2f/0x3c
kernel: [<ffffffff8151d1ee>] xen_do_hypervisor_callback+0x1e/0x30
kernel: <EOI>  [<ffffffff8100122a>] ? hypercall_page+0x22a/0x1000
kernel: [<ffffffff8100122a>] ? hypercall_page+0x22a/0x1000
kernel: [<ffffffff81006b99>] ? xen_force_evtchn_callback+0xd/0xf
kernel: [<ffffffff810071f2>] ? check_events+0x12/0x20
kernel: [<ffffffff810071df>] ? xen_restore_fl_direct_reloc+0x4/0x4
kernel: [<ffffffff810b546b>] ? get_page_from_freelist+0x452/0x4a4
kernel: [<ffffffff810b5a2a>] ? __alloc_pages_nodemask+0x3d9/0x775
kernel: [<ffffffff810d4a7e>] ? __vmalloc_node_range+0x11e/0x1ba
kernel: [<ffffffffa0238eaa>] ? spl_kmem_reap+0x81/0xa5 [spl]
kernel: [<ffffffff810d4b4a>] ? __vmalloc_node+0x30/0x32
kernel: [<ffffffffa0238eaa>] ? spl_kmem_reap+0x81/0xa5 [spl]
kernel: [<ffffffff810d4cb5>] ? __vmalloc+0x1b/0x1d
kernel: [<ffffffffa0238eaa>] ? spl_kmem_reap+0x81/0xa5 [spl]
kernel: [<ffffffffa0239106>] ? spl_kmem_cache_alloc+0x238/0x961 [spl]
kernel: [<ffffffffa033f14c>] ? zio_nowait+0x116/0xc9c [zfs]
kernel: [<ffffffffa030f87c>] ? vdev_config_sync+0x801/0xa0d [zfs]
kernel: [<ffffffffa033d527>] ? zio_buf_alloc+0x1d/0x541 [zfs]
kernel: [<ffffffffa033d725>] ? zio_buf_alloc+0x21b/0x541 [zfs]
kernel: [<ffffffffa033d090>] ? zio_execute+0xf3/0x27b [zfs]
kernel: [<ffffffff8151b44e>] ? _raw_spin_unlock_irqrestore+0x14/0x16
kernel: [<ffffffff8106a1e6>] ? __wake_up+0x3f/0x48
kernel: [<ffffffffa023ba8f>] ? __taskq_dispatch+0x71a/0x96c [spl]
kernel: [<ffffffff8106de7f>] ? try_to_wake_up+0x24b/0x24b
kernel: [<ffffffffa023b7c7>] ? __taskq_dispatch+0x452/0x96c [spl]
kernel: [<ffffffff81063600>] ? kthread+0x84/0x8c
kernel: [<ffffffff8151d0a4>] ? kernel_thread_helper+0x4/0x10
kernel: [<ffffffff8151b7b8>] ? retint_restore_args+0x5/0x6
kernel: [<ffffffff8151d0a0>] ? gs_change+0x13/0x13
kernel: Mem-Info:
kernel: DMA per-cpu:
kernel: CPU    0: hi:    0, btch:   1 usd:   0
kernel: CPU    1: hi:    0, btch:   1 usd:   0
kernel: CPU    2: hi:    0, btch:   1 usd:   0
kernel: CPU    3: hi:    0, btch:   1 usd:   0
kernel: DMA32 per-cpu:
kernel: CPU    0: hi:  186, btch:  31 usd: 158
kernel: CPU    1: hi:  186, btch:  31 usd: 139
kernel: CPU    2: hi:  186, btch:  31 usd:  55
kernel: CPU    3: hi:  186, btch:  31 usd:  71
kernel: active_anon:8970 inactive_anon:9066 isolated_anon:0
kernel: active_file:3709 inactive_file:3690 isolated_file:0
kernel: unevictable:2 dirty:0 writeback:0 unstable:0
kernel: free:27 slab_reclaimable:2618 slab_unreclaimable:8605
kernel: mapped:3398 shmem:57 pagetables:1088 bounce:0
kernel: DMA free:44kB min:248kB low:308kB high:372kB active_anon:0kB inactive_anon:224kB active_file:4kB inactive_file:4kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15680kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:12kB slab_unreclaimable:180kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
kernel: lowmem_reserve[]: 0 994 994 994
kernel: DMA32 free:64kB min:16132kB low:20164kB high:24196kB active_anon:35880kB inactive_anon:36040kB active_file:14832kB inactive_file:14756kB unevictable:8kB isolated(anon):0kB isolated(file):0kB present:1018464kB mlocked:8kB dirty:0kB writeback:0kB mapped:13592kB shmem:228kB slab_reclaimable:10460kB slab_unreclaimable:34240kB kernel_stack:2720kB pagetables:4352kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:26 all_unreclaimable? no
kernel: lowmem_reserve[]: 0 0 0 0
kernel: DMA: 1*4kB 1*8kB 0*16kB 1*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 44kB
kernel: DMA32: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 0kB
kernel: 7495 total pagecache pages
kernel: 24 pages in swap cache
kernel: Swap cache stats: add 515, delete 491, find 3/5
kernel: Free swap  = 4192312kB
kernel: Total swap = 4194300kB
kernel: 262226 pages RAM
kernel: 40891 pages reserved
kernel: 15330 pages shared
kernel: 209924 pages non-shared

I read on the ZFS users list [1] that Gentoo already applied some patches related to memory allocation that are not yet integrated into upstream, that's why I open this bug here. However I'm not sure if it is a ZFS bug at all.

I also checked the solutions mentioned in [2], since these traces look somehow similar. However LRO is not enabled on my network card and disabling GRO didn't help either.

Could someone help me to identify what's the problem here?

Kind regards,
Reto

Reproducible: Always




Portage 2.1.11.9 (default/linux/amd64/10.0/server, gcc-4.5.3, glibc-2.15-r2, 3.5.2-gentoo-dom0 x86_64)
=================================================================
System uname: Linux-3.5.2-gentoo-dom0-x86_64-AMD_Athlon-tm-_II_X4_615e_Processor-with-gentoo-2.1
Timestamp of tree: Sat, 18 Aug 2012 09:30:01 +0000
app-shells/bash:          4.2_p20
dev-lang/python:          2.7.3-r2
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.5 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo linuxmonk xen
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=amdfam10 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=amdfam10 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/linuxmonk /var/lib/layman/xen"
SYNC="rsync://centos6/gentoo-portage"
USE="3dnow 3dnowext X aio alsa amd64 api apng ass bash-completion bzip2 caps cdda cddb cli consolekit cracklib crypt curl cxx dbus device-mapper dga dri dvd dvdnav ermt faac fdt flac gif gnutls gudev hvm hwdb iconv ioemu ipv6 jpeg libkms libnl macvtap minizip mmx mmxext modules mp3 mp4 mpeg mudflap multilib ncurses network nptl ogg opengl optimization pam pcre pic plymouth png policykit pppd pulseaudio pygrub qemu readline rtc rtmp rtsp screen session sndfile spice sse sse2 ssl svg symlink threads truetype udev unicode urandom vdisk vdpau vim-syntax vorbis x264 xattr xen xml xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="caps lvm syslog plymouth xen" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="radeon vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Reto Gantenbein (ganto) 2012-08-18 16:50:06 UTC
Created attachment 321634 [details]
Kernel Configuration
Comment 2 Reto Gantenbein (ganto) 2012-08-18 16:51:35 UTC
Created attachment 321636 [details]
PCI devices/drivers
Comment 3 Reto Gantenbein (ganto) 2012-08-18 16:55:57 UTC
Created attachment 321638 [details]
USB Devices
Comment 4 Reto Gantenbein (ganto) 2012-08-18 16:57:08 UTC
Created attachment 321640 [details]
Network Adapter Offload Settings
Comment 6 Reto Gantenbein (ganto) 2012-08-18 17:09:54 UTC
After a little bit more of searching I found that the following report is quite identical: https://groups.google.com/a/zfsonlinux.org/forum/?fromgroups#!topic/zfs-discuss/jOejyNSD1Ck

However, there is no vm.zone_reclaim_mode key in the kernel 3.5.2 sysfs.
Comment 7 Reto Gantenbein (ganto) 2012-08-18 17:11:15 UTC
Created attachment 321644 [details]
/proc/zoneinfo
Comment 8 Reto Gantenbein (ganto) 2012-09-30 16:53:25 UTC
After allocating more memory to the Xen dom0 2GB instead of 1GB ZFS seems to run more stable. Also updated to rc11 and can't find any kernel traces anymore in the log.

I think this bug can be closed then...