Re: [Quickfix-developers] Build problems on Solaris
Brought to you by:
orenmnero
|
From: Joerg T. <Joe...@ma...> - 2003-04-03 11:47:10
|
Hi Barry,
> No, invalid argument as pbind tells you.
>
>> bash-2.03$ /usr/sbin/psrinfo
>> 1 on-line since 07/19/02 18:35:00
>> 2 on-line since 07/19/02 18:35:02
>
>
> From this output, you see that you have processors 1 and 2 (see first
> column).
>
>> bash-2.03$ /usr/sbin/pbind -b 0 3761
>> /usr/sbin/pbind: cannot bind pid 3761: Invalid argument
>
>
> But you try to bind to processor 0 (-b 0) which simply does not exist --
> therefore the invalid argument.
Please, can you confirm whether this works now?
Does it fix your problem?
> Actually, we used this approach to hotfix a threading problem under
> heavy load on a
> multiprocessor machine while development took place on a single
> processor one.
> But later we discovered, that we had used C library functions which are
> not thread save.
> After we fixed this, we could drop the pbind.
>
> For all non-thread save functions, there are thread-safe (re-entrant)
> variants suffixed
> by "_r". In our case, gethostbyname() was one of the culprits. We
> replaced it by
> gethostbyname_r(), which lead to a somewhat more complex call syntax.
Perhaps you have been experiencing exactly this kind of situation. It would be
good to have a stack trace of core dump:
$ pstack core
In the stack trace we could see at which place the error occured. For more such
nice utilities see "man proc", "man truss", "man gcore", "man coreadm".
In addition, beginning with Solaris 2.8 there are two thread libraries:
1. Old T1 lib in /lib/libthread.so implements complex N:M mappings of N user threads
to M<<N kernel threads callend LWPs( Light Weight Processes ). Due to the complexity
there are many issues in the bug database.
2. New T2 lib in /lib/lwp/libthread.so. This simply maps every user thread to an LWP.
This is much simpler and new kernels can handle lots of LWPs. Therefore, this is the
default in Solaris 9.
Prepend /usr/lib/lwp to your LD_LIBRARY_PATH to activate it:
export LD_LIBRARY_PATH=/usr/lib/lwp:$LD_LIBRARY_PATH
or
setenv LD_LIBRARY_PATH /usr/lib/lwp:$LD_LIBRARY_PATH
In our experience, if you mix Java application and JNI/native libs which create threads
on their own, this is always a good choice to avoid threading problem by buggy libs.
Cheers, Jörg
--
Joerg Thoennes
http://macd.com
Tel.: +49 (0)241 44597-24 Macdonald Associates GmbH
Fax : +49 (0)241 44597-10 Lothringer Str. 52, D-52070 Aachen
|