New issue 2537: erequests (requests with eventlet): bad file descriptor / 
segmentation fault
https://bitbucket.org/pypy/pypy/issues/2537/erequests-requests-with-eventlet-bad-file

Serge G:

Using [erequests](https://github.com/saghul/erequests) library causes either 
segmentation fault or exceptions like following:

```
Traceback (most recent call last):
  File "/home/hadoop/stats/experiments/to_report_pypy_threading_actually.py", 
line 104, in <module>
    main()
  File "/home/hadoop/stats/experiments/to_report_pypy_threading_actually.py", 
line 100, in main
    read_events_parallel_threads()
  File "/home/hadoop/stats/experiments/to_report_pypy_threading_actually.py", 
line 74, in read_events_parallel_threads
    for res in results:
  File 
"/home/hadoop/pypy2-v5.7.0-src/site-packages/concurrent/futures/_base.py", line 
581, in result_iterator
    yield future.result()
  File 
"/home/hadoop/pypy2-v5.7.0-src/site-packages/concurrent/futures/_base.py", line 
405, in result
    return self.__get_result()
  File 
"/home/hadoop/pypy2-v5.7.0-src/site-packages/concurrent/futures/thread.py", 
line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/hadoop/stats/experiments/to_report_pypy_threading_actually.py", 
line 63, in _post_helper
    return requests.post(*arg_d['args'], **arg_d['kwargs'])
  File "/home/hadoop/pypy2-v5.7.0-src/site-packages/requests/api.py", line 110, 
in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/home/hadoop/pypy2-v5.7.0-src/site-packages/requests/api.py", line 56, 
in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/hadoop/pypy2-v5.7.0-src/site-packages/requests/sessions.py", line 
488, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/hadoop/pypy2-v5.7.0-src/site-packages/requests/sessions.py", line 
641, in send
    r.content
  File "/home/hadoop/pypy2-v5.7.0-src/site-packages/requests/models.py", line 
797, in content
    self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or 
bytes()
  File "/home/hadoop/pypy2-v5.7.0-src/site-packages/requests/models.py", line 
722, in generate
    raise ChunkedEncodingError(e)
ChunkedEncodingError: ("Connection broken: error(9, 'Bad file descriptor')", 
error(9, 'Bad file descriptor'))
```

Also this happens if just import library once and then use usual standard 
[`requests`](http://docs.python-requests.org/en/master/) library.

```
Python 2.7.13 (fa3249d55d15b9829e1be69cdf45b5a44cec902d, Mar 21 2017, 11:06:49)
[PyPy 5.7.0 with GCC 4.8.3 20140911 (Red Hat 4.8.3-9)
```


_______________________________________________
pypy-issue mailing list
pypy-issue@python.org
https://mail.python.org/mailman/listinfo/pypy-issue

Reply via email to