[bug #18969] crashes in udp_bind

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug #18969] crashes in udp_bind

David GIRAULT-2

URL:
  <http://savannah.nongnu.org/bugs/?18969>

                 Summary: crashes in udp_bind
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: tims
            Submitted on: Tuesday 02/06/2007 at 05:45
                Category: UDP
                Severity: 3 - Normal
              Item Group: Crash Error
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Vers 1.2.0.  Crashes during snmp_init call to udp_bind.  causes SWI vector
(for LPC23xx ARM7TDMI - a port by Kurt Sterckx).  Not sure if it is something
from the port of or some other issue.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tuesday 02/06/2007 at 05:45  Name: udp.c  Size: 21kB   By: tims
yes - I know it looks like hackery (at least the main.c portion) - that's my
fault... I'm just trying to get it to work.
<http://savannah.nongnu.org/bugs/download.php?file_id=11928>
-------------------------------------------------------
Date: Tuesday 02/06/2007 at 05:45  Name: main.c  Size: 6kB   By: tims
yes - I know it looks like hackery (at least the main.c portion) - that's my
fault... I'm just trying to get it to work.
<http://savannah.nongnu.org/bugs/download.php?file_id=11929>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?18969>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

Re: [bug #18969] crashes in udp_bind

Kieran Mansley
On Tue, 2007-02-06 at 05:45 +0000, Tim Shirley wrote:

> URL:
>   <http://savannah.nongnu.org/bugs/?18969>
>
>                  Summary: crashes in udp_bind
>                  Project: lwIP - A Lightweight TCP/IP stack
>             Submitted by: tims
>             Submitted on: Tuesday 02/06/2007 at 05:45
>                 Category: UDP
>                 Severity: 3 - Normal
>               Item Group: Crash Error
>                   Status: None
>                  Privacy: Public
>              Assigned to: None
>              Open/Closed: Open
>          Discussion Lock: Any
>
>     _______________________________________________________
>
> Details:
>
> Vers 1.2.0.  Crashes during snmp_init call to udp_bind.  causes SWI vector
> (for LPC23xx ARM7TDMI - a port by Kurt Sterckx).  Not sure if it is something
> from the port of or some other issue.

I think the SNMP server is pretty new in 1.2.0 - perhaps one of the
other developers who knows more about it can comment?

Did you (or the porter) see this:

http://lists.gnu.org/archive/html/lwip-users/2007-01/msg00016.html

Kieran



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #18969] crashes in udp_bind

David GIRAULT-2
In reply to this post by David GIRAULT-2

Follow-up Comment #1, bug #18969 (project lwip):


I think the SNMP server is pretty new in 1.2.0 - perhaps one of the
other developers who knows more about it can comment?

Did you (or the porter) see this:

http://lists.gnu.org/archive/html/lwip-users/2007-01/msg00016.html


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?18969>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #18969] crashes in udp_bind

David GIRAULT-2

Follow-up Comment #2, bug #18969 (project lwip):

ok... yes I've seen the previous post.

I tried a little experiment to just create a udb_pcb and pass it to
udp_bind().  It runs - but the udp_pcb is not allocated (or at least it
doesn't seem to be).

Here's the relevant code for getting the udp_pcb:

        struct udp_pcb *my_udp_pcb = NULL;
        my_udp_pcb = udp_new();

Huh - now that I think about it, that's really strange.  I have blocking code
around the udp_bind() call which makes sure the udp_pcb != NULL.

Thanks for the help thus far, any other thoughts?

TimS


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?18969>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #18969] crashes in udp_bind

David GIRAULT-2

Follow-up Comment #3, bug #18969 (project lwip):

Maybe you need to increment #define MEMP_NUM_UDP_PCB in lwipopts.h ... The
SNMP code needs an extra PCB, and the udp_new() may choke on that if this
setting is too low.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?18969>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #18969] crashes in udp_bind

David GIRAULT-2

Follow-up Comment #4, bug #18969 (project lwip):

Made quite a bit more progress...

udp_bind() is ok... it turns out that it really was hanging at the call to
snmp_cold_trap().  I commented that out (work on that another day) and
started working on the snmp get stuff.

sending get to my lwIP SNMP embedded system:

  receives udp packet... good
  starts doing various tests .... good
  completes recognition of iso.org.dod.internet ... good
  when processing snmp_search_tree() always returns NULL

Good thing - it no longer crashes
Bad thing - I haven't figured out why it won't do the search tree.  I'm
trying to send get iso.org.dod.internet.mgmt.mib-2.system.3, and .4 (which it
looks like the code should respond to).  The ident length that is passed to
snmp_search_tree is 4 (which I expect).  The ident value is 02 00 00 00 (I
have a routine to print as bytes)... I'm guessing each time through the while
loop will drill down to the next level so that isn't too odd (I double checked
that I was sending the right info with a packet sniffer).  It takes the
MIB_NODE_SC branch and then returns NULL...

Any new words of wisdom on what to look @ next?

Thx,

TimS

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?18969>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #18969] crashes in udp_bind

David GIRAULT-2

Follow-up Comment #5, bug #18969 (project lwip):

ok... I had the ident values wrong.  For some reason I assumed you would pack
the values (which I realize doens't make much sense)... After evaluating the
ident values correctly I can now see that I am getting the whole get request
for iso.org.dod.2.1.1.x.  However, it still decides that the ...dod.2 isn't
found and returns a null...

What I'm wondering is why the node is of type MIB_NODE_SC when it should
probably be something else.  The SC type is for the leaf right?  So who do
the node types get set... I haven't quite figured that one out.  

Or am I asking the wrong questions still?  Perhaps the only issue is that I
haven't enabled the mib (even thought I populate sysContact and other sys
vals per the short snmp doc/directions, I guess that doesn't mean that they
are "live")


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?18969>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #18969] crashes in udp_bind

David GIRAULT-2

Follow-up Comment #6, bug #18969 (project lwip):

You can't SNMP-GET iso.org.dod.internet.mgmt.mib-2.system.3
you can only get iso.org.dod.internet.mgmt.mib-2.system.3.0

Scalars identifiers for simple objects (non-tabular) must be terminated with
.0 !

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?18969>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #18969] crashes in udp_bind

David GIRAULT-2

Update of bug #18969 (project lwip):

                  Status:                    None => Invalid                
             Open/Closed:                    Open => Closed                

    _______________________________________________________

Follow-up Comment #7:

I'm going to close this bug as the original problem is resolved.  If you
could file new bugs for the additional problems you've come across that would
be great.  Otherwise we end up tracking many issues in one bug report, which
can lead to confusion.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?18969>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel