Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when calling numpy.astype #75479

Closed
dhroth mannequin opened this issue Aug 29, 2017 · 3 comments
Closed

Error when calling numpy.astype #75479

dhroth mannequin opened this issue Aug 29, 2017 · 3 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@dhroth
Copy link
Mannequin

dhroth mannequin commented Aug 29, 2017

BPO 31298
Nosy @berkerpeksag, @crwilcox, @dhroth
Files
  • memdump.txt: Memory Map
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2017-11-01.05:31:38.633>
    created_at = <Date 2017-08-29.02:10:29.690>
    labels = ['interpreter-core', 'type-crash']
    title = 'Error when calling numpy.astype'
    updated_at = <Date 2017-11-01.05:31:38.631>
    user = 'https://github.com/dhroth'

    bugs.python.org fields:

    activity = <Date 2017-11-01.05:31:38.631>
    actor = 'berker.peksag'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-11-01.05:31:38.633>
    closer = 'berker.peksag'
    components = ['Interpreter Core']
    creation = <Date 2017-08-29.02:10:29.690>
    creator = 'droth'
    dependencies = []
    files = ['47105']
    hgrepos = []
    issue_num = 31298
    keywords = []
    message_count = 3.0
    messages = ['300970', '301547', '305359']
    nosy_count = 3.0
    nosy_names = ['berker.peksag', 'crwilcox', 'droth']
    pr_nums = []
    priority = 'normal'
    resolution = 'third party'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue31298'
    versions = ['Python 3.5']

    @dhroth
    Copy link
    Mannequin Author

    dhroth mannequin commented Aug 29, 2017

    Ubuntu 16.04.3
    Python 3.5.2
    Numpy version 1.11.0

    Running the following two commands causes Python to crash:
    import numpy as np
    np.array([[1, 2],[3,4]]).astype(np.dtype([("a", np.float), ("b", np.str_)]))

    The error occurs when running in an interactive session and when running those two commands as a script.

    The error I get is:
    *** Error in `python3': free(): invalid next size (normal): 0x0000000001a088f0 ***

    A memory map printed after the error is attached.

    The backtrace is
    ======= Backtrace: =========
    /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f55ac35e7e5]
    /lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7f55ac36737a]
    /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f55ac36b53c]
    /usr/lib/python3/dist-packages/numpy/core/multiarray.cpython-35m-x86_64-linux-gnu.so(+0x6d35e)[0x7f55ab0fa35e]
    /usr/lib/python3/dist-packages/numpy/core/multiarray.cpython-35m-x86_64-linux-gnu.so(+0x45a29)[0x7f55ab0d2a29]
    /usr/lib/python3/dist-packages/numpy/core/multiarray.cpython-35m-x86_64-linux-gnu.so(+0x461a2)[0x7f55ab0d31a2]
    /usr/lib/python3/dist-packages/numpy/core/multiarray.cpython-35m-x86_64-linux-gnu.so(+0xcf828)[0x7f55ab15c828]
    python3(PyCFunction_Call+0x77)[0x4e9bc7]
    python3(PyEval_EvalFrameEx+0x614)[0x524414]
    python3[0x52d2e3]
    python3(PyEval_EvalCode+0x1f)[0x52dfdf]
    python3[0x5fd2c2]
    python3(PyRun_FileExFlags+0x9a)[0x5ff76a]
    python3(PyRun_SimpleFileExFlags+0x1bc)[0x5ff95c]
    python3(Py_Main+0x456)[0x63e7d6]
    python3(main+0xe1)[0x4cfe41]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f55ac307830]
    python3(_start+0x29)[0x5d5f29]

    @dhroth dhroth mannequin added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump labels Aug 29, 2017
    @crwilcox
    Copy link
    Mannequin

    crwilcox mannequin commented Sep 7, 2017

    I may be wrong, but this seems like it could be an issue with NumPy. There are similar issues on their GitHub around crashes on astype. It probably wouldn't hurt to file this over there as well.
    https://github.com/numpy/numpy/issues

    @berkerpeksag
    Copy link
    Member

    Chris is right. Please report this to numpy developers. We can always reopen this issue if they decide that this is an issue in Python. Thank you.

    By the way, I cannot reproduce the crash with numpy 1.13.3.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant