It looks to me line you have a bug in your code.  I'd valgrind it.

Hi,
Sorry, the error was the following
Caught signal 11.
  0xb75601a1   64 (vigil::fault_handler(int)+0x51)
  0xb7757400 1376 (__kernel_sigreturn+0x0)
  0xb75a1e2e
  0xb75a1faa   48 (vigil::Co_waitqueue::wake_n(int, unsigned int)+0x4a)
  0xb75a014d   32 (vigil::Co_cond::signal()+0x2d)
0xb75b4bad 96 (vigil::Timer_dispatcher::post(boost::function<void ()(), std::allocator<void> > const&, timeval const&)+0x11d) 0xb765a71a 32 (vigil::nox::post_timer(boost::function<void ()(), std::allocator<void> > const&, timeval const&)+0x3a) 0xb763a630 32 (vigil::container::Component::post(boost::function<void ()(), std::allocator<void> > const&, timeval const&) const+0x30)
  0xb58292f3  320 (vigil::applications::Linkloads::timer(void*)+0x113)
  0xb6f604ff
Segmentation fault

Thanks


On Thu, Apr 1, 2010 at 2:07 PM, sravanthi gondhi <gondhisravan...@gmail.com <mailto:gondhisravan...@gmail.com>> wrote:

    Hi,
    I am trying to collect statistics from the switches periodically
    using timer and I am creating a thread for this. I have written
    the following code

    void
    Linkloads::install() {
    pthread_create(&thread_id,0,&Linkloads::timer,(void *)this);
    }

    void* Linkloads::timer(void *obj)
    {
    cout<<"timer called"<<endl;
    timeval tv={1,0};
    ((Linkloads *)obj)->post(boost::bind(&Linkloads::timer, (Linkloads
    *)obj), tv);
    }

    So I am expecting the timer to be called every 1 second. I have
    made timer static while declaring it.  It compiles well but when I
    run nox_core with linkloads, it gives the following message.

    00034|nox|ERR:Cannot change the state of 'linkloads' to INSTALLED:
    'linkloads' ran into an error:
        Can't open a dynamic library:
    'nox/netapps/linkloads/linkloads.so: cannot open shared object
    file: No such file or directory' or
    'nox/netapps/linkloads/.libs/linkloads.so: undefined symbol:
    vigil::applications::Linkloads::post(boost::function<void ()(),
    std::allocator<void> > const&, timeval const&) const'

    I am unable to figure out the error and any help is greatly
    appreciated. Thanks in advance.

    Sravanthi


------------------------------------------------------------------------

_______________________________________________
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


_______________________________________________
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org

Reply via email to