multip register_uprobe

Wenji Huang wenji.huang@oracle.com
Fri Jul 6 08:03:00 GMT 2007


Hi,

   I am creating some test scripts based on sarikar's framework.
  
   There is one problem about register multiple times.
       .................
        probes->vaddr = vaddr;
        probes->pid = pid;
        probes->handler = handler;
        for (i=0; i < 3; i++) {
             ret = register_uprobe(probes);
             if (ret!=0)  //of course, the first time should succeed and 
will failed in second time, ret = -16
               {
 I tried several possibilities:
                 * return ret; //RESULT: the module can't be removed, 
the probed process will hang, can't be killed/continued
                 * return 0; //RESULT: same as above
                 * unregister_uprobe(probes);kfree(probes);break; 
//RESULT: same as above
                 * kfree(probes);break; //RESULT: the module can be 
removed, the probed process will hang, can't be killed/continued
               }
         }
        return 0;
        .................

  But, no problem in "register once and unregister multiple times".  

  Environment:
    kernel: 2.6.21
    utrace: http://people.redhat.com/roland/utrace/2.6.21/
    uprobe: mail by Jim, on 2007/05/26
    All the tests in srikar's testsuite passed in the box.

    Any analysis? or need to update utrace/uprobe? Is there any website 
or cvs to get the resource?

Regards,  
-- 
 ***Wenji Huang
*   



More information about the Systemtap mailing list