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

Segmentation fault #12779

Closed
kaelsunkiller opened this issue Sep 24, 2019 · 5 comments
Closed

Segmentation fault #12779

kaelsunkiller opened this issue Sep 24, 2019 · 5 comments

Comments

@kaelsunkiller
Copy link

kaelsunkiller commented Sep 24, 2019

Linux18.04 前些时候系统动态链接库被误删 后恢复 但就启动不了了 gdb调试如下
xx版本是3.13.3
GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
Copyright (C) 2018 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-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python2...(no debugging symbols found)...done.
(gdb) set args ./start.py
(gdb) r
Starting program: /usr/bin/python2 ./start.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
do_lookup_x (
undef_name=undef_name@entry=0x7ffff4dc096c "_ITM_deregisterTMCloneTable",
new_hash=new_hash@entry=2247416213,
old_hash=old_hash@entry=0x7fffffffc580, ref=0x7ffff4dc03b0,
result=result@entry=0x7fffffffc590, scope=, i=0,
version=0x0, flags=1, skip=0x0, type_class=4, undef_map=0x555555c29240)
at dl-lookup.c:349
349 dl-lookup.c: No such file or directory.
(gdb)

@kaelsunkiller
Copy link
Author

Anyone gets an idea?
this is the backtrace information:
(gdb) backtrace
#0 do_lookup_x (
undef_name=undef_name@entry=0x7ffff4e0096c "_ITM_deregisterTMCloneTable",
new_hash=new_hash@entry=2247416213,
old_hash=old_hash@entry=0x7fffffffceb0, ref=0x7ffff4e003b0,
result=result@entry=0x7fffffffcec0, scope=, i=0,
version=0x0, flags=1, skip=0x0, type_class=4, undef_map=0x555555c266a0)
at dl-lookup.c:349
#1 0x00007ffff7de01ef in _dl_lookup_symbol_x (
undef_name=0x7ffff4e0096c "_ITM_deregisterTMCloneTable",
undef_map=undef_map@entry=0x555555c266a0, ref=ref@entry=0x7fffffffcfe0,
symbol_scope=symbol_scope@entry=0x555555c269f8, version=0x0, type_class=4,
flags=1, skip_map=) at dl-lookup.c:813
#2 0x00007ffff7de1af9 in elf_machine_rela (skip_ifunc=0,
reloc_addr_arg=0x7ffff5070fa0, version=,
sym=, reloc=0x7ffff4e010d0, map=0x555555c266a0)
at ../sysdeps/x86_64/dl-machine.h:308
#3 elf_dynamic_do_Rela (skip_ifunc=0, lazy=,
nrelative=, relsize=,
reladdr=, map=0x555555c266a0) at do-rel.h:137
#4 _dl_relocate_object (scope=, reloc_mode=reloc_mode@entry=0,
consider_profiling=, consider_profiling@entry=0)
at dl-reloc.c:258
#5 0x00007ffff7dea0bd in dl_open_worker (a=a@entry=0x7fffffffd2c0)
---Type to continue, or q to quit---r
at dl-open.c:382
#6 0x00007ffff7b4b2df in __GI__dl_catch_exception (exception=0x7fffffffd2a0,
operate=0x7ffff7de9dc0 <dl_open_worker>, args=0x7fffffffd2c0)
at dl-error-skeleton.c:196
#7 0x00007ffff7de97ca in _dl_open (
file=0x555555c1b1c0 "/usr/lib/python2.7/dist-packages/gi/_gi.x86_64-linux-gnu.so", mode=-2147483646,
caller_dlopen=0x5555556a4b62 <_PyImport_GetDynLoadFunc+226>,
nsid=, argc=2, argv=, env=0x7fffffffe4e0)
at dl-open.c:605
#8 0x00007ffff75c1f96 in dlopen_doit (a=a@entry=0x7fffffffd4f0) at dlopen.c:66
#9 0x00007ffff7b4b2df in __GI__dl_catch_exception (
exception=exception@entry=0x7fffffffd490,
operate=0x7ffff75c1f40 <dlopen_doit>, args=0x7fffffffd4f0)
at dl-error-skeleton.c:196
#10 0x00007ffff7b4b36f in __GI__dl_catch_error (objname=0x555555b1be20,
errstring=0x555555b1be28, mallocedp=0x555555b1be18,
operate=, args=) at dl-error-skeleton.c:215
#11 0x00007ffff75c2735 in _dlerror_run (
operate=operate@entry=0x7ffff75c1f40 <dlopen_doit>,
args=args@entry=0x7fffffffd4f0) at dlerror.c:162
#12 0x00007ffff75c2051 in __dlopen (file=, mode=)
at dlopen.c:87
---Type to continue, or q to quit---r
#13 0x00005555556a4b62 in _PyImport_GetDynLoadFunc ()
#14 0x00005555556a4744 in _PyImport_LoadDynamicModule ()
#15 0x0000555555631527 in ?? ()
#16 0x0000555555634a83 in ?? ()
#17 0x0000555555630c4c in PyImport_ImportModuleLevel ()
#18 0x0000555555632518 in ?? ()
#19 0x00005555556322ae in PyObject_Call ()
#20 0x00005555556521d0 in PyEval_CallObjectWithKeywords ()
#21 0x000055555564bbc6 in PyEval_EvalFrameEx ()
#22 0x0000555555646b0a in PyEval_EvalCodeEx ()
#23 0x0000555555646429 in PyEval_EvalCode ()
#24 0x0000555555646365 in PyImport_ExecCodeModuleEx ()
#25 0x000055555563f5c3 in ?? ()
#26 0x0000555555640a99 in ?? ()
#27 0x0000555555631527 in ?? ()
#28 0x0000555555630b4f in PyImport_ImportModuleLevel ()
#29 0x0000555555632518 in ?? ()
#30 0x00005555556322ae in PyObject_Call ()
#31 0x00005555556521d0 in PyEval_CallObjectWithKeywords ()
#32 0x000055555564bbc6 in PyEval_EvalFrameEx ()
#33 0x000055555564d8cd in PyEval_EvalFrameEx ()
#34 0x0000555555646b0a in PyEval_EvalCodeEx ()
#35 0x0000555555646429 in PyEval_EvalCode ()
---Type to continue, or q to quit---r
#36 0x00005555556764cf in ?? ()
#37 0x0000555555671442 in PyRun_FileExFlags ()
#38 0x00005555556708bd in PyRun_SimpleFileExFlags ()
#39 0x000055555562075b in Py_Main ()
#40 0x00007ffff7a05b97 in __libc_start_main (main=0x5555556200c0

