* * * READ ME * * * * * * Veritas File System 5.0.1RP3P7 * * * * * * P-patch * * * Patch Date: 2012-10-19 This document provides the following information: * PATCH NAME * PACKAGES AFFECTED BY THE PATCH * BASE PRODUCT VERSIONS FOR THE PATCH * OPERATING SYSTEMS SUPPORTED BY THE PATCH * INCIDENTS FIXED BY THE PATCH * INSTALLATION PRE-REQUISITES * INSTALLING THE PATCH * REMOVING THE PATCH PATCH NAME ---------- Veritas File System 5.0.1RP3P7 P-patch PACKAGES AFFECTED BY THE PATCH ------------------------------ VRTSvxfs VRTSvxfs BASE PRODUCT VERSIONS FOR THE PATCH ----------------------------------- * Veritas File System 5.0.1 OPERATING SYSTEMS SUPPORTED BY THE PATCH ---------------------------------------- HP-UX 11i v3 (11.31) INCIDENTS FIXED BY THE PATCH ---------------------------- This patch fixes the following Symantec incidents: Patch ID: PHKL_43260, PHCO_43261 * 1935624 (Tracking ID: 1903977) SYMPTOM: On a Cluster File System (CFS) the write operation may fail and the system panics with the following stack trace: vx_active_common_flush+0x74() vx_rwlock+0x14() DESCRIPTION: When a check is done to verify if the VX_DLSYNCFREE flag is set inside the function vx_getblk_clust(), there is no lock to protect the check. As a result, there could be a race condition leading to inconsistent data, this causes the system to panic. RESOLUTION: The code is modified to synchronize the VX_DLSYNCFREE flag updates using the VX_FSQ_LOCK. * 1935635 (Tracking ID: 1742707) SYMPTOM: Mounting a Cluster File System (CFS) fails with the following usage message: UX:vxfs fsck_logv: INFO: V-3-20896: Usage: fsck [-V] [-F vxfs] [-mnNyY] [-o fu'll, nolog, mounted, p] special [...] DESCRIPTION: The "switchout fsck" command needs to be invoked for CFS with two separate options: "-o" and "mounted". However, the "switchout fsck" command gets invoked with the "-o mounted" option. As a result, the error occurs. RESOLUTION: The code is modified so that the "switchout fsck" command gets invoked with two different options: "-o" and "mounted", instead of being invoked as the "-o mounted" option. * 1954685 (Tracking ID: 1934537) SYMPTOM: The reverse-name-lookup operation on an inode may panic the machine with the following stack trace: vx_free vx_traverse_tree+0x4a0 vx_dir_lookup+0x1e4 vx_rev_namelookup+0x294 vx_aioctl_common+0xac4 vx_aioctl+0x12c vx_ioctl+0xe0 DESCRIPTION: During the lookup operation if the memory allocation fails, the user still goes ahead and adds it to the used memory, and later tries to free that memory. This results in the panic. RESOLUTION: The code is modified to update the usage counters correctly, and skip updating the count during the error condition. An additional check is added to free only the non-null buffers. * 2798208 (Tracking ID: 2767579) SYMPTOM: The system hangs during a lookup operation with the following stack trace: vx_dnlc_pathname_realloc+0x80 () vx_dnlc_getpathname+0xcf0 () audit_get_pathname_from_dnlc+0x370 () audit_dnlc_path_name+0x70 ftruncate+0x480 () syscall+0x590 () DESCRIPTION: The system hangs because of an infinite loop that gets triggered when an inode with the negative DNLC entry is encountered, during a reverse name DNLC lookup. RESOLUTION: The code is modified to add an avoidance fix to prevent the infinite loop to occur. * 2822988 (Tracking ID: 2822984) SYMPTOM: When the extendfs(1m) command extends the file system that is greater than 2TB the extendfs(1m) command fails and the following error message is displayed: "UX:vxfs fsck: ERROR: V-3-25315: could not seek to block offset" DESCRIPTION: This is a typecasting problem. When the extendfs(1m) command tries to extend the file system, the bs_bseek() function is invoked. The bs_bseek() function's return type is a 32 bit integer value. This value gets negative for offsets greater than 2TB and results in failure. RESOLUTION: The code is modified to resolve the typecasting problem. * 2852520 (Tracking ID: 2850738) SYMPTOM: The system may hang with the following stack trace during the low memory condition: swtch_to_thread(inlined) slpq_swtch_core+0x520 real_sleep(inlined) sleep+0x400 mrg_reserve_swapmem(inlined) $cold_steal_swap+0x460 $cold_kalloc_nolgpg+0x4b0 kalloc_internal(inlined) $cold_kmem_arena_refill+0x650 kmem_arena_varalloc+0x280 vx_alloc(inlined)vx_worklist_enqueue+0x40 vx_buffer_kmcache_callback+0x160 kmem_gc_arena(inlined) foreach_arena_ingroup+0x840 kmem_garbage_collect_group(inlined) kmem_garbage_collect+0x390 kmem_arena_gc+0x240 kthread_daemon_startup+0x90 DESCRIPTION: The VxFS kernel memory callback() routine allocates memory with M_WAITOK flag. This results in the system hang during the low memory condition as the callback () routine waits for memory allocation. RESOLUTION: The code is modified to allocate memory without waiting in the VxFS kernel memory callback() routine. Patch ID: PHKL_43062 * 2036217 (Tracking ID: 2019793) SYMPTOM: While umounting the file system the system may panic and the following stack trace is displayed: vx_set_tunefs+0x264() vx_aioctl_full+0xc7c() vx_aioctl_common+0x738() vx_aioctl+0x13c() vx_ioctl+0xe4() syscall+0xcc() DESCRIPTION: Due to a race condition during the umount operation to update fse_fs and the fse_zombie pointers, there may be a small window where both the pointers are out of sync, which results in the panic. RESOLUTION: The code is modified to set the fsext->fse_zombie pointer before the fsext- >fse_fs pointer to keep them consistent. * 2043627 (Tracking ID: 2028782) SYMPTOM: For a file managed by Hierarchical Storage Management (HSM), application file quota gets doubled after an HSM migrate or recall process.DESCRIPTION: HSM file quota get doubled after HSM migrate/recall process. DESCRIPTION: A file has a set of quota when it is created. For efficient storage, the data is moved from the high speed disk to the low speed tape using HSM. This process is called HSM migrate. When the data is recalled from the tape to the disk, the HSM quota for the file gets updated and doubled. RESOLUTION: The code is modified to handle quota updates for files managed by HSM correctly. * 2410793 (Tracking ID: 1466351) SYMPTOM: Mount hangs in vx_bc_binval_cookie like the following stack, delay vx_bc_binval_cookie vx_blkinval_cookie vx_freeze_flush_cookie vx_freeze_all vx_freeze vx_set_tunefs1 vx_set_tunefs vx_aioctl_full vx_aioctl_common vx_aioctl vx_ioctl genunix:ioctl unix:syscall_trap32 DESCRIPTION: The hanging process is waiting for a buffer to be unlocked. But that buffer can only be released if its associated cloned map writes get flushed. But a necessary flush is missed. RESOLUTION: Add code to synchronize cloned map writes so that all the cloned maps will be cleared and the buffers associated with them will be released. * 2429335 (Tracking ID: 2337470) SYMPTOM: The Cluster File System (CFS) can unexpectedly and prematurely report a 'file system out of inodes' error when attempting to create a new file. The following error message is displayed: vxfs: msgcnt 1 mesg 011: V-2-11: vx_noinode - /dev/vx/dsk/dg/vol file system out of inodes. DESCRIPTION: While allocating new index nodes (inodes) in a CFS, Veritas File System (VxFS) searches for an available free inode in the Inode Allocation Units (IAUs) that are delegated to the local node. If none are available, it searches the IAUs that are not delegated to any node, or revokes an IAU delegated to another node. Gaps may be created in the IAU structures as a side effect of the CFS delegation processing. However, while searching for an available free inode, if VxFS ignores any gaps, new IAUs cannot be created if the maximum size of the metadata structures reaches (2^31). Therefore, one of the gaps must be populated and used for the allocation of the new inode. If the gaps are ignored, VxFS may prematurely report the "file system out of inodes" error message even though there is enough free space in the VxFS file system to create new inodes. RESOLUTION: The code is modified to allocate new inodes from the gaps in the IAU structures created as a part of the CFS delegation processing. * 2730965 (Tracking ID: 2730759) SYMPTOM: The sequential read performance is poor because of the read-ahead issues. DESCRIPTION: The read-ahead on sequential reads performed incorrectly because of wrong read- advisory and the read-ahead pattern offsets are used to detect and perform the read-ahead. Also, more sync reads are performed which can affect the performance. RESOLUTION: The code is modified and the read-ahead pattern offsets are updated correctly to detect and perform the read-ahead at the required offsets. The read-ahead detection is also modified to reduce the sync reads. * 2796940 (Tracking ID: 2599590) SYMPTOM: Expansion of a 100% full file system may panic the machine with the following stack trace. bad_kern_reference() $cold_vfault() vm_hndlr() bubbledown() vx_logflush() vx_log_sync1() vx_log_sync() vx_worklist_thread() kthread_daemon_startup() DESCRIPTION: When 100% full file system is expanded intent log of the file system is truncated and blocks freed up are used during the expansion. Due to a bug the block map of the replica intent log inode was not getting updated thereby causing the block maps of the two inodes to differ. This caused some of the in- core structures of the intent log to go NULL. The machine panics while de- referencing one of this structure. RESOLUTION: Updated the block map of the replica intent log inode correctly. 100% full file system now can be expanded only If the last extent in the intent log contains more than 32 blocks, otherwise fsadm will fail. To expand such a file-system, some of the files should be deleted manually and resize be retried. * 2798203 (Tracking ID: 2316793) SYMPTOM: After removing the files in a file system, the df(1M)command which uses the statfs(2)function may take 10 seconds to complete. DESCRIPTION: To obtain an up-to- date and valid free block count in a file system a delay and retry loop delays for one second and retries 10 times. This excessive retrying causes a 10 second delay per file system while executing the df(1M) command. RESOLUTION: The code is modified to reduce the original 10 retries with one second delay each, to one retry after a 20 millisecond delay. * 2806468 (Tracking ID: 2806466) SYMPTOM: A reclaim operation on a filesystem mounted on a Logical Volume Manager (LVM) volume using the fsadm(1M) command with the 'R' option may panic the system and the following stack trace is displayed: vx_dev_strategy+0xc0() vx_dummy_fsvm_strategy+0x30() vx_ts_reclaim+0x2c0() vx_aioctl_common+0xfd0() vx_aioctl+0x2d0() vx_ioctl+0x180() DESCRIPTION: Thin reclamation is supported only on the file systems mounted on a Veritas Volume Manager (VxVM) volume. RESOLUTION: The code is modified to error out gracefully if the underlying volume is LVM. * 2831287 (Tracking ID: 1703223) SYMPTOM: The internal local mount test exits due to full fsck operation failure. DESCRIPTION: While testing, if some directory inode is set with the extended VX_IEREMOVE operation it must mark the files from the directory with the extended operation. If all the files inside that directory are not set with the VX_IEREMOVE operation, it results in a number of unreferenced files and the test fails. RESOLUTION: The code is modified to remove the file entries if the directory inode has VX_IEREMOVE operation set. * 2832560 (Tracking ID: 2829708) SYMPTOM: On a locally mounted Veritas File System (VxFS) machine, the system hangs due to low memory during an internal test. DESCRIPTION: The system hangs because the memory allocated to the structure used to enqueue or dequeue work items in batches, is not freed. RESOLUTION: The code is modified to free the memory. * 2847808 (Tracking ID: 2845175) SYMPTOM: When the Access Control List (ACL) feature is enabled, the system may panic with "Data Key Miss Fault in KERNEL mode" error message in the vx_do_getacl() function and the following stack trace is displayed: vx_do_getacl+0x840 () vx_getacl+0x70 () acl+0x480 () DESCRIPTION: In the vx_do_getacl() function, a local variable is accessed without being initializing as a result leading to a panic. RESOLUTION: The code is modified to initialize the local variable to NULL before using it. Patch ID: PHKL_42892 * 1946124 (Tracking ID: 1797955) SYMPTOM: In a setup that involves files with large extents (greater than 32 MB), which have encountered state map corruptions previously, the file system is disabled and the following message is displayed in the syslog: WARNING: msgcnt 3 mesg 037: V-2-37: vx_metaioerr - vx_tflush_1 - /dev/vx/dsk// file system meta data write error in dev/block ?/???? DESCRIPTION: The file system is disabled after an existing corruption is discovered. According to the VxFS I/O error policy, the file system must be disabled only when a read/write operation fails with an I/O error to prevent further corruption and not when an existing corruption is discovered. RESOLUTION: The code has been modified such that the file system is not disabled in case of a discovered corruption. * 1995390 (Tracking ID: 1985626) SYMPTOM: The system panics during multiple parallel unmount operations. The following stack trace is displayed: vx_freeze_idone_list+24c vx_workitem_process+10 vx_worklist_process+344 vx_worklist_thread+94 DESCRIPTION: During simultaneous unmount operations, a race condition occurs between the INODE_DEINIT() and FREEZE_IDONE_LIST() functions. While the INODE_DEINIT() function uses locks, the FREEZE_IDONE_LIST() function does not use locks while updating a pointer value. Hence, there is a possibility of a pointer having a NULL value, which gets de-referenced. This results in a panic. RESOLUTION: The code is modified to serialize the inode de-initialization operation. * 2036843 (Tracking ID: 2026799) SYMPTOM: A hang occurs while enforcing the policy on File Change Log (FCL) inode and the following stack trace is displayed: lwp_park() cond_wait_queue () cond_wait () pthread_cond_wait() ts_drain_masters() do_walk_ilist() do_process() do_enforce() main() _start() DESCRIPTION: While enforcing the policy on FCL, the file system is frozen. After enforcing the policy on FCL, a function is called which checks whether the file system is frozen. If it is frozen, the function returns the EACTIVERETRY error. This error gets percolated to further functions. The AIOCTL_COMMON() function performs the retry operation endlessly, resulting in a hang. RESOLUTION: The code is modified to return the EACTIVERETRY error only if the file system is not in the frozen state. * 2084004 (Tracking ID: 2040647) SYMPTOM: Quota on cluster mounted system does not enforce hard limit. DESCRIPTION: The information on the hard limit is stored in an unsigned integer. When a larger value is subtracted from it, it wraps around and stores an incorrect value. RESOLUTION: The code is modified to handle the wrap around and special code is added to identify the quota soft limit in the Cluster File System (CFS) environment. * 2092072 (Tracking ID: 2029556) SYMPTOM: When the file system is full, it is not possible to remove a file which has more than 13 hard links. This may lead to a panic with the following stack trace: panicsys() vpanic() panic() mutex_panic() vx_iunlock() vx_remove_tran() vx_do_remove() vx_remove1() vx_remove() vn_remove() unlink() syscall_trap32() DESCRIPTION: While removing or updating an inode, a new attribute inode is allocated which is modified. When the file system is full, no new attribute inodes can be allocated and the above operation may panic the system. RESOLUTION: The code is modified such that the file system can modify the attribute inode rather than allocating new attribute inode. * 2194629 (Tracking ID: 2161379) SYMPTOM: In a Cluster File System (CFS) environment, various file system operations hang with the following stack trace: T1: vx_event_wait() vx_async_waitmsg() vx_msg_send() vx_iread_msg() vx_rwlock_getdata() vx_glm_cbfunc() vx_glmlist_thread() T2: vx_ilock() vx_assume_iowner() vx_hlock_getdata() vx_glm_cbfunc() vx_glmlist_thread() DESCRIPTION: Due to improper handling of the ENOTOWNER error in the ireadreceive() function, the operation is retried repeatedly while holding an inode lock. All the other threads are blocked, thus causing a deadlock. RESOLUTION: The code is modified to release the inode lock on the ENOTOWNER error and acquire it again, thus resolving the deadlock. * 2222508 (Tracking ID: 2192895) SYMPTOM: A system panic occurs when executing File Change Log (FCL) commands and the following stack trace is displayed: panicsys() panic_common() panic() vmem_xalloc() vmem_alloc() segkmem_xalloc() segkmem_alloc_vn() vmem_xalloc() vmem_alloc() kmem_alloc() vx_getacl() vx_getsecattr() fop_getsecattr() cacl() acl() syscall_trap32() DESCRIPTION: The Access Control List (ACL) count in the inode can be corrupted due to a race condition. For example, the setacl() function can change the ACL count when the getacl() function is processing the same inode. This results in an incorrect ACL count. RESOLUTION: The code is modified to add protection to the vulnerable ACL count to avoid corruption. * 2370061 (Tracking ID: 2370046) SYMPTOM: Read ahead operations miss to read early blocks of data when the value of "read_nstream" tunable is not set to 1. PROBLEM DESCRIPTION: The read ahead operation reads the file on demand and does not read the portion of the file which is to be read in advance. This occurs because the parameter that determines the next read ahead offset is incorrectly reset. RESOLUTION: The code is modified so that the read ahead length is set correctly. * 2720002 (Tracking ID: 1396859) SYMPTOM: The internal spin watcher tools show heavy contention on the buffer freelist lock, bc_freelist_lock, even when the I/O loads are predominantly direct I/Os. DESCRIPTION: Direct I/O data need not be cached in file system buffers. But Veritas File System (VxFS) maintains empty buffers to track these requests. Hence, contention is seen even when I/O is direct in nature. RESOLUTION: The code is modified to have a separate arena to track direct I/O buffers so that the contention on the buffer freelist lock is reduced. * 2722869 (Tracking ID: 1244756) SYMPTOM: A lookup operation on a VxFS file system may fail with the following stack trace: vx_cbdnlc_purge_iplist+0x64 vx_inode_free_list+0x160 vx_ifree_scan_list+0xf8 vx_workitem_process+0x10 vx_worklist_process+0x17c vx_worklist_thread+0x94 DESCRIPTION: Due to a race condition between the Directory Name Lookup Cache (DNLC) lookup and the DNLC get functions, there is an attempt to move a DNLC entry to the tail of the freelist in the lookup function when it has already been removed from the freelist by the DNLC get function. This leads to a null pointer de- reference. RESOLUTION: The code is modified to verify that the DNLC entry is present on the freelist before it is moved to the tail by the DNLC get function. * 2722958 (Tracking ID: 2696067) SYMPTOM: When a getaccess() command is issued on a file which inherits the default Access Control List (ACL) entries from the parent, it shows incorrrect group object permissions. DESCRIPTION: If a newly created file leverages the ACL entries of its parent directory, the vx_daccess() function does not fabricate any GROUP_OBJ entry unlike the vx_do_getacl() function. RESOLUTION: The code is modified to fabricate a GROUP_OBJ entry. * 2726001 (Tracking ID: 2371710) SYMPTOM: User quota file gets corrupted when DELICACHE feature is enabled and the current usage of inodes of a user becomes negative after frequent file creations and deletions. If the quota information is checked using the vxquota command with the '-vu username ' option, the number of files is "-1". For example: # vxquota -vu testuser2 Disk quotas for testuser2 (uid 500): Filesystem usage quota limit timeleft files quota limit timeleft /vol01 1127809 8239104 8239104 -1 0 0 DESCRIPTION: This issue is introduced by the inode DELICACHE feature which is a performance enhancement to optimize the updates done to the inode map during file creation and deletion operations. The feature is enabled by default, and can be changed by the vxtunefs(1M) command. When DELICACHE is enabled and the quota is set for Veritas File System (VxFS), there is an extra quota update for the inodes on the inactive list during the removal process. Since this quota has been updated already before being put on the DELICACHE list, the current number of user files gets decremented twice. RESOLUTION: The code is modified to add a flag to identify the inodes which have been moved to the inactive list from the DELICACHE list. This flag is used to prevent decrementing the quota again during the removal process. * 2730957 (Tracking ID: 2651922) SYMPTOM: On a local VxFS file system, the ls(1M) command with the '-l' option runs slowly and high CPU usage is observed. DESCRIPTION: Currently, Cluster File System (CFS) inodes are not allowed to be reused as local inodes to avoid Global Lock Manager (GLM) deadlo`ck issue when Veritas File System (VxFS) reconfiguration is in process. Hence, if a VxFS local inode is needed, all the inode free lists need to be traversed to find a local inode if the free lists are almost filled up with CFS inodes. RESOLUTION: The code is modified to add a global variable, 'vxi_icache_cfsinodes' to count the CFS inodes in inode cache. The condition is relaxed for converting a cluster inode to a local inode when the number of in-core CFS inodes is greater than the 'vx_clreuse_threshold' threshold and reconfiguration is not in progress. * 2733704 (Tracking ID: 2421901) SYMPTOM: Internal stress test on locally mounted VxFS file system resulted in the following assert: f:vx_getinoquota:1a DESCRIPTION: While reusing the inode from inactive inode list, the inode field that contains quota information is expected to be NULL. While moving the inode from delicache list to inactive inode list, quota information field is not set to NULL. This results in the assert. RESOLUTION: The code is modified to reset the quota information field of inode while moving it from delicache list to inactive inode list. INSTALLING THE PATCH -------------------- To install the VxFS 5.0.1-11.31 patch: a) To install this patch on a CVM cluster, install it one system at a time so that all the nodes are not brought down simultaneously. b) The VxFS 11.31 pkg with revision 5.0.31.5 must be installed before applying the patch. c) To verify the VERITAS file system level, execute: # swlist -l product | egrep -i 'VRTSvxfs' VRTSvxfs 5.0.31.5 VERITAS File System Note: VRTSfsman is a corequisite for VRTSvxfs. So, VRTSfsman also needs to be installed with VRTSvxfs. # swlist -l product | egrep -i 'VRTS' VRTSvxfs 5.0.31.5 Veritas File System VRTSfsman 5.0.31.5 Veritas File System Manuals d)All prerequisite/corequisite patches have to be installed.The Kernel patch requires a system reboot for both installation and removal. e) To install the patch, execute the following command: # swinstall -x autoreboot=true -s PHKL_43260 PHCO_43261 If the patch is not registered, you can register it using the following command: # swreg -l depot The is the absolute path where the patch resides. REMOVING THE PATCH ------------------ To remove the VxFS 5.0.1-11.31 patch: a) Execute the following command: # swremove -x autoreboot=true PHKL_43260 PHCO_43261 SPECIAL INSTRUCTIONS -------------------- NONE OTHERS ------ NONE