This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

  • Resolved

RTOS/TM4C129XNCZAD: NDK IP change with HTTP connection

Part Number: TM4C129XNCZAD

Tool/software: TI-RTOS

Trying to change the IP address when using the HTTP server gives me the error: 00010.933 llExit: Illegal call to llExit()

The code changes the IP in response to an HTTP GET which contains the new IP value. I am trying to remove the CFGTAG_IPNET configuration in the same CGI function that received the HTTP GET message.

The CGI function gives the error when calling CfgRemoveEntry()  and then CfgAddEntry() is not able to run. I can't tell for sure because the chip his loader_exit() when attempting to single step over the functions.

Other post have had a priority issue when getting the llExit error. There is a task called dchild that gets priority 9 (kernel) but I think this task is related to the HTTP server. I did not create this task in XGCONF.

Am I removing IPs in an unreasonable way? What is causing my error?

  • In reply to Peter Borenstein:

    Hi Peter,

    Fyi...Steve is out this week. He'll respond when he gets back into the office next week.

    Todd
  • In reply to ToddMullanix:

    *Friendly ping*
  • In reply to Peter Borenstein:

    Peter,

    My apologies for the lack of response. I'm still looking at this and will report back shortly. Thanks for your patience.

    Steve

  • In reply to Steven Connell:

    *
  • In reply to Peter Borenstein:

    How have you been Steven?
  • In reply to Peter Borenstein:

    Hi Peter,

    I have to again apologize for the lack of response, but I have not forgotten about this problem and have been working on it behind the scenes.

    It turns out that this issue is due to a race condition, which has been pretty tough to pinpoint.

    The good news is I have a pretty good handle on it now and am testing out a possible solution. Once I have it working, I'll pass it on so you can try it on your end.

    Steve
  • In reply to Steven Connell:

    Peter,

    Just wanted to update you again. The solution I had didn't pan out and actually brought more (related) issues to light regarding this race condition.

    I'm still working through it and will update you again soon.

    Steve
  • In reply to Steven Connell:

    Hi Peter,

    I finally have something for you! Please find the attached tarball which addresses the following 4 issues:

      1.  NDK-36 netsrv.c missing llEnter()/llExit() pair around socket clean up code (?)

      2.  NDK-225 Prevent lingering sockets from being freed in SockCleanPcb

      3.  NDK-230 Prevent lingering sockets from being freed when TCP_RST received

      4.  NDK-232 Call Sock6CleanPcb() when an IPv6 address is removed and/or IPv6 is deinitialized

    Issues 2 - 4 were found as a result of fixing #1. They all involved race conditions to free sockets between different threads when an IP address was removed (the issue you hit) or when the stack was rebooted or shut down.

    You should be able to drag and drop the packages folder from the attached onto your NDK intsallation's packages folder (e.g. C:/ti/tirtos_tivac_2_16_00_08/products/ndk_2_25_00_09/packages on your PC) and say "yes to all" (please make sure to back up your NDK installation! Or, you might want to first try this on a copy of the NDK install).

    Once you've updated the files in your NDK with the attached, you will need to rebuild the NDK stack, and then rebuild your application.

    Just reply back here if you need any more help with this or have any questions.

    -Steve

    ndk_2.25.00.09_raceConditionFixes.tar.gz

  • In reply to Steven Connell:

    To be cautious, I am building in an ndk copy folder. The copied files appear to have compiled, but I do not know which library to copy back over to my main stack install.

    The NDK user guide says "If you configure the NDK in CCS with the XGCONF configuration tool, the appropriate NETCTRL library is
    automatically selected based on the modules you enable".

    How can I tell what library is selected by CCS? How can I tell that this library isn't being recompiled by CCS (undoing my changes)?

    The wiki gives instructions for building in debug mode. Do I need to build a copy with and without debug mode?

  • In reply to Peter Borenstein:

    I can see a setting in CCS project properties to make a makefile in the projects Debug/ folder. There is no reference to an NDK file in this make file.

    In the console output, I see CCS creating another make file for sys/bios "making ../src/sysbios/sysbios.aem4f ...". I  do not see any setting in CCS project properties for this make file. There is no reference to and NDK file here either.

    I found a _linkinfo.xml file that calls out packages\ti\ndk\hal\timer_bios\lib\hal_timer_bios.aem4f and packages\ti\ndk\netctrl\lib\netctrl_ipv4.aem4f. So The NDK lirabries are being specified somehow..

    What is telling CCS to make the sys/bios library? How can I tell what NDK libraries are selected by CCS? When would it make NDK libraries?

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.