Operating System - HP-UX
1834586 Members
3383 Online
110069 Solutions
New Discussion

Re: mmap failed for dld mmap failed for TSD

 
Kiran Nadgir
New Member

mmap failed for dld mmap failed for TSD

I am getting a core dump in a shell script which is used to build applications on our unix box.

Here is the log from the core.

acilh505
B.11.11
9000/800
101901557
build9i
l>X{
UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU?
>B$Revision: 92453-07 linker linker crt0.o B.11.16 000601 $
/usr/lib/dld.sl
ERROR: mmap failed for dld
ERROR: mmap failed for TSD
@@@@@@@@@@@@@@@@@@@@@@@@@@
/tmp/shxxxxxxxxxx.aaaaaaaaaa
LINES
LINES=1
COLUMNS
COLUMNS=1
ksh: no memory
eE;,TtFf
@(#) $ B.11.11_LR Jul 24 2003 00:43:42 $


We have recently upgraded to oracle client 9.2.0 from oracle 8.1.7.



Here is the info for libc

PHCO_25569 1.0 libc cumulative header file patch

PHCO_28481 1.0 cumulative 10.20 libc compatibility support

PHCO_29328 1.0 libc manpage cumulative patch

PHCO_31061 1.0 libc cumulative patch


When I try an ldd on dld.sl in /usr/lib/
This is what I get.
/usr/lib/dld.sl: Call to mmap() failed - TEXT /usr/lib/dld.sl
/usr/lib/dld.sl: Not enough space

The swap mem info is
Mb Mb Mb PCT START/ Mb

TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 2000 59 1941 3% 0 - 1 /dev/vg00/lvol2
dev 2000 59 1941 3% 0 - 1 /dev/vg00/swap2
dev 2000 59 1941 3% 0 - 1 /dev/vg00/swap3
reserve - 2118 -2118
memory 3061 1323 1738 43%
total 9061 3618 5443 40% - 0 -



I'd appreciate it if someone could help out. I have tried searching the web but havent found any answers yet.


Thanks,
Kiran Nadgir

6 REPLIES 6
RAC_1
Honored Contributor

Re: mmap failed for dld mmap failed for TSD

What is your setting for maxtsiz (or maxtsiz_64bit)???

Also in your script, do ulimit -t unlimited (if you are using posix shell) at the start of the script.

Anil
There is no substitute to HARDWORK
Kiran Nadgir
New Member

Re: mmap failed for dld mmap failed for TSD

The seetings are
maxtsiz 262144 - 0-503859 Pages -
maxtsiz_64bit 262144 - 1024-1073741823 Pages -

RAC_1
Honored Contributor

Re: mmap failed for dld mmap failed for TSD

As you are on HP-UX 11.11, the maxtsiz_64bit applies to you. In your script at start, do ulimit -t unlimited and try. OR before you start your script do ulimit -t unlimited.

Check and post.

Anil
There is no substitute to HARDWORK
Kiran Nadgir
New Member

Re: mmap failed for dld mmap failed for TSD

I checked ulimit it is set to unlimited.

There is one thing which I noticed is unusual.
I use one script to set all env vars. When I have this line
export LD_PRELOAD=/usr/lib/libcl.sl:/usr/lib/libpthread.sl

I get the coredump, If I comment out this line it works fine.

We have also upgraded DBD Oracle as well as perl

/opt/perl5.6.1/lib/site_perl/5.6.1/PA-RISC2.0/auto/DBD/Oracle> ldd Oracle.sl
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
/usr/lib/librt.2 => /usr/lib/librt.2
/usr/lib/libcl.2 => /usr/lib/libcl.2
/usr/lib/libisamstub.1 => /usr/lib/libisamstub.1
/usr/lib/libdld.2 => /usr/lib/libdld.2
/opt/oracle/product/9.2.0/lib32//libclntsh.sl.9.0 => /opt/oracle/product/9.2.0/lib32//libclntsh.sl.9.0
/usr/lib/libcl.2 => /usr/lib/libcl.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libnss_dns.1 => /usr/lib/libnss_dns.1
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
/usr/lib/librt.2 => /usr/lib/librt.2

/opt/oracle/product/9.2.0/lib32/libwtc9.sl => /opt/oracle/product/9.2.0/lib32/libwtc9.sl


RAC_1
Honored Contributor

Re: mmap failed for dld mmap failed for TSD

Kiran,

Really do not know what LD_PRELOAD does. Most probablly it loads the libraries into the memory. Commenting it out, will load the libraries as and when required. This is what my understanding says.

Not sure though. If ulimit is set to unlimited and maztsiz_64bit is high enought, I do not see a reason it should core dump.

Anil
There is no substitute to HARDWORK
ranganath ramachandra
Esteemed Contributor

Re: mmap failed for dld mmap failed for TSD

1. install the latest linker patch (PHSS_30967 for 11.00, PHSS_30968 for 11.11).
2. use LD_PRELOAD_ONCE instead of LD_PRELOAD.
3. do not try to make sense out of the strings in a corefile. use a debugger such as gdb to look at the contents of a core file.

"file core" will usually tell you which application dumped this core. run gdb with the paths to the application and corefile such as "gdb /opt/emacs/bin/emacs /tmp/core". the gdb "bt" command should give you the stack trace - this is the information you can provide when you ask for help.
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo