Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 589014 - www-servers/nginx proxy crashing on ARM
Summary: www-servers/nginx proxy crashing on ARM
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: Tiziano Müller (RETIRED)
URL: https://forums.gentoo.org/viewtopic-t...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-17 17:37 UTC by Grobi
Modified: 2016-07-19 23:46 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grobi 2016-07-17 17:37:56 UTC
Nginx crashes on first request on ARM with compiler option PIE.
This issue occured on my Raspberry PI 2.
I saw no crashed since I disabled this flag only for nginx package and recompile nginx. (FIX: LDFLAGS="-fPIE -pie" CFLAGS="-fPIE -pie")
There should be a way to disable those flags in ebuild for ARM per default.

Description by gordonb3:
I did some further digging into the issue. Adding more verbosity to tcpdump I can see Nginx fetching the page from the backend server. The page size exceeds the ethernet packet size, so I'm seeing two data packets and all seems normal. When Nginx is supposed to pass the page on to the client I'm only seeing a 52 byte (N)ACK packet.

I did note this in the log though:
Code:	
2016/04/14 14:32:11 [alert] 11395#0: worker process 11402 exited on signal 11	

Apparently the Nginx worker dies somewhere between receiving the page from the backend server and passing it on to the client. I disabled the gzip feature in Nginx, but that didn't help.

I have to come back on something I stated in the opening post however. Crazy how time flies sometimes. The logging appears to have been useless because I was looking at the backend server. As it turns out I did in fact update Nginx from 1.9.6 to 1.9.10-r3 (and 1.9.13 since noticing the issue) after the last access logged by Nginx. Luckily I create binary packages for this system (armvtel) so I could reinstall that previous version, and tadaaa. The proxy is working again. So it would seem that an old issue has risen again.


Edit: confirmed. I did a rebuild of Nginx with the following command line and now the proxy also works with 1.9.13
Code:	
LDFLAGS="-fPIE -pie" CFLAGS="-fPIE -pie" emerge -v nginx	
Didn't want to investigate whether those were compiler flags or linker flags :oops:

For further info see:
https://forums.gentoo.org/viewtopic-t-1042446-start-0-postdays-0-postorder-asc-highlight-.html?sid=b88b8bbc0907477fd0d0147bdbdd8143
Comment 1 Mike Gilbert gentoo-dev 2016-07-18 00:48:23 UTC
What version of nginx?
Comment 2 Grobi 2016-07-18 07:34:59 UTC
It is in the text:
At least for 1.9.10-r3 and 1.9.13.
1.9.6 seemed to be OK thou.

I personally switched to Gentoo in May-2016 and directly hit this problem with 1.10.0.
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2016-07-19 23:46:15 UTC
Please re-test with =www-servers/nginx-1.11.2 which will land in a few ours in the repository. Also please enable the "debug" USE flag for that package. This will allow you to use

>  debug_connection <IP;

in nginx' "events" block in "/etc/nginx.conf" so you only log connections in debug mode from a specific client.

Once you hit the problem again please attach the debug log showing the problem to this bug and change status.

Thanks!