[DRE-commits] [ruby-pygments.rb] 01/03: Add Set-reasonable-upper-limit-to-RLIMIT_NOFILE.patch to avoid closing too many files when mentos starts (Closes: #876768)
Cédric Boutillier
boutil at moszumanska.debian.org
Sun Nov 26 21:11:30 UTC 2017
This is an automated email from the git hooks/post-receive script.
boutil pushed a commit to branch stretch/master
in repository ruby-pygments.rb.
commit 352162673dd9f49f5d1a1d32673a8a1a7ff1af32
Author: Cédric Boutillier <boutil at debian.org>
Date: Sat Nov 25 21:47:56 2017 +0100
Add Set-reasonable-upper-limit-to-RLIMIT_NOFILE.patch to avoid closing too many files when mentos starts (Closes: #876768)
---
...t-reasonable-upper-limit-to-RLIMIT_NOFILE.patch | 29 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 30 insertions(+)
diff --git a/debian/patches/0011-Set-reasonable-upper-limit-to-RLIMIT_NOFILE.patch b/debian/patches/0011-Set-reasonable-upper-limit-to-RLIMIT_NOFILE.patch
new file mode 100644
index 0000000..d5fd229
--- /dev/null
+++ b/debian/patches/0011-Set-reasonable-upper-limit-to-RLIMIT_NOFILE.patch
@@ -0,0 +1,29 @@
+commit d69d8e9ea11f9cd6652ef4cb066356792182af7e
+Author: Cédric Boutillier <boutil at debian.org>
+Date: Fri Sep 29 22:49:47 2017 +0200
+
+ Set reasonable upper limit to RLIMIT_NOFILE
+
+ When RLIMIT_NOFILE is too high, the number of files to close
+ can be too important and the process of closing could take more time
+ than the timeout set (default to 8s).
+
+ This causes asciidoctor to crash on some architectures
+
+ https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=876768
+
+ Gbp-Pq: Name 0011-Set-reasonable-upper-limit-to-RLIMIT_NOFILE.patch
+
+diff --git a/lib/pygments/mentos.py b/lib/pygments/mentos.py
+index 9c7c650..cf70b7b 100755
+--- a/lib/pygments/mentos.py
++++ b/lib/pygments/mentos.py
+@@ -334,7 +334,7 @@ def main():
+ # close fd's inherited from the ruby parent
+ import resource
+ maxfd = resource.getrlimit(resource.RLIMIT_NOFILE)[1]
+- if maxfd == resource.RLIM_INFINITY:
++ if maxfd >= 65536:
+ maxfd = 65536
+
+ for fd in range(3, maxfd):
diff --git a/debian/patches/series b/debian/patches/series
index 1e05c73..1be029e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,4 @@
0008-fix_test_pygments.patch
0009-adapt-to-new-pygments.patch
0010-no-relative-path-for-require-in-tests.patch
+0011-Set-reasonable-upper-limit-to-RLIMIT_NOFILE.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-pygments.rb.git
More information about the Pkg-ruby-extras-commits
mailing list