Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Pavlos Parissis Newsgroups: comp.lang.python Subject: Re: intermittent ValueErrors from subprocess Date: Mon, 16 May 2016 01:17:41 +0200 Lines: 95 Message-ID: References: <57389A9D.1010205@gmail.com> <5738F8E2.1030403@gmail.com> <57390395.8070005@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="W24aAP5878TnVX0qEU4P5pv4J0DQd1WB2" X-Trace: news.uni-berlin.de y6A7piu2q7fVTBkbui3P9ApgYcekB21eC53XmNZ40fdw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '16,': 0.03; 'cpython': 0.05; 'that?': 0.05; 'apis': 0.07; 'converts': 0.07; 'executed': 0.07; 'skip:/ 10': 0.07; 'mess': 0.09; 'messing': 0.09; 'url:github': 0.09; 'exception': 0.13; '12:59': 0.16; '2016': 0.16; "can't.": 0.16; 'descriptor.': 0.16; 'descriptors,': 0.16; 'did,': 0.16; 'filename:fname piece:signature': 0.16; 'received:192.168.0.103': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'so;': 0.16; 'sudo': 0.16; 'traceback.': 0.16; 'wrote:': 0.16; 'integer': 0.18; '>>>': 0.20; 'trace': 0.22; 'am,': 0.23; '(you': 0.23; 'slightly': 0.23; 'header:In-Reply- To:1': 0.24; 'mon,': 0.24; 'header:User-Agent:1': 0.26; 'chris': 0.26; 'least': 0.27; 'occurred': 0.29; 'code': 0.30; 'post': 0.31; 'problem': 0.33; 'usually': 0.33; 'message-id:@gmail.com': 0.34; 'file': 0.34; 'running': 0.34; 'received:google.com': 0.35; 'could': 0.35; 'instance': 0.35; 'level': 0.35; 'received:74.125.82': 0.35; 'problem.': 0.35; 'lines': 0.36; 'possible': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'say': 0.37; 'thanks': 0.37; 'sources': 0.37; 'times.': 0.38; 'several': 0.38; 'mean': 0.38; 'subject:from': 0.39; "didn't": 0.39; 'unable': 0.39; 'received:192': 0.39; 'rather': 0.39; 'to:addr:python.org': 0.40; 'where': 0.40; 'some': 0.40; 'easy': 0.60; 'your': 0.60; 'clients': 0.61; 'worth': 0.67; 'click': 0.76; 'chrisa': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to; bh=WN7h+VvjWhoK+Npdn57Gp3QYEDr1+mHOV1nLkm6CqQ4=; b=hj6hczvTfLK5JxIIk8T5Hr8tZSnd1FzSSBukxZ01scH2mZDHiTeF+I4k78RgKY+LpM ZdENrBwaS+yPYBSSUEDjSHo2zOrpuVFFuGYrYx0wmAarPeHi4mjnD0KGnUAsPR8lHaeC 1s8izjHGlK/0tB8DHri2w9wzWPu6xDxUrIeZBw407algU2WcQdily20Iciu00DGCYrtq pLnCUKsmJ3zoldL9bERTeqwWnqDs+cdgNOnrFN/KVkwkp6XstHp9W7hyJb2cwbWn33H4 xXfSXgtJ7QX5w4HxB71ByxVKEE9dKuEjqN3cB3+ncz1h9q7+IatyBd3PL1oze+6HEo2p PfFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=WN7h+VvjWhoK+Npdn57Gp3QYEDr1+mHOV1nLkm6CqQ4=; b=k7Pw1/RvBGJmxstWuZQoYoGO0k3EEc6RkSRSGDsLGHERKgP1WvSX1NolqQLFIw1v8k /PMk9v+e4JZc85n6UaZc0qPHI0yyNs44SiDLfJOvjix363A8vRqHgyHFftsiueV736Qe ZecuFCHbAPDi/fsOw7tGk3U3vJx72bMjaHMcuseRmJum2YLR3XrCQbh5tIRKXM7xJjuq l7G2agBlvYlGjdtWkyYSiYfTGl8KjDcgWapvEA8nbpsqZP7VboeKAXlpe4Pz34PwPano qFWnZbnriBim/hL1udnIi6WbzgyteTW952kNGfNWAY0iG6mVIvZGcrMzaouKKdrfC2M/ l3Mg== X-Gm-Message-State: AOPr4FWwtvrbabDkiYbx/wJDX4Mzk3cMwgQLACIaasP5ql4n/SUgFcypDmfTpYlZxUr9iA== X-Received: by 10.194.51.8 with SMTP id g8mr26196002wjo.15.1463354264438; Sun, 15 May 2016 16:17:44 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <57390395.8070005@gmail.com> X-Mailman-Original-References: <57389A9D.1010205@gmail.com> <5738F8E2.1030403@gmail.com> Xref: csiph.com comp.lang.python:108650 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --W24aAP5878TnVX0qEU4P5pv4J0DQd1WB2 Content-Type: multipart/mixed; boundary="s0Jvn9DHKMq5U1tdrESaxI6BaUfwBsT4W" From: Pavlos Parissis To: python-list@python.org Message-ID: <57390395.8070005@gmail.com> Subject: Re: intermittent ValueErrors from subprocess References: <57389A9D.1010205@gmail.com> <5738F8E2.1030403@gmail.com> In-Reply-To: --s0Jvn9DHKMq5U1tdrESaxI6BaUfwBsT4W Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 16/05/2016 12:59 =CF=80=CE=BC, Chris Angelico wrote: > On Mon, May 16, 2016 at 8:32 AM, Pavlos Parissis > wrote: >>> Searching the CPython sources for that exception shows one hit: >>> selectors.py, where it converts a file object to an integer file >>> descriptor. (You could have helped out by showing us the full >>> traceback.) >> >> I did, https://gist.github.com/unixsurfer/67db620d87f667423f6f6e3a04e0= bff5 >=20 > Ah. I didn't click that link in your original post - didn't know it > was the traceback. Better would have been to at least say so; best > would have been to include it inline. >=20 I don't usually include traces as they have long lines and several e-mail clients mess with them in a way that makes the trace unreadable. >>> Is it possible you were running out of file descriptors, >>> or in some other way unable to create the pipe? >> >> I don't think as I see right now only 8 FDs: >> >> sudo ls -1 /proc/22706/fd|wc >> 8 8 16 >> >=20 > If you can recreate the problem consistently, I can't. This is my main problem. This code has been executed ~100K and that exception has occurred only ~5 times. > it would be worth > messing around with slightly lower level APIs - using subprocess.Popen > rather than check_output, for instance - and see what you can do > without the pipes. What do you mean by that? > Somewhere, something's failing, and it's not easy > to see what. >=20 > ChrisA >=20 Thanks once again, Pavlos --s0Jvn9DHKMq5U1tdrESaxI6BaUfwBsT4W-- --W24aAP5878TnVX0qEU4P5pv4J0DQd1WB2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXOQOWAAoJEIP8ktofcXa5FxUP/iVILTGrHR9Qaj8N8QW1qn+a 6Fmjwm0uqA2ZMKTYQq9toCaIRLJOY1I5H4K5lOC1VzQbga71h8FXUf11Lml94Fuv rzTj6Meo0O5Leyqqm5Qgf2TCbRbNJqw6ZdkcQ7bjwjR8xTawGeI+W+pdlMPBwkIp 07ISeEkhDBpC695h3MQ30rRfXe6jmf/doQ1Ugm6Vw26gWLrxkwYMcu8EJ73qaEy5 NeEEdSLCiP4oLpYAxX1vzEqvOuNBOjR6y1NwTUpMfTSg2Nm2cIOixYQhtu7dohN2 QNLbqqxBtTmNNfQLRRbTXtTE/YyyExdnliTCEQ6l7ILBOk7hZ7FyfK7knDTA91pD XngipEv5pwAPJXcDhVm6HnhYcLypqwATqSXiyYdZ/XpPlg3IJJrOiKG3eNeSYOii iAbdrbX7cjrUsTbvAVAWqLnPgGrSH37na7ZK/TU2JMzXYB/NklfBZsaLwFtPC46y BZ5PJ9K5sHgBA8plneQ0h9LhUNuV0uxCzqY9XKQ0/1dx8m458HLQWtvhjPDlmu7i A+IdVm8w4/N/SOHOg8N3HfpaFvag8oHEXZucJHmBFFcOkuljbHI1AJB3fFlM/ct8 BplwOcB8fBGiUUgZljE8PF94wqtJ0tpkyxKi7CiQSN3C7lPIxDJbojPsZjlbNwER pF3KcYi4E9HHb52CtRxg =IfOa -----END PGP SIGNATURE----- --W24aAP5878TnVX0qEU4P5pv4J0DQd1WB2--