Skip to content

ambled/apache-passenger-fail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apache+Passenger+HAProxy+Malformed request = crashing passenger

tl;dr;searchable;

Why is my PassengerAgent Processes aborted! signo=SIGSEGV(11), reason=SEGV_MAPERR
A blank/empty Host header may be crashing your process when run under apache2

Given:

* Apache/2.4.7 (Ubuntu)
* Ruby ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
* Passenger passenger-5.0.8 / passenger-5.0.6
* HAProxy 1.5

deploy this repo and then make a request with a malformed Host header.

echo -e 'GET / HTTP/1.1\r\nHost: \n\n' |nc localhost 80

While It is a known issue that HTTP/1.1 requires a Host header, and that it’s possible to set the host header for the haproxy health check with:

  • option httpchk OPTIONS * HTTP/1.1rnHost:\ www

It’s not really ideal that passenger crashes:


pid=19472, timestamp=1432932619

Process aborted! signo=SIGSEGV(11), reason=SEGV_MAPERR, si_addr=0x10, randomSeed=1432932617

pid=19472

Crash log dumped to /var/tmp/passenger-crash-log.1432932619

pid=19472

Date, uname and ulimits:

Fri May 29 20:50:19 UTC 2015 Linux 2.6.32-042stab079.5 #1 SMP Fri Aug 2 17:16:15 MSK 2013 x86_64 x86_64 time(seconds) unlimited file(blocks) unlimited data(kbytes) unlimited stack(kbytes) 10240 coredump(blocks) 0 memory(kbytes) unlimited locked memory(kbytes) 64 process 1546159 nofiles 8192 vmemory(kbytes) unlimited locks unlimited

pid=19472

Phusion Passenger version: 5.0.8

About

Illustrating crash when Host: header is blank

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published