Univention Bugzilla – Full Text Bug Listing |
Summary: | Windows Client join: smbd core due to panic /SIGABRT "smbXsrv_session_logoff_all failed" | ||
---|---|---|---|
Product: | UCS | Reporter: | Arvid Requate <requate> |
Component: | Samba4 | Assignee: | Samba maintainers <samba-maintainers> |
Status: | RESOLVED WONTFIX | QA Contact: | |
Severity: | normal | ||
Priority: | P5 | CC: | gohmann, thorp-hansen |
Version: | UCS 4.1 | ||
Target Milestone: | --- | ||
Hardware: | Other | ||
OS: | Linux | ||
URL: | https://bugzilla.samba.org/show_bug.cgi?id=9873 | ||
See Also: |
https://forge.univention.org/bugzilla/show_bug.cgi?id=37388 https://forge.univention.org/bugzilla/show_bug.cgi?id=40938 https://forge.univention.org/bugzilla/show_bug.cgi?id=43088 |
||
What kind of report is it?: | Bug Report | What type of bug is this?: | 1: Cosmetic issue or missing function but workaround exists |
Who will be affected by this bug?: | 3: Will affect average number of installed domains | How will those affected feel about the bug?: | 1: Nuisance – not a big deal but noticeable |
User Pain: | 0.017 | Enterprise Customer affected?: | Yes |
School Customer affected?: | ISV affected?: | ||
Waiting Support: | Flags outvoted (downgraded) after PO Review: | ||
Ticket number: | 2015110921000315 2016011921000304 2016032921000318 2017030821000936 | Bug group (optional): | |
Max CVSS v3 score: | |||
Attachments: |
win7pro_smbd.core.log
win7pro_join.tar.bz2 all logs fix-windowscomputer-uid.sh |
Description
Arvid Requate
2015-11-05 17:56:18 CET
Created attachment 7251 [details]
win7pro_smbd.core.log
Created attachment 7252 [details]
win7pro_join.tar.bz2 all logs
I'm currently unable to reproduce it in my test environment. Might be a timing issue. auth.log shows exactly 4 messages pam_mkhomedir(samba:session): User unknown. This is the relevant part: ============================================================================ Nov 5 16:26:54 master100 PAM-univentionsambadomain[4546]: continuing as user WIN7PRO$ Nov 5 16:26:54 master100 smbd[4546]: pam_unix(samba:session): session opened for user WIN7PRO$ by (uid=0) Nov 5 16:26:54 master100 smbd[4546]: pam_mkhomedir(samba:session): User unknown. Nov 5 16:26:54 master100 smbd[4548]: pam_unix(samba:session): session closed for user AR41S4PT1+WIN7PRO$ Nov 5 16:26:54 master100 PAM-univentionsambadomain[4550]: continuing as user WIN7PRO$ Nov 5 16:26:54 master100 smbd[4550]: pam_unix(samba:session): session opened for user WIN7PRO$ by (uid=0) Nov 5 16:26:55 master100 smbd[4546]: pam_unix(samba:session): session closed for user AR41S4PT1+WIN7PRO$ Nov 5 16:26:55 master100 smbd[4550]: pam_mkhomedir(samba:session): User unknown. Nov 5 16:26:55 master100 smbd[4553]: pam_unix(samba:session): session closed for user AR41S4PT1+WIN7PRO$ Nov 5 16:26:55 master100 smbd[4550]: pam_unix(samba:session): session closed for user AR41S4PT1+WIN7PRO$ Nov 5 16:26:55 master100 PAM-univentionsambadomain[4556]: continuing as user WIN7PRO$ Nov 5 16:26:55 master100 smbd[4556]: pam_unix(samba:session): session opened for user WIN7PRO$ by (uid=0) Nov 5 16:26:55 master100 smbd[4556]: pam_mkhomedir(samba:session): User unknown. Nov 5 16:26:55 master100 smbd[4558]: pam_unix(samba:session): session closed for user AR41S4PT1+WIN7PRO$ Nov 5 16:26:55 master100 PAM-univentionsambadomain[4560]: continuing as user WIN7PRO$ Nov 5 16:26:55 master100 smbd[4560]: pam_unix(samba:session): session opened for user WIN7PRO$ by (uid=0) Nov 5 16:26:55 master100 smbd[4556]: pam_unix(samba:session): session closed for user AR41S4PT1+WIN7PRO$ Nov 5 16:26:55 master100 smbd[4560]: pam_mkhomedir(samba:session): User unknown. Nov 5 16:26:55 master100 smbd[4563]: pam_unix(samba:session): session closed for user AR41S4PT1+WIN7PRO$ Nov 5 16:26:56 master100 smbd[4560]: pam_unix(samba:session): session closed for user AR41S4PT1+WIN7PRO$ Nov 5 16:27:09 master100 smbd[4537]: pam_unix(samba:session): session closed for user AR41S4PT1+Administrator Nov 5 16:28:00 master100 PAM-univentionsambadomain[4570]: continuing as user WIN7PRO$ Nov 5 16:28:00 master100 smbd[4570]: pam_unix(samba:session): session opened for user WIN7PRO$ by (uid=0) Nov 5 16:29:52 master100 PAM-univentionsambadomain[4608]: continuing as user WIN7PRO$ Nov 5 16:29:52 master100 smbd[4608]: pam_unix(samba:session): session opened for user WIN7PRO$ by (uid=0) Nov 5 16:29:57 master100 PAM-univentionsambadomain[4614]: continuing as user WIN7PRO$ Nov 5 16:29:57 master100 smbd[4614]: pam_unix(samba:session): session opened for user WIN7PRO$ by (uid=0) ============================================================================ So I guess pam_mkhomedir ('required' in common-session) fails because the uid is not yet resolvable via nss_ldap. At Ticket#: 2016011921000304 I discovered the same traceback/panic/core dump in the log.samba of the DC Master (UCS 4.1-0, Errata 56), also triggered by a machine account but repeatedly. Will report more details as they become available. The same traceback I see at Ticket#: 2015110921000315 (UCS 4.0-4 Samba 4.2.3) We see this regularly in log.smbd, e.g. Ticket#2016030421000203. My impression is, that this happens whenever a machine account logs off. My gut feeling is that it might be due to homeDirectory: /dev/null. Looks a bit but not entirely similar like https://bugzilla.samba.org/show_bug.cgi?id=9873 . Anyway, it's annoying but apparently of no consequence. In the case of 2015110921000315 (Comment 6) the coredump is triggered by two clients, both of which have uid != sAMAccontName, so getent passwd doesn't work on the sAMAccountName. Probably this specific case is yet another collateral damage of Bug 37388. Created attachment 7564 [details]
fix-windowscomputer-uid.sh
Happened again at Ticket# 2016032921000318, fixed by renaming the corresponding computers/windows object in OpenLDAP. The attached script may be useful to check and fix all computers/windows objects ("untested").
In a Samba 4.5.1 test domain Felix saw this during the initial join of a Windows client, but only in one out of four cases. I looked at core dump and it's not a segfault (code defect/regression) but an explicit call to smb_panic in the samba code. The reason seems to be that Samba performs a pam login with the machine account and that fails during pam_mkhomedir. It seems to be a timing issue (S4-Connector -> OpenLDAP -> NSS). /var/log/auth.log says: ============================================================================== Nov 7 10:38:53 master PAM-univentionsambadomain[13866]: continuing as user WIN7EN$ Nov 7 10:38:53 master smbd[13866]: pam_unix(samba:session): session opened for user WIN7EN$ by (uid=0) Nov 7 10:38:53 master smbd[13866]: pam_mkhomedir(samba:session): User unknown. Nov 7 10:38:53 master smbd[13868]: pam_unix(samba:session): session closed for user W2K12+WIN7EN$ Nov 7 10:38:53 master PAM-univentionsambadomain[13870]: continuing as user WIN7EN$ Nov 7 10:38:53 master smbd[13870]: pam_unix(samba:session): session opened for user WIN7EN$ by (uid=0) Nov 7 10:38:53 master smbd[13866]: pam_unix(samba:session): session closed for user W2K12+WIN7EN$ Nov 7 10:38:53 master smbd[13870]: pam_mkhomedir(samba:session): User unknown. Nov 7 10:38:53 master smbd[13873]: pam_unix(samba:session): session closed for user W2K12+WIN7EN$ Nov 7 10:38:53 master smbd[13870]: pam_unix(samba:session): session closed for user W2K12+WIN7EN$ ============================================================================== And the corresponding log.smbd messages (before the usual stack trace): ============================================================================== [2016/11/07 10:38:53.832846, 1, pid=8082] ../source3/smbd/server.c:868(remove_child_pid) Scheduled cleanup of brl and lock database after unclean shutdown [2016/11/07 10:38:53.848626, 0, pid=13873] ../source3/auth/pampass.c:89(smb_pam_error_handler) smb_pam_error_handler: PAM: session setup failed : Benutzer bei zu Grunde liegendem Authentifi zierungsmodul nicht bekannt [2016/11/07 10:38:53.850747, 1, pid=13873] ../source3/smbd/session.c:70(session_claim) pam_session rejected the session for W2K12+WIN7EN$ [smb/2546232234] [2016/11/07 10:38:53.850781, 1, pid=13873] ../source3/smbd/smb2_sesssetup.c:462(smbd_smb2_auth_ generic_return) smb2: Failed to claim session for vuid=2546232234 [2016/11/07 10:38:53.913918, 0, pid=13870] ../source3/auth/pampass.c:89(smb_pam_error_handler) smb_pam_error_handler: PAM: session setup failed : Benutzer bei zu Grunde liegendem Authentifi zierungsmodul nicht bekannt [2016/11/07 10:38:53.915006, 1, pid=13870] ../source3/smbd/session.c:70(session_claim) pam_session rejected the session for W2K12+WIN7EN$ [smb/2546232234] [2016/11/07 10:38:53.915029, 1, pid=13870] ../source3/smbd/smb2_sesssetup.c:462(smbd_smb2_auth_ generic_return) smb2: Failed to claim session for vuid=2546232234 [2016/11/07 10:38:53.915216, 0, pid=13870] ../source3/smbd/smbXsrv_session.c:1675(smbXsrv_session_logoff) smbXsrv_session_logoff(0x97c46baa): failed to delete global key '97C46BAA': NT_STATUS_NOT_FOUND [2016/11/07 10:38:53.920076, 0, pid=13870] ../source3/smbd/smbXsrv_session.c:1775(smbXsrv_session_logoff_all) smbXsrv_session_logoff_all: count[1] errors[1] first[NT_STATUS_NOT_FOUND] ============================================================================== Later auth.log looks ok, there are several logins with the machine account and all of them are ok. This issue has been filled against UCS 4.1. The maintenance with bug and security fixes for UCS 4.1 has ended on 5st of April 2018. Customers still on UCS 4.1 are encouraged to update to UCS 4.3. Please contact your partner or Univention for any questions. If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you. |