Автор Тема: Проблема с модулем python после обновления  (Прочитано 143 раз)

Оффлайн kiav

  • Давно тут
  • **
  • Сообщений: 315
    • Email
Работаю с thg. Обновил python 2.7. Получил ошибку сегментирования.
Спойлер
$ gdb --args /usr/bin/env python thg version

(gdb) run
Starting program: /usr/bin/env python thg version
process 17110 is executing new program: /usr/bin/python2.7
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
strlen () at ../sysdeps/x86_64/strlen.S:106
106             movdqu  (%rax), %xmm4

(gdb) backtrace
#0  strlen () at ../sysdeps/x86_64/strlen.S:106
#1  0x00007ffff7a80a7f in PyString_FromFormatV (
    format=0x7ffff1d35850 "the sip module implements API v%d.0 to v%d.%d but the %s module requires API v%d.%d", vargs=vargs@entry=0x7fffffffcf98)
    at Objects/stringobject.c:241
#2  0x00007ffff7aec33f in PyErr_Format (exception=0x7ffff7d98b00 <_PyExc_RuntimeError>, format=<optimized out>) at Python/errors.c:570
#3  0x00007ffff1d1a548 in sip_api_export_module (client=0x7fffece19780 <sipModuleAPI_Qsci>, api_major=11, api_minor=2, unused=0x0) at siplib.c:1667
#4  0x00007fffecbc71c7 in initQsci () at ./sipQscicmodule.cpp:2884
#5  0x00007ffff7af7bc7 in _PyImport_LoadDynamicModule (name=0xace730 "PyQt4.Qsci", pathname=0xacf740 "/usr/lib64/python2.7/site-packages/PyQt4/Qsci.so",
    fp=<optimized out>) at Python/importdl.c:53
#6  0x00007ffff7af55d8 in import_submodule (mod=mod@entry=0x7ffff7eb0558, subname=subname@entry=0xace736 "Qsci",
    fullname=fullname@entry=0xace730 "PyQt4.Qsci") at Python/import.c:2704
#7  0x00007ffff7af64a4 in load_next (p_buflen=<synthetic pointer>, buf=0xace730 "PyQt4.Qsci", p_name=<synthetic pointer>, altmod=0x7ffff7eb0558,
    mod=0x7ffff7eb0558) at Python/import.c:2519
#8  import_module_level (locals=<optimized out>, level=<optimized out>, fromlist=<optimized out>, globals=<optimized out>, name=<optimized out>)
    at Python/import.c:2236
#9  PyImport_ImportModuleLevel (name=<optimized out>, globals=<optimized out>, locals=<optimized out>, fromlist=<optimized out>, level=<optimized out>)
    at Python/import.c:2292
#10 0x00007ffff7ad4ec8 in builtin___import__ (self=<optimized out>, args=<optimized out>, kwds=<optimized out>) at Python/bltinmodule.c:49
#11 0x00007ffff7adff4a in ext_do_call (nk=<optimized out>, na=<optimized out>, flags=<optimized out>, pp_stack=0x7fffffffd318, func=0x7ffff7feafc8)
    at Python/ceval.c:4660
#12 PyEval_EvalFrameEx (f=f@entry=0x7c6fd0, throwflag=throwflag@entry=0) at Python/ceval.c:3026
#13 0x00007ffff7ae0954 in PyEval_EvalCodeEx (co=<optimized out>, globals=<optimized out>, locals=locals@entry=0x0, args=<optimized out>,
    argcount=argcount@entry=4, kws=kws@entry=0x90a858, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3582
#14 0x00007ffff7adcd4f in fast_function (nk=<optimized out>, na=4, n=<optimized out>, pp_stack=0x7fffffffd510, func=0x7ffff414ae60) at Python/ceval.c:4446
#15 call_function (oparg=<optimized out>, pp_stack=0x7fffffffd510) at Python/ceval.c:4371
#16 PyEval_EvalFrameEx (f=f@entry=0x90a640, throwflag=throwflag@entry=0) at Python/ceval.c:2987
#17 0x00007ffff7ae0954 in PyEval_EvalCodeEx (co=<optimized out>, globals=<optimized out>, locals=locals@entry=0x0, args=args@entry=0x7ffff3eef6f0,
    argcount=<optimized out>, kws=kws@entry=0x0, kwcount=0, defs=0x7ffff4154d20, defcount=4, closure=0x0) at Python/ceval.c:3582
#18 0x00007ffff7a5895c in function_call (func=0x7ffff41600c8, arg=0x7ffff3eef6d8, kw=0x0) at Objects/funcobject.c:526
#19 0x00007ffff7a27ae3 in PyObject_Call (func=func@entry=0x7ffff41600c8, arg=arg@entry=0x7ffff3eef6d8, kw=<optimized out>) at Objects/abstract.c:2546
#20 0x00007ffff7ad69b7 in PyEval_CallObjectWithKeywords (func=func@entry=0x7ffff41600c8, arg=arg@entry=0x7ffff3eef6d8, kw=kw@entry=0x0)
    at Python/ceval.c:4219
