[Resolved] segfaults on FreeBSD 7

sysadm

Active Member
#1
Aug 23 10:40:20 hostname kernel: pid 76346 (lshttpd.4.0.16), uid 7629:
exited on signal 11


We have coredump enabled, but I can't localize any core file.


/usr/local/lsws/logs/error.log contains:
2010-08-23 10:40:20.235 [NOTICE] [AutoRestarter] child process with
pid=76346 received signal=11, no core file is created!

# id 7629
uid=7629(lsadm) gid=7629(lsadm) groups=7629(lsadm),1003(apache)

# uname -a
FreeBSD hostname 7.2-RELEASE-p6 FreeBSD 7.2-RELEASE-p6 #7: Sat Jan 23 23:14:14 CET 2010

# ldd /usr/local/lsws/bin/lshttpd.4.0.16
/usr/local/lsws/bin/lshttpd.4.0.16:
libcrypt.so.3 => /lib/libcrypt.so.3 (0x28292000)
libm.so.4 => /lib/libm.so.4 (0x282ab000)
libc.so.6 => /lib/libc.so.6 (0x282c4000)


We have compat6x-i386-6.4.604000.200810_3 package installed and COMPAT_FREEBSD6 compiled in the kernel.





The second problem is that sometimes we can't restart lshttpd at all:


# ps aux |grep lsh
apache 6638 0,0 3,0 190080 188260 ?? S pon22 202:07,35 litespeed (lshttpd.4.0.16)
apache 6665 0,0 3,0 189992 187856 ?? S pon22 202:01,23 litespeed (lshttpd.4.0.16)
root 75071 0,0 3,0 190024 187824 ?? S pon22 0:32,61 litespeed (lshttpd.4.0.16)
root 15065 0,0 0,0 3332 1112 p0 S+ 0:58 0:00,00 grep lsh
# /usr/local/lsws/bin/lswsctrl restart
[OK] Leased license key 1 will expire in 9 days!
[OK] litespeed: pid=22990.
No matching processes were found
[OK] Leased license key 1 will expire in 9 days!
[OK] litespeed: pid=23880.
# ps aux |grep lsh
apache 6638 0,0 3,0 190080 188260 ?? S pon22 202:07,56 litespeed (lshttpd.4.0.16)
apache 6665 0,0 3,0 189992 187856 ?? S pon22 202:01,44 litespeed (lshttpd.4.0.16)
root 75071 0,0 3,0 190024 187824 ?? S pon22 0:32,61 litespeed (lshttpd.4.0.16)
root 30644 0,0 0,0 3332 1112 p0 S+ 0:58 0:00,00 grep lsh


As you can see both lshttpd.4.0.16 processess has still the sam proces numbers!


To force restart we need to manually kill these processes (6638 6665) with -9 signal and root process and try again /usr/local/lsws/bin/lswsctrl
 
Last edited by a moderator:

mistwang

LiteSpeed Staff
#2
for core dump, please check sysctl

kern.sugid_coredump
kern.coredump
kern.corefile

and "ulimit -c"

We will investigate the freebsd restart issue.
 

sysadm

Active Member
#3
# sysctl -a |grep corefile
kern.corefile: %N.core

# sysctl -a |grep coredump
kern.nodump_coredump: 0
kern.coredump: 1
kern.sugid_coredump: 1
debug.elf32_legacy_coredump: 0


'ulimit' doesn't exist. It's csh shell.

'limits' shows unlimited size for coredumps.

# limits
Resource limits (current):
cputime infinity secs
filesize infinity kB
datasize 524288 kB
stacksize 65536 kB
coredumpsize infinity kB
memoryuse infinity kB
memorylocked infinity kB
maxprocesses 65536
openfiles 65536
sbsize infinity bytes
vmemoryuse infinity kB
 

mistwang

LiteSpeed Staff
#4
I am out of ideas, looks like core dump is allowed.

You can try making some changes, then sending SIGBUS signal to a child litespeed process, see if it can dump the core file. usually core file should be in /tmp/lshttpd.
 

sysadm

Active Member
#5
Yes, I am able to force coredump by sending -10 signal.

Sep 1 20:18:53 hostname kernel: pid 1365 (lshttpd.4.0.16), uid 1003: exited on signal 10 (core dumped)


Coredump location is as you said.



But I am still unable to obtain coredump when lshttpd crashes itself - coredump file doesn't exist.

Sep 1 20:23:51 hostname kernel: pid 78247 (lshttpd.4.0.16), uid 7629: exited on signal 11

2010-09-01 20:23:51.238 [NOTICE] [AutoRestarter] child process with pid=78247 received signal=11, no core file is created!
 

sysadm

Active Member
#6
Hello,

We have paid for our licence and we can't use our product.

Could you prepare LSWS compilation for FreeBSD7 or officially pronounce that LSWS is not fully compatible with FreeBSD7? (also within compat6x)

Last year we had tried LSWS with FreeBSD6 on a very similar server and It was fine but now we are using only FreeBSD7.
 
Top