,
argc=2, argv=0x7fffffffe4c8, init=, fini=,
rtld_fini=, stack_end=0x7fffffffe4b8)
at ../csu/libc-start.c:310
#41 0x000055555561ffda in _start ()

@SeaHOH
Copy link
Contributor

SeaHOH commented Oct 7, 2019

是不是文件链接丢失了,建议重新安装一次 python。
如果你其它程序也有类似问题,可能还需要重装系统。

@Harveychn

This comment has been minimized.

@kaelsunkiller
Copy link
Author

kaelsunkiller commented Oct 8, 2019

【已解决】

重装了python2也无效,但从调试结果看应该还是python相关的动态链接库问题;
解决办法:
重装所有依赖包以及依赖包本身的依赖
wiki提及的依赖包:https://github.com/XX-net/XX-Net/wiki/How-to-use

ubuntu 下,可能需要安装
- sudo apt-get install python-openssl
- sudo apt-get install libffi-dev
- sudo apt-get install python-gtk2
- sudo apt-get install python-appindicator
- sudo apt-get install libnss3-tools

同时使用apt-cache查看这些包的依赖包
apt-cache depends *your-package*
如:

python-gtk2
Depends: python
Depends: python
Depends: python:any
python:i386
python
Depends: libatk1.0-0
Depends: libc6
Depends: libcairo2
Depends: libgdk-pixbuf2.0-0
Depends: libglib2.0-0
Depends: libgtk2.0-0
Depends: libpango-1.0-0
Depends: libpangocairo-1.0-0
Depends: python-cairo
Depends: python-gobject-2
Breaks: python-gtkglext1
Suggests: python-gtk2-doc

Depends全部重装
sudo apt-get install --reinstall *your-package*
之前还瞎操作了好多步骤,不知是否相关,包括重装很多其它的系统依赖包(因为系统一些其他软件也出现不同的错误),重装miredo等;
差点就重装系统了。。。太难了

@SeaHOH
Copy link
Contributor

SeaHOH commented Oct 8, 2019

所谓重装肯定不是单指本体啦。
其实我觉得吧,还重装下系统的好,因为你都不清楚自己到底破坏了哪些组件,记得要先各种备份。

@SeaHOH SeaHOH closed this as completed Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants