Threading on solaris10/sparc

Hi all,

I have tried to compile unbound 1.2.0 on solaris 10/sparc with gcc 4.0.2 from blastwave. Threaded model with posix or solaris threads has been builded, but in performace tests I got strange errors like:

error: could not event_del on close
error: could not create outgoing sockets
error: can't create commpoint
error: could not create listening sockets
fatal error: Could not initialize thread

Pre-forked model is working fine, stable and quickly, but because memory allocation per child is not usable in real life.

Unbound has been compiled with ldns-1.4.1 and libevent-1.4.9-stable.

Any recomendation other than build with Sun Studio ?

best regards
Ivan Stenda

Hi Ivan,

Solaris 10 has more stringent ulimit(open files). ulimit -a shows the
limit you have. The limit is per process - so a threaded model uses all
file descriptors in one process and the pre-forked model does not. I
think your problem is solved if you increase your ulimit(open files) to
a large number (say 16384) with

$ ulimit -n 16384

Building with sun-studio does not change the ulimit enforced.

Best regards,
   Wouter

Ivan Stenda wrote: