raku“ Precomp`汇编错误以及如何克服?

发布于 2025-02-06 22:58:46 字数 1565 浏览 0 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦醒时光 2025-02-13 22:58:46

#Raku IRC频道中的人们在解决此

问题时停止该过程 非常有用。打印了错误消息。)并查看rakudo编译器流程之一的/proc/$ pid/fd显示,它已打开1024个文件(ls -1/proc/$) pid/fd |。这些文件中的大多数如下:

lr-x------. 1 patrickb patrickb 64 Jun 13 17:20 965 -> /home/patrickb/.raku/precomp/F494CC98E40B399BDACD0E2436C176FDE8706DE8/EA/EA68508E655FD3F22D1AE0A8666B86469073473

因此,这是编译器打开许多预编译文件的编译器。这实际上是非常合理的,因为依赖树很容易构成>具有一个或两个较大依赖性的非琐事项目中的1000个文件。 (就我而言,有红色 cro 在deps中。

/cpan:jnthn/cro :: http 因此,我有一个相当低的限制集。调用ulimit -n 4096在运行我的应用程序之前使其正常工作。

考虑到以上所有内容,干净的解决方案似乎是将以下内容添加到/etc/security/limits.conf

# Increase nofile soft from the default of 1024.
# The Rakudo compiler sometimes hits the limit.
*               soft    nofile          4096

The people in the #raku IRC channel were super helpful in solving this.

Stopping the process at the point it errors (I compiled my own Rakudo and put a sleep right before where the error message is printed.) and looking at /proc/$PID/fd of one of the rakudo compiler processes showed that it has exactly 1024 files open (ls -1 /proc/$PID/fd | wc -l). Most of those files look as follows:

lr-x------. 1 patrickb patrickb 64 Jun 13 17:20 965 -> /home/patrickb/.raku/precomp/F494CC98E40B399BDACD0E2436C176FDE8706DE8/EA/EA68508E655FD3F22D1AE0A8666B86469073473

So it's the compiler that has lots of precompiled files open. That's actually quite plausible, as the dependency trees can easily comprise > 1000 files in non trivial projects with one or two larger dependencies. (In my case there is Red and Cro in the deps.)

ulimit -Sn prints 1024. So I have a rather low limit set. Calling ulimit -n 4096 before running my application makes it work.

Considering all of the above, the clean solution seems to be to add the following to /etc/security/limits.conf:

# Increase nofile soft from the default of 1024.
# The Rakudo compiler sometimes hits the limit.
*               soft    nofile          4096
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文