Announcement

Collapse
No announcement yet.

mDNSResponder, crashing XPortPro 16MB

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • mDNSResponder, crashing XPortPro 16MB

    I was wondering if anybody out there has any experience using mDNSResponder on the XPortPro 16MB device.
    Over the last day or so I've added it to my project and it seems to run fine for about 5 to 10 minutes (I haven't measured exactly) and then the device becomes totally unresponsive (over the network and the serial port) and I have to do a hard reset of the device to get it back.
    I don't see any sort of crash log or stack trace or anything so I really don't know what's going on.
    I'm fairly certain that mDNSResponder is causing the problem as I can kill it just after the device boots up and the device seems stable over the long term.

    I'm pretty new to ucLinux and this device so I'd appreciate any tips on using mDNSResponder and or debugging problems like this.

    Thanks,
    Matt S.

    PS Alternatively I'd like to know if anyone has used Avahi on this device instead of mDNSResponder.

  • #2
    Here is an update.

    I still haven't gotten mDNSResponder to work (it still crashes my device after a few minutes) but then I haven't really tried as I've never been all that impressed with this code from Apple anyway.

    I have gotten Avahi to work but with some reservations and conniptions.
    Out of the box the Avahi-daemon runs but it won't register any services, this is because it fails to read the .service files in /etc/avahi/services. It fails to read the .service files because the glob() function provided by uClib returns an error if errno is nonzero before calling glob() and in this case errno is nonzero because avahi-daemon just failed to detect the nss-mdns service running (it's not running because 1. I don't really need it and 2. It's not provided as part of the Lantronix SDK). I found a this thread that somewhat deals with the problem of glob() erroring if errno is nonzero before calling glob() and the recommendation is to configure uClibc to use the GNU version of glob() by setting UCLIBC_HAS_GNU_GLOB to turn in uClibc .config file. I haven't tired this yet because I'm not 100% sure if this is a safe thing to do (nor exactly how to do this).
    The approach I've taken so far is to modify avahi-daemon/static-services.c to ensure errno is set to 0 before calling glob() this seemed safest and probably something that should be done by the avahi code anyway.

    I'm open to any other suggestions.

    Comment


    • #3
      Oh ya I forgot to mention that I would like to get mDNSResponder working, if for no other reason that it is about half the size of avahi-daemon.

      Comment


      • #4
        Can you run the free command when it's running to see if the memory usage is steadily climbing? That would tell you if there's a memory leak somewhere that results in an eventual crash.

        Comment


        • #5
          Mariano thanks for the suggestion, I thought that I had used top to confirm that there wasn't a memory leak problem but to make certain I just went ahead and added mDNSResponder back into my image and tested it with free and I'm frustrated to say that so far it has run for more than an hour without crashing or showing any signs of a memory leak. I really don't know what was going on the first time I tried mDNSResponder but the device definitely seemed less stable with mDNSResponder running than without it. I will go ahead and continue to test with mDNSResponder.
          Thanks,
          Matt S.

          Comment


          • #6
            So I did some more testing over the holiday break and the XPortPro definitely seems less stable with mDNSResponder running although I still can't quantify what is causing the system to lock up.

            Matt S.

            Comment


            • #7
              Building avahi

              mschuckmann, were you able to build the avahi daemon using the Lantronix SDK? I am trying myself to build avahi using Lantronix SDK 2.0.0.3, but it fails on missing "intltool" which doesn't seem to be part of the SDK. Any help on building avahi is much appreciated!

              Comment


              • #8
                building avahi

                Yes I did get avahi to build.
                As I recall the intltool needs to be installed on your development machine.
                I believe that for Ubuntu the command to install it would be.
                sudo apt-get install intltool

                I did not end up using avahi in our end product as it consumed a fair chunk of memory and I believe that the instability I was seeing was out of memory crashes.

                Matt S.

                Comment


                • #9
                  OK, I see. After installing intltool on the host I am able to build avahi. Thanks for getting back .

                  Comment


                  • #10
                    mschuckmann, did you have any luck to run mDNSResponder without stability issues? I'm seeing the same effect here. mDNSResponder running for a few minutes and then crashing (sometimes only the process, sometimes the whole system stalls). The only (possible) hint I can see in the logs is that the implementation used in the Lantronix SDK (214.3) has a length restriction of 14 characters for the service type which is no longer a restriction in the current spec. But I'm not entirely sure if this is the root cause. I imported mDNSResponder-567. But this version is even more unstable than 214.3.

                    Comment


                    • #11
                      I'm now using avahi successfully. Thanks to mschuckmann for sharing his findings regarding glob().
                      As already mentioned by him, UCLIBC_HAS_GNU_GLOB=y must be set in order to use avahi without changing source code. The symbol must be defined in the file config.uClibc of the current profile (located under <install_directory>/linux/vendor/Lantronix/<platform>/profile/<profile-name>, see also "6. Building μClinux -> Configuration Profiles" in the User Guide) and <install_directory>/linux/uClibc/.config (which seems to be a copy of the profile file).

                      Change "# UCLIBC_HAS_GNU_GLOB is not set" to "UCLIBC_HAS_GNU_GLOB=y"

                      Comment

                      Working...
                      X