[jira] [Updated] (THRIFT-1193) Potential infinite loop in nonblocking_server
[ https://issues.apache.org/jira/browse/THRIFT-1193?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ilya Maykov updated THRIFT-1193: Attachment: patch-THRIFT-1193.txt Patch attached. > Potential infinite loop in nonblocking_server > - > > Key: THRIFT-1193 > URL: https://issues.apache.org/jira/browse/THRIFT-1193 > Project: Thrift > Issue Type: Bug > Components: Ruby - Library >Affects Versions: 0.7 >Reporter: Ilya Maykov >Assignee: Ilya Maykov >Priority: Minor > Attachments: patch-THRIFT-1193.txt > > > The fix for THRIFT-1187 could cause the server to enter an infinite loop if > select() started throwing Errno::EBADF when called on a non-closed > @server_transport. > The obvious fix is to turn the 'next' into a 'break'. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (THRIFT-1193) Potential infinite loop in nonblocking_server
Potential infinite loop in nonblocking_server - Key: THRIFT-1193 URL: https://issues.apache.org/jira/browse/THRIFT-1193 Project: Thrift Issue Type: Bug Components: Ruby - Library Affects Versions: 0.7 Reporter: Ilya Maykov Assignee: Ilya Maykov Priority: Minor The fix for THRIFT-1187 could cause the server to enter an infinite loop if select() started throwing Errno::EBADF when called on a non-closed @server_transport. The obvious fix is to turn the 'next' into a 'break'. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1192) Typo: TProtocol.h tests for HAVE_SYS_PARAM_H_
[ https://issues.apache.org/jira/browse/THRIFT-1192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042440#comment-13042440 ] Hudson commented on THRIFT-1192: Integrated in Thrift #153 (See [https://builds.apache.org/hudson/job/Thrift/153/]) THRIFT-1192: Typo: TProtocol.h tests for HAVE_SYS_PARAM_H_ Client: cpp Patch: Eric Rannaud Fixes the typo in the check for HAVE_SYS_PARAM_H jfarrell : http://svn.apache.org/viewvc/?view=rev&rev=1130293 Files : * /thrift/trunk/lib/cpp/src/protocol/TProtocol.h > Typo: TProtocol.h tests for HAVE_SYS_PARAM_H_ > - > > Key: THRIFT-1192 > URL: https://issues.apache.org/jira/browse/THRIFT-1192 > Project: Thrift > Issue Type: Bug >Affects Versions: 0.6.1, 0.7 >Reporter: Eric Rannaud >Assignee: Eric Rannaud > Fix For: 0.7 > > Attachments: thrift-have-sys-param-typo.patch > > > TProtocol.h tests for HAVE_SYS_PARAM_H_, which will never be defined, so > is never included. > Attached is a patch that fixes the typo on HAVE_SYS_PARAM_H, but I actually > suspect that is not needed at all in the current codebase, as > nobody reported a problem and I can't find any obvious need for it. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (THRIFT-891) Comments are not properly handled in some cases
[ https://issues.apache.org/jira/browse/THRIFT-891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jake Farrell closed THRIFT-891. --- Resolution: Fixed Assignee: Jake Farrell Looking through the code base again i did not find any cases where this was an issue anymore. If you are still having problems generating the doctext please supply a list of the offending files and I will be glad to fix them for you. > Comments are not properly handled in some cases > --- > > Key: THRIFT-891 > URL: https://issues.apache.org/jira/browse/THRIFT-891 > Project: Thrift > Issue Type: Bug > Components: Compiler (General) >Affects Versions: 0.4 >Reporter: Lars Francke >Assignee: Jake Farrell >Priority: Minor > Fix For: 0.7 > > > There's a problem with some comments. > A comment like > {noformat} > /** foobar **/ > {noformat} > works but > {noformat} > /**foobar **/ > {noformat} > does not. Basically if there are two {{*}} at the beginning it must be > followed by a space to parse otherwise I get the following: > {noformat} > thrift: src/main.cc:512: char* clean_up_doctext(char*): Assertion > `docstring.length() <= strlen(doctext)' failed. > Aborted > {noformat} -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (THRIFT-1192) Typo: TProtocol.h tests for HAVE_SYS_PARAM_H_
[ https://issues.apache.org/jira/browse/THRIFT-1192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jake Farrell closed THRIFT-1192. Resolution: Fixed Fix Version/s: 0.7 Assignee: Eric Rannaud added to trunk, thanks for the patch > Typo: TProtocol.h tests for HAVE_SYS_PARAM_H_ > - > > Key: THRIFT-1192 > URL: https://issues.apache.org/jira/browse/THRIFT-1192 > Project: Thrift > Issue Type: Bug >Affects Versions: 0.6.1, 0.7 >Reporter: Eric Rannaud >Assignee: Eric Rannaud > Fix For: 0.7 > > Attachments: thrift-have-sys-param-typo.patch > > > TProtocol.h tests for HAVE_SYS_PARAM_H_, which will never be defined, so > is never included. > Attached is a patch that fixes the typo on HAVE_SYS_PARAM_H, but I actually > suspect that is not needed at all in the current codebase, as > nobody reported a problem and I can't find any obvious need for it. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (THRIFT-1192) Typo: TProtocol.h tests for HAVE_SYS_PARAM_H_
Typo: TProtocol.h tests for HAVE_SYS_PARAM_H_ - Key: THRIFT-1192 URL: https://issues.apache.org/jira/browse/THRIFT-1192 Project: Thrift Issue Type: Bug Affects Versions: 0.6.1, 0.7 Reporter: Eric Rannaud Attachments: thrift-have-sys-param-typo.patch TProtocol.h tests for HAVE_SYS_PARAM_H_, which will never be defined, so is never included. Attached is a patch that fixes the typo on HAVE_SYS_PARAM_H, but I actually suspect that is not needed at all in the current codebase, as nobody reported a problem and I can't find any obvious need for it. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (THRIFT-1192) Typo: TProtocol.h tests for HAVE_SYS_PARAM_H_
[ https://issues.apache.org/jira/browse/THRIFT-1192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eric Rannaud updated THRIFT-1192: - Attachment: thrift-have-sys-param-typo.patch > Typo: TProtocol.h tests for HAVE_SYS_PARAM_H_ > - > > Key: THRIFT-1192 > URL: https://issues.apache.org/jira/browse/THRIFT-1192 > Project: Thrift > Issue Type: Bug >Affects Versions: 0.6.1, 0.7 >Reporter: Eric Rannaud > Attachments: thrift-have-sys-param-typo.patch > > > TProtocol.h tests for HAVE_SYS_PARAM_H_, which will never be defined, so > is never included. > Attached is a patch that fixes the typo on HAVE_SYS_PARAM_H, but I actually > suspect that is not needed at all in the current codebase, as > nobody reported a problem and I can't find any obvious need for it. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1187) nonblocking_server shutdown race under Ruby 1.9
[ https://issues.apache.org/jira/browse/THRIFT-1187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042368#comment-13042368 ] Hudson commented on THRIFT-1187: Integrated in Thrift #152 (See [https://builds.apache.org/hudson/job/Thrift/152/]) THRIFT-1187. rb: nonblocking_server shutdown race under Ruby 1.9 This patch fixes a shutdown error that occurs under ruby 1.9.2 Patch: Ilya Maykov bryanduxbury : http://svn.apache.org/viewvc/?view=rev&rev=1130242 Files : * /thrift/trunk/lib/rb/lib/thrift/server/nonblocking_server.rb > nonblocking_server shutdown race under Ruby 1.9 > --- > > Key: THRIFT-1187 > URL: https://issues.apache.org/jira/browse/THRIFT-1187 > Project: Thrift > Issue Type: Bug > Components: Ruby - Library >Affects Versions: 0.6.1 > Environment: OS X Darwin 10.6 i686 + Ruby 1.9.2-p180 >Reporter: Ilya Maykov >Assignee: Ilya Maykov >Priority: Minor > Fix For: 0.7 > > Attachments: patch-THRIFT-1187.txt > > > While testing some changes today I noticed that nonblocking_server tests pass > for me under Ruby 1.8.7 but fail under Ruby 1.9.2. Here are the test failures: > ... > 1) > Errno::EBADF in 'Thrift::NonblockingServer should shut down when asked' > Bad file descriptor > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:47:in > `select' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:47:in > `block in serve' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:45:in > `loop' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:45:in > `serve' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/spec/nonblocking_server_spec.rb:118:in > `block (3 levels) in ' > 2) > Errno::EBADF in 'Thrift::NonblockingServer should continue processing active > messages when shutting down' > Bad file descriptor > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:47:in > `select' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:47:in > `block in serve' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:45:in > `loop' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:45:in > `serve' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/spec/nonblocking_server_spec.rb:118:in > `block (3 levels) in ' > 3) > Errno::EBADF in 'Thrift::NonblockingServer should kill active messages when > they don't expire while shutting down' > Bad file descriptor > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:47:in > `select' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:47:in > `block in serve' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:45:in > `loop' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:45:in > `serve' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/spec/nonblocking_server_spec.rb:118:in > `block (3 levels) in ' > 4) > Errno::EBADF in 'Thrift::NonblockingServer should allow shutting down in > response to a message' > Bad file descriptor > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:47:in > `select' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:47:in > `block in serve' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:45:in > `loop' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:45:in > `serve' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/spec/nonblocking_server_spec.rb:118:in > `block (3 levels) in ' > ... > I *think* that either the behavior of select() changed between 1.8.7 and > 1.9.2, or the different threading model in 1.9.2 is tickling a timing bug. In > any case, shutting down the server causes the @server_transport socket to be > closed, which raises Errno::EBADF in the main loop inside the serve() method. > Probably not a big deal because the server is shutting down anyway, but > should be fixed so the tests pass. > Will attach patch shortly. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1190) readBufferBytesAllocated in TNonblockingServer.java should be AtomicLong to fix FD leakage and general server malfunction
[ https://issues.apache.org/jira/browse/THRIFT-1190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042318#comment-13042318 ] Hudson commented on THRIFT-1190: Integrated in Thrift #151 (See [https://builds.apache.org/hudson/job/Thrift/151/]) THRIFT-1190. java: readBufferBytesAllocated in TNonblockingServer.java should be AtomicLong to fix FD leakage and general server malfunction There was a race condition in the use of the memory limiting feature that would lead to memory loss. Patch: Tom May bryanduxbury : http://svn.apache.org/viewvc/?view=rev&rev=1130231 Files : * /thrift/trunk/lib/java/src/org/apache/thrift/server/TNonblockingServer.java > readBufferBytesAllocated in TNonblockingServer.java should be AtomicLong to > fix FD leakage and general server malfunction > - > > Key: THRIFT-1190 > URL: https://issues.apache.org/jira/browse/THRIFT-1190 > Project: Thrift > Issue Type: Bug > Components: Java - Library >Affects Versions: 0.6 > Environment: Any >Reporter: Tom May >Assignee: Tom May > Fix For: 0.7 > > Attachments: thrift.patch > > > We're having a problem using THsHaServer where the server suddenly stops > closing connections and runs out of file descriptors. > It looks like the problem is in TNonblockingServer.java. The variable "long > readBufferBytesAllocated" is shared between threads but isn't synchronized. > Intermittently, its value can get out of whack due to races and cause this if > statement to always execute: > // if this frame will push us over the memory limit, then return. > // with luck, more memory will free up the next time around. > if (readBufferBytesAllocated.get() + frameSize > > MAX_READ_BUFFER_BYTES) { > return true; > } > We started having this problem when we set MAX_READ_BUFFER_BYTES to a > somewhat small size, which unmasked the issue. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1183) Pure-ruby CompactProtocol raises ArgumentError when deserializing under Ruby 1.9
[ https://issues.apache.org/jira/browse/THRIFT-1183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042319#comment-13042319 ] Hudson commented on THRIFT-1183: Integrated in Thrift #151 (See [https://builds.apache.org/hudson/job/Thrift/151/]) THRIFT-1183. rb: Pure-ruby CompactProtocol raises ArgumentError when deserializing under Ruby 1.9 Use #ord to ensure we get back an int Patch: Ilya Maykov bryanduxbury : http://svn.apache.org/viewvc/?view=rev&rev=1130236 Files : * /thrift/trunk/lib/rb/lib/thrift/protocol/compact_protocol.rb > Pure-ruby CompactProtocol raises ArgumentError when deserializing under Ruby > 1.9 > > > Key: THRIFT-1183 > URL: https://issues.apache.org/jira/browse/THRIFT-1183 > Project: Thrift > Issue Type: Bug > Components: Ruby - Library >Affects Versions: 0.6.1 > Environment: OS X 10.6 i686 / Ruby 1.9.2 >Reporter: Ilya Maykov >Assignee: Ilya Maykov > Fix For: 0.7 > > Attachments: patch-THRIFT-1183.txt > > > While testing my fix for THRIFT-1182 with various combinations of > native/non-native ruby and binary/compact protocols, I stumbled upon a bug in > the pure-ruby implementation of CompactProtocol. > In lib/thrift/protocol/compact_protocol.rb line 306: > ... > val = dat[0] > if (val > 0x7f) > ... > Here, dat is a string, so dat[0] returns a Fixnum in Ruby 1.8.7 but a string > of size 1 in Ruby 1.9.2. The conditional compares dat[0] with 0x7f, which > raises the following error in 1.9.2: > /Users/ilyam/.rvm/gems/ruby-1.9.2-p180/gems/thrift-0.6.0/lib/thrift/protocol/compact_protocol.rb:307:in > `>': comparison of String with 127 failed (ArgumentError) > from > /Users/ilyam/.rvm/gems/ruby-1.9.2-p180/gems/thrift-0.6.0/lib/thrift/protocol/compact_protocol.rb:307:in > `read_byte' > from > /Users/ilyam/.rvm/gems/ruby-1.9.2-p180/gems/thrift-0.6.0/lib/thrift/protocol/compact_protocol.rb:243:in > `read_field_begin' > from > /Users/ilyam/.rvm/gems/ruby-1.9.2-p180/gems/thrift-0.6.0/lib/thrift/struct.rb:86:in > `block in read' > from > /Users/ilyam/.rvm/gems/ruby-1.9.2-p180/gems/thrift-0.6.0/lib/thrift/struct.rb:85:in > `loop' > from > /Users/ilyam/.rvm/gems/ruby-1.9.2-p180/gems/thrift-0.6.0/lib/thrift/struct.rb:85:in > `read' > from > /Users/ilyam/.rvm/gems/ruby-1.9.2-p180/gems/thrift-0.6.0/lib/thrift/serializer/deserializer.rb:29:in > `deserialize' > The solution is a one-line fix, patch will be attached shortly. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (THRIFT-1187) nonblocking_server shutdown race under Ruby 1.9
[ https://issues.apache.org/jira/browse/THRIFT-1187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bryan Duxbury closed THRIFT-1187. - Resolution: Fixed Fix Version/s: 0.7 Assignee: Ilya Maykov I just committed this patch. > nonblocking_server shutdown race under Ruby 1.9 > --- > > Key: THRIFT-1187 > URL: https://issues.apache.org/jira/browse/THRIFT-1187 > Project: Thrift > Issue Type: Bug > Components: Ruby - Library >Affects Versions: 0.6.1 > Environment: OS X Darwin 10.6 i686 + Ruby 1.9.2-p180 >Reporter: Ilya Maykov >Assignee: Ilya Maykov >Priority: Minor > Fix For: 0.7 > > Attachments: patch-THRIFT-1187.txt > > > While testing some changes today I noticed that nonblocking_server tests pass > for me under Ruby 1.8.7 but fail under Ruby 1.9.2. Here are the test failures: > ... > 1) > Errno::EBADF in 'Thrift::NonblockingServer should shut down when asked' > Bad file descriptor > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:47:in > `select' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:47:in > `block in serve' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:45:in > `loop' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:45:in > `serve' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/spec/nonblocking_server_spec.rb:118:in > `block (3 levels) in ' > 2) > Errno::EBADF in 'Thrift::NonblockingServer should continue processing active > messages when shutting down' > Bad file descriptor > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:47:in > `select' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:47:in > `block in serve' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:45:in > `loop' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:45:in > `serve' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/spec/nonblocking_server_spec.rb:118:in > `block (3 levels) in ' > 3) > Errno::EBADF in 'Thrift::NonblockingServer should kill active messages when > they don't expire while shutting down' > Bad file descriptor > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:47:in > `select' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:47:in > `block in serve' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:45:in > `loop' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:45:in > `serve' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/spec/nonblocking_server_spec.rb:118:in > `block (3 levels) in ' > 4) > Errno::EBADF in 'Thrift::NonblockingServer should allow shutting down in > response to a message' > Bad file descriptor > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:47:in > `select' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:47:in > `block in serve' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:45:in > `loop' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/lib/thrift/server/nonblocking_server.rb:45:in > `serve' > /Users/ilyam/src/vendor/thrift-src/thrift-0.6.1-r19/lib/rb/spec/nonblocking_server_spec.rb:118:in > `block (3 levels) in ' > ... > I *think* that either the behavior of select() changed between 1.8.7 and > 1.9.2, or the different threading model in 1.9.2 is tickling a timing bug. In > any case, shutting down the server causes the @server_transport socket to be > closed, which raises Errno::EBADF in the main loop inside the serve() method. > Probably not a big deal because the server is shutting down anyway, but > should be fixed so the tests pass. > Will attach patch shortly. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (THRIFT-1183) Pure-ruby CompactProtocol raises ArgumentError when deserializing under Ruby 1.9
[ https://issues.apache.org/jira/browse/THRIFT-1183?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bryan Duxbury closed THRIFT-1183. - Resolution: Fixed Fix Version/s: 0.7 Assignee: Ilya Maykov Ah, you're totally right. I just tested #ord in a ruby 1.8.6 irb without thinking about our extensions. I just committed this patch. > Pure-ruby CompactProtocol raises ArgumentError when deserializing under Ruby > 1.9 > > > Key: THRIFT-1183 > URL: https://issues.apache.org/jira/browse/THRIFT-1183 > Project: Thrift > Issue Type: Bug > Components: Ruby - Library >Affects Versions: 0.6.1 > Environment: OS X 10.6 i686 / Ruby 1.9.2 >Reporter: Ilya Maykov >Assignee: Ilya Maykov > Fix For: 0.7 > > Attachments: patch-THRIFT-1183.txt > > > While testing my fix for THRIFT-1182 with various combinations of > native/non-native ruby and binary/compact protocols, I stumbled upon a bug in > the pure-ruby implementation of CompactProtocol. > In lib/thrift/protocol/compact_protocol.rb line 306: > ... > val = dat[0] > if (val > 0x7f) > ... > Here, dat is a string, so dat[0] returns a Fixnum in Ruby 1.8.7 but a string > of size 1 in Ruby 1.9.2. The conditional compares dat[0] with 0x7f, which > raises the following error in 1.9.2: > /Users/ilyam/.rvm/gems/ruby-1.9.2-p180/gems/thrift-0.6.0/lib/thrift/protocol/compact_protocol.rb:307:in > `>': comparison of String with 127 failed (ArgumentError) > from > /Users/ilyam/.rvm/gems/ruby-1.9.2-p180/gems/thrift-0.6.0/lib/thrift/protocol/compact_protocol.rb:307:in > `read_byte' > from > /Users/ilyam/.rvm/gems/ruby-1.9.2-p180/gems/thrift-0.6.0/lib/thrift/protocol/compact_protocol.rb:243:in > `read_field_begin' > from > /Users/ilyam/.rvm/gems/ruby-1.9.2-p180/gems/thrift-0.6.0/lib/thrift/struct.rb:86:in > `block in read' > from > /Users/ilyam/.rvm/gems/ruby-1.9.2-p180/gems/thrift-0.6.0/lib/thrift/struct.rb:85:in > `loop' > from > /Users/ilyam/.rvm/gems/ruby-1.9.2-p180/gems/thrift-0.6.0/lib/thrift/struct.rb:85:in > `read' > from > /Users/ilyam/.rvm/gems/ruby-1.9.2-p180/gems/thrift-0.6.0/lib/thrift/serializer/deserializer.rb:29:in > `deserialize' > The solution is a one-line fix, patch will be attached shortly. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (THRIFT-1190) readBufferBytesAllocated in TNonblockingServer.java should be AtomicLong to fix FD leakage and general server malfunction
[ https://issues.apache.org/jira/browse/THRIFT-1190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bryan Duxbury closed THRIFT-1190. - Resolution: Fixed Fix Version/s: 0.7 Assignee: Tom May Nice catch! I just committed this patch. > readBufferBytesAllocated in TNonblockingServer.java should be AtomicLong to > fix FD leakage and general server malfunction > - > > Key: THRIFT-1190 > URL: https://issues.apache.org/jira/browse/THRIFT-1190 > Project: Thrift > Issue Type: Bug > Components: Java - Library >Affects Versions: 0.6 > Environment: Any >Reporter: Tom May >Assignee: Tom May > Fix For: 0.7 > > Attachments: thrift.patch > > > We're having a problem using THsHaServer where the server suddenly stops > closing connections and runs out of file descriptors. > It looks like the problem is in TNonblockingServer.java. The variable "long > readBufferBytesAllocated" is shared between threads but isn't synchronized. > Intermittently, its value can get out of whack due to races and cause this if > statement to always execute: > // if this frame will push us over the memory limit, then return. > // with luck, more memory will free up the next time around. > if (readBufferBytesAllocated.get() + frameSize > > MAX_READ_BUFFER_BYTES) { > return true; > } > We started having this problem when we set MAX_READ_BUFFER_BYTES to a > somewhat small size, which unmasked the issue. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (THRIFT-1191) Erlang binding throws during skipping fields of composite type (maps, lists, structs, sets)
Erlang binding throws during skipping fields of composite type (maps, lists, structs, sets) --- Key: THRIFT-1191 URL: https://issues.apache.org/jira/browse/THRIFT-1191 Project: Thrift Issue Type: Bug Components: Erlang - Library Reporter: Anatoly Kanivetsky Erlang binding throws during skipping fields of composite type (maps, lists, structs, sets) Here's the pull request with this fix: https://github.com/apache/thrift/pull/3 here is the patch Here's the fix only: https://github.com/chaos-ad/thrift/commit/d70576209ae01f7ae56a1afccc1210d120b0ecde -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira