Operating System - HP-UX
1836617 Members
1657 Online
110102 Solutions
New Discussion

UxCreateSubProc call causes BUS Error (Core Dumped) HPUX 10.20

 
Brian Whyte_1
New Member

UxCreateSubProc call causes BUS Error (Core Dumped) HPUX 10.20

Hi,

I am trying to troubleshoot a problem that one of my users is having. They wrote a code snippet in to test out a UIMX call. Here is the snippet. The user told me that he thought the problem was with a patch. How do I find out what patch I need? If I do not need a patch, any other ideas?

#include
#include
#include

handle Hhand;

static void vPingOutputHandlerCB(int sfFD, Widget Wclosure)
{
printf("vPingOutputHandler called \n");
}

main()
{
printf("Before SubProc Create. \n");
Hhand=UxCreateSubproc("date"," ",NULL);
UxExitSubproc(Hhand);
printf("After SubProc Create. \n");
}

The following was used to compile this program:
cc -g -Aa -I/opt/uimx2.9/include cmd_test2.c -Wl, -L/usr/lib/ -Wl, -L/opt/uimx2.9/lib -Wl, -lux -L/usr/lib/X11R5 -L/usr/lib/Motif1.2 -Wl, -a shared -lXm -lXt -lX11

When the program is run (output):
%./a.out
Before Bus Error.
Bus Error (core dumped)

Other outputs:
%file core
core: core files from 'a.out' - recieved SIGBUS

%what core
PATCH-PHCO_26158 for 10.20; for 10.30, 11.x compatibility libc.1_ID@@/main
.
.

%gdb ./a.out

gdb>run
warning: Unable to find _DLD_HOOK symbol in the object file
warning: Suggest linking with /usr/lib/end.o.
warning: GDB will be unable to track shl_load/shl_unload calls
Before Bus Error

Program recieved signal SIGBUS, Bus error.
0x7ad6a0a4 in QueueTimerEvent()

Thanks,

Brian Whyte

1 REPLY 1
Rick Beldin
HPE Pro

Re: UxCreateSubProc call causes BUS Error (Core Dumped) HPUX 10.20

You've got a number of hurdles going against you:

1. HP-UX 10.20 is obsolete. You can use the ITRC to find the *last* set of patches for that OS release. HP will not produce any more patches for 10.20.

2. HP does not support UIM/X anymore and hasn't for over 5 years. UxCreateSubProc() is a part of that product. Since the core is occuring in that product, you will likely need assistance from whoever owns support for UIM/X for assistance.

Given that you probably don't have source for UxCreateSubProc(), you are probably going to have to debug at the instruction level. Start gdb this way:

gdb -tui -xdb app

(gdb) b main
(gdb) r
(gdb) td

Then you can do stepi to step by instructions.
You can examine registers this way:

(gdb) p $r1

You might want to set a breakpoint up on QueueTimerEvent and then do a bt. Perhaps this will yield something interesting.

(gdb)b QueueTimerEvent
(gdb)c
(gdb)bt

SIGBUS could be an alignment problem.

Good luck...
Necessary questions: Why? What? How? When?