Skip to content
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

findutils: plug memory hole in find #22857

Closed
wants to merge 1 commit into from
Closed

Conversation

bendlas
Copy link
Contributor

@bendlas bendlas commented Feb 16, 2017

Motivation for this change

Running update-locatedb.service has been reproducibly making my computer unusable for some time now, with the find utility using memory north of 12G (RES) and growing. Thankfully, someone over at the ubuntu bug tracker has already developed a fix for this memory hole and I can confirm that with it update-locatedb now smoothly runs in the background, with find taking no more than a couple of megs, as it should be.

I'm now running this patch as part of my services.locate.locate findutils, though this PR applies it to the findutils in all-packages.nix and will result in a mass-rebuild.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@bendlas, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @vcunat and @durko to be potential reviewers.

@Mic92
Copy link
Member

Mic92 commented Feb 16, 2017

Was the patch also reported upstream? https://www.gnu.org/software/findutils/

@bendlas
Copy link
Contributor Author

bendlas commented Feb 16, 2017

Was the patch also reported upstream? https://www.gnu.org/software/findutils/

Not by me.

@vcunat
Copy link
Member

vcunat commented Feb 16, 2017

The Ubuntu bug shows no indication of that.

@bendlas
Copy link
Contributor Author

bendlas commented Feb 16, 2017

I reported it to the findutils tracker: https://savannah.gnu.org/bugs/index.php?50326

@vcunat vcunat self-assigned this Feb 16, 2017
@vcunat vcunat changed the base branch from master to staging February 16, 2017 18:03
vcunat added a commit that referenced this pull request Feb 16, 2017
Using the upstream patch directly.  It's copied in nixpkgs, because:
 - fetchpatch isn't usable at this point in bootstrapping,
 - the upstream patch creates collisions in NEWS.
@vcunat
Copy link
Member

vcunat commented Feb 16, 2017

Upstream now pushed a different but functionally equivalent fix, so I took that "wording" instead. Thanks for getting this moving!

valgrind still shows some leaks for me, but they seem small now (hopefully constant amount), and no bad frees were detected.

@vcunat vcunat closed this Feb 16, 2017
@bendlas bendlas deleted the findutils branch October 22, 2023 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants