mirror_zfs/cmd/zpool
Matthew Ahrens d66aab7c08
Assertion failure when logging large output of channel program
The output of ZFS channel programs is logged on-disk in the zpool
history, and printed by `zpool history -i`.  Channel programs can use
10MB of memory by default, and up to 100MB by using the `zfs program -m`
flag.  Therefore their output can be up to some fraction of 100MB.

In addition to being somewhat wasteful of the limited space reserved for
the pool history (which for large pools is 1GB), in extreme cases this
can result in a failure of `ASSERT(length <= DMU_MAX_ACCESS);` in
`dmu_buf_hold_array_by_dnode()`.

This commit limits the output size that will be logged to 1MB.  Larger
outputs will not be logged, instead a entry will be logged indicating
the size of the omitted output.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
Closes #11194
2020-11-14 10:17:16 -08:00
..
os Remove dead code 2020-06-18 12:21:18 -07:00
zpool.d Style fixes 2020-06-27 17:38:55 -07:00
.gitignore Add .gitignore files to exclude build products 2010-01-08 11:35:17 -08:00
Makefile.am Use abs_top_builddir when referencing libraries 2020-07-10 14:26:32 -07:00
zpool_iter.c Remove refences to blacklist/whitelist 2020-06-16 11:41:45 -07:00
zpool_main.c Assertion failure when logging large output of channel program 2020-11-14 10:17:16 -08:00
zpool_util.c OpenZFS restructuring - zpool 2019-09-30 12:16:06 -07:00
zpool_util.h Remove refences to blacklist/whitelist 2020-06-16 11:41:45 -07:00
zpool_vdev.c Distributed Spare (dRAID) Feature 2020-11-13 13:51:51 -08:00