tNetTask suspends after booting the kernel image........ - VxWorks

This is a discussion on tNetTask suspends after booting the kernel image........ - VxWorks ; Hi All, The target is a pc486 with 3 NIC Cards fei82550 and its RAM is 256MB. My bootable vxworks include the application project. A bootable vxworks image is created ,with a main function of the application project which is ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: tNetTask suspends after booting the kernel image........

  1. tNetTask suspends after booting the kernel image........

    Hi All,

    The target is a pc486 with 3 NIC Cards fei82550 and its RAM is
    256MB.

    My bootable vxworks include the application project.
    A bootable vxworks image is created ,with a main function of the
    application project which is referenced in usrAppInit.c.
    The application project is basically acting as a firewall with tasks
    running for packet handing.

    the image is working fine but after some time tNetTask suspends and
    gives error like.........

    page fault:
    program counter : 0x001a8a90
    Status Register : 0x00010246
    error code : 0x00000000
    Task : 0xa9a31d0 "INTRANET"

    where intranet is user defined task in my application code.

    can anyone suggest me any idea about this.

    thanks in advance
    Praneeth.


  2. Re: tNetTask suspends after booting the kernel image........

    Hi Praneeth!

    Seems that your INTRANET Task is trying to access a memory region not within
    the RAM of your target (or not mapped). => page fault.

    The program counter may give you a quick reference where in your code the
    problem is located. Lookup the address in map-file, or try "lkAddr
    0x001a8a90" in Tornado Shell.

    If you have debug-connection after the problem occures, you can attach the
    debugger to your INTRANET-Task. In Backtrace-Window you can seen where in
    code the your problem is located.

    bye,
    Thomas



  3. Re: tNetTask suspends after booting the kernel image........

    Thank you Thomas,

    i don't have a debug connection and map file too.

    i have done lkAddr of that program counter and got the output like this


    0x0019c6c4 ip_output text
    0x0019cf64 ip_optcopy text
    0x0019d014 ip_ctloutput text
    0x0019d3d4 ip_pcbopts text
    0x0019d954 ip_getmoptions text
    0x0019da54 ip_freemoptions text
    0x0019db98 rip_init text
    0x0019dbc8 rip_input text
    0x0019dd48 rip_output text
    0x0019de68 rip_tloutput text
    0x0019dfc8 rip_usrreq text
    0x0019e318 qPriBMapPut text

    Value=0=0x0

    now by seeing this how can we say which part of the code is going
    wrong?
    Please give me any idea regarding this.

    thanks in advance,
    Praneeth.


  4. Re: tNetTask suspends after booting the kernel image........

    Cpu tells you, at which place in code your error takes place (program
    counter (pc)). Via lkAddr you can find out which function this program
    counter belongs to. Basicly lkAddr tells you the "function"-Adresses
    "around" the value you enter as parameter (your pc).
    Your pc was 0x001a8a90, so you have to find out the function-Adress just
    _before_ that value. In this function the error takes place.
    The output yor added does not quite fit to a pc of 0x001a8a90 i think...?

    With this method you can only find out the function which is causing the
    toubles. You can not find out by whom the function was called... Maybe you
    are lucky, and the function-name is obvious to you, and just called in one
    place of your application... but if function is eg. "memcpy" or so, then you
    need more information. For this you need the debugger. I would suggest, that
    you get the debugger running!

    bye,
    Thomas


    "comp.os.Vxworks" schrieb im Newsbeitrag
    news:1148549379.688926.61230@g10g2000cwb.googlegro ups.com...
    > Thank you Thomas,
    >
    > i don't have a debug connection and map file too.
    >
    > i have done lkAddr of that program counter and got the output like this
    >
    >
    > 0x0019c6c4 ip_output text
    > 0x0019cf64 ip_optcopy text
    > 0x0019d014 ip_ctloutput text
    > 0x0019d3d4 ip_pcbopts text
    > 0x0019d954 ip_getmoptions text
    > 0x0019da54 ip_freemoptions text
    > 0x0019db98 rip_init text
    > 0x0019dbc8 rip_input text
    > 0x0019dd48 rip_output text
    > 0x0019de68 rip_tloutput text
    > 0x0019dfc8 rip_usrreq text
    > 0x0019e318 qPriBMapPut text
    >
    > Value=0=0x0
    >
    > now by seeing this how can we say which part of the code is going
    > wrong?
    > Please give me any idea regarding this.
    >
    > thanks in advance,
    > Praneeth.
    >




  5. Re: tNetTask suspends after booting the kernel image........

    Hi Thomas,

    i forgot to give the PC no. in my last post

    Program counter No: 0x0019ce97 this is the program counter no. for the
    output what i have mentioned there.

    lkAddr 0x0019ce97 output is

    0x0019c6c4 ip_output text
    0x0019cf64 ip_optcopy text
    0x0019d014 ip_ctloutput text
    0x0019d3d4 ip_pcbopts text
    0x0019d954 ip_getmoptions text
    0x0019da54 ip_freemoptions text
    0x0019db98 rip_init text
    0x0019dbc8 rip_input text
    0x0019dd48 rip_output text
    0x0019de68 rip_tloutput text
    0x0019dfc8 rip_usrreq text
    0x0019e318 qPriBMapPut text

    Value=0=0x0

    i think first one is the address of the function which is just before
    the PC value.

    1) how can we find which function starts at this address?(we shud have
    a mapfile or there is any other procedure?) and

    2) what are the names given beside that pcno. indicates?

    and one more doubt is why it suspends at different program counters at
    each start up?

    Please help me with this questions...

    Thanks in advance,
    Praneeth.


  6. Re: tNetTask suspends after booting the kernel image........

    Ok, lkAddr tells you that the function ip_output occupies memory from
    0x0019c6c4 to about 0x0019cf64. The memory from 0x0019cf64 to about
    0x0019d014 is occupied by ip_optcopy, and so on.
    As your program counter (=Instruction pointer, = Instruction in memory where
    you program crashes) says 0x0019ce97, which is within the memory range of
    ip_output, you know, that you crash occures in the ip_output-function.

    So far so good. I don't know what ip_output does, but its name implies that
    it has to do something with output of IP-packets on network. Most likely a
    function of the vxWorks-TCP/IP-stack...?

    Is it really true, that pc-value is different each start-up? I mean, you
    really just start again, without compiling new/changed code? If you change
    something in code, it is normal that you get different pc-values, because
    your program and functions occupy different regions in memory...
    If you really just start, and pc-value is always different, than your
    problem is maybe a bit difficult to find...

    Anyway, as long a ip_output will not give you much hint where your problem
    is, i really would reccomend that you get the debugger running. With the
    debugger you can easily find out which function calls ip_output. You'll get
    the whole calling-chain up to you application-code.

    bye,
    Thomas



  7. Re: tNetTask suspends after booting the kernel image........

    thank you for ur help Thomas,

    sorry Thomas the program counter at each start up is the same, no
    change in it, no probs with it

    and about the function name i dont have any function with that
    name(ip_output) in my code. so, cant make out where it's getting
    crashed.

    one more doubt is are the names beside that PC's are really the
    function names or some thing else? why im asking this is i dont have
    any function in my code with those names as we got in lkAddr output.

    i think debugging will solve my problem... but i dont have any
    knowledge on debugging tools and how to connect the debugger and all
    the things.... can u suggest me any document? or any site? to develop
    this debugger for my application.. i have developed my application
    using Tornado 2.0 with Windows XP as the platform.....


  8. Re: tNetTask suspends after booting the kernel image........

    thank you for ur help Thomas,

    the program counter at each start up is the same, no
    change in it, no probs with it

    and about the function name i dont have any function with that
    name(ip_output) in my code. so, cant make out where it's getting
    crashed.

    one more doubt is are the names beside that PC's are really the
    function names or some thing else? why im asking this is i dont have
    any function in my code with those names as we got in lkAddr output.

    i think as u said debugging will solve my problem... but i dont have
    any
    knowledge on debugging tools and how to connect the debugger and all
    the things.... can u suggest me any document? or any site? to develop
    this debugger for my application.. i have developed my application
    using Tornado 2.0 with Windows XP as the platform.....

    Thanks in advance,
    Praneeth.


  9. Re: tNetTask suspends after booting the kernel image........

    Hi!

    The names beside the adresses in output of lkAddr are "symbol-names". This
    can be function names, names of global variables, and so on.
    That you don't get any of you functions in the list of lkAddr is very
    possible. lkAddr prints just a few names that are around the value you enter
    as a parameter. When your functions are located somewhat "away" from the
    value you enter as parameter to lkAddr, then you functions will not be
    shown.
    If you are interested where in memory your functions are, then you can use
    the lkup()-Function. Which is the "inversion" if lkAddr. You can find out
    the adress of a symbol with lkup.
    eg.
    -> lkup "printf"
    or
    -> lkup "YourFunction"

    As debugger I would reccommend the vxWorks WDB. WDB is already included in
    your Tornado installation. Your just need to add some things in the
    project-configuration of your bootable-vxWorks-project. This can be done
    from Tornado-IDE. You can configure the WDB to use END-network-driver for
    debugging, or alternatively use the serial-line as the debug connection.
    I would try END connection first, to get things running.
    When you successfully configured WDB on your traget, then it should print
    out "WDB ready" (and some other stuff) on your terminal-connection (with
    printf).

    After that, you need to tell the Tornado-IDE which target you want to debug.
    This is done by configurating a "traget-server". You specify IP-adress, the
    vxWorksImage you are booting on target, and some other things. Then you are
    able to start the target-server. The target-server holds the connection to
    your target, and also debugging is done via target-server.

    Try building a small application first, start target-server and debugger,
    set some breakpoints, start your program, and so on. When you are familiar
    with it, you can attach to the task which caused your problem after it
    crashed. Tornado debugger will give you full callstack (if u are lucky .
    When network is not working after your crash, you might want to use
    serial-line for debugging.

    Look up Tornado-manuals for WDB and target-server. There you'll get help on
    how to configure it.

    bye,
    Thomas



+ Reply to Thread