Skip to content

momory fault on exit #37840

Closed
Closed

Description

@sjoerdmullender
BPO 675341
Nosy @loewis, @sjoerdmullender

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 = 'https://github.com/loewis'
closed_at = <Date 2003-01-27.12:18:48.000>
created_at = <Date 2003-01-27.10:32:43.000>
labels = ['interpreter-core']
title = 'momory fault on exit'
updated_at = <Date 2003-01-27.12:18:48.000>
user = 'https://github.com/sjoerdmullender'

bugs.python.org fields:

activity = <Date 2003-01-27.12:18:48.000>
actor = 'sjoerd'
assignee = 'loewis'
closed = True
closed_date = None
closer = None
components = ['Interpreter Core']
creation = <Date 2003-01-27.10:32:43.000>
creator = 'sjoerd'
dependencies = []
files = []
hgrepos = []
issue_num = 675341
keywords = []
message_count = 3.0
messages = ['14226', '14227', '14228']
nosy_count = 2.0
nosy_names = ['loewis', 'sjoerd']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue675341'
versions = ['Python 2.3']

Activity

  1. sjoerdmullender commented on Jan 27, 2003

    @sjoerdmullender
    MemberAuthor

    Martin, I think this has to do with your changes to
    iconv_codec.

    After cvs update; configure; make, I get a seg fault on
    exit of the interpreter after doing nothing other than
    typing ctrl-D. This is on Linux (RedHat 8.0).

    + ./python
    Python 2.3a1 (#1, Jan 27 2003, 11:06:58)
    [GCC 3.2 2002090 (Red Hat Linux 8.0 3.2-7)] on linux2
    Type "help", "copyright", "credits" or "license" for
    more information.

    >>
    Memory fault

    However:
    + ./python -S
    Python 2.3a1 (#1, Jan 27 2003, 11:06:58)
    [GCC 3.2 2002090 (Red Hat Linux 8.0 3.2-7)] on linux2
    Type "help", "copyright", "credits" or "license" for
    more information.

    >>

    Stack trace:

    (gdb) bt
    #0 0x0808606c in type_dealloc (type=0x4001d400)
    at ../Objects/typeobject.c:1998
    #1 0x08073179 in dict_dealloc (mp=0x400f4a44) at
    ../Objects/dictobject.c:686
    #2 0x08073179 in dict_dealloc (mp=0x4009a8ac) at
    ../Objects/dictobject.c:686
    #3 0x080bcb1d in _PyImport_Fini () at
    ../Python/import.c:224
    #4 0x080c57b4 in Py_Finalize () at
    ../Python/pythonrun.c:232
    #5 0x08054b1d in Py_Main (argc=1, argv=0xbffff5e4) at
    ../Modules/main.c:457
    #6 0x0805431a in main (argc=1, argv=0xbffff5e4) at
    ../Modules/python.c:23
    #7 0x420158d4 in __libc_start_main () from
    /lib/i686/libc.so.6

    And the reason I think Martin has something to do with
    it (note the tp_name field):
    (gdb) p *type
    $2 = {ob_refcnt = 0, ob_type = 0x8104b20, ob_size = 0,
    tp_name = 0x4001cbf2 "iconvcodec", tp_basicsize = 20,
    tp_itemsize = 0,
    tp_dealloc = 0x4001c81e <iconvcodec_dealloc>,
    tp_print = 0, tp_getattr = 0,
    tp_setattr = 0, tp_compare = 0, tp_repr = 0x4001c8ca
    <iconvcodec_repr>,
    tp_as_number = 0x0, tp_as_sequence = 0x0,
    tp_as_mapping = 0x0, tp_hash = 0,
    tp_call = 0, tp_str = 0, tp_getattro = 0x807786a
    <PyObject_GenericGetAttr>,
    tp_setattro = 0, tp_as_buffer = 0x0, tp_flags = 17899,
    tp_doc = 0x4001d020 "iconvcodec object", tp_traverse
    = 0, tp_clear = 0,
    tp_richcompare = 0, tp_weaklistoffset = 0, tp_iter =
    0, tp_iternext = 0,
    tp_methods = 0x4001d3c0, tp_members = 0x0, tp_getset
    = 0x0, tp_base = 0x0,
    tp_dict = 0x0, tp_descr_get = 0, tp_descr_set = 0,
    tp_dictoffset = 0,
    tp_init = 0, tp_alloc = 0x80833e6 <PyType_GenericAlloc>,
    tp_new = 0x4001c5c4 <iconvcodec_new>, tp_free =
    0x80ccc0e <PyObject_GC_Del>,
    tp_is_gc = 0, tp_bases = 0x0, tp_mro = 0x0, tp_cache
    = 0x0,
    tp_subclasses = 0x0, tp_weaklist = 0x0, tp_del = 0}

  2. loewis commented on Jan 27, 2003

    loewismannequin
    Mannequin

    Logged In: YES
    user_id=21627

    This is fixed in _iconv_codec.c 1.4.

    I'm surprised that it happens in this way for you, though,
    since normally, importing site.py won't import _iconv_codec.
    The only explanation is that you have changed site.py in
    some way.

  3. sjoerdmullender commented on Jan 27, 2003

    @sjoerdmullender
    MemberAuthor

    Logged In: YES
    user_id=43607

    The reason _iconv_codec got imported is because I have
    JapanesCodecs installed which is imported by addpackage in
    site.py. And JapaneseCodecs imports encodings which in turn
    imports iconv_codecs.

    Things work now thanks to your fix. Thanks.

  4. transferred this issue fromon Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

interpreter-core(Objects, Python, Grammar, and Parser dirs)

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions