{"action":"created","issue":{"url":"https://api.github.com/repos/rails-sqlserver/tiny_tds/issues/305","repository_url":"https://api.github.com/repos/rails-sqlserver/tiny_tds","labels_url":"https://api.github.com/repos/rails-sqlserver/tiny_tds/issues/305/labels{/name}","comments_url":"https://api.github.com/repos/rails-sqlserver/tiny_tds/issues/305/comments","events_url":"https://api.github.com/repos/rails-sqlserver/tiny_tds/issues/305/events","html_url":"https://github.com/rails-sqlserver/tiny_tds/issues/305","id":181125116,"number":305,"title":"segfault on reconnect","user":{"login":"SteveAlexander","id":4321921,"avatar_url":"https://avatars.githubusercontent.com/u/4321921?v=3","gravatar_id":"","url":"https://api.github.com/users/SteveAlexander","html_url":"https://github.com/SteveAlexander","followers_url":"https://api.github.com/users/SteveAlexander/followers","following_url":"https://api.github.com/users/SteveAlexander/following{/other_user}","gists_url":"https://api.github.com/users/SteveAlexander/gists{/gist_id}","starred_url":"https://api.github.com/users/SteveAlexander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SteveAlexander/subscriptions","organizations_url":"https://api.github.com/users/SteveAlexander/orgs","repos_url":"https://api.github.com/users/SteveAlexander/repos","events_url":"https://api.github.com/users/SteveAlexander/events{/privacy}","received_events_url":"https://api.github.com/users/SteveAlexander/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-05T11:11:11Z","updated_at":"2016-10-06T00:21:26Z","closed_at":null,"body":"tiny_tds 1.0.4, Mac OS Sierra 10.12.\r\n\r\nI'm seeing something interesting...\r\n\r\nRunning a program that makes a number of queries, I sometimes see this warning:\r\n\r\n  warning: TinyTds: dbsqlsend() returned FAIL.\r\n\r\nI find that the `result` of client.execute is `false` rather than the expected result object.\r\n\r\nWhen I call 'client.close' and then try to make a new connection with `TinyTds::Client.new`, I got a segfault.\r\n\r\n```\r\n/Users/steve/.gem/ruby/2.3.1/gems/tiny_tds-1.0.4/lib/tiny_tds/client.rb:43: [BUG] Segmentation fault at 0x00000000000000\r\nruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]\r\n\r\n-- Crash Report log information --------------------------------------------\r\n   See Crash Report log file under the one of following:\r\n     * ~/Library/Logs/CrashReporter\r\n     * /Library/Logs/CrashReporter\r\n     * ~/Library/Logs/DiagnosticReports\r\n     * /Library/Logs/DiagnosticReports\r\n   for more details.\r\nDon't forget to include the above Crash Report log file in bug reports.\r\n\r\n-- Control frame information -----------------------------------------------\r\nc:0010 p:---- s:0057 e:000056 CFUNC  :connect\r\nc:0009 p:0351 s:0053 e:000052 METHOD /Users/steve/.gem/ruby/2.3.1/gems/tiny_tds-1.0.4/lib/tiny_tds/client.rb:43 [FINISH]\r\nc:0008 p:---- s:0049 e:000048 CFUNC  :new\r\nc:0007 p:0026 s:0045 e:000044 METHOD /Users/steve/code/my_stuff.rb:51\r\n\r\n-- Machine register context ------------------------------------------------\r\n rax: 0x9000000000000000 rbx: 0x00000001012af6d7 rcx: 0x0000000000000007\r\n rdx: 0x00000001012af6d7 rdi: 0x0000000000000019 rsi: 0x000000000000000c\r\n rbp: 0x0000700004456ed0 rsp: 0x0000700004456d70  r8: 0x0000000000000006\r\n  r9: 0x00007f9601441530 r10: 0x00007fffb36a1236 r11: 0xffffff9649b6a2b6\r\n r12: 0x00007f95ff54be00 r13: 0x0000000000004e24 r14: 0x00007f95fd199e00\r\n r15: 0x00000001012b3350 rip: 0x00000001012698b4 rfl: 0x0000000000010286\r\n\r\n-- C level backtrace information -------------------------------------------\r\n0   ruby                                0x0000000100f3ac74 rb_vm_bugreport + 388\r\n1   ruby                                0x0000000100dd354a rb_bug_context + 490\r\n2   ruby                                0x0000000100ea8f13 sigsegv + 83\r\n3   libsystem_platform.dylib            0x00007fffb377dbba _sigtramp + 26\r\n4   libsybdb.5.dylib                    0x00000001012698b4 dbperror + 496\r\n5   ???                                 0x000000010109a000 0x0 + 4312375296\r\n\r\n-- Other runtime information -----------------------------------------------\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/rails-sqlserver/tiny_tds/issues/comments/251836377","html_url":"https://github.com/rails-sqlserver/tiny_tds/issues/305#issuecomment-251836377","issue_url":"https://api.github.com/repos/rails-sqlserver/tiny_tds/issues/305","id":251836377,"user":{"login":"metaskills","id":2381,"avatar_url":"https://avatars.githubusercontent.com/u/2381?v=3","gravatar_id":"","url":"https://api.github.com/users/metaskills","html_url":"https://github.com/metaskills","followers_url":"https://api.github.com/users/metaskills/followers","following_url":"https://api.github.com/users/metaskills/following{/other_user}","gists_url":"https://api.github.com/users/metaskills/gists{/gist_id}","starred_url":"https://api.github.com/users/metaskills/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metaskills/subscriptions","organizations_url":"https://api.github.com/users/metaskills/orgs","repos_url":"https://api.github.com/users/metaskills/repos","events_url":"https://api.github.com/users/metaskills/events{/privacy}","received_events_url":"https://api.github.com/users/metaskills/received_events","type":"User","site_admin":false},"created_at":"2016-10-06T00:21:26Z","updated_at":"2016-10-06T00:21:26Z","body":"Interesting. Have you tried using a higher abstraction to make sure this is not an issue with your code? For example, ActiveRecord, Sequel, or maybe the [connection_pool](https://github.com/mperham/connection_pool) gem if you do not want to stay a bit lower?"}}
{"actor":{"display_login":"metaskills"}}