Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

python

c

gdb

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 !

like image 414
Alex Gao Avatar asked Jun 26 '14 15:06

Alex Gao


1 Answers

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.

like image 105
Tom Tromey Avatar answered Nov 15 '22 21:11

Tom Tromey