Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
563 views
in Technique[技术] by (71.8m points)

python - Is "syscall-template.S: No such file or directory" a bug of GDB or My Program

I used GDB to debug a combined program of Python and C. The GDB gives me an error when segmentation fault of my program occurs.

81  ../sysdeps/unix/syscall-template.S: No such file or directory.

Here is several lines more of the trackback information.

0  0x00007ffff6f2b6d7 in kill () at ../sysdeps/unix/syscall-template.S:81
1  0x000000000042a241 in posix_kill.64590 (self=<optimized out>, args=<optimized out>) at ../Modules/posixmodule.c:4306
2  0x000000000050e78c in call_function (oparg=<optimized out>, pp_stack=0x7fffffffd7b0) at ../Python/ceval.c:4020
3  PyEval_EvalFrameEx (f=f@entry=Frame 0x7ffff5784608, for file /usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py, line 121, in python_reloader (main_func=<instancemethod at remote 0x7ffff69a3a00>, args=(), kwargs={'use_static_handler': True, 'settings': None, 'pythonpath': None, 'verbosity': '1', 'traceback': None, 'use_ipv6': False, 'use_threading': True, 'use_reloader': True, 'insecure_serving': False}, exit_code=-11), 
throwflag=throwflag@entry=0) at ../Python/ceval.c:2666

Is it a bug of GDB or my Program? I cannot find any class of my program in trackback information.

thanks !

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

If your program passes invalid arguments to a C library function, it can crash in the C library. And, if you don't have the source for the C library installed, then you will get a message like this from gdb. However, this doesn't mean anything is wrong... it is normal to be missing debuginfo and/or source for one or more libraries used by a program. Ordinarily the solution is to go "up" a few stack frames and see what the real problem is. More rarely you may be encountering a library bug.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...