This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Print Stacktrace on Runtime Error
On 07/14/2016 10:41 AM, William Cohen wrote:
> On 07/14/2016 01:19 PM, Alexander Lochmann wrote:
>> Hi folks!
>>
>> My stap scripts keeps failing either with a "user string copy
>> fault" or with a "read fault". Is there a way get more context
>> information about the error? A stacktrace for example? :)
>>
>> Thanks!
>>
>> Cheers, Alex
>>
>
> Hi Alex,
>
> Is this script using the user_string function? Is the script
> actually passing in a valid pointer? It might be useful to print out
> the value being passed to user_string to see if it valid and makes
> sense. Could you post the script that is causing the problem?
It's also possible that a user pointer is perfectly valid, just not
paged in. Since stap handlers run in atomic context, we can't take a
page fault to populate that memory.
Stap's try-catch mechanism might be helpful to you, whether to continue
past any encountered faults, or print your diagnostics like a backtrace.