Bug 10138 - smbd doesn't always clean up share modes after hard crash.
smbd doesn't always clean up share modes after hard crash.
Status: RESOLVED FIXED
Product: Samba 4.0
Classification: Unclassified
Component: File services
unspecified
All All
: P5 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-12 18:44 UTC by Jeremy Allison
Modified: 2013-11-05 12:00 UTC (History)
1 user (show)

See Also:


Attachments
git-am fix for 4.1.0 (14.98 KB, patch)
2013-09-12 19:19 UTC, Jeremy Allison
jra: review? (vl)
Details
git-am fix for 4.0.next (15.04 KB, patch)
2013-09-12 19:22 UTC, Jeremy Allison
vl: review+
Details
Additional patch for 4.0 (1.15 KB, patch)
2013-09-30 12:55 UTC, Volker Lendecke
jra: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Allison 2013-09-12 18:44:11 UTC
Spotted by Volker and reported on samba-technical:

------------------------------------------------------
While staring at code I found a nasty defect that might kick
in when an smbd dies hard and leaves stale share mode
entries behind. See the torture test in the last patch of
this patchset.

Please review and comment or push.

Thanks,

Volker
------------------------------------------------------

Patchset from master to follow.

Jeremy.
Comment 1 Jeremy Allison 2013-09-12 19:19:34 UTC
Created attachment 9208 [details]
git-am fix for 4.1.0

Equivalent to the following cherry-picks.

git cherry-pick -x 94b320527eee0c7ba1d3818816e7d59cb863bf3f
git cherry-pick -x 696bc569b17f024f840774e3d59761229836a310
git cherry-pick -x 5006db98aaf1efe119f1da8be091587a9bc2b952
git cherry-pick -x 7d91ffc6fdc3b371564e14f09822a96264ea372a
git cherry-pick -x ade8477f98fcffcc6e3c5ea31618b49d0c1bba95

Jeremy.
Comment 2 Jeremy Allison 2013-09-12 19:22:06 UTC
Created attachment 9209 [details]
git-am fix for 4.0.next

The cherry-pick fixes from master don't fully apply (the fix:

git cherry-pick -x 5006db98aaf1efe119f1da8be091587a9bc2b952

smbd: Rename parameter "i" to "idx" - doesn't apply cleanly).

All the other fixes are identical.

Jeremy.
Comment 3 Karolin Seeger 2013-09-23 07:31:07 UTC
Is there a chance to get review until tomorrow (freeze for 4.0.10)?
Comment 4 Jeremy Allison 2013-09-25 13:33:38 UTC
Re-assigning to Karolin for inclusion in 4.0.next, 4.1.0.

