Operating System - HP-UX
1753259 Members
5372 Online
108792 Solutions
New Discussion

HP-UX 11.23 / Itanium â Hang issues

 
SOLVED
Go to solution
Serio
Occasional Contributor

HP-UX 11.23 / Itanium â Hang issues

Hi,
I am doing a port from HP-UX 11.11 on PA-RISC to HPUX 11.23 on IA64 of complex applications.
The compilation/link have been done without any problem. Iâ m doing now the first runtime tests.
With the help of the HP Networking team, we have managed to solve a first hang issue. It apparently seems that all our binaries/libraries needs to be built with -DPTHREAD_COMPAT_MODE flag. I'm asking what this flag is for? Does someone know the meaning and the impact of this compilation option? Are there some other compilation options to use?

Then with this option, the first hangs have been solved but some others appear. Are there some known runtime issues on HP-UX 11.23 on Itanium due for example to more restrictions in the lock mechanism in multi-threaded applications?

Thanks in advance for any help

--Nicol
3 REPLIES 3
Manish Srivastava
Trusted Contributor

Re: HP-UX 11.23 / Itanium â Hang issues

Hi,

The DPTHREAD_COMPAT_MODE flag is for compiling the threads application in the Compatibality mode and not MxN threads model.

Probaly you may want to compile with -DREENTRANT option.

manish
Muthukumar_5
Honored Contributor

Re: HP-UX 11.23 / Itanium â Hang issues

Hai,

Before 11.22 version,thread applications with DPTHREAD_COMPAT_MODE flag uses the 1 x 1 threads. From that it is changed to use M x N threads.

So threads application with DPTHREAD_COMPAT_MODE flag after 11.22 is initiates the pthread_attr_init(3T) call to initiate the M x N threads (PTHREAD_SCOPE_PROCESS).

You can knew this change with the pthread_attr_init man page with the 11.22 version and previous versions.

On 11.23,if you want to use the same application as like as in 11.11, don't use the DPTHREAD_COMPAT_MODE flag.

There is a memory leak / corruption problem in libpthread.so.1 library on 11.23 version.
Check this out,
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=587032

Regards,
Muthukumar.
Easy to suggest when don't know about the problem!
Mike Stroyan
Honored Contributor
Solution

Re: HP-UX 11.23 / Itanium â Hang issues

The -DPTHREAD_COMPAT_MODE setting is equivalent to starting threads with an attribute that was set to PTHREAD_SCOPE_SYSTEM with a call to pthread_attr_setscope(). The default had always been PTHREAD_SCOPE_PROCESS, but that had not actually been implemented until 11.23. With code recompiled on 11.23 the default will actually result in user-space threads that migrate amoung a pool of kernel threads. Some drivers may have trouble with the migration of user space threads between kernel threads.

The topic that Muthukumar pointed you to was a discussion regarding a pre-release of 11.23 on PA-RISC rather than the IPF release.

Application hangs of multithreaded processes are often very difficult to diagnose. They may be caused by synchronization defects that were always in an application, but which never showed a problem until some change in scheduling.

You could have a look at the 'visual threads' tool for more insight into hangs. You can download it from http://www.hp.com/go/visualthreads