Discussion:
SOLVED: ERROR: pthread_create failed -- post install after new compile
(too old to reply)
Dave Richardson
2006-08-10 13:01:16 UTC
Permalink
I had problems with the 0.88, 0.88.1, 0.88.2 and 0.88.4 compile on linux
(and probably versions before that).

After I would compile my clamav from source
(using the ./configure, make, make install)
and put into service a new version of clamd, I would log errors immediately
ERROR: pthread_create failed
and clamd would hose itself

My qmail system with qmail-scanner would barf.

Some threads in mailing lists have suggested, somewhat tersely, to raise
softlimits assuming that DJB's tcpserver were being used.
I'm using a RedHat-based system (not using the .RPM for clamd) and have
elected to use the initscripts version to launch clamd.

Irrespective of my configuration, I see a few folks still struggling
with the compiled clamd. On my system, 'cat /proc/cpuinfo' yields:

processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping : 9


So I took the advise of a CFLAGS optimization page from Gentoo (after
some hasty googling) and did

'make clean'
then
./configure CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"

Without changing my system 'ulimits', nor my initscript, nor fussing
with softlimits in a tcpserver run file, I now have clamd running
without complaint.

YOUR CFLAGS will be different for your architecture, of course, but I
presume something can be gained by either i) optimizing for your
specific architecture, or using the '-pipe' or '-fomit-frame-pointer'
bits. I don't know compiler behavior well enough to grasp out "why",
but it works. That's enough sometimes...

Godspeed.



_______________________________________________
http://lurker.clamav.net/list/clamav-users.html
Jeff Donsbach
2006-08-14 04:49:10 UTC
Permalink
Post by Dave Richardson
YOUR CFLAGS will be different for your architecture, of course, but I
presume something can be gained by either i) optimizing for your
specific architecture, or using the '-pipe' or '-fomit-frame-pointer'
bits. I don't know compiler behavior well enough to grasp out "why",
but it works. That's enough sometimes...
If I had to speculate, I believe the source of the original problem was
probably that the default thread stack size was not big enough and that use
of "-fomit-frame-pointer" lowered the stack space requirements just enough
that the default thread stack size was now sufficient. Using "-pipe"
certainly has nothing to do with it and I can't think of any reason that
using "-march=pentium4" would make any difference in a case like this.
_______________________________________________
http://lurker.clamav.net/list/clamav-users.html

Loading...