Coder Social home page Coder Social logo

damziobro / gdb-automatic-deadlock-detector Goto Github PK

View Code? Open in Web Editor NEW
69.0 5.0 13.0 10 KB

Script adds new command to GDB which allows automatically detect C/C++ thread locking and deadlocks in GDB debugger

License: MIT License

C 29.80% Shell 3.24% Python 66.96%
gdb deadlock-detection deadlock gdb-commands python thread

gdb-automatic-deadlock-detector's People

Contributors

codypiersall avatar damziobro avatar quipyowert2 avatar vonorfasyexela avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gdb-automatic-deadlock-detector's Issues

makes gdb crash

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
__GI___poll (timeout=100, nfds=1, fds=0xbed30650) at ../sysdeps/unix/sysv/linux/poll.c:29
29 ../sysdeps/unix/sysv/linux/poll.c: No such file or directory.
custom command => blocked - command show how threads blocks themselves waiting on mutexes


Displaying blocking threads using 'blocked' command
/build/gdb-Y5K2MU/gdb-8.2.1/gdb/inline-frame.c:156: internal-error: void inline_frame_this_id(frame_info*, void**, frame_id*): Assertion `frame_id_p (*this_id)' fail.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) [answered Y; input not from terminal]

This is a bug, please report it. For instructions, see:
http://www.gnu.org/software/gdb/bugs/.

/build/gdb-Y5K2MU/gdb-8.2.1/gdb/inline-frame.c:156: internal-error: void inline_frame_this_id(frame_info*, void**, frame_id*): Assertion `frame_id_p (*this_id)' fail.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) [answered Y; input not from terminal]
Aborted (core dumped)

type 'NoneType' is not iterable

I got no useful output from the analysis:

$ gdb  -x gdbcommands  myexec  core.1234
[New LWP 2880]
[New LWP 32369]
[New LWP 3027]
[New LWP 25174]
o o o
********************************************************************************
Displaying blocking threads using 'blocked' command
Python Exception <type 'exceptions.TypeError'> argument of type 'NoneType' is not iterable: 
gdbcommands:5: Error in sourced command file:
Error occurred in Python command: argument of type 'NoneType' is not iterable

Given that NoneType is synonymous with "no data", can I assume that no deadlock was detected?

Calling blocked fails with invalid literal for int() with base 10

(gdb) blocked

********************************************************************************
Displaying blocking threads using 'blocked' command
Python Exception <class 'ValueError'> invalid literal for int() with base 10: '-': 
Error occurred in Python: invalid literal for int() with base 10: '-'

Got Error : No symbol "mutex" in current context

When I tried using this script I got the following error


Displaying blocking threads using 'blocked' command
Python Exception <class 'gdb.error'> No symbol "mutex" in current context.:
Error occurred in Python command: No symbol "mutex" in current context.

Is this because of my pthread library? do we have any solution for the same?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.