[jira] [Commented] (THRIFT-3974) Using clang-3.8 and ThreadSanitizer on the concurrency_test claims bad PThread behavior

2017-03-03 Thread James E. King, III (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15895509#comment-15895509
 ] 

James E. King, III commented on THRIFT-3974:


Issue might be related to THRIFT-4106.

> Using clang-3.8 and ThreadSanitizer on the concurrency_test claims bad 
> PThread behavior
> ---
>
> Key: THRIFT-3974
> URL: https://issues.apache.org/jira/browse/THRIFT-3974
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Library
>Affects Versions: 0.9.3, 0.10.0
>Reporter: James E. King, III
>Assignee: James E. King, III
>Priority: Minor
>
> After using ThreadSanitizer to prove THRIFT-2755 is no longer present after 
> THRIFT-3932 was completed, it looks like there are some issues in the 
> PThreadThread class, specifically that the destructor calls a virtual method. 
>  ThreadSanitizer picks calls this out (many, many times).  
> The usage may be correct, but since we're not using C++11 we cannot seal the 
> class (mark it with the final keyword) which would tell ThreadSanitizer 
> nothing can inherit from the class, making that behavior safe.
> Another way to deal with this is to move the join implementation to a 
> non-virtual method and have both the dtor and join() call it.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (THRIFT-4029) Accelerated protocols do not build from thrift-py 0.10.0 on PyPI

2017-03-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15895464#comment-15895464
 ] 

ASF GitHub Bot commented on THRIFT-4029:


Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1206
  
If the build fails try using this technique to kick another if you think it 
was environmental:

git commit --amend
  don't change anything, just save.  This makes a new identical commit with 
a new hash.
git push -u origin  --force
  overwrites the previous push and kicks another build

Thanks.


> Accelerated protocols do not build from thrift-py 0.10.0 on PyPI
> 
>
> Key: THRIFT-4029
> URL: https://issues.apache.org/jira/browse/THRIFT-4029
> Project: Thrift
>  Issue Type: Bug
>  Components: Python - Library
>Affects Versions: 0.10.0
>Reporter: Chandler May
>Assignee: Jake Farrell
>
> The thrift 0.10.0 distribution on PyPI does not include extension headers and 
> a C++ (template) file, preventing the accelerated protocols from being built. 
>  {{pip install}} reports a brief error:
> {code}
> Running thrift-0.10.0/setup.py -q bdist_egg --dist-dir 
> /tmp/easy_install-bVU8VN/thrift-0.10.0/egg-dist-tmp-ghJzGL
> cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for 
> C/ObjC but not for C++
> src/ext/module.cpp:21:19: fatal error: types.h: No such file or directory
>  #include "types.h"
>^
> compilation terminated.
> ()
> 
> An error occurred while trying to compile with the C extension enabled
> Attempting to build without the extension now
> 
> ()
> {code}
> The list of files that is not included in the distribution is as follows.  In 
> addition to the headers and source file mentioned above, there's a Windows 
> compatibility header missing and a couple of test files missing.  It looks 
> like there was a file extension filter (accidentally) applied to the C++ 
> files at least:
> {code}
> src/ext/binary.h
> src/ext/compact.h
> src/ext/endian.h
> src/ext/protocol.h
> src/ext/protocol.tcc
> src/ext/types.h
> compat/win32/stdint.h
> test/_import_local_thrift.py
> test/thrift_json.py
> {code}
> [~jfarrell] were you who made the release?  Is it possible to hotfix?  My 
> team has been waiting on the release of the accelerated compact protocol for 
> a while, this discovery is saddening for us.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] thrift issue #1206: THRIFT-4029 Accelerated protocols do not build from thri...

2017-03-03 Thread jeking3
Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1206
  
If the build fails try using this technique to kick another if you think it 
was environmental:

git commit --amend
  don't change anything, just save.  This makes a new identical commit with 
a new hash.
git push -u origin  --force
  overwrites the previous push and kicks another build

Thanks.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] thrift pull request #1207: THRIFT-4031: Fix invalid Go code generation for l...

2017-03-03 Thread dcelasun
GitHub user dcelasun opened a pull request:

https://github.com/apache/thrift/pull/1207

THRIFT-4031: Fix invalid Go code generation for list of typedef'ed types

This commit reverts 12d430e723b020f7a8ce42a40c19edf88f948367 which caused 
invalid code to be generated for certain types.

See THRIFT-4031 for details.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/dcelasun/thrift master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/1207.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1207


commit c5609762b717db771985c8d3f74befda3764d180
Author: D. Can Celasun 
Date:   2017-03-03T11:03:24Z

THRIFT-4031: Fix invalid code generation for list of typedef'ed built-in 
types

This commit reverts 12d430e723b020f7a8ce42a40c19edf88f948367 which
caused invalid code to be generated for certain types.

