[Bug 226096] [zfs] zpool add attach internal error: out of memory, pool with many vdevs, since r324255

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Feb 21 20:48:44 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226096

            Bug ID: 226096
           Summary: [zfs] zpool add attach internal error: out of memory,
                    pool with many vdevs, since r324255
           Product: Base System
           Version: 11.1-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: ea at uoga.net

Created attachment 190872
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=190872&action=edit
init errno = 0; in zpool_read_labelr()

On FreeBSD stable 11.1, any rev. since r324255, zpool add (or attach) may fail
with "internal error: out of memory". I can reproduce this on a pool with many
real physical disks, after adding 22-23 3x mirror vdevs, next one fails. Can
not reproduce this on virtual configuration with simulated file based vdevs. On
a running pool with many mirror vdevs a "zpool detach" followed by "zpool
attach" would also fail with the same error.

I traced it back to svn commit r324255, on systems before this commit zpool add
attach works without failure, same hardware, I used beadm to boot different
revisions.

A quick fix that seems to work is to do "zpool create temporarypool daXX &&
zpool destroy temporarypool" then try again, i.e. "zpool attach bigtank daYY
daXX".

Attached here small patch that initializes "errno = 0" in zpool_read_label(),
tested on latest r329700.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list