passenger: No default temp path in nginx module causes segfault.
Issue report
Question 1: What is the problem? Your answer:
With nginx 1:1.15.8-8.6.0.1~xenial1 on a Rails 5.2.2.1 app I can use Rails send_file without a problem. When upgrading to nginx/xenial 1:1.15.8-8.6.0.2~xenial1 this doesn’t work anymore (for most file, not all of them. For example thumbnails of images work, but the originals don’t).
nginx’ error.log shows:
2019/03/22 13:10:47 [alert] 21227#21227: worker process 2032 exited on signal 11
2019/03/22 13:10:47 [alert] 21227#21227: worker process 2031 exited on signal 11
2019/03/22 13:10:47 [alert] 21227#21227: worker process 23789 exited on signal 11
2019/03/22 13:12:02 [alert] 21227#21227: worker process 23788 exited on signal 11
2019/03/22 13:12:03 [alert] 21227#21227: worker process 23790 exited on signal 11
2019/03/22 13:12:03 [alert] 21227#21227: worker process 23898 exited on signal 11
2019/03/22 13:12:53 [alert] 21227#21227: worker process 23901 exited on signal 11
2019/03/22 13:16:02 [alert] 21227#21227: worker process 23902 exited on signal 11
2019/03/22 13:16:02 [alert] 21227#21227: worker process 23976 exited on signal 11
2019/03/22 13:16:02 [alert] 21227#21227: worker process 24219 exited on signal 11
I can reproduce this by upgrading nginx, nginx-common, nginx-extras to 1:1.15.8-8.6.0.2~xenial1 and then downgrading again to 1:1.15.8-8.6.0.1~xenial1.
Since I am using the passenger provided nginx packages, I believe this to be a passenger problem, but that’s just an assumption. I couldn’t find the source repo or changelog of these releases.
I’m not sure if I can provide a reproduction case since it just happens on our staging server after the upgrade of the packages and not for all files. I’m happy to provide additional information!
Question 2: Passenger version and integration mode:
- For example: open source 5.0.26 standalone; enterprise 5.0.21/nginx
$ passenger --version
Phusion Passenger 6.0.2
$ nginx -v
nginx version: nginx/1.15.8
Question 3: OS or Linux distro, platform (including version):
Ubuntu 16.04 LTS
Question 4: Passenger installation method:
Phusion APT repo
# /etc/apt/sources.list.d/phusionpassenger.list
deb "https://oss-binaries.phusionpassenger.com/apt/passenger" xenial main
deb-src "https://oss-binaries.phusionpassenger.com/apt/passenger" xenial main
Question 5: Your app’s programming language (including any version managers) and framework (including versions):
Ruby 2.6.2, rbenv, Rails 5.2.2.1
Question 6: Are you using a PaaS and/or containerization? If so which one?
No.
Question 7: Anything else about your setup that we should know?
Using letsencrypt and the following nginx config (don’t mind nginx 1.14.0 being shown there, it’s just what the page generates): https://mozilla.github.io/server-side-tls/ssl-config-generator/?server=nginx-1.14.0&openssl=1.0.2g&hsts=yes&profile=modern
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 2
- Comments: 30 (17 by maintainers)
6.0.3 released
This issue is affecting me as well (Passenger; send_file; nginx 1.17.0). Backtrace:
The SIGSEGV is because
pathisNULL:The
pathcomes fromtf->pathwhich isNULL:My location directive has
proxy_temp_pathset:Let me know if you need anything else.
@CamJN I tried with
proxy_temp_pathset to custom path and it still crashes.@aried3r since you indicated you were interested, here’s our ubuntu/debian nginx repo source: https://github.com/phusion/passenger_apt_automation/tree/master/debian_specs/nginx