Find the answer to your Linux question:
Results 1 to 4 of 4
Hi All, I'm working for a software company. We recently tried running our C++ application compiled in gcc 4.4 compiler in Redhat Linux. Every time, our application was constantly crashing ...
  1. #1
    Just Joined!
    Join Date
    Oct 2010
    Posts
    2

    Threading issue in gcc 4.4 compiler

    Hi All,

    I'm working for a software company. We recently tried running our C++ application compiled in gcc 4.4 compiler in Redhat Linux.

    Every time, our application was constantly crashing after running for 4 hrs. We were not able to narrowdown the root cause of this issue, but, after trying our application to print more log statements, we believe that it could be an threading issue that cause the application to crash.

    We also found out that gcc 4.4 was not an supported version and gcc 4.1.2 was the last supported version got released. We then tried running our application compiled in gcc 4.1.2. This time, more surprisingly our application didn't crash and ran for more than 3 days continuously with out any issues.

    Is there any threading related problem in gcc 4.4.4?

    Very soon we will be ending up in a state to upgrade the compiler to latest one. In such a case which compiler version we need to use?

    Is it safe to use the gcc 4.5 version?

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    What distribution+version+kernel are you using? For RHEL/CentOS 5 the supported versions are 4.1.2 and 4.4.0. I haven't had any problems with either of them. I built and installed 4.5.1 as well, but that is so bleeding edge (just released in the past month) that I cannot recommend it for production applications at this time. There are also a lot of library dependencies that are incompatible with 4.1/4.4 which need to be installed somewhere other than /usr/lib or /usr/lib64, requiring a change in your LD_LIBRARY_PATH environment to run them. Ditto for 4.5.1, installing in an alternative location, requiring changing your PATH environment as well. So, 4.5.1 can be used for R&D, but definitely not for production code, just to reiterate.

    As for your threading problem (if that's what it is), remember that threading is mostly handled by the operating system. I'm not aware of user->kernel interface issues related to 4.4, though there could be something going on there. My guess is that there are some subtle runtime library issues going on vs. a compiler-specific problem, though I cannot say that without reservation. It could also be a kernel issue.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Oct 2010
    Posts
    2
    Thanks for your reply.

    I'm using RHEL 5.5 version. I have installed some libraries like binutils, mpc, mpfr and gmp to support compiling the gcc 4.4.4. These libraries are correctly mentioned in the LD_LIBRARY path otherwise the compilation even wouldn't be done correctly

    I can see from some source(from net) saying that 4.1.2 is the supported version for RHEL 5.5. Also, we got some reply from the Linux saying that 4.1.2 is the supported version

    Reply from Linux Org
    ===============
    3. The product has been built on GCC 4.4, which is unsupported for Production implementation as it made available via RHN for Technical Preview only. Could you check if it is possible to rebuild the application with GCC 4.1.2 which is the default compiler available on RHEL-5?

    But, From another source it says that 4.1.2 has issues with the memory handling when it is multhithreaded

    From this, I have an hypothesis saying 4.1.2 was not as seed in running as 4.4.4 and so the thread issue was not occuring in that. Please correct me if I'm wrong.

    You have mentioned that there are some library incompatible with 4.1.2 and 4.4. Can you provide some more information on it? What and Where should I check to make sure that my libraries are correctly installed and pointed.?

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    You have mentioned that there are some library incompatible with 4.1.2 and 4.4. Can you provide some more information on it? What and Where should I check to make sure that my libraries are correctly installed and pointed.?
    Actually, it was between 4.5.1 and 4.1/4.4. Well, you can install 4.4.0 directly with YUM. Try yum install 'gcc44*' from a root command line. All the dependencies will be installed so as to not conflict with gcc 4.1. If you build from source, I don't know about the possibility of conflict, except that as I said that with 4.5 there were some, although I don't remember exactly which libraries those were. In any case, building the gcc tool chain is not for the newbie or the faint of heart...
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...