Bug 9101

Summary: vim crash when loading non existant python module or just printing version
Product: Mageia Reporter: Stéphane Pontier <stephane.pontier>
Component: RPM PackagesAssignee: Thierry Vignaud <thierry.vignaud>
Status: RESOLVED OLD QA Contact:
Severity: normal    
Priority: Normal Keywords: Triaged
Version: 3   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: vim-7.3.762-4.mga3.src.rpm CVE:
Status comment:

Description Stéphane Pontier 2013-02-18 11:53:13 CET
Description of problem:
In vim, when trying to load non-existant python module, or trying to print python version, vim segfault

Version-Release number of selected component (if applicable):
vim-7.3.762-4
python-2.7.3-7.mga3
python3-3.3.0-3.mga3

How reproducible:
Everytime

Steps to Reproduce:
1. load vim (with or without file, I even tried with "vim -u NONE -N")
2. try to type ":python import xxx_unexistent_package"
   or try ":py import vim"
     followed by ":py print sys.version"
3. See vim crash
4. cry :-)

I got another computer(i586), not as up to date than my main one, and vim does't crash on it, it got following versions of packages:
vim-enhanced-7.3.762-3.mga3
python-2.7.3-7.mga3
no python3
Comment 1 Manuel Hiebel 2013-05-28 23:24:09 CEST
is this still valid ? 
if yes maybe you can get a strace https://wiki.mageia.org/en/Debugging_software_crashes#gdb

Version: Cauldron => 3

Comment 2 Stéphane Pontier 2013-05-29 15:42:04 CEST
Yes, the problem is still valid.
After installing various debuginfo rpm gdb was claiming:

======
gdb vim
GNU gdb (GDB) 7.5.1-7.mga3 (Mageia release 3)
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-mageia-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/vim...(no debugging symbols found)...done.
(gdb) run -u NONE -N
======
in vim I type:
    :py print sys.version
======
Program received signal SIGSEGV, Segmentation fault.
memchr () at ../sysdeps/x86_64/memchr.S:39
39              movdqu  (%rdi), %xmm0
(gdb) bt full
#0  memchr () at ../sysdeps/x86_64/memchr.S:39
No locals.
#1  0x0000000000580e74 in ?? ()
No symbol table info available.
#2  0x000000000058106f in ?? ()
No symbol table info available.
#3  0x00007ffff6ed0e6e in PyObject_Call (func=func@entry=0x7ffff7e86cf8, arg=arg@entry=0x7ffff7f0ab10, kw=<optimized out>) at Objects/abstract.c:2529
        result = <optimized out>
        call = 0x7ffff6f08a10 <PyCFunction_Call>
#4  0x00007ffff6f5db77 in PyEval_CallObjectWithKeywords (func=func@entry=0x7ffff7e86cf8, arg=arg@entry=0x7ffff7f0ab10, kw=kw@entry=0x0) at Python/ceval.c:3890
        result = <optimized out>
#5  0x00007ffff6eedd73 in PyFile_WriteObject (v=v@entry=0x7ffff7fae088, f=f@entry=0x7f6260, flags=flags@entry=1) at Objects/fileobject.c:2536
        writer = 0x7ffff7e86cf8
        value = 0x7ffff7fae088
        args = 0x7ffff7f0ab10
        result = <optimized out>
#6  0x00007ffff6f61750 in PyEval_EvalFrameEx (f=f@entry=0x958440, throwflag=throwflag@entry=0) at Python/ceval.c:1770
        stack_pointer = <optimized out>
        next_instr = 0x7ffff7e874bb "Hd"
        opcode = <optimized out>
        oparg = <optimized out>
        why = WHY_NOT
        err = 0
        x = 0x7ffff7fae088
        v = 0x7ffff7fae088
        w = 0x7f6260
        u = <optimized out>
        t = <optimized out>
        stream = <optimized out>
        fastlocals = 0x9585b8
        freevars = 0x9585b8
        retval = 0x0
        tstate = <optimized out>
        co = 0x7ffff7f05bb0
        instr_ub = -1
        instr_lb = 0
        instr_prev = -1
        first_instr = 0x7ffff7e874b4 "e"
        names = 0x7ffff7e83c68
        consts = 0x7ffff7f0a850
#7  0x00007ffff6f644dd in PyEval_EvalCodeEx (co=co@entry=0x7ffff7f05bb0, globals=globals@entry=0x8c8730, locals=locals@entry=0x8c8730, args=args@entry=0x0, argcount=argcount@entry=0, 
    kws=kws@entry=0x0, kwcount=kwcount@entry=0, defs=defs@entry=0x0, defcount=defcount@entry=0, closure=closure@entry=0x0) at Python/ceval.c:3253
        f = <optimized out>
        retval = 0x0
        fastlocals = <optimized out>
        freevars = <optimized out>
        tstate = 0x8c5c40
        x = <optimized out>
        u = <optimized out>
#8  0x00007ffff6f645b2 in PyEval_EvalCode (co=co@entry=0x7ffff7f05bb0, globals=globals@entry=0x8c8730, locals=locals@entry=0x8c8730) at Python/ceval.c:667
No locals.
#9  0x00007ffff6f7d50a in run_mod (mod=<optimized out>, filename=filename@entry=0x7ffff6fa5c0d "<string>", globals=globals@entry=0x8c8730, locals=locals@entry=0x8c8730, flags=flags@entry=0x0, 
    arena=arena@entry=0x934cf0) at Python/pythonrun.c:1353
        co = 0x7ffff7f05bb0
        v = <optimized out>
#10 0x00007ffff6f7e0d8 in PyRun_StringFlags (str=str@entry=0x839a53 "print sys.version", start=start@entry=257, globals=0x8c8730, locals=0x8c8730, flags=flags@entry=0x0) at Python/pythonrun.c:1316
        ret = 0x0
        mod = <optimized out>
        arena = 0x934cf0
#11 0x00007ffff6f7ebeb in PyRun_SimpleStringFlags (command=0x839a53 "print sys.version", flags=0x0) at Python/pythonrun.c:969
        m = <optimized out>
        d = <optimized out>
        v = <optimized out>
#12 0x0000000000583719 in ?? ()
No symbol table info available.
#13 0x00000000005838f8 in ex_python ()
No symbol table info available.
#14 0x00000000004800ff in do_cmdline ()
No symbol table info available.
#15 0x00000000004eb11a in ?? ()
No symbol table info available.
#16 0x00000000004f1392 in normal_cmd ()
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#17 0x00000000004b52cf in main_loop ()
No symbol table info available.
#18 0x0000000000428446 in main ()
No symbol table info available.
Manuel Hiebel 2013-05-29 19:38:20 CEST

Keywords: (none) => Triaged
Assignee: bugsquad => thierry.vignaud

Comment 3 Marja Van Waes 2015-03-31 16:05:58 CEST
Mageia 3 changed to end-of-life (EOL) status 4 months ago.
http://blog.mageia.org/en/2014/11/26/lets-say-goodbye-to-mageia-3/ 

Mageia 3 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of Mageia
please feel free to click on "Version" change it against that version of Mageia
and reopen this bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

--
The Mageia Bugsquad

Status: NEW => RESOLVED
Resolution: (none) => OLD

Comment 4 Thierry Vignaud 2015-04-01 09:14:38 CEST
Actually this one is fixed in mga5