See THRIFT-4031 for details.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (THRIFT-4031) Go plugin generates invalid code for lists of typedef'ed built-in types

2017-03-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15894165#comment-15894165
 ] 

ASF GitHub Bot commented on THRIFT-4031:


GitHub user dcelasun opened a pull request:

https://github.com/apache/thrift/pull/1207

THRIFT-4031: Fix invalid Go code generation for list of typedef'ed types

This commit reverts 12d430e723b020f7a8ce42a40c19edf88f948367 which caused 
invalid code to be generated for certain types.

See THRIFT-4031 for details.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/dcelasun/thrift master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/1207.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1207


commit c5609762b717db771985c8d3f74befda3764d180
Author: D. Can Celasun 
Date:   2017-03-03T11:03:24Z

THRIFT-4031: Fix invalid code generation for list of typedef'ed built-in 
types

This commit reverts 12d430e723b020f7a8ce42a40c19edf88f948367 which
caused invalid code to be generated for certain types.

See THRIFT-4031 for details.




> Go plugin generates invalid code for lists of typedef'ed built-in types
> ---
>
> Key: THRIFT-4031
> URL: https://issues.apache.org/jira/browse/THRIFT-4031
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Compiler
>Affects Versions: 0.10.0
> Environment: Thrift version 0.10.0
> go version go1.7.4 linux/386
>Reporter: Benoit Sigoure
>Priority: Critical
>
> Reproduction:
> {code}
> mkdir /tmp/bug
> cd /tmp/bug
> cat >test.thrift < typedef i32 foo
> struct s {
>  1:list a
> }
> EOF
> mkdir _build
> thrift -out _build --gen go:package=pkg -r test.thrift
> {code}
> Then try to compile the resulting {{go build _build/pkg/test.go}} and you'll 
> get:
> {code}
> _build/pkg/test.go:81: cannot use _elem0 (type int32) as type Foo in append
> {code}
> Here's the generated code with line numbers and a couple comments I added:
> {code}
>  67 func (p *S)  ReadField1(iprot thrift.TProtocol) error {
>  68   _, size, err := iprot.ReadListBegin()
>  69   if err != nil {
>  70 return thrift.PrependError("error reading list begin: ", err)
>  71   }
>  72   tSlice := make([]Foo, 0, size)  // The slice contain Foo values
>  73   p.A =  tSlice
>  74   for i := 0; i < size; i ++ {
>  75 var _elem0 int32
>  76 if v, err := iprot.ReadI32(); err != nil {
>  77 return thrift.PrependError("error reading field 0: ", err)
>  78 } else {
>  79 _elem0 = v
>  80 }
>  81 p.A = append(p.A, _elem0)  // Here the code should do append(p.A, 
> Foo(_elem0))
>  82   }
>  83   if err := iprot.ReadListEnd(); err != nil {
>  84 return thrift.PrependError("error reading list end: ", err)
>  85   }
>  86   return nil
>  87 }
> {code}
> This was working fine with 0.9.3 so this is a regression in 0.10.0.  With 
> 0.9.3 the slice {{tSlice}} is a {{[]int32}}, as opposed to a {{[]Foo}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Comment Edited] (THRIFT-4107) Thrift Server crashes when receiving specific bad packet

2017-03-03 Thread Yurong LIAO (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15893832#comment-15893832
 ] 

Yurong LIAO edited comment on THRIFT-4107 at 3/3/17 9:19 AM:
-

patch uploaded.

tests performed are listed below:

1. All unit test cases, by executing 'make -k check'
2. Intentionally send a packet composed of 4 bytes followed with 0 and then 
verify the server does not crash. 


was (Author: yurongliao):
test performed.
1. All unit test cases, by executing 'make -k check'
2. Intentionally send a packet composed of 4 bytes followed with 0 and then 
verify the server does not crash. 

> Thrift Server crashes when receiving specific bad packet
> 
>
> Key: THRIFT-4107
> URL: https://issues.apache.org/jira/browse/THRIFT-4107
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Library
>Affects Versions: 0.9.1, 0.9.2, 0.9.3, 0.10.0
> Environment: Ubuntu 12.04
> Thrift 0.9.1
>Reporter: Yurong LIAO
>  Labels: easyfix, easytest, security
> Attachments: THRIFT-4107.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> A server program with Thrift 0.9.1 always crash when receiving a specific 
> packet from client. It's 100% reproducible by intentionally sending a packet 
> consist of any 4 bytes followed with a 0.
> After checking the code, it is found that the crash is caused by an assert in 
> method TNonblockingServer::TConnection::workSocket() (line 494, file 
> TNonblockingServer.cpp). To prevent the crash, protection code can be add to 
> check readWant_ when receiving data from client.
> The issue was found 0.9.1 and also exists in latter versions including latest 
> code.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)