xiaoxiang781216 commented on issue #15446: URL: https://github.com/apache/nuttx/issues/15446#issuecomment-2574918660
> > @yamt can you try https://github.com/apache/nuttx/blob/master/sched/misc/deadlock.c? > > glancing at the code, it requires you to actually make a deadlock happen, and then somehow trigger an assertion failure. is it right? > Yes, the code assume that the deadlock will trigger panic finally. but it's easy to expose a nsh command to trigger the check periodly. > reproducing a deadlock is not always easy. well, if you know how to reproduce a deadlock, i guess you likely already know the problem well. just fix it. :-) > in a complex system, it's hard to know which mutexs and threads participant the deadlock chain, this tool help people identify the problem mutex and thread after the deadlock happen. > what i want to see is something more aggressive. eg. detect locking attempts with a wrong order. (in most cases it might not actually cause a deadlock. but it _can_ cause a deadlock.) this feature requires to record the locking order. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
