LiteSpeed - 2.09 breaks

These forums are not for questions about ModSecurity, just the cmc script itself
Post Reply
eldergeek
Junior Member
Posts: 27
Joined: 18 Mar 2010, 07:25

LiteSpeed - 2.09 breaks

Post by eldergeek »

After uninstalling, and reinstalling to 2.09, the WHM UI will not load.

We see stuck process

root 160020 0.5 0.0 56884 16860 ? S 11:22 0:00 | \_ /usr/local/cpanel/3rdparty/bin/perl /usr/local/cpanel/whostmgr/docroot/cgi/configserver/cmc.cgi

we straced this process from a few milliseconds after it was created, and it stops in the same place every time

Code: Select all

11:22:47.342042 stat("/home/redacted", {st_mode=S_IFDIR|0711, st_size=4096, ...}) = 0
11:22:47.342127 open("/var/cpanel/users/redacted", O_RDONLY) = 8
11:22:47.342191 ioctl(8, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0x7ffeee507000) = -1 ENOTTY (Inappropriate ioctl for device)
11:22:47.342249 lseek(8, 0, SEEK_CUR)   = 0
11:22:47.342299 fstat(8, {st_mode=S_IFREG|0640, st_size=1320, ...}) = 0
11:22:47.342354 fcntl(8, F_SETFD, FD_CLOEXEC) = 0
11:22:47.342404 flock(8, LOCK_SH
The above set of system calls appears repeatedly previously, succesfully opening several users' cpanel users files.

2.09 runs fine on servers with EA4 running apache, but ones with LiteSpeed installed (as a direct apache replacement using their enterprice installer) break CMC.

We reverted to v2.00 and it runs fine with LiteSpeed.
ForumAdmin
Moderator
Posts: 1523
Joined: 01 Oct 2008, 09:24

Re: LiteSpeed - 2.09 breaks

Post by ForumAdmin »

cmc only provides support for Apache.
eldergeek
Junior Member
Posts: 27
Joined: 18 Mar 2010, 07:25

Re: LiteSpeed - 2.09 breaks

Post by eldergeek »

We're a long time user of CXS with a lot of licenses. I'm quite sure that this wouldn't be a massive issue to fix. We're willing to pay for a fix. We're probably not the only host using LiteSpeed. Please provide an email address so I can provide you with proof we are a good customer of yours, and let's take this a little further. The issue only appeared after version 2.00 was upgraded to 2.09.
eldergeek
Junior Member
Posts: 27
Joined: 18 Mar 2010, 07:25

Re: LiteSpeed - 2.09 breaks

Post by eldergeek »

OK, this is not related to LiteSpeed. This is occuring on sporadic servers running Centos 7, cPanel 62 with EA4. We see this behaviour on around 10% of our installations.
ForumAdmin
Moderator
Posts: 1523
Joined: 01 Oct 2008, 09:24

Re: LiteSpeed - 2.09 breaks

Post by ForumAdmin »

This:

Code: Select all

11:22:47.342127 open("/var/cpanel/users/redacted", O_RDONLY) = 8
...
11:22:47.342404 flock(8, LOCK_SH
Means that some other process on your server has exclusively locked "/var/cpanel/users/redacted" preventing cmc from accessing it.

You need to identify that process at the time this happens. Using lsof should tell you:

Code: Select all

lsof | grep /var/cpanel/users/redacted
eldergeek
Junior Member
Posts: 27
Joined: 18 Mar 2010, 07:25

Intermittent hanging upon load

Post by eldergeek »

So, as you moved my last post out of this section I'm going to raise it again. Around 10% of our productions machines (those with high numbers of accounts) have a problem with the newer versions of CMC. A stack trace shows the LOCK_SH blocking when opening files for reading in /var/cpanel/users

cmc.cgi Line 794 (cmc v2.11) edited make the LOCK non-blocking

Code: Select all

		flock ($IN, LOCK_SH | LOCK_NB);
The problem we found was due to a previous cpanel bug which meant that /usr/local/cpanel/scripts/suspendacct processes were stuck in memory, and had left a deleted /var/cpanel/users/artchite.lock file.
ForumAdmin
Moderator
Posts: 1523
Joined: 01 Oct 2008, 09:24

Re: LiteSpeed - 2.09 breaks

Post by ForumAdmin »

This is not a bug in cmc. The issue, as you have explained here is a bug in cPanel.
Post Reply