From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 11 Apr 2013 17:02:28 +0400 From: "Dmitry V. Levin" To: ALT Linux Team development discussions Message-ID: <20130411130228.GA19391@altlinux.org> Mail-Followup-To: ALT Linux Team development discussions References: <51652CDC.4050300@solin.spb.ru> <20130410125323.GA10600@altlinux.org> <51656ACF.9070204@solin.spb.ru> <20130410134558.GG10600@altlinux.org> <51657A20.3060304@solin.spb.ru> <20130410154703.GA11748@altlinux.org> <51659BFC.1060309@solin.spb.ru> <20130410173918.GB11748@altlinux.org> <5166B1D0.4000602@solin.spb.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PEIAKu/WMn1b1Hv9" Content-Disposition: inline In-Reply-To: <5166B1D0.4000602@solin.spb.ru> X-fingerprint: FE4C 93AB E19A 2E4C CB5D 3E4E 7CAB E6AC 9E35 361E Subject: Re: [devel] =?koi8-r?b?UTogW3B5dGhvbjMtMy4zLjFdIFJMSU1JVCDXIGhhc2hl?= =?koi8-r?b?cmDF?= X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 13:02:28 -0000 Archived-At: List-Archive: List-Post: --PEIAKu/WMn1b1Hv9 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 11, 2013 at 04:51:28PM +0400, Aleksey Avdeev wrote: > 10.04.2013 21:39, Dmitry V. Levin =D0=C9=DB=C5=D4: > > On Wed, Apr 10, 2013 at 09:06:04PM +0400, Aleksey Avdeev wrote: > >> 10.04.2013 19:47, Dmitry V. Levin =D0=C9=DB=C5=D4: > >>> On Wed, Apr 10, 2013 at 06:41:36PM +0400, Aleksey Avdeev wrote: > >>>> 10.04.2013 17:45, Dmitry V. Levin =D0=C9=DB=C5=D4: > >>>>> On Wed, Apr 10, 2013 at 05:36:15PM +0400, Aleksey Avdeev wrote: > >>>>>> 10.04.2013 16:53, Dmitry V. Levin =D0=C9=DB=C5=D4: > >>>>>>> On Wed, Apr 10, 2013 at 01:11:56PM +0400, Aleksey Avdeev wrote: > >>>>>>>> =F0=D2=C9=D7=C5=D4=D3=D4=D7=D5=C0. > >>>>>>>> > >>>>>>>> =F1 =D0=D2=C1=D7=C9=CC=D8=CE=CF =D0=CF=CE=C9=CD=C1=C0, =DE=D4= =CF =D5=D3=D4=C1=CE=CF=D7=CB=C1 =D0=CF=CC=D8=DA=CF=D7=C1=D4=C5=CC=D8=D3=CB= =C9=CD =D0=D2=CF=C3=C5=D3=D3=CF=CD RLIMIT > >>>>>>>> =D7 1000000, =DA=C1=D0=D2=C5=DD=C5=CE=C1 =CE=C1=D3=D4=D2=CF=CA= =CB=C1=CD=C9 hasher`=C1? > >>>>>>> > >>>>>>> $ 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 > >>>>>>> > >>>>>>> =F0=D2=C9=D7=D9=D3=C9=D4=D8 =DA=CE=C1=DE=C5=CE=C9=D1 =DC=D4=C9=C8= hard limits =D1=C4=D2=CF =CE=C5 =C4=C1=D3=D4. > >>>>>>> > >>>>>>>> PS: =F7 Python-3.3.1 =D4=C1=CB=D5=C0 =CF=D0=C5=D2=C1=C3=C9=C0 = =D0=D9=D4=C1=C5=D4=D3=D1 =D3=C4=C5=CC=C1=D4=D8 > >>>>>>>> test.test_resource.ResourceTest. =E5=D3=CC=C9 =D5 =CE=C1=D3 =DC= =D4=CF =DA=C1=D0=D2=C5=DD=C5=CE=CF -- =CF=D4=CB=CC=C0=DE=D5 =D4=C5=D3=D4. > >>>>>>> > >>>>>>> =EB=C1=CB=CF=CA =C9=CD=C5=CE=CE=CF =CC=C9=CD=C9=D4? > >>>>>> > >>>>>> =F7 =CB=CF=C4=C5 (=D3=CD. > >>>>>> ): > >>>>>> > >>>>>> # Issue 6083: Reference counting bug > >>>>>> def test_setrusage_refcount(self): > >>>>>> try: > >>>>>> limits =3D 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()) > >>>>> > >>>>> =E9 =CB=C1=CB=C9=C5 =DA=CE=C1=DE=C5=CE=C9=D1 RLIMIT_CPU =D7 =D2=C5= =DA=D5=CC=D8=D4=C1=D4=C5 =D0=D9=D4=C1=C5=D4=D3=D1 =D5=D3=D4=C1=CE=CF=D7=C9= =D4=D8 =DC=D4=CF=D4 =CB=CF=C4? > >>>> > >>>> 1000000 (=D3=CD. =D7=D9=C4=C5=CC=C5=CE=C9=C5). > >>>> > >>>> =F4=C1=CD =D7 =CB=CF=CE=C5=DE=CE=CF=CD =C9=D4=CF=C7=C5 setrlimit(r= esource, &rl)(=D3=CD. =C6=D5=CE=CB=C3=C9=C0 > >>>> resource_setrlimit(PyObject *self, PyObject *args) =D7 > >>>> ) > >>>> =D7=CF=DA=D7=D2=C1=DD=C1=C5=D4 errno =3D=3D EPERM. > >>> > >>> =F3=CB=CF=CC=D8=CB=CF =DA=CE=C1=DE=C5=CE=C9=CA RLIMIT_CPU =D0=C5=D2= =C5=C4=C1=C5=D4=D3=D1 =D7 =CF=C4=CE=CF=CD =D7=D9=DA=CF=D7=C5 setrlimit? > >>> =EB=C1=CB=C9=C5 =DA=CE=C1=DE=C5=CE=C9=D1 RLIMIT_CPU =D7 =D2=C5=DA=D5= =CC=D8=D4=C1=D4=C5 =D0=D9=D4=C1=C5=D4=D3=D1 =D5=D3=D4=C1=CE=CF=D7=C9=D4=D8 = =DC=D4=CF=D4 =CB=CF=C4? > >> > >> =F7=D9=DA=CF=D7 =D0=D2=CF=C9=D3=C8=CF=C4=C9=D4 =D4=C1=CB: > >> > >> setrlimit(resource, &rl) > >> > >> =C7=C4=C5: > >> > >> resource =3D 0 (=CB=CF=CE=D3=D4=C1=CE=D4=C1 RLIMIT_CPU =C9=DA /usr/inc= lude/bits/resource.h) > >> > >> rl -- =D3=D4=D2=D5=CB=D4=D5=D2=C1, =D3=CF=C4=C5=D2=D6=C1=DD=C1=D1: > >> > >> rl.rlim_cur =3D 1000000 > >> > >> rl.rlim_max =3D 1000000 > >=20 > > =F7=C5=D2=CE=CF. > >=20 > >>> =EE=C1 =CB=C1=CB=CF=C5 =D0=CF=D7=C5=C4=C5=CE=C9=C5 setrlimit =D2=C1= =D3=D3=DE=C9=D4=D9=D7=C1=C5=D4 =DC=D4=CF=D4 =D4=C5=D3=D4? > >> > >> =FE=D4=CF setrlimit(resource, &rl) =D7=C5=D2=CE=A3=D4 =CE=C5=DE=D4= =CF =CF=D4=CC=C9=DE=CE=CF=C5 =CF=D4 -1. > >=20 > > =F7=C5=D2=CE=CF. > >=20 > >>> =FE=D4=CF =D7=CF=CF=C2=DD=C5 =D4=C5=D3=D4=C9=D2=D5=C5=D4 =D4=C5=D3=D4= =D0=CF =C9=CD=C5=CE=C9 test_setrusage_refcount? > >> > >> =F0=CF=C8=CF=D6=C5 =CF=CE =D0=D2=CF=D7=C5=D2=D1=C5=D4 =D2=C1=C2=CF= =D4=CF=D3=D0=CF=D3=CF=C2=CE=CF=D3=D4=D8 =D7=D9=DA=CF=D7=C1 setrlimit (=D3= =D5=C4=D1 =D0=CF =CB=CF=C4=D5). > >=20 > > =EE=C5=D7=C5=D2=CE=CF. >=20 > =FC=D4=CF =CE=C5 =D7=C1=D6=CE=CF, =D4. =CB., =D3=D5=C4=D1 =D0=CF =CC=CF= =C7=D5, =D0=D2=CF=C2=CC=C5=CD=C1 =C9=CD=C5=CE=CE=CF =D7 =D7=CF=DA=D7=D2=C1= =D4=C5 -1, > =D7=D9=DA=CF=D7=CF=CD setrlimit. =F7 =CC=CF=C7=C5: >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > ERROR: test_setrusage_refcount (test.test_resource.ResourceTest) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/usr/src/RPM/BUILD/python3-3.3.1/Lib/test/test_resource.py", > line 125, in test_setrusage_refcount > resource.setrlimit(resource.RLIMIT_CPU, BadSequence()) > ValueError: not allowed to raise maximum limit > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >=20 > =E1 =D3=D4=D2=CF=CB=C1 "not allowed to raise maximum limit" =D0=D2=C9= =D3=D5=D4=D3=D4=D7=D5=C5=D4 =D4=CF=CC=D8=CB=CF =D7: >=20 > if (setrlimit(resource, &rl) =3D=3D -1) { > if (errno =3D=3D EINVAL) > PyErr_SetString(PyExc_ValueError, > "current limit exceeds maximum limit"); > else if (errno =3D=3D EPERM) > PyErr_SetString(PyExc_ValueError, > "not allowed to raise maximum limit"); > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > else > PyErr_SetFromErrno(PyExc_OSError); > goto error; > } >=20 > =F4. =C5. =C4=CF =D7=D9=DA=CF=D7=C1 setrlimit, =D3 =D5=CB=C1=DA=C1=CE= =CE=D9=CD=C9 =D7=D9=DB=C5 =D0=C1=D2=C1=CD=C5=D4=D2=C1=CD=C9, =C4=C5=CC=CF > =C4=CF=C8=CF=C4=C9=D4. =E9 =CB=CF=D2=C5=CE=D8 =D0=D2=CF=C2=CC=C5=CD=D9 = =D7 =D4=CF=CD, =DE=D4=CF =CF=CE =D7=CF=DA=D7=D2=C1=DD=C1=C5=D4 -1. >=20 > =E1 =D3=CD=D9=D3=CC =D4=C5=D3=D4=C1 -- =D7=C5=DD=D8, =D7 =C4=C1=CE=CE= =CF=CD =CB=CF=CE=D4=C5=CB=D3=D4=C5, =C4=C5=D3=D1=D4=C1=D1. =EE=D5 =C8=D7=C1=D4=C9=D4 =D5=D6=C5 =D0=CF=DA=CF=D2=C9=D4=D8=D3=D1. --=20 ldv --PEIAKu/WMn1b1Hv9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlFmtGQACgkQfKvmrJ41Nh71/ACgp1lGaT/UXaQMvIhnv5QxSYkm BWQAn3cJsFAYb5gq8o8xvcyKXQp3/QK8 =2IC8 -----END PGP SIGNATURE----- --PEIAKu/WMn1b1Hv9--