From issues-reply at bitbucket.org Thu Nov 1 13:47:04 2018 From: issues-reply at bitbucket.org (Shaun Jackman) Date: Thu, 01 Nov 2018 17:47:04 +0000 (UTC) Subject: [pypy-issue] Issue #2908: Segfault when reading a GraphViz file with Pygraphviz (pypy/pypy) Message-ID: <20181101174704.17827.6046@celery-worker-110.ash1.bb-inf.net> New issue 2908: Segfault when reading a GraphViz file with Pygraphviz https://bitbucket.org/pypy/pypy/issues/2908/segfault-when-reading-a-graphviz-file-with Shaun Jackman: I installed Pypy3 6.0.0 and GraphViz 2.40.1 using Linuxbrew `brew install pypy3 graphviz`, and I installed Pygraphviz 1.5 and Networkx 2.2 using `pip_pypy3 install --user pygraphviz networkx`. When I attempt to write a GraphViz file using `networkx.write_dot`, it segafults in `_IO_new_fdopen iofdopen.c:63` called by `_wrap_agwrite` in `_graphviz.pypy3-60-x86_64-linux-gnu.so`. It appears to be dereferencing a null pointer. Here's the backtrace: ``` (gdb) bt #0 _IO_new_fdopen (fd=1, mode=0x0) at iofdopen.c:63 #1 0x00007fc0ef4fb759 in _wrap_agwrite () from /home/sjackman/.local/lib/python3.5/site-packages/pygraphviz/_graphviz.pypy3-60-x86_64-linux-gnu.so #2 0x00007fc0ed183984 in ?? () from /gsc/btl/linuxbrew/Cellar/pypy3/6.0.0/lib/libpypy3-c.so (gdb) x/i $pc => 0x7fc0eb9a67b <_IO_new_fdopen+11>: movzbl (%rsi),%eax (gdb) p/x $rsi $1 = 0x0 ``` This works as expected when using CPython 3.7.0 rather than Pypy3. For my purpose, I have found Pypy3 to be four times faster than CPython. Any thoughts on how to troubleshoot this issue? See also https://github.com/pygraphviz/pygraphviz/issues/177 From issues-reply at bitbucket.org Sat Nov 3 14:01:28 2018 From: issues-reply at bitbucket.org (Louis Sautier) Date: Sat, 03 Nov 2018 18:01:28 +0000 (UTC) Subject: [pypy-issue] Issue #2909: PyObject_GetBuffer fails on arrays (pypy/pypy) Message-ID: <20181103180128.26327.88470@celery-worker-108.ash1.bb-inf.net> New issue 2909: PyObject_GetBuffer fails on arrays https://bitbucket.org/pypy/pypy/issues/2909/pyobject_getbuffer-fails-on-arrays Louis Sautier: Hello, the regex package [fails tests with PyPy](https://bitbucket.org/mrabarnett/mrab-regex/issues/145/1-fail-in-testsuite-under-pypy). Apparently `PyObject_GetBuffer(string, &str_info->view, PyBUF_SIMPLE)` does not work on `array.array` types. The relevant code is [here](https://bitbucket.org/mrabarnett/mrab-regex/src/cec0dc244e5dad3fa3994ed527ee4928b79332ef/regex_2/_regex.c#lines-17501) Test programme: ```py import regex import array a = array.array("c") regex.compile("bla").match(a) ``` Result: ``` pypy test.py PyObject_GetBuffer failed! Traceback (most recent call last): File "test.py", line 5, in regex.compile("bla").match(a) TypeError: expected string or buffer ``` From issues-reply at bitbucket.org Thu Nov 8 09:22:58 2018 From: issues-reply at bitbucket.org (Robert Behar) Date: Thu, 08 Nov 2018 14:22:58 +0000 (UTC) Subject: [pypy-issue] Issue #2910: 'distutils.sysconfig' has no attribute '_init_posix' (pypy/pypy) Message-ID: <20181108142250.24135.77017@app-147.ash1.bb-inf.net> New issue 2910: 'distutils.sysconfig' has no attribute '_init_posix' https://bitbucket.org/pypy/pypy/issues/2910/distutilssysconfig-has-no-attribute Robert Behar: even though it is implemented in sysconfig_pypy.py it is not exposed by sysconfig.py. pip_pypy3 install pcapy failes with this error due to this From issues-reply at bitbucket.org Fri Nov 9 22:09:42 2018 From: issues-reply at bitbucket.org (Aaron Wise) Date: Sat, 10 Nov 2018 03:09:42 +0000 (UTC) Subject: [pypy-issue] Issue #2911: high memory usage calling json.dumps (pypy/pypy) Message-ID: <20181110030942.9637.42932@app-137.ash1.bb-inf.net> New issue 2911: high memory usage calling json.dumps https://bitbucket.org/pypy/pypy/issues/2911/high-memory-usage-calling-jsondumps Aaron Wise: When running a simple script (below) pypy3 has about 20x memory usage compared to cpython when performing json.dumps(). Seems like this might be related to issue [1124](https://bitbucket.org/pypy/pypy/issues/1124/memory-usage-parsing-json) Here are the memory-profiler traces: python3-3.6.5 Line # Mem usage Increment Line Contents ================================================ 12 999.1 MiB 999.1 MiB @profile(stream=fp) 13 def my_func(my_map): 14 1041.2 MiB 0.0 MiB for i in range(1): 15 999.1 MiB 0.0 MiB print(i) 16 #start = time.time() 17 1041.2 MiB 42.1 MiB a = json.dumps(my_map) pypy3-6.0.0 Line # Mem usage Increment Line Contents ================================================ 12 1359.5 MiB 1359.5 MiB @profile(stream=fp) 13 def my_func(my_map): 14 2314.0 MiB 0.0 MiB for i in range(1): 15 1359.5 MiB 0.0 MiB print(i) 16 #start = time.time() 17 2314.0 MiB 954.5 MiB a = json.dumps(my_map) ------ ``` #!python import random import json from memory_profiler import profile fp=open('memory_profiler.log','w+') @profile(stream=fp) def my_func(my_map): for i in range(1): print(i) a = json.dumps(my_map) if __name__ == '__main__': my_map = {} for i in range(10000000): my_map[''.join(str(random.randint(0,10000000)))] = random.uniform(0,1) my_func(my_map) ``` From issues-reply at bitbucket.org Mon Nov 12 11:18:10 2018 From: issues-reply at bitbucket.org (Donald Stufft) Date: Mon, 12 Nov 2018 16:18:10 +0000 (UTC) Subject: [pypy-issue] Issue #2912: TypeError: decoding Unicode is not supported when using PyCurl (pypy/pypy) Message-ID: <20181112161810.37695.59155@app-137.ash1.bb-inf.net> New issue 2912: TypeError: decoding Unicode is not supported when using PyCurl https://bitbucket.org/pypy/pypy/issues/2912/typeerror-decoding-unicode-is-not Donald Stufft: I am attempting to port an application from CPython to PyPy3, and I'm running into an error that is only occurring on PyPy when using PyCurl. Reproduction steps are: ``` docker run --rm -it pypy:3.5-6.0.0-slim /bin/bash apt-get update apt-get install build-essential libffi-dev libcurl4-openssl-dev libssl-dev pip install pycurl pypy3 - <<$end import pycurl c = pycurl.Curl() c.setopt(pycurl.URL, "https://example.com/") print(c.getinfo(pycurl.EFFECTIVE_URL)) $end Traceback (most recent call last): File "", line 4, in TypeError: decoding Unicode is not supported ``` If I do the same thing using CPython 3.5 (or 3.6), it gives me back `https://example.com/` instead of generating a `TypeError`. From issues-reply at bitbucket.org Mon Nov 12 15:21:59 2018 From: issues-reply at bitbucket.org (Sean) Date: Mon, 12 Nov 2018 20:21:59 +0000 (UTC) Subject: [pypy-issue] Issue #2913: Deletion from array.array is far slower than CPython (pypy/pypy) Message-ID: <20181112202159.8990.39996@celery-worker-111.ash1.bb-inf.net> New issue 2913: Deletion from array.array is far slower than CPython https://bitbucket.org/pypy/pypy/issues/2913/deletion-from-arrayarray-is-far-slower Sean: Hey, The below script completes in about 50 seconds with Python 3.7 but after 10 mins still hasn't finished running under the latest version of PyPy shipped with Fedora 29, which is as follows: ``` Python 3.5.3 (7cafdf4fca72, Aug 27 2018, 22:02:53) [PyPy 6.0.0 with GCC 8.2.1 20180801 (Red Hat 8.2.1-2)] ``` If you require any further information let me know! ``` import array import random MAX64 = 2**64 - 1 OP_QWORD_LEN = 3 OPS = 200 ars = [] for x in range(100000): ars.append(array.array('Q', [MAX64 for x in range(OPS * OP_QWORD_LEN)])) for x in range(100000): ar = ars[x] for _ in range(250): idx = int(len(ar) * random.random()) del ar[idx] ``` From issues-reply at bitbucket.org Fri Nov 16 02:51:56 2018 From: issues-reply at bitbucket.org (V.E.O) Date: Fri, 16 Nov 2018 07:51:56 +0000 (UTC) Subject: [pypy-issue] Issue #2914: ctypes.FormatError() different behavior from python (pypy/pypy) Message-ID: <20181116075156.1503.77402@celery-worker-111.ash1.bb-inf.net> New issue 2914: ctypes.FormatError() different behavior from python https://bitbucket.org/pypy/pypy/issues/2914/ctypesformaterror-different-behavior-from V.E.O: the argument of ctypes.FormatError() is optional, but it is different in pypy: >>>> import ctypes >>>> ctypes.FormatError() Traceback (most recent call last): File "", line 1, in TypeError: FormatError() takes exactly 1 argument (0 given) From issues-reply at bitbucket.org Fri Nov 16 20:06:50 2018 From: issues-reply at bitbucket.org (Donald Stufft) Date: Sat, 17 Nov 2018 01:06:50 +0000 (UTC) Subject: [pypy-issue] Issue #2915: Importing lxml on PyPy3.6 nightly fails (pypy/pypy) Message-ID: <20181117010649.21915.9985@celery-worker-110.ash1.bb-inf.net> New issue 2915: Importing lxml on PyPy3.6 nightly fails https://bitbucket.org/pypy/pypy/issues/2915/importing-lxml-on-pypy36-nightly-fails Donald Stufft: When installing and then importing lxml on PyPy3 3.6 (`pypy-c-jit-95165-6ffaea666f35-linux64.tar.bz2`) an error is generating when trying to import `lxml.etree`. ``` >>>> import lxml.etree Traceback (most recent call last): File "", line 1, in ImportError: /opt/warehouse/site-packages/lxml/etree.pypy3-61-x86_64-linux-gnu.so: undefined symbol: _PyErr_FormatFromCause ``` I'm not sure if this bug lies with PyPy or lxml, but figured I'd start here. From issues-reply at bitbucket.org Sun Nov 18 13:24:36 2018 From: issues-reply at bitbucket.org (Ryan Hileman) Date: Sun, 18 Nov 2018 18:24:36 +0000 (UTC) Subject: [pypy-issue] Issue #2916: py3.6 variable annotation breaks ternary expression (pypy/pypy) Message-ID: <20181118182436.24705.60553@celery-worker-110.ash1.bb-inf.net> New issue 2916: py3.6 variable annotation breaks ternary expression https://bitbucket.org/pypy/pypy/issues/2916/py36-variable-annotation-breaks-ternary Ryan Hileman: `var: bool = True if False else False` In python3.6, this sets `var` to `False`. In pypy's py3.6 branch, it sets `var` to `(True, False, False)`. Seems like a parsing or AST error. pypy3: ``` 2 0 LOAD_CONST 1 ((True, False, False)) 2 STORE_FAST 0 (var) 4 LOAD_CONST 0 (None) 6 RETURN_VALUE ``` python3.7: ``` 2 0 LOAD_CONST 1 (False) 2 POP_JUMP_IF_FALSE 8 4 LOAD_CONST 2 (True) 6 JUMP_FORWARD 2 (to 10) >> 8 LOAD_CONST 1 (False) >> 10 STORE_FAST 0 (var) 12 LOAD_CONST 0 (None) 14 RETURN_VALUE ``` Is this a bug in constant folding? This works as expected: ``` var: bool var = True if False else False ``` From issues-reply at bitbucket.org Sun Nov 25 14:23:08 2018 From: issues-reply at bitbucket.org (Julian Berman) Date: Sun, 25 Nov 2018 19:23:08 +0000 (UTC) Subject: [pypy-issue] Issue #2917: Deformed enough PYTHONWARNINGS makes pypy crash on startup (pypy/pypy) Message-ID: <20181125192307.31355.4096@celery-worker-112.ash1.bb-inf.net> New issue 2917: Deformed enough PYTHONWARNINGS makes pypy crash on startup https://bitbucket.org/pypy/pypy/issues/2917/deformed-enough-pythonwarnings-makes-pypy Julian Berman: ``` #!terminal ? /usr/local/bin/pypy --version && env -i PYTHONWARNINGS='ignore:*:*:foo.py' /usr/local/bin/pypy julian at Air Python 2.7.13 (ab0b9caf307db6592905a80b8faffd69b39005b8, Jun 24 2018, 08:19:27) [PyPy 6.0.0 with GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)] debug: OperationError: debug: operror-type: ValueError debug: operror-value: Empty module name ``` In CPython this also blows up, but only once you import the warnings module (presumably the same thing happening, just early enough in PyPy startup to make the interpreter freak out a bit?): ``` ? /usr/bin/python --version && env -i PYTHONWARNINGS='ignore:*:*:foo.py' /usr/bin/python julian at Air Python 2.7.10 Python 2.7.10 (default, Aug 17 2018, 17:41:52) [GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.0.42)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import warnings Traceback (most recent call last): File "", line 1, in File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/warnings.py", line 388, in _processoptions(sys.warnoptions) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/warnings.py", line 110, in _processoptions _setoption(arg) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/warnings.py", line 126, in _setoption category = _getcategory(category) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/warnings.py", line 166, in _getcategory m = __import__(module, None, None, [klass]) ValueError: Empty module name ``` ISTM that probably the best behavior here is to not fail at all and to just do the same thing that happens when you provide slightly less deformed PYTHONWARNINGS -- i.e., ignore it. ``` ? PYTHONWARNINGS=foo:bar:bar:bar pypy julian at Air Invalid -W option ignored: invalid action: 'foo' ``` ``` From issues-reply at bitbucket.org Mon Nov 26 02:39:54 2018 From: issues-reply at bitbucket.org (teru mitsui) Date: Mon, 26 Nov 2018 07:39:54 +0000 (UTC) Subject: [pypy-issue] Issue #2918: Translation error when building with jit_profile=oprofile option (pypy/pypy) Message-ID: <20181126073953.13895.61580@celery-worker-110.ash1.bb-inf.net> New issue 2918: Translation error when building with jit_profile=oprofile option https://bitbucket.org/pypy/pypy/issues/2918/translation-error-when-building-with teru mitsui: When I built PyPy with the following command, translation was failed. ``` $ pypy ../../rpython/bin/rpython --translation-jit_profile=oprofile --opt=jit targetpypystandalone.py ``` What does log module mean? ``` [translation:info] Error: File "/Users/izawa/dev/pypy2-v6.0.0-src/rpython/translator/goal/translate.py", line 318, in main drv.proceed(goals) File "/Users/izawa/dev/pypy2-v6.0.0-src/rpython/translator/driver.py", line 554, in proceed result = self._execute(goals, task_skip = self._maybe_skip()) File "/Users/izawa/dev/pypy2-v6.0.0-src/rpython/translator/tool/taskengine.py", line 114, in _execute res = self._do(goal, taskcallable, *args, **kwds) File "/Users/izawa/dev/pypy2-v6.0.0-src/rpython/translator/driver.py", line 278, in _do res = func() File "/Users/izawa/dev/pypy2-v6.0.0-src/rpython/translator/driver.py", line 361, in task_pyjitpl_lltype backend_name=self.config.translation.jit_backend, inline=True) File "/Users/izawa/dev/pypy2-v6.0.0-src/rpython/jit/metainterp/warmspot.py", line 49, in apply_jit **kwds) File "/Users/izawa/dev/pypy2-v6.0.0-src/rpython/jit/metainterp/warmspot.py", line 240, in __init__ self.build_cpu(CPUClass, **kwds) File "/Users/izawa/dev/pypy2-v6.0.0-src/rpython/jit/metainterp/warmspot.py", line 489, in build_cpu translate_support_code, gcdescr=self.gcdescr) File "/Users/izawa/dev/pypy2-v6.0.0-src/rpython/jit/backend/x86/runner.py", line 47, in __init__ log.WARNING('oprofile support was explicitly enabled, but oprofile headers seem not to be available') [translation:ERROR] NameError: global name 'log' is not defined ``` From issues-reply at bitbucket.org Mon Nov 26 07:21:29 2018 From: issues-reply at bitbucket.org (Peter Gerell) Date: Mon, 26 Nov 2018 12:21:29 +0000 (UTC) Subject: [pypy-issue] Issue #2919: Problem with multiprocessing.Process on Windows (pypy/pypy) Message-ID: <20181126122128.33317.52058@celery-worker-108.ash1.bb-inf.net> New issue 2919: Problem with multiprocessing.Process on Windows https://bitbucket.org/pypy/pypy/issues/2919/problem-with-multiprocessingprocess-on Peter Gerell: The following simple program fails when using pypy3-v6. ``` #!python from multiprocessing import Process, freeze_support def func(): print(42) if __name__ == '__main__': freeze_support() p = Process(target=func) p.start() p.join() ``` ~~~~ C:\Test>c:\pypy3\pypy3 test.py Traceback (most recent call last): File "", line 1, in File "c:\pypy3\lib-python\3\multiprocessing\spawn.py", line 100, in spawn_main new_handle = steal_handle(parent_pid, pipe_handle) File "c:\pypy3\lib-python\3\multiprocessing\reduction.py", line 80, in steal_handle source_process_handle = _winapi.OpenProcess( AttributeError: module '_winapi' has no attribute 'OpenProcess' ~~~~ From issues-reply at bitbucket.org Mon Nov 26 07:53:08 2018 From: issues-reply at bitbucket.org (Julian Berman) Date: Mon, 26 Nov 2018 12:53:08 +0000 (UTC) Subject: [pypy-issue] Issue #2920: stat_result is missing st_birthtime (on OSes/FSes where that's a thing) (pypy/pypy) Message-ID: <20181126125308.16281.53248@celery-worker-110.ash1.bb-inf.net> New issue 2920: stat_result is missing st_birthtime (on OSes/FSes where that's a thing) https://bitbucket.org/pypy/pypy/issues/2920/stat_result-is-missing-st_birthtime-on Julian Berman: E.g., macOS + HFS on CPython: ``` #!terminal ~ ? /usr/bin/python -c 'import os; print os.stat("/usr/bin/python").st_birthtime' Julian at home 1540378051.0 ~ ? pypy -c 'import os; print os.stat("/usr/bin/python").st_birthtime' Julian at home Traceback (most recent call last): File "", line 1, in AttributeError: 'stat_result' object has no attribute 'st_birthtime' ``` From issues-reply at bitbucket.org Tue Nov 27 21:16:25 2018 From: issues-reply at bitbucket.org (Joshua Oreman) Date: Wed, 28 Nov 2018 02:16:25 +0000 (UTC) Subject: [pypy-issue] Issue #2921: missing select.KQ_NOTE_* exposures on kqueue platforms (pypy/pypy) Message-ID: <20181128021625.34445.7500@app-137.ash1.bb-inf.net> New issue 2921: missing select.KQ_NOTE_* exposures on kqueue platforms https://bitbucket.org/pypy/pypy/issues/2921/missing-selectkq_note_-exposures-on-kqueue Joshua Oreman: On kqueue platforms such as OS X, if the system headers define NOTE_FOO, it gets exposed under CPython as a Python constant select.KQ_NOTE_FOO, for values of FOO in (ATTRIB, CHILD, DELETE, EXEC, EXIT, EXTEND, FORK, LINK, LOWAT, RENAME, REVOKE, TRACK, TRACKERR, WRITE). It would be useful for PyPy to replicate this behavior, since it is otherwise difficult to use some kqueue filters without groveling in system headers for the right values for the NOTE constants. From issues-reply at bitbucket.org Tue Nov 27 21:26:38 2018 From: issues-reply at bitbucket.org (Joshua Oreman) Date: Wed, 28 Nov 2018 02:26:38 +0000 (UTC) Subject: [pypy-issue] Issue #2922: missing os.waitid exposure (pypy/pypy) Message-ID: <20181128022638.17123.77611@celery-worker-112.ash1.bb-inf.net> New issue 2922: missing os.waitid exposure https://bitbucket.org/pypy/pypy/issues/2922/missing-oswaitid-exposure Joshua Oreman: CPython exposes os.waitid() on platforms where waitid() is defined by the system C library, which among other features allows one to wait for a process to exit without consuming its exit status. It would be useful to be able to use this on PyPy as well, along with the associated os.P_PID/os.P_PGID/os.P_ANY and os.WEXITED/os.WNOWAIT/etc constants. From issues-reply at bitbucket.org Thu Nov 29 09:07:11 2018 From: issues-reply at bitbucket.org (Alex Kashirin) Date: Thu, 29 Nov 2018 14:07:11 +0000 (UTC) Subject: [pypy-issue] Issue #2923: a Fatal RPython error: AssertionError (pypy/pypy) Message-ID: <20181129140711.23313.24466@celery-worker-110.ash1.bb-inf.net> New issue 2923: a Fatal RPython error: AssertionError https://bitbucket.org/pypy/pypy/issues/2923/a-fatal-rpython-error-assertionerror Alex Kashirin: Hello, I'm unable to determine the cause for the error, The EXIT happens sometimes in at least several minutes or hours and not sure where days stand and most of the time never happens. ``` #!bash RPython traceback: File "rpython_jit_metainterp_8.c", line 44084, in send_bridge_to_backend File "rpython_jit_backend_x86_3.c", line 3963, in Assembler386_assemble_bridge File "rpython_jit_backend_x86.c", line 5295, in Assembler386__assemble File "rpython_jit_backend_x86.c", line 11112, in RegAlloc_walk_operations File "rpython_jit_backend_x86.c", line 34442, in RegAlloc_consider_jump File "rpython_jit_backend_x86_1.c", line 7012, in remap_frame_layout_mixed File "rpython_jit_backend_x86_1.c", line 29467, in remap_frame_layout File "rpython_jit_backend_x86_1.c", line 23820, in MachineCodeBlockWrapper_INSN_MOVSD File "rpython_jit_backend_x86.c", line 13847, in _missing_binary_insn Fatal RPython error: AssertionError ``` The translation of the PyPy is the script at: [https://github.com/kashirin-alex/environments-builder/blob/master/scripts/pypy2.sh#L10 ](Link URL) Will be great to know what is possible to inspect. Thank You, Kashirin Alex