# Bug report: SSI -\> signal 10 (nginx 0.7.10, Solaris 10)

**URL:** <https://www.ruby-forum.com/t/bug-report-ssi-signal-10-nginx-0-7-10-solaris-10/152523>\
**Category:** NGINX\
**Created:** [November 4, 2008, 8:30pm UTC](https://www.ruby-forum.com/t/bug-report-ssi-signal-10-nginx-0-7-10-solaris-10/152523 "2008-11-04T20:30:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hannes\_Haug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/8e7dd6/32.png) [@Hannes\_Haug](https://www.ruby-forum.com/u/Hannes_Haug)\
**Post date:** [November 4, 2008, 8:30pm UTC](https://www.ruby-forum.com/t/bug-report-ssi-signal-10-nginx-0-7-10-solaris-10/152523/1 "2008-11-04T20:30:46Z")

</div>

Hi all,

a SSI bug in 0.7.19 but not in 0.6.32 results in “worker process NNNNN  
exited on signal 10 (core dumped)”  
if I have many include instructions in one file. 5 includes are ok, 6  
not. See details below.

Regards  
Hannes

$ cd nginx-0.7.19  
$ ./configure --prefix=/cs/nginx --with-pcre=…/pcre-7.8  
checking for OS

- SunOS 5.10 sun4v  
checking for C compiler … found
- using GNU C compiler
- gcc version: 4.2.0 (gccfss)  
checking for gcc -pipe switch … found  
checking for gcc variadic macros … found  
checking for C99 variadic macros … found  
checking for unistd.h … found  
checking for inttypes.h … found  
checking for limits.h … found  
checking for sys/filio.h … found  
checking for crypt.h … found  
checking for SunOS specific features  
checking for sendfilev() … found  
checking for event ports … found  
checking for nobody group … found  
checking for poll() … found  
checking for /dev/poll … found  
checking for kqueue … not found  
checking for crypt() … found  
checking for O\_DIRECT … not found  
checking for F\_NOCACHE … not found  
checking for directio() … found  
checking for zlib library … found  
checking for int size … 4 bytes  
checking for long size … 4 bytes  
checking for long long size … 8 bytes  
checking for void \* size … 4 bytes  
checking for uint64\_t … found  
checking for sig\_atomic\_t … found  
checking for sig\_atomic\_t size … 4 bytes  
checking for socklen\_t … found  
checking for in\_addr\_t … found  
checking for in\_port\_t … found  
checking for rlim\_t … found  
checking for uintptr\_t … uintptr\_t found  
checking for system endianess … big endianess  
checking for size\_t size … 4 bytes  
checking for off\_t size … 8 bytes  
checking for time\_t size … 4 bytes  
checking for setproctitle() … not found  
checking for pread() … found  
checking for pwrite() … found  
checking for strerror\_r() … found  
checking for gnu style strerror\_r() … found but is not working  
checking for localtime\_r() … found  
checking for posix\_memalign() … not found  
checking for memalign() … found  
checking for sched\_yield() … found  
checking for mmap(MAP\_ANON|MAP\_SHARED) … found  
checking for mmap("/dev/zero", MAP\_SHARED) … found  
checking for System V shared memory … found  
checking for struct msghdr.msg\_control … not found  
checking for ioctl(FIONBIO) … found  
checking for struct tm.tm\_gmtoff … not found  
checking for struct dirent.d\_namlen … not found  
checking for struct dirent.d\_type … not found

Configuration summary

- using PCRE library: …/pcre-7.8
- OpenSSL library is not used
- md5 library is not used
- sha1 library is not used
- using system zlib library

nginx path prefix: “/cs/nginx”  
nginx binary file: “/cs/nginx/sbin/nginx”  
nginx configuration prefix: “/cs/nginx/conf”  
nginx configuration file: “/cs/nginx/conf/nginx.conf”  
nginx pid file: “/cs/nginx/logs/nginx.pid”  
nginx error log file: “/cs/nginx/logs/error.log”  
nginx http access log file: “/cs/nginx/logs/access.log”  
nginx http client request body temporary files:  
“/cs/nginx/client\_body\_temp”  
nginx http proxy temporary files: “/cs/nginx/proxy\_temp”  
nginx http fastcgi temporary files: “/cs/nginx/fastcgi\_temp”

$ make install  
nothing special  
$ cat \>/cs/nginx/conf/nginx.cfg  
worker\_rlimit\_core 1024m;

events {  
worker\_connections 1024;  
}

http {  
ssi on;

types {  
text/html html htm;  
text/css css;ls /cs  
application/x-javascripts js;  
image/gif gif;  
image/jpeg jpeg jpg;  
image/png png;  
}  
default\_type application/octet-stream;

server {  
listen 7080;  
}  
}  
^D  
$ cat \>/cs/nginx/html/index.html

 include test   
  
  
  
  
  
 ^D $ cat \>/cs/nginx/html/fragment.html included text ^D $ cd /cs/nginx $ sbin/nginx $ GET -e http://localhost:7080 GET -e http://localhost:7080 Client-Date: Tue, 04 Nov 2008 08:44:06 GMT Client-Peer: 127.0.0.1:7080 Client-Response-Num: 1

$ cat logs/error.log  
2008/11/04 09:44:06 [alert] 22399#0: worker process 22400 exited on  
signal 10 (core dumped)  
$ mdb sbin/nginx core  
Loading modules: [libc.so.1 ld.so.1]

> ::stack  
> ngx\_read\_file+0x70(b025c, b0480, e, 0, 0, 0)  
> ngx\_output\_chain+0x840(b0400, b0448, 60000000, 80000000, ffbfe80c,  
> b0200)  
> ngx\_http\_copy\_filter+0xd4(afcb8, ffbfe9e8, b0400, 8000, 980a4, b5918)  
> ngx\_http\_range\_body\_filter+0x54(afcb8, ffbfe9e8, b025c, afcb8, e, 45c4c)  
> ngx\_http\_output\_filter+0x10(afcb8, ffbfe9e8, 3728, 3728, 0, 54f60)  
> ngx\_http\_static\_handler+0x514(b0200, 0, b025c, afcb8, e, 80)  
> ngx\_http\_core\_content\_phase+0x3c(afcb8, b4078, 2, 1, 5, acb90)  
> ngx\_http\_core\_run\_phases+0x3c(afcb8, 28, a9350, a91d0, 0, 0)  
> ngx\_http\_handler+0x180(afcb8, a0, b5918, a0, 800000, b5918)  
> ngx\_http\_subrequest+0x3cc(acb90, 20000, 0, ffbfec34, b, 0)  
> ngx\_http\_ssi\_include+0x528(acb90, ad870, 0, 0, e, 1)  
> ngx\_http\_ssi\_body\_filter+0x1758(acb90, adb85, ffbfed04, 80c90, ad870,  
> ad884)  
> ngx\_output\_chain+0xbf4(ada28, ada70, adc30, 80000000, 5ae20, ada70)  
> ngx\_http\_copy\_filter+0xd4(acb90, ffbff048, ada28, 8000, 980a4, b5918)  
> ngx\_http\_range\_body\_filter+0x54(acb90, ffbff048, ad7a0, acb90, a, 45c4c)  
> ngx\_http\_output\_filter+0x10(acb90, ffbff048, 0, 0, 0, 54f60)  
> ngx\_http\_static\_handler+0x514(ad768, 0, ad7a0, acb90, a, 80)  
> ngx\_http\_core\_content\_phase+0x3c(acb90, b4078, 0, 1, 5, 8)  
> ngx\_http\_core\_run\_phases+0x3c(acb90, 28, a9350, a91d0, 0, 0)  
> ngx\_http\_handler+0x180(acb90, a0, b5918, a0, 800000, b5918)  
> ngx\_http\_internal\_redirect+0x118(acb90, 20, a4c00, 60, 6b, a)  
> ngx\_http\_index\_handler+0x590(acb90, b, ad6f2, ad700, a, 1)  
> ngx\_http\_core\_content\_phase+0x3c(acb90, b4060, 0, 1, 5, 8)  
> ngx\_http\_core\_run\_phases+0x3c(acb90, 20, a9350, a91d0, 0, 0)  
> ngx\_http\_handler+0x180(acb90, 0, b5918, 0, 0, 0)  
> ngx\_http\_process\_request+0xa4(acb90, 3f400, 3f368, 0, d88e0, 3f000)  
> ngx\_http\_process\_request\_headers+0x5d8(2, a, acb90, 7e768, ad520,  
> ffbff570)  
> ngx\_http\_process\_request\_line+0x438(cb8d8, acbc8, acc34, acb90, b5918,

1. 

ngx\_http\_init\_request+0x418(0, 42500, cb8d8, acb90, b5918, 95c00)  
ngx\_devpoll\_process\_events+0x32c(a4d54, a4c04, 40000000, a4c00,  
10000000, 0)  
ngx\_process\_events\_and\_timers+0xd0(a87a8, a4c00, ea60, 1, 19ba,  
66ac47aa)  
ngx\_worker\_process\_cycle+0x674(a87a8, a4c00, a4b34, 7cd28, a4c2c, a4d7c)  
ngx\_spawn\_process+0x41c(a87a8, 340f0, 0, 7cc50, fffffffe, 0)  
ngx\_start\_worker\_processes+0x90(a87a8, 9c800, fffffffe, a4c30, 1, 4)  
ngx\_master\_process\_cycle+0x1f8(a87a8, fffffffe, 1a, b411d, b4136, 20)  
main+0x720(27, a4c00, 1, a4c00, a8f58, a87a8)  
\_start+0x5c(0, 0, 0, 0, 0, 0)

---

<div class="post-metadata">

**Author:** ![Hannes\_Haug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/8e7dd6/32.png) [@Hannes\_Haug](https://www.ruby-forum.com/u/Hannes_Haug)\
**Post date:** [November 4, 2008, 11:50pm UTC](https://www.ruby-forum.com/t/bug-report-ssi-signal-10-nginx-0-7-10-solaris-10/152523/2 "2008-11-04T23:50:06Z")

</div>

Hello!

On Tue, Nov 04, 2008 at 08:21:39PM +0100, Hannes Haug wrote:

> a SSI bug in 0.7.19 but not in 0.6.32 results in “worker process NNNNN  
> exited on signal 10 (core dumped)”  
> if I have many include instructions in one file. 5 includes are ok, 6  
> not. See details below.

Could you please check if the following patch fixes this?

diff --git a/src/core/ngx\_palloc.c b/src/core/ngx\_palloc.c  
— a/src/core/ngx\_palloc.c  
+++ b/src/core/ngx\_palloc.c  
@@ -171,6 +171,7 @@ ngx\_palloc\_block(ngx\_pool\_t \*pool, size\_  
new-\>d.next = NULL;

```
 m += sizeof(ngx_pool_data_t);

```

- m = ngx\_align\_ptr(m, NGX\_ALIGNMENT);  
new-\>d.last = m + size;

Maxim D.
