According to streams_depot_unlink() source code of streams_depot module,
it tries to call SMB_VFS_NEXT_RMDIR for streams directory while streams' files are still there. On such design RMDIR must fail and existent streams and directory are left, so filesystem is polluted by this.
P.S. Such scenario is applicable only for removing base file (and some streams are present). Unlinking independent streams are not so critical but still after deletion of the last stream the directory itself is NOT removed.
I think the implementation must either walk all streams of the file and remove them or use some kind of recursive rmdir. Removing streams directory on the last streams unlink is possibly not worth of additional efforts (empty directory is not so large).
Is this really an issue? Look at smbd/close.c, lines 447ff (in master). That code is supposed to walk the list of streams and individually remove the streams from a higher level.
If that does not work, it is a bug that needs fixing at that level (IMHO).
Yep, you are right. Samba core already takes care about deleting streams before the base file. Sorry...