zenchild/gssapi — Issue #9: Crash after making a second connection
Author: centromere
Created: 2012-02-06 01:57:22+00:00
State: open

Hello,

I ran in to a reproducible crash when using this gem. I loaded the server and client example scripts on to two separate FreeBSD 9.0-RELEASE amd64 machines running Ruby 1.9.3. The first time I ran client.rb, it worked flawlessly (I disconnected by typing 'exit'). The second time I ran it (same server.rb instance), the server reported the base64 string correctly, however the client did not report a successful connection. I manually killed the client and tried connecting again. Upon making another connection attempt, server.rb crashes with this error:

/home/alex/.gem/ruby/1.9/gems/gssapi-1.0.3/lib/gssapi/simple.rb:117: [BUG] Bus Error
ruby 1.9.3p0 (2011-10-30 revision 33570) [amd64-freebsd9]

-- Control frame information -----------------------------------------------
c:0005 p:---- s:0038 b:0038 l:000037 d:000037 CFUNC :gss_accept_sec_context
c:0004 p:0299 s:0024 b:0024 l:000023 d:000023 METHOD /home/alex/.gem/ruby/1.9/gems/gssapi-1.0.3/lib/gssapi/simple.rb:117
c:0003 p:0091 s:0011 b:0011 l:0022e8 d:000010 BLOCK server.rb:20
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:---- s:0002 b:0002 l:000001 d:000001 TOP

-- Ruby level backtrace information ----------------------------------------
server.rb:20:in `block (2 levels) in

'
/home/alex/.gem/ruby/1.9/gems/gssapi-1.0.3/lib/gssapi/simple.rb:117:in `accept_context'
/home/alex/.gem/ruby/1.9/gems/gssapi-1.0.3/lib/gssapi/simple.rb:117:in `gss_accept_sec_context'

-- Other runtime information -----------------------------------------------

* Loaded script: server.rb

* Loaded features:

0 enumerator.so
1 /usr/local/lib/ruby/1.9/amd64-freebsd9/enc/encdb.so
2 /usr/local/lib/ruby/1.9/amd64-freebsd9/enc/trans/transdb.so
3 /usr/local/lib/ruby/site_ruby/1.9/rubygems/defaults.rb
4 /usr/local/lib/ruby/1.9/amd64-freebsd9/rbconfig.rb
5 /usr/local/lib/ruby/site_ruby/1.9/rubygems/deprecate.rb
6 /usr/local/lib/ruby/site_ruby/1.9/rubygems/exceptions.rb
7 /usr/local/lib/ruby/site_ruby/1.9/rubygems/custom_require.rb
8 /usr/local/lib/ruby/site_ruby/1.9/rubygems.rb
9 /usr/local/lib/ruby/site_ruby/1.9/rubygems/version.rb
10 /usr/local/lib/ruby/site_ruby/1.9/rubygems/requirement.rb
11 /usr/local/lib/ruby/site_ruby/1.9/rubygems/platform.rb
12 /usr/local/lib/ruby/site_ruby/1.9/rubygems/specification.rb
13 /usr/local/lib/ruby/site_ruby/1.9/rubygems/path_support.rb
14 /usr/local/lib/ruby/site_ruby/1.9/rubygems/dependency.rb
15 /usr/local/lib/ruby/gems/1.9/gems/ffi-1.0.11/lib/ffi_c.so
16 /usr/local/lib/ruby/gems/1.9/gems/ffi-1.0.11/lib/ffi/platform.rb
17 /usr/local/lib/ruby/gems/1.9/gems/ffi-1.0.11/lib/ffi/types.rb
18 /usr/local/lib/ruby/gems/1.9/gems/ffi-1.0.11/lib/ffi/library.rb
19 /usr/local/lib/ruby/gems/1.9/gems/ffi-1.0.11/lib/ffi/errno.rb
20 /usr/local/lib/ruby/gems/1.9/gems/ffi-1.0.11/lib/ffi/pointer.rb
21 /usr/local/lib/ruby/gems/1.9/gems/ffi-1.0.11/lib/ffi/memorypointer.rb
22 /usr/local/lib/ruby/gems/1.9/gems/ffi-1.0.11/lib/ffi/struct_layout_builder.rb
23 /usr/local/lib/ruby/gems/1.9/gems/ffi-1.0.11/lib/ffi/struct.rb
24 /usr/local/lib/ruby/gems/1.9/gems/ffi-1.0.11/lib/ffi/union.rb
25 /usr/local/lib/ruby/gems/1.9/gems/ffi-1.0.11/lib/ffi/managedstruct.rb
26 /usr/local/lib/ruby/gems/1.9/gems/ffi-1.0.11/lib/ffi/callback.rb
27 /usr/local/lib/ruby/gems/1.9/gems/ffi-1.0.11/lib/ffi/io.rb
28 /usr/local/lib/ruby/gems/1.9/gems/ffi-1.0.11/lib/ffi/autopointer.rb
29 /usr/local/lib/ruby/gems/1.9/gems/ffi-1.0.11/lib/ffi/variadic.rb
30 /usr/local/lib/ruby/gems/1.9/gems/ffi-1.0.11/lib/ffi/enum.rb
31 /usr/local/lib/ruby/gems/1.9/gems/ffi-1.0.11/lib/ffi/ffi.rb
32 /usr/local/lib/ruby/gems/1.9/gems/ffi-1.0.11/lib/ffi.rb
33 /home/alex/.gem/ruby/1.9/gems/gssapi-1.0.3/lib/gssapi/exceptions.rb
34 /home/alex/.gem/ruby/1.9/gems/gssapi-1.0.3/lib/gssapi/lib_gssapi_loader.rb
35 /home/alex/.gem/ruby/1.9/gems/gssapi-1.0.3/lib/gssapi/lib_gssapi.rb
36 /home/alex/.gem/ruby/1.9/gems/gssapi-1.0.3/lib/gssapi/simple.rb
37 /home/alex/.gem/ruby/1.9/gems/gssapi-1.0.3/lib/gssapi.rb
38 /usr/local/lib/ruby/1.9/base64.rb
39 /usr/local/lib/ruby/1.9/amd64-freebsd9/socket.so
40 /usr/local/lib/ruby/1.9/socket.rb

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Abort trap: 6 (core dumped)

Any ideas?