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

Getting "PP: internal error, state == PI" under 0.8.2 #108

Closed
necrodome opened this issue Jan 5, 2013 · 18 comments
Closed

Getting "PP: internal error, state == PI" under 0.8.2 #108

necrodome opened this issue Jan 5, 2013 · 18 comments

Comments

@necrodome
Copy link

I am running a simple script that connects to jabber.org and sends messages. 0.8.2 upgrade errors with the message PP: internal error, state == PI.

0.8.1 is working. My ruby env:

    interpreter:  "ruby"
    version:      "1.9.3p327"
    date:         "2012-11-10"
    platform:     "x86_64-darwin11.4.2"
    patchlevel:   "2012-11-10 revision 37606"
    full_version: "ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin11.4.2]"

gems:

 blather (0.8.1)
      activesupport (>= 2.3.11)
      eventmachine (>= 0.12.6)
      girl_friday
      niceogiri (~> 1.0)
      nokogiri (~> 1.5.5)
@benlangfeld
Copy link
Member

I'm going to need more context here. Please provide the code you used, some wire logs and a full stack trace.

@necrodome
Copy link
Author

Tested with a minimal script and included the outputs: https://gist.github.com/4466375#file-connect-rb

All dependent gems are the same version.

  • activesupport (3.2.10)
  • blather (0.8.2)
  • bundler (1.2.2)
  • connection_pool (0.9.3)
  • eventmachine (1.0.0)
  • girl_friday (0.11.1)
  • i18n (0.6.1)
  • multi_json (1.5.0)
  • niceogiri (1.1.1)
  • nokogiri (1.5.6)
  • rubinius-actor (0.0.2)
  • rubinius-core-api (0.0.1)

@benlangfeld
Copy link
Member

I'm afraid I don't see "PP: internal error, state == PI" anywhere in those logs. All I see is your XMPP server failing to respond to an <auth/>. Can you clarify?

@necrodome
Copy link
Author

Updated the output to capture stderr. Relevant line: https://gist.github.com/4466375#file-0-8-2-output-1357504474-L196

How can I capture more useful information? Any ideas?

@jessereynolds
Copy link

I'm seeing something similar in flapjack (https://github.com/flpjck/flapjack/) with blather 0.8.2 (whereas 0.8.0 and 0.8.1 are fine):

/opt/rbenv/versions/1.9.3-p125/bin/flapjack:23:in `<main>'PP: internal error, state == PI
...
Blather::ParseError
/opt/rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/blather-0.8.2/lib/blather/stream/parser.rb:86:in `error'
/opt/rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/blather-0.8.2/lib/blather/stream/parser.rb:26:in `rescue in receive_data'
/opt/rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/blather-0.8.2/lib/blather/stream/parser.rb:22:in `receive_data'
/opt/rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/blather-0.8.2/lib/blather/stream.rb:164:in `receive_data'
/opt/rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine'
/opt/rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run'
/opt/rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/em-synchrony-1.0.2/lib/em-synchrony.rb:28:in `synchrony'
/opt/rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/flapjack-0.6.60/lib/flapjack/coordinator.rb:38:in `start'

Let me know if you'd like a wire trace to be captured.

See also that coordinator.rb line in context: https://github.com/flpjck/flapjack/blob/3e5ebbf2ef4ae8013be872fae151e5931761cfae/lib/flapjack/coordinator.rb#L38

@benlangfeld
Copy link
Member

I'd love a wire trace

@jessereynolds
Copy link

Is there a way to configure blather to not to TLS? I have a wire trace but it's encrypted after the TLS start.

Alternatively, is there a way to have blather dump all communications back and forth?

@benlangfeld
Copy link
Member

Blather will print a wire log if you set the log level to debug. You can do this by passing -D if you're using the CLI include, or Blather.logger.level = Logger::DEBUG if you are not. Blather does not currently have a way to configure TLS. If the server advertises support, Blather will use it. A contribution to make this configurable would be accepted (assuming it meets quality standards).

@cburgmer
Copy link

cburgmer commented Feb 1, 2013

+1, Going back to 0.8.1 works for us on ejabberd

@benlangfeld
Copy link
Member

Would someone mind bisecting between 0.8.1 and 0.8.2 to locate the commit that triggered this?

@cburgmer
Copy link

cburgmer commented Feb 1, 2013

I can run our crashing app, but I don't know how to tell ruby to look for a local version of blather instead of an installed gem.

@benlangfeld
Copy link
Member

In your Gemfile, specify:

gem 'blather', github: 'adhearsion/blather', ref: 'somesha1'

Then do bundle install.

Regards,
Ben Langfeld

On 1 February 2013 15:05, Christoph Burgmer notifications@github.comwrote:

I can run our crashing app, but I don't know how to tell ruby to look for
a local version of blather instead of an installed gem.


Reply to this email directly or view it on GitHubhttps://github.com//issues/108#issuecomment-12997790.

@cburgmer
Copy link

cburgmer commented Feb 1, 2013

Sorry, I cannot get bundle to properly install the locally available git repo via :path => …, so I am unable to to do a proper bisect without putting much more time into this.

Please see my minimal program and the resulting output (when failing) here: https://gist.github.com/4694226

For reference, my issue above is the following:

$ ruby failing.rb  -D
/Users/cburgmer/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- blather/client (LoadError)
    from /Users/cburgmer/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from failing.rb:2:in `<main>'

when the Gemfile points to

gem "blather", :path => "/tmp/blather"

@benlangfeld
Copy link
Member

You need to do require 'bundler/setup' first.

@cburgmer
Copy link

cburgmer commented Feb 2, 2013

Thanks!


$ git bisect bad
a0655365602a91c790b64745d3bfb1ba009a1586 is the first bad commit
commit a0655365602a91c790b64745d3bfb1ba009a1586
Author: Ben Langfeld <ben@langfeld.me>
Date:   Tue Dec 25 22:46:56 2012 +0000

    [CS] Reduce duplication in Stream parser allocation

:040000 040000 a8d96b3e46536ae0431e413b91549f9b88284d5c e8f65707b8a10675632d3614a37702bb1e4e98ea M  lib

@lucasuyezu
Copy link
Contributor

+1 on the issue, I'm using 0.8.1 until it is fixed. I'll try to find the problem and report here.

@benlangfeld
Copy link
Member

This was fixed by f318807. Not sure why I didn't update the issue. Try using 0.8.3.

@jessereynolds
Copy link

0.8.3 works a treat, thank you @benlangfeld

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

5 participants