"libgcc_s.so.1 must be installed for pthread_cancel to work"

quietFinn

Well-Known Member
Feb 4, 2006
2,040
551
493
Finland
cPanel Access Level
Root Administrator
Hello,

in a VPS I did MySQL Upgrade from 5.1 to 5.5.
After the upgrade I am getting a 500-error in some (not all) sites.
In /usr/local/apache/logs/error_log I see this:
[Fri Dec 27 17:22:45 2013] [error] [client xx.xxx.xxx.xx] libgcc_s.so.1 must be installed for pthread_cancel to work
[Fri Dec 27 17:22:45 2013] [error] [client xx.xxx.xxx.xx] Premature end of script headers: index.php

WHM 11.40.1 (build 8)
CENTOS 6.5 x86_64 vmware

PHP 5.2.17
mysql 5.5.34
Apache 2.2.26

libgcc_s.so.1 exists:
/lib/libgcc_s.so.1
/lib64/libgcc_s.so.1

I ran EasyApache a few times with different settings, and upcp --force, still the same.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello :)

Could you check to see if there are any "RLimitMEM" limits in your Apache configuration file?

Thank you.
 

quietFinn

Well-Known Member
Feb 4, 2006
2,040
551
493
Finland
cPanel Access Level
Root Administrator
Hello :)

Could you check to see if there are any "RLimitMEM" limits in your Apache configuration file?
Yes there is:

grep "RLimitMEM" /usr/local/apache/conf/httpd.conf
RLimitMEM 228335274
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Please try removing this limit to see if the issue continues.

Thank you.
 

quietFinn

Well-Known Member
Feb 4, 2006
2,040
551
493
Finland
cPanel Access Level
Root Administrator
Please try removing this limit to see if the issue continues.
Yes that solved it, thank you.

Then I went to WHM -> Service Configuration -> Apache Configuration -> Memory Usage Restrictions

That added the same line in httpd.conf, so the error was back.

When I edited the line from
RLimitMEM 228335274
to
RLimitMEM 328335274

the error went away again.

So it seems that for some reason in that server it's not safe to use that "Memory Usage Restrictions" function.


And I suppose it's good to tell this:

If you edit httpd.conf by yourself you have to run:

Code:
/usr/local/cpanel/bin/apache_conf_distiller --update
/usr/local/cpanel/bin/build_apache_conf
/etc/rc.d/init.d/httpd -k restart
 

rpili1313

Member
Jul 16, 2014
5
0
1
cPanel Access Level
Root Administrator
Hi,

I have the same problem but can't seem to find RMlimit line in the config file.
Could you please help?

I'm a noob an unix so pls be accurate on the commands :)

Thx
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Could you elaborate on the details of how you are having the exact same problem? For instance, what error message do you receive?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
It's important to let us know what exact issue you are experiencing, as often times it's completely different than the original post.

Thank you.