-2

I am requesting opinions on expected and desired outcome of prog initialization, specifically loading of shared libraries for a program that I do not have source code. All code delivered via RPMs.

  • Suspect prog exhibits constant Revc-Q buffering on two TCP conns. Other end of TCP conns looks good. Suspect prog buffers 1000-10000 bytes almost constantly, rarely goes to zero. Host of suspect prog shows tcpActiveOpens.0 50,000 with tcpAttemptFails.0 at 47,000 with both incrementing continuously. Many other probable TCP issues.

  • When ldd run on suspect prog returns total of 42 libraries with 24 "not found" the other 18 resolve with a DIR and hexaddr. Put an strace wrapper around suspect prog and noted the many "-1 ENOENT" on every library, not just the ones noted "not found" with ldd. All libraries are eventually found and loaded into suspect progs mem. Some have as many as 42 ENOENT before success.

  • Contacted dev with findings and have been assured that when I ran ldd I needed to source their environment config file, which is supposed to run at prog launch and set all library paths. No comment on the ENOENT.

Questions: When you have finished your code and complied, do you validate with tools such as ldd? Should ldd always return 0, or is some or a lot of "not founds" not always an issue. And what about the ENOENTs? It seems to me that there should be zero errors if the code is compiled and running correctly.

0

ldd should always return OK, otherwise the program can't run. On the other hand, there are ways to control where the dynamic linker searches for shared libraries. Based on the reply you got from the program supplier, I assume they have delivered some kind of startup script that sets up the program environment so that the search paths are satisfied. If you don't run the program like it is intended to be run, ldd will very likely report errors.

The ENOENT errors are perfectly normal when the library search path contains several directories. The dynamic linker tries to find what it is looking for by opening the requested file, and if it is not found ("No such file or directory"), it proceeds to the next directory in the search path. This applies not only to shared libraries, but also other types of files. For example, if a configuration file is optional, the program just ignores the error message and continues execution.

Ps. I found the newspaper personals ad style of you question amusing.

  • Thanks Johan, you did answer my question. It would seem to my non-programmer background that any KERNEL ERROR is bad. But the fact that the prog does find all the libraries led to me believe that is may not be an issue. The Dev did lead me to their environment control script, but it keeps pointing to a DIR where there are no libraries at all. I think this is due to there Dev environment not exactly matching my Op environment. – ZarNix Mar 30 at 11:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.