New issue 2786: pypy3 interpreter segfault somewhere around async/gc/finalization https://bitbucket.org/pypy/pypy/issues/2786/pypy3-interpreter-segfault-somewhere
Joshua Oreman: The async_generator package provides pure-Python async generators with semantics as similar as possible to the native ones in CPython 3.6, with the goal of supporting PyPy and CPython 3.5. It's located at https://github.com/python-trio/async_generator. I'm working on adding support to async_generator for PEP 525 finalization hooks, and ran into a PyPy interpreter crash. I've merged all the dependencies into one file without any CPython-specifics, and it still reliably reproduces the crash, with or without `--jit off`; it's attached below. (The full change from which this was extracted is https://github.com/python-trio/async_generator/pull/14; it's not merged into async_generator yet.) I'm using OS X 10.13.3, with pypy3 installed using Homebrew: ``` $ pypy3 asyncgenissue.py mock_sleep mock_sleep Segmentation fault: 11 $ pypy3 Python 3.5.3 (3f6eaa010fce78cc7973bdc1dfdb95970f08fed2, Jan 13 2018, 18:14:01) [PyPy 5.10.1 with GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] >>> print("\n".join("{}: {}".format(*elem) for elem in >>> __import__("sys").pypy_translation_info.items())) objspace.usemodules.__builtin__: False [lots of other objspace.usemodules.something: True] objspace.usemodules.micronumpy: False objspace.allworkingmodules: True objspace.extmodules: None objspace.translationmodules: False objspace.soabi: None objspace.honor__builtins__: False objspace.disable_call_speedhacks: False objspace.disable_entrypoints: False objspace.fstrings: True objspace.hash: siphash24 objspace.std.withtproxy: True objspace.std.withprebuiltint: False objspace.std.prebuiltintfrom: -5 objspace.std.prebuiltintto: 100 objspace.std.withsmalllong: False objspace.std.withspecialisedtuple: True objspace.std.withliststrategies: True objspace.std.withmethodcachecounter: False objspace.std.methodcachesizeexp: 11 objspace.std.intshortcut: True objspace.std.optimized_list_getitem: True objspace.std.newshortcut: False translating: True translation.continuation: True translation.type_system: lltype translation.backend: c translation.shared: True translation.log: True translation.gc: incminimark translation.gctransformer: framework translation.gcremovetypeptr: True translation.gcrootfinder: shadowstack translation.thread: True translation.sandbox: False translation.rweakref: True translation.jit: True translation.jit_backend: auto translation.jit_profiler: off translation.jit_opencoder_model: normal translation.check_str_without_nul: True translation.verbose: True translation.cc: clang translation.profopt: False translation.profoptargs: None translation.instrument: False translation.countmallocs: False translation.fork_before: None translation.dont_write_c_files: False translation.instrumentctl: None translation.output: None translation.secondaryentrypoints: cpyext,main translation.dump_static_data_info: False translation.no__thread: True translation.make_jobs: 3 translation.list_comprehension_operations: True translation.withsmallfuncsets: 5 translation.taggedpointers: False translation.keepgoing: False translation.lldebug: False translation.lldebug0: False translation.lto: False translation.icon: pypy.ico translation.libname: None translation.backendopt.inline: True translation.backendopt.inline_threshold: 32.4 translation.backendopt.inline_heuristic: rpython.translator.backendopt.inline.inlining_heuristic translation.backendopt.print_statistics: False translation.backendopt.merge_if_blocks: True translation.backendopt.mallocs: True translation.backendopt.constfold: True translation.backendopt.profile_based_inline: None translation.backendopt.profile_based_inline_threshold: 32.4 translation.backendopt.profile_based_inline_heuristic: rpython.translator.backendopt.inline.inlining_heuristic translation.backendopt.clever_malloc_removal: False translation.backendopt.clever_malloc_removal_threshold: 32.4 translation.backendopt.clever_malloc_removal_heuristic: rpython.translator.backendopt.inline.inlining_heuristic translation.backendopt.remove_asserts: False translation.backendopt.really_remove_asserts: False translation.backendopt.stack_optimization: True translation.backendopt.storesink: True translation.backendopt.replace_we_are_jitted: False translation.backendopt.none: None translation.platform: host ``` I gave about an hour's effort to trying to get a debug version of pypy translated, and gave up when I got `[translation:ERROR] Exception: 'no_collect' function can trigger collection: <function _siphash24 at 0x000000010b2afcb8>`. _______________________________________________ pypy-issue mailing list pypy-issue@python.org https://mail.python.org/mailman/listinfo/pypy-issue