Currently in some error code paths in the DH reconnect code we leave stale sharemode entries around that can lead to all sorts of havoc.
Note, one way I've seen this happen is with a custom private VFS module stack that causes incorrect stat info in the cookie compared to the result from SMB_VFS_FSTAT() in the reconnect function. Have patch, need bugnumber.
This bug was referenced in samba master: d76edcd48437715c7541b5b1e6a56245c25f460b 5c57e840527432c4b1a7ec94894939022a9e9622 7add7dbf1aee13b4d9ab70d1a5312c8ff30d9e00 b45e78871aadca6ae33475bee890736838f44219 d8613d7ee23c4e990285a387eb9ac2eeefff9749 679e12aee2f0c283a6f9b9c6008c549a6ca9633e 90d776cb18395ed804f0ab4fd13ef571fc0ad827 692ed832dfff61ad1c9b646b5c8d6f85f25efb99 ef4ef04e7f83b1029446ff8b5fc5fdf4ab33edbd 14875448ca06a3a28800343a3a326f1a66bccec0 a91457f97c98fcec1ed062514c364271af1df669 2ff3b9bc0d254a63a913ff9084de3d794fee27d0