Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #108649

Re: intermittent ValueErrors from subprocess

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Subject Re: intermittent ValueErrors from subprocess
Date Mon, 16 May 2016 08:59:19 +1000
Lines 29
Message-ID <mailman.6.1463353165.19823.python-list@python.org> (permalink)
References <57389A9D.1010205@gmail.com> <CAPTjJmp1H99HKmEarskE1b-ia0=KFDBTpfU+cWt6vVFeJtBHZg@mail.gmail.com> <5738F8E2.1030403@gmail.com> <CAPTjJmrNLFnvWOr=0D=WT3FJuZ1btFuLsxxrRaAF5M2D7GYtXg@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de 1yl+HVUndL3jaUYLRBXjPACmT0nRDjcmseyKnsuQZw+A==
Return-Path <rosuav@gmail.com>
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; 'apis': 0.07; 'converts': 0.07; 'skip:/ 10': 0.07; 'cc:addr :python-list': 0.09; 'messing': 0.09; 'url:github': 0.09; 'exception': 0.13; '2016': 0.16; 'descriptor.': 0.16; 'descriptors,': 0.16; 'did,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:74.125.82.46': 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; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'am,': 0.23; '(you': 0.23; 'slightly': 0.23; 'header:In-Reply-To:1': 0.24; 'mon,': 0.24; 'least': 0.27; 'message-id:@mail.gmail.com': 0.27; 'post': 0.31; 'problem': 0.33; '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; 'possible': 0.36; 'subject:: ': 0.37; 'say': 0.37; 'sources': 0.37; 'subject:from': 0.39; "didn't": 0.39; 'unable': 0.39; 'rather': 0.39; 'where': 0.40; 'some': 0.40; 'easy': 0.60; 'your': 0.60; 'worth': 0.67; 'click': 0.76; 'chrisa': 0.84; 'to:none': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc; bh=WgDmd0GE53bW0YIMZPAQEBJUbBk47UmS9qgHzjmMPM4=; b=ia4CF8ZW64V8tS4RqFUZ4My5d3eRp6V8L9XhJihPV5CJqodF2Thfa/yw7/60IbLSx7 Mh6Nz3MkoEO0/2et3dYrncMZcwW4OREJ205JNOeVs/nUZl0OAtz6gIJCEyq2NJBrRL6P zsww+3+4SiZQqFjN68qpVajcYx9c/KTHiTo3Eg2cnWr3z/1Hs2A/+mReepiA9BJQBrxz iKU0ez3ahuuu7izoXvFrh3u+ixpg26Wb4SJ3m3NndDc6uIKChGK3BEXenvLX1FQq+zNR zLRXSYWAjid4yhtd5WdiPAT95ot90HA1FFdDXouduY16Xb5koLoFrpo2jdeUkCAHBwhJ IW5g==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc; bh=WgDmd0GE53bW0YIMZPAQEBJUbBk47UmS9qgHzjmMPM4=; b=e5j1O8o3gK/yEz3lQx7ralL8N5zgM2SiMoAGtcgE0uWbFeb/NgCcVBRFc4RApXe/RS uNvkEXyd+OAiY2nn0dddOYjHfmCon1PDdheRvND3JJQNUAAwNI98AuitjVM7x/n++85W 1ZLihtRkEHzDsYEo8LUaDwGwtzPkpuotpHUy2MLEZ6+JW9pfAwwD+wDEj9Dg6WuUIxKf VoajWPgl+wi8loiFTfFGg3Cd+01IWlHftICFwvj1DyJLC1s5C/Z/YkFUnU0orygtLBK8 q52VlAt6Biyey7XQ+FrGGDzb5isVeJA9+KGNlXdk9SFRUhWc3yEMCS/Iwpb9fJHd+gaD hhhg==
X-Gm-Message-State AOPr4FWqLh1bT0jWYjl5vx7RbjJa5T5gt9qpbFPcwkun/ImPdf2qbQoQsqYb0vI4UTzvm2nQ9Y2GuUxIDc9haA==
X-Received by 10.28.126.145 with SMTP id z139mr13988836wmc.81.1463353159712; Sun, 15 May 2016 15:59:19 -0700 (PDT)
In-Reply-To <5738F8E2.1030403@gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.22
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <CAPTjJmrNLFnvWOr=0D=WT3FJuZ1btFuLsxxrRaAF5M2D7GYtXg@mail.gmail.com>
X-Mailman-Original-References <57389A9D.1010205@gmail.com> <CAPTjJmp1H99HKmEarskE1b-ia0=KFDBTpfU+cWt6vVFeJtBHZg@mail.gmail.com> <5738F8E2.1030403@gmail.com>
Xref csiph.com comp.lang.python:108649

Show key headers only | View raw


On Mon, May 16, 2016 at 8:32 AM, Pavlos Parissis
<pavlos.parissis@gmail.com> 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/67db620d87f667423f6f6e3a04e0bff5

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.

>> 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
>

If you can recreate the problem consistently, 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. Somewhere, something's failing, and it's not easy
to see what.

ChrisA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: intermittent ValueErrors from subprocess Chris Angelico <rosuav@gmail.com> - 2016-05-16 08:59 +1000

csiph-web