Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jul 2012 11:44:05 GMT
From:      Michael Letzgus <michael.letzgus@uni-bielefeld.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/169598: winbind failure on ssh login, failed to mlock memory: Cannot allocate memory (12)
Message-ID:  <201207021144.q62Bi5k9088064@red.freebsd.org>
Resent-Message-ID: <201207021150.q62Bo61v025085@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         169598
>Category:       ports
>Synopsis:       winbind failure on ssh login, failed to mlock memory: Cannot allocate memory (12)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 02 11:50:06 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Michael Letzgus
>Release:        FreeBSD 9.0R
>Organization:
Universität Bielefeld
>Environment:
FreeBSD uche-pc1-pc1.dyn.uni-bielefeld.de 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
When trying to login via ssh and pam_winbind.so, sometimes (after a few hours
without errors) this error occurs and login is not possible:

Debug-Output from winbinnd:

Plain-text authentication for user AD\mletzgus2 returned NT_STATUS_OK (PAM: 0)
Finished processing child request 13
Writing 3893 bytes to parent
timed_events_timeout: 3599/504701
select will use timeout of 3599.504701 seconds
s3_event: Destroying timer event 0x80582c990 "tevent_req_timedout"
failed to mlock memory: Resource temporarily unavailable (35)
winbindd_add_memory_creds returned: NT_STATUS_NETWORK_BUSY
wb_request_done[59289:PAM_AUTH]: NT_STATUS_NETWORK_BUSY
s3_event: Schedule immediate event "tevent_queue_immediate_trigger":
0x80582c390
s3_event: Run immediate event "tevent_queue_immediate_trigger": 0x80582c390
winbind_client_response_written[59289:PAM_AUTH]: delivered response to client
closing socket 26, client exited


wbinfo -K ad\\mletzgus

stops working, too:

plaintext kerberos password authentication for [ad\mletzgus] failed (requesting
cctype: FILE)
Could not authenticate user [ad\mletzgus] with Kerberos (ccache: FILE)


A couple of minutes befor the answer was:

plaintext kerberos password authentication for [ad\mletzgus] succeeded
(requesting cctype: FILE)
credentials were put in: FILE:/tmp/krb5cc_0

So in principle it works...

Just a guess: My System has 16GB RAM and was running rsync on a ZFS filesystem.
ZFS may use a lot of memory - and winbinds error message was "failed to mlock
memory: Resource temporarily unavailable (35)". Maybe there are not enough
resources of something?

CPU:  0.3% user,  0.0% nice,  0.4% system,  0.0% interrupt, 99.3% idle
Mem: 42M Active, 83M Inact, 7770M Wired, 664K Cache, 218M Buf, 7897M Free
Swap: 10G Total, 10G Free

There are still 8 GB left... should be enough for winbind...
>How-To-Repeat:
* Set up FreeBSD as AD domain member
* Lock a a large amount of memory (stress yout ZFS or use "memtest 5G")
* try to authenticate:"wbinfo -K domain\\username"
* tail -f \var\log\auth.log


>Fix:
Maybe(!) it's only some limit - but I can't figure out wht limit:

When starting "memtest 5G", memtest says something like

"got  4736MB (4966440960 bytes), trying mlock ...over system/pre-process limit, reducing..."

What limit is that...?

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207021144.q62Bi5k9088064>