Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segfaults in passenger 5.0.9 #1530

Closed
codekitchen opened this issue Jun 9, 2015 · 9 comments
Closed

segfaults in passenger 5.0.9 #1530

codekitchen opened this issue Jun 9, 2015 · 9 comments
Assignees
Milestone

Comments

@codekitchen
Copy link

We upgraded one application from 5.0.8 to 5.0.9 last week, and we've been seeing about 6 segfaults per day per server since then. We rolled back all but one server, and built the debug version on that one server and captured some detailed crash logs.

All the segfaults have the same active thread stack trace. Here is an example: https://gist.github.com/codekitchen/84199c1f85e8abed39f1

The active thread is always on this line https://github.com/phusion/passenger/blob/release-5.0.9/ext/oxt/system_calls.cpp#L463 , at first glance it looks like bad params are being passed to the select syscall.

I will continue to try and get further information.

@OnixGH OnixGH added this to the 5.0.10 milestone Jun 9, 2015
@OnixGH
Copy link
Contributor

OnixGH commented Jun 9, 2015

@codekitchen thanks for the report. It's easiest to search for "raise" in the stacktrace to find the offending thread.

In this case Thread 15 at "ext/common/ServerKit/HttpServer.h:1038" is trying to free a string that we added in 5.0.9 to support leaving headers in the original case. We'll investigate.

@codekitchen
Copy link
Author

Ah, I see what you mean. Thanks!

@OnixGH
Copy link
Contributor

OnixGH commented Jun 9, 2015

@FooBarWidget have a look at this, maybe you have a quick solution.

@OnixGH
Copy link
Contributor

OnixGH commented Jun 9, 2015

Upon first glance at the code it looks to me like a missing psg_lstr_init(&header->origKey); in BufferBody.cpp

@FooBarWidget
Copy link
Member

Yes, that appears to be the case. I have committed a preliminary fix to the GH-1530 branch, but haven't tested it yet. Could you take a look @OnixGH?

@OnixGH
Copy link
Contributor

OnixGH commented Jun 9, 2015

@FooBarWidget crash reproduced with Apache, and fixed after the commit.

@codekitchen I don't think this particular bit of code is reached with Nginx, can you confirm you are using Apache?

@codekitchen
Copy link
Author

Yep, we are using Apache.

@OnixGH
Copy link
Contributor

OnixGH commented Jun 10, 2015

OK, then this is solved for 5.0.10!

@OnixGH OnixGH closed this as completed Jun 10, 2015
@codekitchen
Copy link
Author

Beautiful, thanks all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants