-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OOM looking up for users/groups with libnss_systemd.so #10
Comments
Hello Very to have found a solution. We have noticed this behavior without time to investigate. Looking about nss information, a workaround could be to add a space before As we can't know if extrauser is used to another usecase, we need to identify specific AlternC block code. |
I've checked about spacing workaround following musl or libc behavior could be different. In both case pwck doesn't accept these lines. |
Hello I've a PR #11 with a less naive approach. |
thanks for the quick response, there is one issue left : the last line of passwd/group/shadow is invalid because it is not terminated/misses an end-of-line. |
line 98, write_content is dubious, won't work for passwd or shadow :
|
I've tried after purge backup and extrauser files and pwck don't raise any error. |
Thanks, without line termination borgbackup raises MemoryError. |
Looks strange. I don't see reason why any backup could be raise any error about termination file. In any case return carrier is now forced :) |
borgbackup looks for permissions, the posix standard definition of a line https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 |
A new day to learn new thing :) |
I fear your write_content() could lead to corruption, if manual changes occurs duplicate entries would then be inserted :
I think we should keep it simple and short and not try to manage things, document that when you install alternc-nss extrausers files are overwritten. (sidenote there are validation tools like pwck) |
Hello I don't want presume any use case. Then we need to check file and manage only AlternC part. array_diff is here to exclude AlternC part following previous backup before to update it. In my mind/mantra we must be kiss indeed and also to be less intrusive :) |
See: AlternC#10 and rm#45665
hi, i prefer the version where we simply overwrite the extrausers files. If you want to manage things and allow more use cases, we could add the following to prevent duplicated entries (untested) :
please decide and lets close this issue :) note my (not really relevant) use case is having alternc entries in extrausers passwd with a modified shell field. |
Hello It's work in progress :) |
* Prevent OOM with numerous AlternC account * Naive solution to #10
Hello 0.1.0 provide "naive" solution to this issue. I'm not again convict about this approach but at least its unblock this situation. |
Hash comments are not allowed in libnss definition files (passwd/group/shadow). Alternc-nss' current implementation wrongly adds hash comments in those files. We spotted the issue after migrating a server (16Go memory) to debian bullseye ,we then got multiple applications reaching memory limits while several gigs of free memory were available, for instance :
Attached is a system call log which allowed us to pinpoint the issue and a naïve patch.
Note that other bullseye machines with more memory (+32Go) do not reach to OOM error while the bug is present, I suspect the libnss-extrausers definitions are ignored in that case.
adduser-strace.log
0001-prevent-user-group-lookups-errors-with-libnss_system.patch.log
The text was updated successfully, but these errors were encountered: