From: Aleksey Avdeev <solo@solin.spb.ru>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] Q: [python3-3.3.1] RLIMIT в hasher`е
Date: Wed, 10 Apr 2013 17:36:15 +0400
Message-ID: <51656ACF.9070204@solin.spb.ru> (raw)
In-Reply-To: <20130410125323.GA10600@altlinux.org>
[-- Attachment #1: Type: text/plain, Size: 2356 bytes --]
10.04.2013 16:53, Dmitry V. Levin пишет:
> On Wed, Apr 10, 2013 at 01:11:56PM +0400, Aleksey Avdeev wrote:
>> Приветствую.
>>
>> Я правильно понимаю, что установка пользовательским процессом RLIMIT
>> в 1000000, запрещена настройками hasher`а?
>
> $ hsh-run -- sh -c 'ulimit -Ha'
> core file size (blocks, -c) unlimited
> data seg size (kbytes, -d) unlimited
> scheduling priority (-e) 0
> file size (blocks, -f) unlimited
> pending signals (-i) 1032915
> max locked memory (kbytes, -l) 64
> max memory size (kbytes, -m) unlimited
> open files (-n) 4096
> pipe size (512 bytes, -p) 8
> POSIX message queues (bytes, -q) 819200
> real-time priority (-r) 0
> stack size (kbytes, -s) unlimited
> cpu time (seconds, -t) 7260
> max user processes (-u) 1024
> virtual memory (kbytes, -v) unlimited
> file locks (-x) unlimited
>
> Привысить значения этих hard limits ядро не даст.
>
>> PS: В Python-3.3.1 такую операцию пытается сделать
>> test.test_resource.ResourceTest. Если у нас это запрещено -- отключу тест.
>
> Какой именно лимит?
В коде (см.
<http://git.altlinux.org/people/solo/packages/?p=python3.git;a=blob;f=python3/Lib/test/test_resource.py;h=f3416b7b43ef2db9094401f65abe78222af7746a;hb=001b4a54de71226a2f7e0d9f5a409774a686effd>):
# Issue 6083: Reference counting bug
def test_setrusage_refcount(self):
try:
limits = resource.getrlimit(resource.RLIMIT_CPU)
except AttributeError:
pass
else:
class BadSequence:
def __len__(self):
return 2
def __getitem__(self, key):
if key in (0, 1):
return len(tuple(range(1000000)))
raise IndexError
resource.setrlimit(resource.RLIMIT_CPU, BadSequence())
Анализ остального кода показывает, что речь о RLIMIT_CPU, определённом
в /usr/include/bits/resource.h:
/* Kinds of resource limit. */
enum __rlimit_resource
{
/* Per-process CPU limit, in seconds. */
RLIMIT_CPU = 0,
#define RLIMIT_CPU RLIMIT_CPU
...
--
С уважением. Алексей.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 897 bytes --]
next prev parent reply other threads:[~2013-04-10 13:36 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-10 9:11 Aleksey Avdeev
2013-04-10 12:53 ` Dmitry V. Levin
2013-04-10 13:36 ` Aleksey Avdeev [this message]
2013-04-10 13:45 ` Dmitry V. Levin
2013-04-10 14:41 ` Aleksey Avdeev
2013-04-10 15:47 ` Dmitry V. Levin
2013-04-10 17:06 ` Aleksey Avdeev
2013-04-10 17:39 ` Dmitry V. Levin
2013-04-11 12:51 ` Aleksey Avdeev
2013-04-11 13:02 ` Dmitry V. Levin
2013-04-10 19:10 ` Paul Wolneykien
2013-04-10 19:54 ` Aleksey Avdeev
2013-04-10 20:12 ` Dmitry V. Levin
2013-04-10 20:47 ` Aleksey Avdeev
2013-04-10 21:22 ` Dmitry V. Levin
2013-04-11 8:45 ` Sergey Y. Afonin
2013-04-11 11:48 ` Aleksey Avdeev
2013-04-11 11:55 ` Paul Wolneykien
2013-04-11 12:15 ` Aleksey Avdeev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51656ACF.9070204@solin.spb.ru \
--to=solo@solin.spb.ru \
--cc=devel@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git