{"action":"created","issue":{"url":"https://api.github.com/repos/jruby/jruby/issues/3863","repository_url":"https://api.github.com/repos/jruby/jruby","labels_url":"https://api.github.com/repos/jruby/jruby/issues/3863/labels{/name}","comments_url":"https://api.github.com/repos/jruby/jruby/issues/3863/comments","events_url":"https://api.github.com/repos/jruby/jruby/issues/3863/events","html_url":"https://github.com/jruby/jruby/issues/3863","id":153712390,"number":3863,"title":"net-ldap#bind fails in jruby-9.1.0.0 (but works in jruby-9.0.5.0)","user":{"login":"gregclar","id":144573,"avatar_url":"https://avatars.githubusercontent.com/u/144573?v=3","gravatar_id":"","url":"https://api.github.com/users/gregclar","html_url":"https://github.com/gregclar","followers_url":"https://api.github.com/users/gregclar/followers","following_url":"https://api.github.com/users/gregclar/following{/other_user}","gists_url":"https://api.github.com/users/gregclar/gists{/gist_id}","starred_url":"https://api.github.com/users/gregclar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregclar/subscriptions","organizations_url":"https://api.github.com/users/gregclar/orgs","repos_url":"https://api.github.com/users/gregclar/repos","events_url":"https://api.github.com/users/gregclar/events{/privacy}","received_events_url":"https://api.github.com/users/gregclar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jruby/jruby/labels/JRuby%209000","name":"JRuby 9000","color":"bfe5bf"},{"url":"https://api.github.com/repos/jruby/jruby/labels/regression","name":"regression","color":"e11d21"},{"url":"https://api.github.com/repos/jruby/jruby/labels/stdlib","name":"stdlib","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/jruby/jruby/milestones/50","html_url":"https://github.com/jruby/jruby/milestones/JRuby%209.1.1.0","labels_url":"https://api.github.com/repos/jruby/jruby/milestones/50/labels","id":1604288,"number":50,"title":"JRuby 9.1.1.0","description":"","creator":{"login":"headius","id":10135,"avatar_url":"https://avatars.githubusercontent.com/u/10135?v=3","gravatar_id":"","url":"https://api.github.com/users/headius","html_url":"https://github.com/headius","followers_url":"https://api.github.com/users/headius/followers","following_url":"https://api.github.com/users/headius/following{/other_user}","gists_url":"https://api.github.com/users/headius/gists{/gist_id}","starred_url":"https://api.github.com/users/headius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/headius/subscriptions","organizations_url":"https://api.github.com/users/headius/orgs","repos_url":"https://api.github.com/users/headius/repos","events_url":"https://api.github.com/users/headius/events{/privacy}","received_events_url":"https://api.github.com/users/headius/received_events","type":"User","site_admin":false},"open_issues":50,"closed_issues":0,"state":"open","created_at":"2016-02-25T01:21:40Z","updated_at":"2016-05-09T15:41:09Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-05-09T06:42:46Z","updated_at":"2016-05-09T15:44:48Z","closed_at":null,"body":"\r\n### Environment\r\n\r\n    $ jruby -v\r\n    jruby 9.1.0.0 (2.3.0) 2016-05-02 a633c63 Java HotSpot(TM) 64-Bit Server VM 23.21-b01 on 1.7.0_21-b12 +jit [darwin-x86_64]\r\n    \r\n    $ gem list --local\r\n    \r\n    *** LOCAL GEMS ***\r\n    \r\n    bundler (1.12.3)\r\n    jar-dependencies (default: 0.3.2)\r\n    jruby-openssl (0.9.15 java)\r\n    json (1.8.3 java)\r\n    minitest (default: 5.4.1)\r\n    net-ldap (0.14.0)\r\n    net-telnet (default: 0.1.1)\r\n    power_assert (default: 0.2.3)\r\n    psych (2.0.17 java)\r\n    racc (1.4.13 java)\r\n    rake (default: 10.4.2)\r\n    rdoc (default: 4.2.0)\r\n    test-unit (default: 3.1.1)\r\n    \r\n    $ uname -a\r\n    Darwin IBISs-iMac.local 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64\r\n    \r\n    \r\n    \r\n### Expected Behavior\r\n    \r\nThis is how it works under jruby-9.0.5.0:\r\n    \r\n     IBISs-iMac Mon May 09 16:24:16  gregc  [jruby-9.0.5.0 (set by /Users/gregc/.rbenv/version)]  ~\r\n    $ irb\r\n    Configured by ~/.irbrc\r\n    irb(main):001:0> require 'net-ldap'\r\n    => true\r\n    irb(main):002:0> ldap = Net::LDAP.new\r\n    => #<Net::LDAP:0x7e7eb4f6 @connect_timeout=nil, @force_no_page=false, @host=\"127.0.0.1\", @hosts=nil, @auth={:method=>:anonymous}, @encryption=nil, @base=\"dc=com\", @port=389, @open_connection=nil, @verbose=false, @instrumentation_service=nil>\r\n    irb(main):003:0> ldap.host = 'localhost'\r\n    => \"localhost\"\r\n    irb(main):004:0> ldap.port = 10389\r\n    => 10389\r\n    irb(main):005:0> ldap.auth \"uid=admin,ou=system\", \"secret\"\r\n    => {:method=>:simple, :username=>\"uid=admin,ou=system\", :password=>\"secret\"}\r\n    irb(main):006:0> ldap.bind\r\n    => true\r\n    \r\n    \r\nI have many gems installed under 9.0.5.0, so haven't listed them here.  For 9.1.0.0 actual (below) I installed 9.1.0.0 clean and added the minimal gems to replicate the problem.\r\n    \r\nCommands I used in irb are:\r\n    \r\n    require 'net-ldap'\r\n    ldap = Net::LDAP.new\r\n    ldap.host = 'localhost' \r\n    ldap.port = 10389\r\n    ldap.auth \"uid=admin,ou=system\", \"secret\"\r\n    ldap.bind\r\n    \r\nwith LDAP server running at the address you provide, and admin user configured.\r\n    \r\n### Actual Behavior\r\n    \r\n    $ irb\r\n    Configured by ~/.irbrc\r\n    irb(main):001:0> require 'net-ldap'\r\n    => true\r\n    irb(main):002:0> ldap = Net::LDAP.new\r\n    => #<Net::LDAP:0x20d3e657 @connect_timeout=nil, @force_no_page=false, @host=\"127.0.0.1\", @hosts=nil, @auth={:method=>:anonymous}, @encryption=nil, @base=\"dc=com\", @port=389, @open_connection=nil, @instrumentation_service=nil, @verbose=false>\r\n    irb(main):003:0> ldap.host = 'localhost'\r\n    => \"localhost\"\r\n    irb(main):004:0> ldap.port = 10389\r\n    => 10389\r\n    irb(main):005:0> ldap.auth \"uid=admin,ou=system\", \"secret\"\r\n    => {:method=>:simple, :username=>\"uid=admin,ou=system\", :password=>\"secret\"}\r\n    irb(main):006:0> ldap.bind\r\n    Java::JavaNioChannels::NotYetConnectedException:\r\n    \tfrom sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:253)\r\n    \tfrom sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:440)\r\n    \tfrom org.jruby.util.io.PosixShim.write(PosixShim.java:106)\r\n    \tfrom org.jruby.util.io.OpenFile$3.run(OpenFile.java:1334)\r\n    \tfrom org.jruby.util.io.OpenFile$3.run(OpenFile.java:1325)\r\n    \tfrom org.jruby.RubyThread.executeTask(RubyThread.java:1464)\r\n    \tfrom org.jruby.util.io.OpenFile.writeInternal(OpenFile.java:2233)\r\n    \tfrom org.jruby.util.io.OpenFile.binwrite(OpenFile.java:2174)\r\n    \tfrom org.jruby.util.io.OpenFile.fwrite(OpenFile.java:2038)\r\n    \tfrom org.jruby.RubyIO.write(RubyIO.java:1437)\r\n    \tfrom org.jruby.RubyIO.write(RubyIO.java:1409)\r\n    \tfrom org.jruby.RubyIO$INVOKER$i$1$0$write.call(RubyIO$INVOKER$i$1$0$write.gen)\r\n    \tfrom org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:313)\r\n    \tfrom org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:163)\r\n    \tfrom org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)\r\n    \tfrom org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:77)\r\n    ... 194 levels...\r\n    \tfrom org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:165)\r\n    \tfrom org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:197)\r\n    \tfrom org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:313)\r\n    \tfrom org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:163)\r\n    \tfrom Users.gregc.$_dot_rbenv.versions.jruby_minus_9_dot_1_dot_0_dot_0.bin.irb.invokeOther3:start(/Users/gregc/.rbenv/versions/jruby-9.1.0.0/bin/irb)\r\n    \tfrom Users.gregc.$_dot_rbenv.versions.jruby_minus_9_dot_1_dot_0_dot_0.bin.irb.RUBY$script(/Users/gregc/.rbenv/versions/jruby-9.1.0.0/bin/irb:13)\r\n    \tfrom java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:566)\r\n    \tfrom org.jruby.ir.Compiler$1.load(Compiler.java:111)\r\n    \tfrom org.jruby.Ruby.runScript(Ruby.java:833)\r\n    \tfrom org.jruby.Ruby.runScript(Ruby.java:825)\r\n    \tfrom org.jruby.Ruby.runNormally(Ruby.java:760)\r\n    \tfrom org.jruby.Ruby.runFromMain(Ruby.java:579)\r\n    \tfrom org.jruby.Main.doRunFromMain(Main.java:425)\r\n    \tfrom org.jruby.Main.internalRun(Main.java:313)\r\n    \tfrom org.jruby.Main.run(Main.java:242)\r\n    \tfrom org.jruby.Main.main(Main.java:204)irb(main):007:0>\r\n    irb(main):008:0* exit\r\n    \r\nThis code has been running fine on various 1.7.x versions of jruby over the past year or two.\r\n\r\nI first saw the broken behaviour on jruby-9.1.0.0 on a Sun box running  `5.11 11.2 sun4v spare sun4v`.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jruby/jruby/issues/comments/217903061","html_url":"https://github.com/jruby/jruby/issues/3863#issuecomment-217903061","issue_url":"https://api.github.com/repos/jruby/jruby/issues/3863","id":217903061,"user":{"login":"headius","id":10135,"avatar_url":"https://avatars.githubusercontent.com/u/10135?v=3","gravatar_id":"","url":"https://api.github.com/users/headius","html_url":"https://github.com/headius","followers_url":"https://api.github.com/users/headius/followers","following_url":"https://api.github.com/users/headius/following{/other_user}","gists_url":"https://api.github.com/users/headius/gists{/gist_id}","starred_url":"https://api.github.com/users/headius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/headius/subscriptions","organizations_url":"https://api.github.com/users/headius/orgs","repos_url":"https://api.github.com/users/headius/repos","events_url":"https://api.github.com/users/headius/events{/privacy}","received_events_url":"https://api.github.com/users/headius/received_events","type":"User","site_admin":false},"created_at":"2016-05-09T15:44:48Z","updated_at":"2016-05-09T15:44:48Z","body":"Well my one change to `bind` appears to be 1d21abc99a04a44af18cf263c7a8c3eddc8f8d69 but reverting that doesn't fix anything. Will bisect."}}