Operating System - HP-UX
1821643 Members
3085 Online
109633 Solutions
New Discussion юеВ

linking problem - "collect2: ld terminated with signal 10"

 
Vitaly Shatsky
Occasional Contributor

linking problem - "collect2: ld terminated with signal 10"

Hi,

When we try to link our compiled C++ files into a shared library using g++ (version 3.0.1) on HP-UX B.11.11 U 9000/782, we get:

collect2: ld terminated with signal 10 [Bus error]
*** Error exit code 1

Dumped core contains:

...
ERROR: mmap failed for dld
ERROR: mmap failed for TSD
...

We have seen this happen at different points of linking process.

There is enough swap space on the machine (1G).

Any ideas?

Thank you.
-Vitaly
5 REPLIES 5
Steven Gillard_2
Honored Contributor

Re: linking problem - "collect2: ld terminated with signal 10"

Make sure you have the latest linker patch installed, which is PHSS_24304. It fixes loads of problems including a bus error like what you're seeing.

Regards,
Steve
Vitaly Shatsky
Occasional Contributor

Re: linking problem - "collect2: ld terminated with signal 10"

Hi,

I appreciate your responce. Unfortunately the patch has not helped.

We wrote a simple C++ program that just allocated memory in a loop and it dumps core before we expect it to. So, it runs out of memory. It seems like our allocated swap space is not used as it should be. When the program runs, before it dies, we monitored output of swapinfo and we noticed that dev and memory swap usage does not change (device swap actually stays at 0% even though it is dedicated as primary swap and has priority 0). Only reserve swap usage changes until some point
and then our program terminates with error
saying (file system is full). Do you have any ideas on how verify and correct this?

Here is output from swapinfo -tm

Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1024 0 1024 0% 0 - 0 /dev/vg00/lvol2
reserve - 129 -129
memory 389 103 286 26%
total 1413 232 1181 16% - 0 -

Thanks
-Vitaly
Steven Gillard_2
Honored Contributor

Re: linking problem - "collect2: ld terminated with signal 10"

Your memory problem is likely to be caused by the maxdsiz kernel parameter, which limits the amount of memory a process can allocate. What is the value of maxdsiz on the system?

The "file system full" error probably means your program is dumping core and filling the file system in the process.

Is the linker still terminating with a bus error as stated in your original post?

Regards,
Steve
Vitaly Shatsky
Occasional Contributor

Re: linking problem - "collect2: ld terminated with signal 10"

 
Steven Gillard_2
Honored Contributor

Re: linking problem - "collect2: ld terminated with signal 10"

I think you need to report this to HP. If the linker is dying with signal 10 it is a bug they'll need to fix.

Regards,
Steve