Fixing nginx random segfaults

Logs in our client’s machine were filled with messages about nginx segfaults:

Sep 24 12:02:34 hostname kernel: nginx[8290]: segfault at 8 ip 00000000004935f0 sp 00007fff6698fd40 error 4 in nginx[400000+b5000]
Sep 24 12:02:34 hostname kernel: nginx[8292]: segfault at 8 ip 00000000004935f0 sp 00007fff6698fd40 error 4 in nginx[400000+b5000]
Sep 24 12:02:36 hostname kernel: nginx[8295]: segfault at 8 ip 00000000004935f0 sp 00007fff6698fd40 error 4 in nginx[400000+b5000]
Sep 24 12:02:36 hostname kernel: nginx[8296]: segfault at 8 ip 00000000004935f0 sp 00007fff6698fd40 error 4 in nginx[400000+b5000]

If you have more than one virtual host and you are using SSL on all of them, you may have incurred in this bug.

As the report states, a workaround is to specify the SSL session cache inside the http block instead than in each server’s block. We disabled it completely for testing and the segfaults went away.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s