Operating System - HP-UX
1753437 Members
5076 Online
108794 Solutions
New Discussion юеВ

Re: does anyone else get a bus error when they do this?

 
Ian Kidd_1
Trusted Contributor

does anyone else get a bus error when they do this?

A couple of apps people are planning to upgrade their PeopleSoft application, when they noticed the following bizarre behavior:
$ export LD_PRELOAD=/usr/lib/libpthread.1
$ /usr/bin/ksh
Bus error(coredump)

I've tested this on other servers I admin - some of them experience this, and other's don't. It may be a patch level issue as my company's clients have different patching strategies. HP is currently investigating - although they state that they haven't been able to duplicate this.

My question is more of a polling question: Does anyone else get a bus error when they try and open a shell after exporting LD_PRELOAD=/usr/lib/libpthread.1 ?
If at first you don't succeed, go to the ITRC
7 REPLIES 7
Michael Tully
Honored Contributor

Re: does anyone else get a bus error when they do this?

Hi Ian,

I am a couple of peopleslop dev systems and I get the same problem. I'm going to look at the core dump and see if there is anything.

Cheers
Michael
Anyone for a Mutiny ?
Michael Steele_2
Honored Contributor

Re: does anyone else get a bus error when they do this?

What does the core file idicate?

strings core

file core

What is the itegrity of the O/S?

check_patches

show_patches

swverify -x check_permissions=true \*

Review the swagent.log file after these. Are there lots of permission errors? Just errors?

You can copy /usr/lib/lib... from another server or a backup.

11.00 Patches?

s700_800 11.00 libc cumulative man page patch PHCO_24904
s700_800 11.00 Pthread library cumulative patch PHCO_23792
PHCO_26960
s700_800 11.00 libc cumulative patch PHCO_27731
s700_800 11.00 POSIX AIO;getdirentries;MVFS;rcp;mmap/IDS; PHKL_27813
Notes: PHKL_28202
s700_800 11.00 PTHREAD_PROCESS_SHARED mutexes enhancement PHKL_28314
s700_800 11.00 OTS/9000 C.09.0[0123] Cumulative Patch PHNE_27889
s700_800 11.00 OpenMail B.05.10 December 00 Periodic Patch PHSS_22698
Notes: PHSS_22698
s700_800 11.00 linker startup code / SLLIC ELF support PHSS_26557
Notes: PHSS_26557
s700_800 11.00 ld(1) and linker tools cumulative patch PHSS_24303
PHSS_26559
s700_800 11.X HP aC++ -AA runtime libraries (aCC A.03.37) PHSS_16587
PHSS_26945
s700_800 11.00 HP DCE/9000 1.7 Server/DevTools cum. patch PHSS_20446
Notes: PHSS_27964


11.11 Patches?

s700_800 11.11 Pthread enhancement and fixes PHCO_26466
PHCO_27632
s700_800 11.11 libc cumulative patch PHCO_27740
s700_800 11.11 Shared mutex hang; Shared synch perf support PHKL_27315
s700_800 11.11 vPars panic; Syscall cumulative PHKL_27172
Notes: PHKL_28475
s700_800 11.11 linker startup code / SLLIC ELF support PHSS_26558
Notes: PHSS_26558
s700_800 11.11 ld(1) and linker tools cumulative patch PHSS_26560
Notes: PHSS_26560
Support Fatherhood - Stop Family Law
Ian Kidd_1
Trusted Contributor

Re: does anyone else get a bus error when they do this?

Thanks Michael! I'm glad I'm not the only one.

M. Frederick Steele - I'll check on your suggestions when I come back in tomorrow morning. 10+ hours today and my dinner's getting cold

If at first you don't succeed, go to the ITRC
Sridhar Bhaskarla
Honored Contributor

Re: does anyone else get a bus error when they do this?

Hi,

I tried with /usr/lib/libpthread.1 and it core dumped. Mine is not a peoplesoft system and it is with the latest patch bundles.

However, if I try using pa20_64's pthread lib, it works.

export LD_PRELOAD=/usr/lib/pa20_64/libpthread.1
$ksh
$

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Jeff Schussele
Honored Contributor

Re: does anyone else get a bus error when they do this?

 
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Ian Kidd_1
Trusted Contributor

Re: does anyone else get a bus error when they do this?

Well, I looked at everything and couldn't find a solution, so I notified HP. They worked on it for a month or so then sent me a "fixed" ksh. I'm including their email text:

"
Please find attached a "fixed" version of the ksh for you to try out on your
equipment. The implemented change is in reference with the order in which
malloc() is defined and called in the ksh code. For short, the explanation
I obtained so far from the lab is "(...) in this case is that dld tries to
use malloc(), but instead of using libc's malloc(), it uses ksh's
malloc(). This leads to the core dump because ksh's malloc() gets
initialized in the main() routine of ksh, which hasn't yet executed because
ksh hasn't even started running."

The attached replacement ksh does no longer "dump" with the simple
LD_PRELOAD statement has been executed on our test system. However, this
version has not been extensively tested in production environments and some
other problems may spring up as you use it to run the scripts. We will
address these in turn, if any.
"

I turned over the ksh to the application team who first discovered this problem, and they're reporting that all is well.

I wouldn't be surprised if HP releases a patch based on this. Thanks for all the responses!
If at first you don't succeed, go to the ITRC
ranganath ramachandra
Esteemed Contributor

Re: does anyone else get a bus error when they do this?

with the latest linker/loader patches PHSS_28869 (11.00) / PHSS_28871 (11.11) you can use LD_PRELOAD_ONCE instead of LD_PRELOAD.

dld will unset LD_PRELOAD_ONCE after reading it so that any exec'd application (and its dld) dont get the same library to preload.
 
--
ranga
[i work for hpe]

Accept or Kudo