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 !

  • I'm having the same issue. It seems clear that GDB is looking for some assembly file (.S) that isn't there. – gred Jun 26 '14 at 18:22
  • This was all I was able to find, but it didn't work for me: squaregoldfish.co.uk/2013/01/06/… – gred Jun 26 '14 at 18:27
  • I found that as well. It didn't work. – Alex Gao Jun 26 '14 at 18:55
up vote 11 down vote accepted

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.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.