Bug 49946 - Windows client fails loading Roaming Profile after reboot due to old smbd locking NTUSER.DAT
Windows client fails loading Roaming Profile after reboot due to old smbd loc...
Status: NEW
Product: UCS
Classification: Unclassified
Component: Samba
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: Samba maintainers
Samba maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-07-31 15:47 CEST by Arvid Requate
Modified: 2021-11-11 08:47 CET (History)
3 users (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
Screenshot roaming profile loading fails with SHARING VIOLATION (119.23 KB, image/png)
2019-07-31 15:47 CEST, Arvid Requate
Details
Screenshot showing SHARING VIOLATION in procmon boot log (174.24 KB, image/png)
2019-07-31 15:50 CEST, Arvid Requate
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2019-07-31 15:47:50 CEST
Created attachment 10142 [details]
Screenshot roaming profile loading fails with SHARING VIOLATION

Observed (again?) on a Windows 7 client joined to my UCS@school 4.4v2 Slave. 
See attached screenshot.

smbstatus on the school server shows:
==========================================================================
Locked files:
Pid          User(ID)   DenyMode   Access      R/W        Oplock           SharePath   Name   Time
--------------------------------------------------------------------------------------------------
[...]
27055        2019       DENY_WRITE 0x12019f    RDWR       NONE             /home/school1/schueler/s1   windows-profiles/default.V2/NTUSER.DAT   Wed Jul 31 15:20:14 2019
[...]
==========================================================================

That process stays even when booting the client. After killing that process and logging on as the test student the roaming profile loaded ok and smbstatus didn't show this lock again.


When rebooting the client, the lock appears again in the smbstatus output:
==========================================================================
29319        2019       DENY_WRITE 0x12019f    RDWR       EXCLUSIVE+BATCH  /home/school1/schueler/s1   windows-profiles/default.V2/NTUSER.DAT   Wed Jul 31 15:39:48 2019
==========================================================================
and the roaming profile fails to load again.



root@slave-edu:~# univention-app info
UCS: 4.4-0 errata186
Installed: cups=2.2.1 samba4=4.10 squid=3.5 ucsschool=4.4 v2
Comment 1 Arvid Requate univentionstaff 2019-07-31 15:50:07 CEST
Created attachment 10143 [details]
Screenshot showing SHARING VIOLATION in procmon boot log

Funnily this posting reports a similar behavor of a Windows (10) client against a Windows 2012 DC:

https://helgeklein.com/blog/2016/04/windows-10-roaming-profile-sharing-violation-every-2nd-logon/

From that posting I took the advice to check the procmon boot log, see attached screenshot.
Comment 2 Arvid Requate univentionstaff 2019-07-31 16:23:27 CEST
Looks like the analysis of this user is right:

https://lists.samba.org/archive/samba/2017-January/206160.html

If the student logs off first then the locking smbd disappears after about 15 seconds, but if the student reboots the client, the smbd stays.
Comment 3 Valentin Heidelberger univentionstaff 2020-02-21 13:58:31 CET
Customer says the solved this with:

samba/socket_options='TCP_NODELAY SO_KEEPALIVE TCP_KEEPIDLE=30 TCP_KEEPCNT=3 TCP_KEEPINTVL=3'