This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Queries on SystemTap - with focus on User Space debugging


Hi,
Iam currently using sytemtap version 0.9.7 on RHEL 5.4. Will it help
in my user-space tracing if i upgrade my version to a more recent one
, say  v1.5 ?

Thanks,
Manjusha.

On Fri, May 27, 2011 at 10:56 AM, Manjusha Ajay <manjusha.ajay@gmail.com> wrote:
> Hi Josh,
>> So try something like:
>>
>> ?probe signal.send {
>> ? ?if (sig == 11 && sig_pid == target()) {
>> ? ? ?print_ubacktrace()
>> ? ?}
>> ?}
>>
>>
>
> Tried filtering signal 11 in the probe 'signal.send' , but
> print_ubacktrace() was giving me a kernel space backtrace.
> Is it possible to get user-space backtrace from a kernel probe?
>
> Manjusha
>
> On Thu, May 26, 2011 at 10:09 PM, Josh Stone <jistone@redhat.com> wrote:
>> On 05/26/2011 03:23 AM, Frank Ch. Eigler wrote:
>>> Hi -
>>>
>>> On Thu, May 26, 2011 at 03:24:54PM +0530, Manjusha Ajay wrote:
>>>> [...]
>>>> probe kernel.function("send_sig") {
>>>> if ($sig == 11 && p && task_pid(p) == target()) {
>>>> ? ? ?print_ubacktrace()
>>>> ? }
>>>> }
>>>>
>>>> Also got a warning when I ran the above script
>>>>
>>>>> stap -c "./test_segfault' test.stp
>>>> WARNING: ?read-only local variable 'p' ?: identifier 'p' at test.stp:19:20
>>>
>>> Ah yes, an appropriate warning: I meant $p instead of p above,
>>> since we're trying to extract the p parameter from the context
>>> of the send_sig function call.
>>>
>>> It appears difficult to place an architecture-neutral kernel probe at
>>> the point where a page fault is about to be declared a SIGSEGV type
>>> error. ?Might try kernel.function("force_sig_info") instead,
>>> filtering on $sig==11.
>>
>> We have a predefined tapset that is supposed to cover all the different
>> ways signals can be sent, documented thusly:
>>
>> /**
>> ?* probe signal.send - Signal being sent to a process
>> ?* Arguments:
>> ?* @sig: The number of the signal
>> ?* @sig_name: A string representation of the signal
>> ?* @sig_pid: The PID of the process receiving the signal
>> ?* @pid_name: The name of the signal recipient
>> ?* @si_code: Indicates the signal type
>> ?* @task: A task handle to the signal recipient
>> ?* @sinfo: The address of siginfo struct
>> ?* @shared: Indicates whether the signal is shared by the thread group
>> ?* @send2queue: Indicates whether the signal is sent to an existing
>> ?* sigqueue
>> ?* @name: The name of the function used to send out the signal
>> ?*
>> ?* Context:
>> ?* ?The signal's sender.
>> ?*
>> ?*/
>>
>> So try something like:
>>
>> ?probe signal.send {
>> ? ?if (sig == 11 && sig_pid == target()) {
>> ? ? ?print_ubacktrace()
>> ? ?}
>> ?}
>>
>>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]