Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pypy pypy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 668
    • Issues 668
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 14
    • Merge requests 14
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyPy
  • pypypypy
  • Issues
  • #2968

Closed
Open
Created Mar 03, 2019 by Bitbucket Importer@bitbucket_importerMaintainer

Segfault calling cpyext_tp_new_tuple

Created originally on Bitbucket by kostialopuhin (Konstantin Lopukhin)

I'm trying to get pytorch to work under PyPy-3.6 7.0.0 on Ubuntu 16.04. After fixing some minor compilation issues in pytorch, I got a Fatal error in cpyext, CPython compatibility layer, calling cpyext_tp_new_tuple, full error is at https://gist.github.com/lopuhin/4a8900aeaa762b9838dfc70af71ff999 (also attached)

PyPy version:

Python 3.6.1 (dab365a46514, Feb 05 2019, 16:36:40)
[PyPy 7.0.0-alpha0 with GCC 6.2.0 20160901] on linux

RPython stacktrace (full in the gist linked above and attached):

Fatal error in cpyext, CPython compatibility layer, calling cpyext_tp_new_tuple
Either report a bug or consider not using this particular extension
<OpErrFmtNoArgs object at 0x32fe6e0>
RPython traceback:
  File "pypy_module_cpyext_3.c", line 15364, in wrapper_second_level__star_3_35
  File "pypy_module_cpyext_1.c", line 35480, in make_ref
  File "pypy_module_cpyext_1.c", line 48084, in create_ref
  File "pypy_objspace.c", line 795, in len
  File "pypy_interpreter.c", line 34189, in BuiltinCode_funcrun_obj
  File "pypy_module_cpyext_6.c", line 11176, in wrap_lenfunc_call
  File "pypy_module_cpyext_6.c", line 2107, in generic_cpy_call__StdObjSpaceConst_funcPtr_SomeI_10
  File "pypy_module_cpyext_1.c", line 48084, in create_ref
  File "pypy_objspace.c", line 795, in len
...

And here are some last lldb frames (full in the gist linked above and attached):

* thread #1: tid = 9293, 0x00007ffff6318dbb libpypy3-c.so`pypy_debug_catch_fatal_exception + 11, name = 'python', stop reason = signal SIGSEGV: invalid address (fault address: 0x18)
  * frame #0: 0x00007ffff6318dbb libpypy3-c.so`pypy_debug_catch_fatal_exception + 11
    frame #1: 0x00007ffff5216b54 libpypy3-c.so`pypy_g_ccall_pypy_debug_catch_fatal_exception____1 + 20
    frame #2: 0x00007ffff585b91a libpypy3-c.so`pypy_g_unexpected_exception + 698
    frame #3: 0x00007ffff58ed206 libpypy3-c.so`pypy_g_wrapper_second_level__star_3_35 + 358
    frame #4: 0x00007fffe3b8fd40 libtorch_python.so`THPSize_pynew(_typeobject*, _object*, _object*) + 48
    frame #5: 0x00007ffff5991731 libpypy3-c.so`pypy_g_generic_cpy_call__StdObjSpaceConst_funcPtr_PyTyp_2 + 273
    frame #6: 0x00007ffff596059a libpypy3-c.so`pypy_g_tp_new_wrapper + 618
    frame #7: 0x00007ffff58eef45 libpypy3-c.so`cpyext_tp_new_wrapper + 661
    frame #8: 0x00007ffff59484de libpypy3-c.so`pypy_g_generic_cpy_call__StdObjSpaceConst_funcPtr_SomeI_4 + 206
...

Looks like the crash happens after this call https://github.com/lopuhin/pytorch/blob/912b0b2a77b3ea0a5bac9fbe3ac5d577c86c6d71/torch/csrc/Size.cpp#L50

I would be happy to narrow it down but not sure how to proceed best.

Attachments: RPython_traceback_and_lldb_backtrace.txt

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking