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


Groups > comp.lang.python > #108650

Re: intermittent ValueErrors from subprocess

From Pavlos Parissis <pavlos.parissis@gmail.com>
Newsgroups comp.lang.python
Subject Re: intermittent ValueErrors from subprocess
Date 2016-05-16 01:17 +0200
Message-ID <mailman.7.1463354266.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> <57390395.8070005@gmail.com>

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 16/05/2016 12:59 πμ, Chris Angelico wrote:
> 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.
> 

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

Thanks once again,
Pavlos



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


Thread

Re: intermittent ValueErrors from subprocess Pavlos Parissis <pavlos.parissis@gmail.com> - 2016-05-16 01:17 +0200

csiph-web