Jeremy.
Comment 5 Karolin Seeger 2013-09-26 07:45:27 UTC
(In reply to comment #4)
> Re-assigning to Karolin for inclusion in 4.0.next, 4.1.0.
> 
> Jeremy.

Pushed to autobuild-v4-1-test and autobuild-v4-0-test.
Comment 6 Karolin Seeger 2013-09-26 09:04:15 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > Re-assigning to Karolin for inclusion in 4.0.next, 4.1.0.
> > 
> > Jeremy.
> 
> Pushed to autobuild-v4-1-test and autobuild-v4-0-test.

The v4-0-test autobuild failed two times, giving it another try...
Comment 7 Jeremy Allison 2013-09-26 09:05:38 UTC
Failed on make test, or somewhere else ?
Comment 8 Karolin Seeger 2013-09-26 09:07:18 UTC
(In reply to comment #7)
> Failed on make test, or somewhere else ?

Hmm, logs overwritten... Is there a chance to see the old logs?
Comment 9 Karolin Seeger 2013-09-26 09:51:44 UTC
[331/721 in 8m3s] samba3.base.disconnect(s3dc)
Using seed 1380187409
trying disconnect with async lock
trying open/disconnect
trying disconnect with async lock
trying open/disconnect
trying disconnect with async lock
trying open/disconnect
(../source4/torture/basic/disconnect.c:64) Incorrect status NT_STATUS_IO_TIMEOUT - should be NT_STATUS_OK
trying disconnect with async lock
trying open/disconnect
(../source4/torture/basic/disconnect.c:64) Incorrect status NT_STATUS_IO_TIMEOUT - should be NT_STATUS_OK
trying disconnect with async lock
trying open/disconnect
(../source4/torture/basic/disconnect.c:64) Incorrect status NT_STATUS_IO_TIMEOUT - should be NT_STATUS_OK
trying disconnect with async lock
trying open/disconnect
(../source4/torture/basic/disconnect.c:64) Incorrect status NT_STATUS_IO_TIMEOUT - should be NT_STATUS_OK
trying disconnect with async lock
trying open/disconnect
(../source4/torture/basic/disconnect.c:64) Incorrect status NT_STATUS_IO_TIMEOUT - should be NT_STATUS_OK
trying disconnect with async lock
trying open/disconnect
(../source4/torture/basic/disconnect.c:64) Incorrect status NT_STATUS_IO_TIMEOUT - should be NT_STATUS_OK
trying disconnect with async lock
trying open/disconnect
(../source4/torture/basic/disconnect.c:64) Incorrect status NT_STATUS_IO_TIMEOUT - should be NT_STATUS_OK
trying disconnect with async lock
trying open/disconnect
(../source4/torture/basic/disconnect.c:64) Incorrect status NT_STATUS_IO_TIMEOUT - should be NT_STATUS_OK
UNEXPECTED(error): samba3.base.disconnect.disconnect(s3dc)
REASON: _StringException: _StringException: Unknown error/failure. Missing torture_fail() or torture_assert_*() call?

FAILED (0 failures, 1 errors and 0 unexpected successes in 0 testsuites)

A summary with detailed information can be found in:
  ./st/summary
SELFTEST FAILED
Comment 10 Karolin Seeger 2013-09-26 09:51:58 UTC
Pushed to v4-1-test.
Comment 11 Karolin Seeger 2013-09-27 07:57:48 UTC
(In reply to comment #9)
> [331/721 in 8m3s] samba3.base.disconnect(s3dc)
> Using seed 1380187409
> trying disconnect with async lock
> trying open/disconnect
> trying disconnect with async lock
> trying open/disconnect
> trying disconnect with async lock
> trying open/disconnect
> (../source4/torture/basic/disconnect.c:64) Incorrect status
> NT_STATUS_IO_TIMEOUT - should be NT_STATUS_OK
> trying disconnect with async lock
> trying open/disconnect
> (../source4/torture/basic/disconnect.c:64) Incorrect status
> NT_STATUS_IO_TIMEOUT - should be NT_STATUS_OK
> trying disconnect with async lock
> trying open/disconnect
> (../source4/torture/basic/disconnect.c:64) Incorrect status
> NT_STATUS_IO_TIMEOUT - should be NT_STATUS_OK
> trying disconnect with async lock
> trying open/disconnect
> (../source4/torture/basic/disconnect.c:64) Incorrect status
> NT_STATUS_IO_TIMEOUT - should be NT_STATUS_OK
> trying disconnect with async lock
> trying open/disconnect
> (../source4/torture/basic/disconnect.c:64) Incorrect status
> NT_STATUS_IO_TIMEOUT - should be NT_STATUS_OK
> trying disconnect with async lock
> trying open/disconnect
> (../source4/torture/basic/disconnect.c:64) Incorrect status
> NT_STATUS_IO_TIMEOUT - should be NT_STATUS_OK
> trying disconnect with async lock
> trying open/disconnect
> (../source4/torture/basic/disconnect.c:64) Incorrect status
> NT_STATUS_IO_TIMEOUT - should be NT_STATUS_OK
> trying disconnect with async lock
> trying open/disconnect
> (../source4/torture/basic/disconnect.c:64) Incorrect status
> NT_STATUS_IO_TIMEOUT - should be NT_STATUS_OK
> UNEXPECTED(error): samba3.base.disconnect.disconnect(s3dc)
> REASON: _StringException: _StringException: Unknown error/failure. Missing
> torture_fail() or torture_assert_*() call?
> 
> FAILED (0 failures, 1 errors and 0 unexpected successes in 0 testsuites)
> 
> A summary with detailed information can be found in:
>   ./st/summary
> SELFTEST FAILED

Can anyone investigate, please?
The patch is in 4.1, but not in 4.0 now...
Comment 12 Jeremy Allison 2013-09-27 08:17:57 UTC
Yes I will investigate, although it may have to wait until I'm back in the office on Monday (Sept 30th).

Jeremy.
Comment 13 Karolin Seeger 2013-09-27 08:19:38 UTC
(In reply to comment #12)
> Yes I will investigate, although it may have to wait until I'm back in the
> office on Monday (Sept 30th).
> 
> Jeremy.

Thanks, Jeremy!
Comment 14 Karolin Seeger 2013-09-30 10:43:06 UTC
Ok, this patchset still breaks the autobuild.
I think Volker is going to have a look at this one also.
When this issue isn't solved until tomorrow, I will go ahead with the release without this patchset. Or shall I delay the release then?
Comment 15 Volker Lendecke 2013-09-30 12:55:16 UTC
Created attachment 9247 [details]
Additional patch for 4.0

This is required on top of https://bugzilla.samba.org/attachment.cgi?id=9209 to fix a crash with this code
Comment 16 Jeremy Allison 2013-09-30 19:02:02 UTC
Comment on attachment 9247 [details]
Additional patch for 4.0

Thanks a lot Volker, sorry for not testing enough when creating the 4.0.x patchset.

Jeremy.
Comment 17 Jeremy Allison 2013-09-30 19:02:35 UTC
Karolin, with Volker's additional patch this now works for 4.0.next.

Cheers,

Jeremy.
Comment 18 Karolin Seeger 2013-10-01 07:26:20 UTC
(In reply to comment #15)
> Created attachment 9247 [details]
> Additional patch for 4.0
> 
> This is required on top of https://bugzilla.samba.org/attachment.cgi?id=9209 to
> fix a crash with this code

Thanks a lot for investigating, Volker! :-)

Unfortunately, the autobuild failed anyway, but that seems to be another problem...
Comment 19 Karolin Seeger 2013-10-02 07:30:33 UTC
Pushed to v4-0-test.
Closing out bug report.

Thanks!