Wind River Support Network


LIN10-3134 : httpd crash when handling SIGINT

Created: Jan 21, 2018    Updated: Dec 3, 2018
Resolved Date: Feb 6, 2018
Found In Version:
Fix Version:
Severity: Standard
Applicable for: Wind River Linux LTS 17
Component/s: Userspace


When running apache in the foreground with a limited configuration and using this command line:

/usr/sbin/httpd -f $PWD/httpd.conf -D FOREGROUND

it crashes with this backtrace when given SIGINT via ^C:

^C*** Error in `/usr/sbin/httpd': free(): invalid pointer: 0x0fece65c ***
======= Backtrace: =========
======= Memory map: ========
00100000-00103000 r-xp 00000000 00:00 0 [vdso]
0fa2b000-0fa31000 r-xp 00000000 08:01 6681 /usr/lib/apache2/modules/
0fa31000-0fa40000 ---p 00006000 08:01 6681 /usr/lib/apache2/modules/
0fa40000-0fa42000 rw-p 00005000 08:01 6681 /usr/lib/apache2/modules/
0fa52000-0fa55000 r-xp 00000000 08:01 6703 /usr/lib/apache2/modules/
0fa55000-0fa64000 ---p 00003000 08:01 6703 /usr/lib/apache2/modules/
0fa64000-0fa65000 rw-p 00002000 08:01 6703 /usr/lib/apache2/modules/
0fa75000-0fa77000 r-xp 00000000 08:01 6710 /usr/lib/apache2/modules/
0fa77000-0fa86000 ---p 00002000 08:01 6710 /usr/lib/apache2/modules/
0fa86000-0fa87000 rw-p 00001000 08:01 6710 /usr/lib/apache2/modules/
0fa97000-0fa9a000 r-xp 00000000 08:01 6691 /usr/lib/apache2/modules/
0fa9a000-0faa9000 ---p 00003000 08:01 6691 /usr/lib/apache2/modules/


Steps to Reproduce

1) Create a project

/wr/installs/lx8/wrlinux-8/wrlinux/configure --enable-board=qemuppc --enable-rootfs=glibc-small --with-package=apache2 --enable-reconfig --with-rcpl-version=0024

2) Create the file «$projDir/layers/local/recipes-httpd/apache2/apache2_2.4.16.bbappend» to give apache2 the module of prefork with the content below:

EXTRA_OECONF += "--with-mpm=prefork"

3) build the project and then run the qemu

make && make start-target

4) inside the target, create a user and switch to it

groupadd admin
useradd -g admin admin
su admin

5) Create required folders and files

mkdir logs
mkdir -p var/run

6) Create the file httpd.conf with the content below:

ServerRoot .

LoadModule unixd_module /usr/lib/apache2/modules/
LoadModule access_compat_module /usr/lib/apache2/modules/
LoadModule alias_module /usr/lib/apache2/modules/
LoadModule mpm_prefork_module /usr/lib/apache2/modules/

PidFile var/run/
HostnameLookups off
ServerName localhost
User admin
Group admin

7) Run the web server in the foreground

/usr/sbin/httpd -f $PWD/httpd.conf -D FOREGROUND

8) Press Ctrl^C, you will get the error

Other Downloads

Live chat