Skip to content

Python-2.5.2: crash in visit_decref () at Modules/gcmodule.c:270 #46798

Closed

Description

@garikvm
mannequin
BPO 2546
Nosy @amauryfa
Files
  • unnamed
  • bug.tar.gz
  • unnamed
  • 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 2008-04-05.12:07:44.509>
    created_at = <Date 2008-04-04.05:28:57.452>
    labels = ['interpreter-core', 'invalid']
    title = 'Python-2.5.2: crash in visit_decref () at Modules/gcmodule.c:270'
    updated_at = <Date 2008-04-05.17:02:28.544>
    user = 'https://bugs.python.org/garikvm'

    bugs.python.org fields:

    activity = <Date 2008-04-05.17:02:28.544>
    actor = 'garikvm'
    assignee = 'none'
    closed = True
    closed_date = <Date 2008-04-05.12:07:44.509>
    closer = 'amaury.forgeotdarc'
    components = ['Interpreter Core']
    creation = <Date 2008-04-04.05:28:57.452>
    creator = 'garikvm'
    dependencies = []
    files = ['9944', '9945', '9949']
    hgrepos = []
    issue_num = 2546
    keywords = []
    message_count = 6.0
    messages = ['64915', '64919', '64960', '64966', '64970', '64989']
    nosy_count = 3.0
    nosy_names = ['nnorwitz', 'amaury.forgeotdarc', 'garikvm']
    pr_nums = []
    priority = 'normal'
    resolution = 'not a bug'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue2546'
    versions = ['Python 2.5']

    Activity

    1. garikvm commented on Apr 4, 2008

      garikvmmannequin
      MannequinAuthor

      Program received signal SIGSEGV, Segmentation fault.
      [Switching to Thread -1208408368 (LWP 2816)]
      0x080edccd in visit_decref (op=0xbf9289ff, data=0x0) at
      Modules/gcmodule.c:270
      270 if (PyObject_IS_GC(op)) {
      (gdb) bt
      #0 0x080edccd in visit_decref (op=0xbf9289ff, data=0x0) at
      Modules/gcmodule.c:270
      #1 0x08099e19 in tupletraverse (o=0xb7f2380c, visit=0x80edcc0
      <visit_decref>, arg=0x0)
      at Objects/tupleobject.c:443
      #2 0x080ee63e in collect (generation=0) at Modules/gcmodule.c:295
      #3 0x080ef159 in _PyObject_GC_NewVar (tp=0x8170700, nitems=14) at
      Modules/gcmodule.c:897
      #4 0x08111f10 in PyFrame_New (tstate=0x8bdd128, code=0xb7d04410,
      globals=0xb7cd3934, locals=0x0)
      at Objects/frameobject.c:614
      #5 0x080c521a in PyEval_EvalFrameEx (f=0x8cf0fb4, throwflag=0) at
      Python/ceval.c:3639
      #6 0x080c5265 in PyEval_EvalFrameEx (f=0x8ced7bc, throwflag=0) at
      Python/ceval.c:3650
      #7 0x080c5265 in PyEval_EvalFrameEx (f=0x8ced484, throwflag=0) at
      Python/ceval.c:3650
      #8 0x080c5265 in PyEval_EvalFrameEx (f=0x8ce7dbc, throwflag=0) at
      Python/ceval.c:3650
      #9 0x080c5265 in PyEval_EvalFrameEx (f=0x8ce7c5c, throwflag=0) at
      Python/ceval.c:3650
      #10 0x080c6075 in PyEval_EvalCodeEx (co=0xb7c2d608, globals=0xb7c18e84,
      locals=0x0, args=0xb7f28378,
      argcount=1, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0)
      at Python/ceval.c:2831
      #11 0x08112871 in function_call (func=0xb7c2af44, arg=0xb7f2836c,
      kw=0x0) at Objects/funcobject.c:517
      #12 0x08061a17 in PyObject_Call (func=0x7, arg=0xb7f2836c, kw=0x0) at
      Objects/abstract.c:1860
      #13 0x08067937 in instancemethod_call (func=0xb7f1302c, arg=0xb7f2836c,
      kw=0x0) at Objects/classobject.c:2497
      #14 0x08061a17 in PyObject_Call (func=0x7, arg=0xb7f5202c, kw=0x0) at
      Objects/abstract.c:1860
      #15 0x0809d7cb in slot_tp_init (self=0xb7c3442c, args=0xb7f5202c,
      kwds=0x0) at Objects/typeobject.c:4862
      #16 0x080a0393 in type_call (type=0x8c5d04c, args=0xb7f5202c, kwds=0x0)
      at Objects/typeobject.c:436
      #17 0x08061a17 in PyObject_Call (func=0x7, arg=0xb7f5202c, kw=0x0) at
      Objects/abstract.c:1860
      #18 0x080c1149 in PyEval_EvalFrameEx (f=0x8ce7afc, throwflag=0) at
      Python/ceval.c:3775
      #19 0x080c6075 in PyEval_EvalCodeEx (co=0xb7c2d4a0, globals=0xb7c83934,
      locals=0x0, args=0xb7f23818,
      argcount=1, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0)
      at Python/ceval.c:2831
      #20 0x08112871 in function_call (func=0xb7c2ae64, arg=0xb7f2380c,
      kw=0x0) at Objects/funcobject.c:517
      #21 0x08061a17 in PyObject_Call (func=0x7, arg=0xb7f2380c, kw=0x0) at
      Objects/abstract.c:1860
      #22 0x080be26c in PyEval_CallObjectWithKeywords (func=0xb7c2ae64,
      arg=0xb7f2380c, kw=0x0)
      at Python/ceval.c:3433
      #23 0x08061c30 in PyObject_CallObject (o=0xb7c2ae64, a=0xb7f2380c) at
      Objects/abstract.c:1851
      #24 0x08061879 in C2py (func=0x81380c5 "backend", nargs=1) at C2py.c:52
      #25 0x0806191d in backend (output_filename=0xbf9289ff "cla") at backend.c:5
      #26 0x08056fa5 in main (argc=3, argv=0xbf9271b4) at main.c:33
      (gdb)

    2. amauryfa commented on Apr 4, 2008

      @amauryfa
      Contributor

      Without a single hint about the code your are running, no investigation
      is possible. And since the traceback shows that the python interpreter
      is embedded in another application, it could very well be an error in
      your C code.

      Please provide a way to reproduce the problem.

    3. nnorwitz commented on Apr 5, 2008

      nnorwitzmannequin
      Mannequin

      I'm setting the priority to release blocker for now. George, please
      provide a way for us to reproduce with a stock python (ie, no third
      party extensions). Thanks.

    4. garikvm commented on Apr 5, 2008

      garikvmmannequin
      MannequinAuthor

      Neal,

      to reproduce the bug you have to have bison and flex on your system.
      (Perl is used to generate some source files
      but in won't be invoked by make in our case.)
      To reproduce the bug you have

      1. to change 'srcdir' in Makefile.
      2. run 'make check'
      3. run 'gdb tryit'
      4. on gdb's prompt type 'r test0.c bla' and press Enter

      I am using CentOS Linux. I don't think Linux's flavor matters though.

      Please let me know if you need an additional info from me.

      Thank you,
      George

      Neal Norwitz <[email protected]> wrote:
      Neal Norwitz added the comment:

      I'm setting the priority to release blocker for now. George, please
      provide a way for us to reproduce with a stock python (ie, no third
      party extensions). Thanks.

      ----------
      nosy: +nnorwitz
      priority: -> release blocker


      Tracker


      ---------------------------------
      You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.

    5. amauryfa commented on Apr 5, 2008

      @amauryfa
      Contributor
      The crash is because of an error in your C code:
      in backend.c::
          void backend(char *output_filename)
          {
              C2py("backend", 1, output_filename);
          }

      But your C2py function expects a variable number of PyObject*.

      I found this by disabling the garbage collector: then the program
      crashes in C2py.c at the instruction "Py_DECREF(pArgs);"

    6. garikvm commented on Apr 5, 2008

      garikvmmannequin
      MannequinAuthor

      Thank you, Amaury, very much for helping me with this one.
      George

      Amaury Forgeot d'Arc <[email protected]> wrote:
      Amaury Forgeot d'Arc added the comment:

      The crash is because of an error in your C code:
      in backend.c::
          void backend(char *output_filename)
          {
              C2py("backend", 1, output_filename);
          }

      But your C2py function expects a variable number of PyObject*.

      I found this by disabling the garbage collector: then the program
      crashes in C2py.c at the instruction "Py_DECREF(pArgs);"

      ----------
      priority: release blocker -> normal
      resolution: -> invalid
      status: open -> closed


      Tracker


      ---------------------------------
      You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.

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

    Metadata

    Metadata

    Assignees

    No one assigned

      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