Project

General

Profile

Bug #3097

zfs set doesn't check length of user property

Added by Yuri Pankov almost 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
2012-08-19
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

Despite the zfs(1M) saying the following in 'User Properties' section:

Property  values are limited to 1024 characters.

zfs set doesn't actually check the length of user property value. There are 3 possible scenarios:

length < 8191 - property is successfully set.

length == 8191:

panic[cpu3]/thread=ffffff00110b9c40:
assertion failed: num_integers * integer_size < (8<<10) (0x2000 < 0x2000), file: ../../common/fs/zfs/zap_leaf.c, line: 227

ffffff00110b95f0 genunix:assfail3+b0 ()
ffffff00110b96a0 zfs:zap_leaf_array_create+24a ()
ffffff00110b9740 zfs:zap_entry_create+26e ()
ffffff00110b9800 zfs:fzap_update+111 ()
ffffff00110b9890 zfs:zap_update+279 ()
ffffff00110b9950 zfs:dsl_prop_set_sync+32b ()
ffffff00110b99f0 zfs:dsl_props_set_sync+11f ()
ffffff00110b9a40 zfs:dsl_sync_task_group_sync+100 ()
ffffff00110b9ac0 zfs:dsl_pool_sync+221 ()
ffffff00110b9b80 zfs:spa_sync+3a2 ()
ffffff00110b9c20 zfs:txg_sync_thread+2c4 ()
ffffff00110b9c30 unix:thread_start+8 ()

length >= 8192:

# zfs set com.example:test='...........' dataset
internal error: Arg list too long
Abort (core dumped)

08044018 libc_hwcap1.so.1`_lwp_kill+0x15(1, 6, 8044038, fee682ae)
08044038 libc_hwcap1.so.1`raise+0x22(6, 0, 8044088, fee3fb9a)
08044088 libc_hwcap1.so.1`abort+0xf2(80440b8, fedc1000, 80440b8, 81330f0, 81334f0, 400)
080440b8 libzfs.so.1`zfs_verror+0xd5(81330c8, 816, fedaf01c, 80440ec)
080440d8 libzfs.so.1`zfs_standard_error_fmt+0x200(81330c8, 7, fedaf01c, 80456f0, 8044118)
080440f8 libzfs.so.1`zfs_standard_error+0x28(81330c8, 7, 80456f0, fed1ed7c)
08044118 libzfs.so.1`zfs_setprop_error+0x1d2(81330c8, ffffffff, 7, 80456f0)
08045b08 libzfs.so.1`zfs_prop_set+0x3c9(8149bc8, 8045d64, 8045d73, fea64104)
08045b28 set_callback+0x16(8149bc8, 8045bf8, 7, 660, 8126f10, 0)
08045bb8 zfs_for_each+0x19f(1, 8045c78, 0, 7, 0, 0)
08045c08 zfs_do_set+0x15c(3, 8045c70, 80769a0, 801, 8045c40, fefbed04)
08045c48 main+0x212(4, 8045c6c, 8045c80, 8060bf0, 0, 0)
08045c60 _start+0x83(4, 8045d5c, 8045d60, 8045d64, 8047d74, 0)


Related issues

Has duplicate illumos gate - Bug #3343: maximum zfs string property length bogusly checkedClosed2012-11-05

Actions

Also available in: Atom PDF