#21 0x00007ffff7ad9a44 in PyEval_EvalFrameEx (f=f@entry=0x7ffff36abb60, throwflag=throwflag@entry=0) at Python/ceval.c:2622
#22 0x00007ffff7ae0954 in PyEval_EvalCodeEx (co=co@entry=0x7ffff3ef8630, globals=globals@entry=0x7ffff387c910, locals=locals@entry=0x7ffff387c910,
    args=args@entry=0x0, argcount=argcount@entry=0, kws=kws@entry=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3582
#23 0x00007ffff7ae0a79 in PyEval_EvalCode (co=co@entry=0x7ffff3ef8630, globals=globals@entry=0x7ffff387c910, locals=locals@entry=0x7ffff387c910)
    at Python/ceval.c:669
#24 0x00007ffff7af425c in PyImport_ExecCodeModuleEx (name=name@entry=0x7442b0 "tortoisehg.hgqt.bugreport", co=co@entry=0x7ffff3ef8630,
    pathname=pathname@entry=0x77b300 "/home/kiav/local/tortoisehg/tortoisehg/hgqt/bugreport.pyc") at Python/import.c:713
#25 0x00007ffff7af45c8 in load_source_module (name=0x7442b0 "tortoisehg.hgqt.bugreport",
    pathname=0x77b300 "/home/kiav/local/tortoisehg/tortoisehg/hgqt/bugreport.pyc", fp=<optimized out>) at Python/import.c:1103
#26 0x00007ffff7af55d8 in import_submodule (mod=mod@entry=0x7ffff4151718, subname=subname@entry=0x7442c0 "bugreport",
    fullname=fullname@entry=0x7442b0 "tortoisehg.hgqt.bugreport") at Python/import.c:2704
#27 0x00007ffff7af64a4 in load_next (p_buflen=<synthetic pointer>, buf=0x7442b0 "tortoisehg.hgqt.bugreport", p_name=<synthetic pointer>,
    altmod=0x7ffff4151718, mod=0x7ffff4151718) at Python/import.c:2519
#28 import_module_level (locals=<optimized out>, level=<optimized out>, fromlist=<optimized out>, globals=<optimized out>, name=<optimized out>)
    at Python/import.c:2236
#29 PyImport_ImportModuleLevel (name=<optimized out>, globals=<optimized out>, locals=<optimized out>, fromlist=<optimized out>, level=<optimized out>)
    at Python/import.c:2292
#30 0x00007ffff7ad4ec8 in builtin___import__ (self=<optimized out>, args=<optimized out>, kwds=<optimized out>) at Python/bltinmodule.c:49
#31 0x00007ffff7adff4a in ext_do_call (nk=<optimized out>, na=<optimized out>, flags=<optimized out>, pp_stack=0x7fffffffdc48, func=0x7ffff7feafc8)
    at Python/ceval.c:4660
#32 PyEval_EvalFrameEx (f=f@entry=0x911730, throwflag=throwflag@entry=0) at Python/ceval.c:3026
#33 0x00007ffff7ae0954 in PyEval_EvalCodeEx (co=<optimized out>, globals=<optimized out>, locals=locals@entry=0x0, args=<optimized out>,
    argcount=argcount@entry=4, kws=kws@entry=0x81d458, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3582
#34 0x00007ffff7adcd4f in fast_function (nk=<optimized out>, na=4, n=<optimized out>, pp_stack=0x7fffffffde40, func=0x7ffff414ae60) at Python/ceval.c:4446
#35 call_function (oparg=<optimized out>, pp_stack=0x7fffffffde40) at Python/ceval.c:4371
#36 PyEval_EvalFrameEx (f=f@entry=0x81d240, throwflag=throwflag@entry=0) at Python/ceval.c:2987
#37 0x00007ffff7ae0954 in PyEval_EvalCodeEx (co=<optimized out>, globals=<optimized out>, locals=locals@entry=0x0, args=args@entry=0x7ffff7ea0d20,
    argcount=<optimized out>, kws=kws@entry=0x0, kwcount=0, defs=0x7ffff4154d20, defcount=4, closure=0x0) at Python/ceval.c:3582
#38 0x00007ffff7a5895c in function_call (func=0x7ffff41600c8, arg=0x7ffff7ea0d08, kw=0x0) at Objects/funcobject.c:526
#39 0x00007ffff7a27ae3 in PyObject_Call (func=func@entry=0x7ffff41600c8, arg=arg@entry=0x7ffff7ea0d08, kw=<optimized out>) at Objects/abstract.c:2546
#40 0x00007ffff7ad69b7 in PyEval_CallObjectWithKeywords (func=func@entry=0x7ffff41600c8, arg=arg@entry=0x7ffff7ea0d08, kw=kw@entry=0x0)
    at Python/ceval.c:4219
