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

[WIP] Make FastCGI work on OS X #2386

Closed
wants to merge 5 commits into from
Closed

Conversation

danslo
Copy link
Contributor

@danslo danslo commented Apr 10, 2014

The thrift/proxygen patches are not done in their own repos due to:

  • fbthrift has shifted towards dev in 'cpp2' while we're using 'cpp'.
  • The copy of fbthrift in HHVM has already been modified.
  • Sara kinda told me I could do it.

At some point we'll have to try to land these elsewhere and use them as
a submodule. Today is not the time.

@@ -104,7 +104,9 @@ void ThreadInfo::onSessionInit() {
m_stacklimit = t_stackbase - (rl.rlim_cur - StackSlack);
} else {
m_stacklimit = (char *)s_stackLimit + StackSlack;
#ifndef __APPLE__
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a comment and a TODO.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't have been included in this diff. It's something that's broken in debug builds on OSX that I haven't figured out yet.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has something to do with the pthread APIs returning different answers for stack size. Probably a quirk of Mach, but yeah, when I looked at JIT support I didn't end up spending enough time on it to figure out what we should be doing here.

@scannell
Copy link
Contributor

It might be better to split the thrift changes into a separate pull assuming they'll independently compile. (This would mean an HHVM change pull, a thrift change pull, and then a final config change pull to add register_fastcgi_server, I think.) This way the first set doesn't get slowed down on the thrift changes [plus I think we'd want the ability to revert all three of those things independently.]

When constructing static objects in OSX, the constructor initialization
list is evaluated. This means a String object is constructed when the
MemoryManager has not been initialized yet (in init_thread_locals).
@@ -106,7 +106,7 @@ class Extension : public IDebuggable {
// this module was built against.
int64_t m_hhvmAPIVersion;

const String m_name;
std::string m_name;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this bothers me too.

It's not technically wrong, by any measure, but why?

@sgolemon
Copy link
Contributor

Needs to be rebased for @ptarjan's third_party move. Generally though this is going to take a little bit longer to merge since I'd like to separately upstreat the thrift/proxygen changes to keep the forks in sync.

@danslo danslo changed the title make FastCGI work on OS X [WIP] Make FastCGI work on OS X May 6, 2014
@JoelMarcey
Copy link
Contributor

@danslo Hi. I am assuming this PR still in a holding pattern? Or is it obsolete now? Do you want us to keep it open? Just doing a bit of triaging.

@danslo
Copy link
Contributor Author

danslo commented May 16, 2014

Hey Joel, like Sara mentioned, this will need to be rebased and some of the changes need to be moved to hhvm/third-party or even fixed further upstream and added as submodules there. I've been traveling so I haven't had time to look at this yet. Do intend to update this PR in the future.

@fredemmott
Copy link
Contributor

Closing until this is actionable.

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

Successfully merging this pull request may close these issues.

None yet

6 participants