How to get user level stack trace of an application from system crash
Hi, I have an application which traps file events using fanotify, process these events and gives a verdict to fanotify whether access to a file is allowed or not. However, in some cases the verdict does not reach fanotify and system freezes. In such a case I just have system crash to analyze the issue. My question is that is it possible to get a user level stack trace of an application using system crash ? Thanks and regards, Shailendra
Hi Shailendra, You may want to run your application using strace/ltrace which may help you identify which system call/library call is actually causing the crash. You may have to look around the application source surrounded by that system call/library call and have to find the clue. I am not aware of any other way to get the user level stacktrace. Vishal On Tue, Oct 6, 2015 at 11:23 AM, Shailendra Rana < shailendra.rana1982@gmail.com> wrote:
Hi,
I have an application which traps file events using fanotify, process these events and gives a verdict to fanotify whether access to a file is allowed or not. However, in some cases the verdict does not reach fanotify and system freezes. In such a case I just have system crash to analyze the issue.
My question is that is it possible to get a user level stack trace of an application using system crash ?
Thanks and regards, Shailendra
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
On 7 October 2015 at 12:20, Vishal Thanki <vishalthanki@gmail.com> wrote:
Hi Shailendra,
You may want to run your application using strace/ltrace which may help you identify which system call/library call is actually causing the crash. You may have to look around the application source surrounded by that system call/library call and have to find the clue. I am not aware of any other way to get the user level stacktrace.
Vishal
On Tue, Oct 6, 2015 at 11:23 AM, Shailendra Rana <shailendra.rana1982@gmail.com> wrote:
Hi,
I have an application which traps file events using fanotify, process these events and gives a verdict to fanotify whether access to a file is allowed or not. However, in some cases the verdict does not reach fanotify and system freezes. In such a case I just have system crash to analyze the issue.
My question is that is it possible to get a user level stack trace of an application using system crash ?
Thanks and regards, Shailendra
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Hi, Yes, for in-house debugging it can be done but this may not be possible if this application is running on a customer system. In that case I would just have the crash dump. Thanks and regards, Shailendra
On Tue, Oct 6, 2015 at 11:23 AM, Shailendra Rana <shailendra.rana1982@gmail.com> wrote:
Hi,
I have an application which traps file events using fanotify, process these events and gives a verdict to fanotify whether access to a file is allowed or not. However, in some cases the verdict does not reach fanotify and system freezes. In such a case I just have system crash to analyze the issue.
Do you've any specific steps? Which kernel version you are using?
My question is that is it possible to get a user level stack trace of an application using system crash ?
Thanks and regards, Shailendra
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- ---P.K.S
On 7 October 2015 at 14:10, Pranay Srivastava <pranjas@gmail.com> wrote:
On Tue, Oct 6, 2015 at 11:23 AM, Shailendra Rana <shailendra.rana1982@gmail.com> wrote:
Hi,
I have an application which traps file events using fanotify, process these events and gives a verdict to fanotify whether access to a file is allowed or not. However, in some cases the verdict does not reach fanotify and system freezes. In such a case I just have system crash to analyze the issue.
Do you've any specific steps? Which kernel version you are using?
My question is that is it possible to get a user level stack trace of an application using system crash ?
Thanks and regards, Shailendra
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- ---P.K.S
Hi, The application traps file events and send them over to other system via TCP. This other machine is running a third party solution which process these events and sends the verdict to the application which passes on the same to fanotify based on which decision of access to a file is made. I have seen this freeze issue in case of network failures but those are identifiable. There are couple of cases mentioned below which may lead to this. 1) The event is received by third party solution but it did not send the verdict to the application. In that scenario need to notify this third party for fixing the issue. 2) Verdict is received by an application but could not pass on the same to fantiofy maybe it is stuck in an infinite loop. In this case I need to work towards fixing my application. In order to identify the correct root cause I would want to have a user level stack trace of this application. Using crash tool I could not figure out the same. I am using 3.13.0-24-generic #47-Ubuntu. Thanks and regards, Shailendra
[2015-10-07T14:55:07+0530]: "Shailendra Rana" (shailendra.rana1982): ,----[ shailendra.rana1982 ] | The application traps file events and send them over to other system | via TCP. This other machine is running a third party solution which | process these events and sends the verdict to the application which | passes on the same to fanotify based on which decision of access to a | file is made. I have seen this freeze issue in case of network | failures but those are identifiable. There are couple of cases | mentioned below which may lead to this. | | 1) The event is received by third party solution but it did not send | the verdict to the application. In that scenario need to notify this | third party for fixing the issue. | 2) Verdict is received by an application but could not pass on the | same to fantiofy maybe it is stuck in an infinite loop. In this case I | need to work towards fixing my application. | | In order to identify the correct root cause I would want to have a | user level stack trace of this application. Using crash tool I could | not figure out the same. | | I am using 3.13.0-24-generic #47-Ubuntu. `---- one word: libunwind
also, this is not a kernel topic, afaik.... -- kind regards anupam
participants (4)
-
Anupam Kapoor -
Pranay Srivastava -
Shailendra Rana -
Vishal Thanki