#41 0x00007ffff7ad9a44 in PyEval_EvalFrameEx (f=f@entry=0x7ffff7ed7cc8, throwflag=throwflag@entry=0) at Python/ceval.c:2622
#42 0x00007ffff7ae0954 in PyEval_EvalCodeEx (co=co@entry=0x7ffff7eecd30, globals=globals@entry=0x7ffff7f85168, locals=locals@entry=0x7ffff7f85168,
    args=args@entry=0x0, argcount=argcount@entry=0, kws=kws@entry=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3582
#43 0x00007ffff7ae0a79 in PyEval_EvalCode (co=co@entry=0x7ffff7eecd30, globals=globals@entry=0x7ffff7f85168, locals=locals@entry=0x7ffff7f85168)
    at Python/ceval.c:669
#44 0x00007ffff7b047ba in run_mod (arena=0x6096c0, flags=0x7fffffffe370, locals=0x7ffff7f85168, globals=0x7ffff7f85168,
    filename=0x63c7f0 "`\023\232RrV\247\274`V\256\366\377\177", mod=<optimized out>) at Python/pythonrun.c:1370
#45 PyRun_FileExFlags (fp=fp@entry=0x63c7f0, filename=filename@entry=0x7fffffffe8a7 "thg", start=start@entry=257, globals=globals@entry=0x7ffff7f85168,
    locals=locals@entry=0x7ffff7f85168, closeit=closeit@entry=1, flags=0x7fffffffe370) at Python/pythonrun.c:1356
#46 0x00007ffff7b05b77 in PyRun_SimpleFileExFlags (fp=fp@entry=0x63c7f0, filename=0x7fffffffe8a7 "thg", closeit=1, flags=flags@entry=0x7fffffffe370)
    at Python/pythonrun.c:948
#47 0x00007ffff7b06223 in PyRun_AnyFileExFlags (fp=fp@entry=0x63c7f0, filename=<optimized out>, closeit=<optimized out>, flags=flags@entry=0x7fffffffe370)
    at Python/pythonrun.c:752
#48 0x00007ffff7b1bf6b in Py_Main (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:640
#49 0x00007ffff76507f0 in __libc_start_main (main=0x4006e0 <main>, argc=3, argv=0x7fffffffe528, init=<optimized out>, fini=<optimized out>,
    rtld_fini=<optimized out>, stack_end=0x7fffffffe518) at ../csu/libc-start.c:289
#50 0x0000000000400719 in _start () at ../sysdeps/x86_64/start.S:118

Отладить нормально не смог (ddd/gdb). Дело в попытке вывода ошибки по шаблону "the sip module implements API v%d.0 to v%d.%d but the %s module requires API v%d.%d". Это происходит при вызове sip_api_export_module с переменной sipModuleAPI_Qsci в качестве аргумента. Дальше у меня мрак. Полное имя модуля (full_name) просмотреть не удалось (вероятнее всего, именно это и породило ошибку вывода ошибки). На уровень выше - ошибка в несовместимости sip и подключаемого модуля:
if (api_major != SIP_API_MAJOR_NR || api_minor > SIP_API_MINOR_NR)
{
    PyErr_Format(PyExc_RuntimeError,
    "the sip module implements API v%d.0 to v%d.%d but the %s module requires API v%d.%d",
    SIP_API_MAJOR_NR, SIP_API_MAJOR_NR, SIP_API_MINOR_NR,
    full_name, api_major, api_minor);

    return -1;
}

Болячка в одном из двух пакетов:
  • python-module-sip-4.19.3-alt0.M80P.1
  • python-module-qscintilla2-qt4-2.9-alt4.1

Что делать?

Оффлайн Skull

  • Глобальный модератор
  • *****
  • Сообщений: 16 422
    • Домашняя страница
    • Email
Вешать багу.
Андрей Черепанов (cas@)

Оффлайн kiav

  • Давно тут
  • **
  • Сообщений: 315
    • Email
Вешать багу.
А на что?

Оффлайн Skull

  • Глобальный модератор
  • *****
  • Сообщений: 16 422
    • Домашняя страница
    • Email
На второй пакет.
Андрей Черепанов (cas@)


Оффлайн ruslandh

  • Поспешай не торопясь !
  • Модератор глобальный
  • *****
  • Сообщений: 30 571
  • Учиться .... Телепатами не рождаются, ими ....
    • Email
Ошибка 34099 - Не регистрируется модуль после обновления python
Надо-бы подписать кого-нибудь из мантейнеров пакетов питона, или перенести багу на Сизиф (если то-же проявляется в Сизифе), а то бага висит только на Андрее и маловероятно, что у него есть время в этом разбираться.

https://packages.altlinux.org/en/Sisyphus/srpms/qscintilla2
Цитировать
ACL:

    Aleksei Nikiforov