[PATCH] fix for valgrind errors in master - smbtorture3 POSIX test.
jra at samba.org
Thu Sep 27 21:30:55 UTC 2018
On Thu, Sep 27, 2018 at 02:25:29PM -0700, Ralph Böhme wrote:
> On Thu, Sep 27, 2018 at 02:16:47PM -0700, Jeremy Allison wrote:
> > On Thu, Sep 27, 2018 at 02:06:32PM -0700, Jeremy Allison via samba-technical wrote:
> > > > ah, but fsp_free() is not called in the close_cnum() case. Heavens!
> > >
> > > Found it - missing:
> > >
> > > file_free(req, fsp);
> > >
> > > calls in close_directory() error paths...
> > Here is the fix. The POSIX test is now valgrind
> > clean.
> ah, that makes sense.
> Pushed. Thanks!
Thanks. We'll need a back-port of this too
(I'll sort that out once the fix is in master).
Underlying the problem is that inside the
close_directory() code delete_all_streams()
share_mode_memcache_delete: deleting entry for file posix:dir seq 8b04ed96a3d06607 key fd01:4e0c5e:0
[2018/09/27 14:14:47.971324, 10, pid=26286, effective(1000, 1000), real(1000, 0), class=locking] ../source3/locking/share_mode_lock.c:358
No used share mode found
[2018/09/27 14:14:47.971460, 5, pid=26286, effective(1000, 1000), real(1000, 0)] ../lib/dbwrap/dbwrap.c:159(dbwrap_lock_order_unlock)
dbwrap_lock_order_unlock: release lock order 1 for /usr/local/samba/var/lock/locking.tdb
[2018/09/27 14:14:47.971640, 10, pid=26286, effective(1000, 1000), real(1000, 0)] ../lib/dbwrap/dbwrap_tdb.c:61(db_tdb_log_key)
db_tdb_log_key: Unlocking key 01FD0000000000005E0C
[2018/09/27 14:14:47.971849, 10, pid=26286, effective(1000, 1000), real(1000, 0)] ../source3/smbd/close.c:185(delete_all_streams)
vfs_streaminfo failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
[2018/09/27 14:14:47.971968, 5, pid=26286, effective(1000, 1000), real(1000, 0)] ../source3/smbd/close.c:1187(close_directory)
delete_all_streams failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
which triggered the error path.
I think this is to do with rmdir already
removing a directory as it's using POSIX
semantics and the close with rmdir not
finding it. I'll take a look to see if
there's a second bug w.r.t. deleting a
directory with POSIX semantics when
the streams_xattr module is being used
and there are streams on the directory.
I think we're doing the right thing
(the directory is already gone) but
I'll do more checking to make sure.
More information about the samba-technical