kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* How to get user level stack trace of an application from system crash
@ 2015-10-06  5:53 Shailendra Rana
  2015-10-07  6:50 ` Vishal Thanki
  2015-10-07  8:40 ` Pranay Srivastava
  0 siblings, 2 replies; 6+ messages in thread
From: Shailendra Rana @ 2015-10-06  5:53 UTC (permalink / raw)
  To: kernelnewbies

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* How to get user level stack trace of an application from system crash
  2015-10-06  5:53 How to get user level stack trace of an application from system crash Shailendra Rana
@ 2015-10-07  6:50 ` Vishal Thanki
  2015-10-07  9:30   ` Shailendra Rana
  2015-10-07  8:40 ` Pranay Srivastava
  1 sibling, 1 reply; 6+ messages in thread
From: Vishal Thanki @ 2015-10-07  6:50 UTC (permalink / raw)
  To: kernelnewbies

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 at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20151007/adfaf643/attachment.html 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* How to get user level stack trace of an application from system crash
  2015-10-06  5:53 How to get user level stack trace of an application from system crash Shailendra Rana
  2015-10-07  6:50 ` Vishal Thanki
@ 2015-10-07  8:40 ` Pranay Srivastava
  2015-10-07  9:25   ` Shailendra Rana
  1 sibling, 1 reply; 6+ messages in thread
From: Pranay Srivastava @ 2015-10-07  8:40 UTC (permalink / raw)
  To: kernelnewbies

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 at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
        ---P.K.S

^ permalink raw reply	[flat|nested] 6+ messages in thread

* How to get user level stack trace of an application from system crash
  2015-10-07  8:40 ` Pranay Srivastava
@ 2015-10-07  9:25   ` Shailendra Rana
  2015-10-07 10:09     ` Anupam Kapoor
  0 siblings, 1 reply; 6+ messages in thread
From: Shailendra Rana @ 2015-10-07  9:25 UTC (permalink / raw)
  To: kernelnewbies

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 at 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* How to get user level stack trace of an application from system crash
  2015-10-07  6:50 ` Vishal Thanki
@ 2015-10-07  9:30   ` Shailendra Rana
  0 siblings, 0 replies; 6+ messages in thread
From: Shailendra Rana @ 2015-10-07  9:30 UTC (permalink / raw)
  To: 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 at 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* How to get user level stack trace of an application from system crash
  2015-10-07  9:25   ` Shailendra Rana
@ 2015-10-07 10:09     ` Anupam Kapoor
  0 siblings, 0 replies; 6+ messages in thread
From: Anupam Kapoor @ 2015-10-07 10:09 UTC (permalink / raw)
  To: kernelnewbies


>>>>> [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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-10-07 10:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-06  5:53 How to get user level stack trace of an application from system crash Shailendra Rana
2015-10-07  6:50 ` Vishal Thanki
2015-10-07  9:30   ` Shailendra Rana
2015-10-07  8:40 ` Pranay Srivastava
2015-10-07  9:25   ` Shailendra Rana
2015-10-07 10:09     ` Anupam Kapoor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).