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]

function pid2task in task.stp causes a kernel panic?


uname -a
Linux linux 3.7.10-1.16-desktop #3 SMP PREEMPT Mon Aug 19 10:39:20 CST
2013 x86_64 x86_64 x86_64 GNU/Linux

script:
probe signal.send {
printf("signame: %s\n", sig_name)
printf("pid: %d\n", sig_pid)
printf("execname: %s\n", pid2execname(sig_pid))
}

screenshot :
http://pynotes.cufy.org/images/kernel_panic_2.JPG
The newest frame is find_get_pid

function task2pid:long {pid:long} %{ /*pure*/
    struct task_struct *t = NULL;
    pid_t t_pid  = (pid_t)(long)STAP_ARG_pid;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
    struct pid *p_pid = find_get_pid(t_pid);
    rcu_read_lock();
    t = pid_task(p_pid, PIDTYPE_PID);
    put_pid(p_pid);
#else
    rcu_read_lock();
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
    t = find_task_by_vpid (t_pid);
#else
    t = find_task_by_pid (t_pid);
#endif /* 2.6.24 */
#endif /* 2.6.31 */
    rcu_read_unlock();
    STAP_RETVALUE = (long)t;
%}


any idea?


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