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

Trace/BPT trap: 5 Crash on Ruby 1.9.3-p327 #39

Closed
KAllan357 opened this issue Mar 29, 2013 · 8 comments
Closed

Trace/BPT trap: 5 Crash on Ruby 1.9.3-p327 #39

KAllan357 opened this issue Mar 29, 2013 · 8 comments

Comments

@KAllan357
Copy link

I have an interesting failure with this gem when I require it in a certain spot in my application. Here is a gist I generated with the --tracer option in IRB (I omitted most of the output).

I'm not quite sure how to solve my particular problem, other than requiring the winrm gem in a different spot, but is this problem possibly related to the comment @pmorton made on #34?

"I was just searching for this fix :basic_auth_only => true. What this does is turn off GSSAPI authentication in the HTTP client. What is happening is that the httpclient sees that GSSAPI gem is installed and tries to use it. If you are on a machine that does not have a full kerberos environment (or one at all), httpclient still tries to use kerberos even though your environment is not complete.

I am working on a major update to the WinRM gem and some of the underlying libraries. In specific, I am in the process of fixing up the rubyntlm gem so that authentication works seamlessly out of the box with the winrm gem."

Is it possible that a major update to the WinRM gem could solve my problem?

For reference, my application fails while it runs when the require is in the same spot its in here - https://github.com/RiotGames/ridley/blob/cb5e8a021e5b2959565744ef2b6478bf4dae7bb5/lib/ridley/host_connector/winrm/worker.rb. Due to some autoloading and who knows what else, I can move the require to a different file, and it works just fine.

@pmorton
Copy link
Contributor

pmorton commented Mar 29, 2013

I do not see the gist in this ticket. Can you send me a link?

@KAllan357
Copy link
Author

whoops, sorry! https://gist.github.com/KAllan357/5272940

@pmorton
Copy link
Contributor

pmorton commented Mar 29, 2013

On the surface this looks like a corrupt kerberos environment or potentially an issue with ffi being borked.

I have looked at the httpclient code and there is no way to prevent it from trying to load GSSAPI if is it is in your bundle. So I dont think there is a in the next 10 seconds fix.

Questions for you:

Do you actually need gssapi/kerberos?

  • If not, what is requiring it (Check your gemfile.lock)
  • If it is only the winrm gem, you could fork and remove the requirement in the gemspect. (I will be addressing this in the next release).

Does this repro if you use a pristine gemset. (Re-Install of all required gems)
Can others repro on this ruby version?
What operating system are you running on?

@KAllan357
Copy link
Author

@pmorton Thanks for the quick response.

I don't actually need gssapi/kerberos. Your second suggestion was what I did locally to work around the issue - I edited my gem installation of winrm to remove the dependency on gssapi and specified the path to that gem in my Gemfile. That change would enable me to move forward.

I was able to reproduce this issue on a clean gemset. In fact, I thought it was a problem with my system, so I ended up spending some time reinstalling my rubies from scratch.

At least one of my team members was able to reproduce the same error.

I am running on OS X 10.7.

@pmorton
Copy link
Contributor

pmorton commented Mar 29, 2013

@KAllan357 I am installing 1.9.3-p327 to verify now.

@pmorton
Copy link
Contributor

pmorton commented Mar 29, 2013

Gah. Can't get rvm to properly install p327. Are you using the binary build or are you building from scratch?

@KAllan357
Copy link
Author

I was using rbenv to build from scratch. I imagine the binary build would work fine as well.

@sneal
Copy link
Member

sneal commented Jul 1, 2014

Ensure you require winrm from the main thread of your application, otherwise you will get a seg fault on OS X. Perhaps with some of the structural changes proposed to remove the hard dependency on gssapi/kerberos this won't be an issue in the future.

crash dump for future reference

@sneal sneal closed this as completed Jul 1, 2014
sneal added a commit that referenced this issue Jul 8, 2014
On Ruby 2.0+ CGI.escapeHTML will escape single quotes to ' which breaks the WinRM web service. We pull out the rendered XML and unescape any single quotes before sending the request.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants