[jira] [Commented] (QPID-7368) CancelledKeyException from accepting socket during Broker shutdown

2016-10-20 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15592349#comment-15592349
 ] 

ASF subversion and git services commented on QPID-7368:
---

Commit 1765852 from oru...@apache.org in branch 'java/trunk'
[ https://svn.apache.org/r1765852 ]

QPID-7368: Wait for cancellation of accept selection key before closing the 
socket

> CancelledKeyException from accepting socket during Broker shutdown
> --
>
> Key: QPID-7368
> URL: https://issues.apache.org/jira/browse/QPID-7368
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-6.1
>
> Attachments: 0001-QPID-7368-Handle-cancelled-selected-key.patch, 
> 0001-QPID-7368-Wait-for-cancellation-of-accept-selection-.patch, 
> TEST-org.apache.qpid.transport.ProtocolNegotiationTest.testWrongProtocolHeaderSent_BrokerRespondsWithSupportedProtocol.txt
>
>
> We saw the following test failure on trunk whilst the test was shutting down 
> a Broker.
> https://builds.apache.org/view/M-R/view/Qpid/job/Qpid-Java-Java-Test-JDK1.8/lastCompletedBuild/testReport/org.apache.qpid.transport/ProtocolNegotiationTest/testWrongProtocolHeaderSent_BrokerRespondsWithSupportedProtocol/
> Thread terminated due to uncaught exception
> {noformat}
> java.nio.channels.CancelledKeyException
>   at sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:73)
>   at sun.nio.ch.SelectionKeyImpl.readyOps(SelectionKeyImpl.java:87)
>   at java.nio.channels.SelectionKey.isAcceptable(SelectionKey.java:360)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.processSelectionKeys(SelectorThread.java:167)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:305)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:87)
>   at 
> org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:462)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



Re: [Proton-c][Solaris][SunStudio-2.1] Compiling Qpid Proton-c and C++ bindings on Solaris

2016-10-20 Thread Andrew Stitcher
On Thu, 2016-10-20 at 16:23 +, Adel Boutros wrote:
> One last question: will the fixes be released in a patch (0.15.1) or
> a minor (0.16.0)?
> 

The changes have been committed to the master branch of proton so will
be part of the next release - 0.16.0.

They don't fit our usual criterea for inclusion into a point release
(in fact I doubt there will be a 0.15 point release anyway).

As we have just released 0.15 it'll probably be around 3 months until
we release 0.16.

Andrew


-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



Re: [Proton-c][Solaris][SunStudio-2.1] Compiling Qpid Proton-c and C++ bindings on Solaris

2016-10-20 Thread Adel Boutros
One last question: will the fixes be released in a patch (0.15.1) or a minor 
(0.16.0)?



On Thu, Oct 20, 2016 at 2:27 PM +0200, "Alan Conway" 
> wrote:

On Thu, 2016-10-20 at 07:27 +, Adel Boutros wrote:
>
> >>> Symbol hiding: PROTON-1316 removes symbol hiding for gcc
> completely, so that change can't go in as is. I'm sure that wasn't
> intentional, just a side effect of doing what was necessary for
> Solaris without checking properly again on Linux.
>
> This is not true, the patch is protected by "if" which will only
> execute the code for SunStudio compiler and will not affect GCC in
> any way (elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "SunPro" in
> CMakeLists.txt and elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
> in code).
>

The original patch did delete the HIDE lines in the GCC section - I'm
sure this was an accident, I restored them as intended.

> >>> This change doesn't quite address my concerns: For SunPro the
> ENABLE_HIDE_UNEXPORTED_SYMBOLS toggle is not honoured.
>
> I apologise for the error in the CMakeLists.txt. We missed the "if
> (ENABLE_HIDE_UNEXPORTED_SYMBOLS) " for the code submitted.
> @Alan
> Will you handle updating the patch here?

Done. I made the minimal change to respect the ENABLE_HIDE... flag for
solaris, I haven't re-factored the flag-setting section.

I've committed the patches,  any further improvements can be made
directly on master.

Cheers,
Alan.


Re: [Proton-c][Solaris][SunStudio-2.1] Compiling Qpid Proton-c and C++ bindings on Solaris

2016-10-20 Thread Alan Conway
On Thu, 2016-10-20 at 12:52 +, Adel Boutros wrote:
> Thanks alot Alan and Andrew for your help!!
> 
> 
> However, it seems one patch has slipped. It is about "int8_t".
> 
> 
> PROTON-1324: Interpretation of "int8_t" on Solaris using SunStudio is
> different from GCC one
> 
> https://issues.apache.org/jira/browse/PROTON-1324
> 
> 

Comitted a slightly different patch, should have the same effect on
Solaris but is a bit more general:

modified   proton-
c/bindings/cpp/include/proton/internal/type_traits.hpp
@@ -30,6 +30,7 @@
 #include "./config.hpp"
 #include "../types_fwd.hpp"
 #include "../type_id.hpp"
+#include 
 
 namespace proton {
 namespace internal {
@@ -47,7 +48,7 @@ template  struct is_integral : public
false_type {};
 template  struct is_signed : public false_type {};
 
 template <> struct is_integral : public true_type {};
-template <> struct is_signed : public false_type {};
+template <> struct is_signed { static const bool value =
std::numeric_limits::is_signed; };
 
 template <> struct is_integral : public true_type {};
 template <> struct is_integral : public true_type {};

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1324) Interpretation of "int8_t" on Solaris using SunStudio is different from GCC one

2016-10-20 Thread Andrew Stitcher (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1559#comment-1559
 ] 

Andrew Stitcher commented on PROTON-1324:
-

Ignore this comment - Alan's fix takes all this into account.

> Interpretation of "int8_t" on Solaris using SunStudio is different from GCC 
> one
> ---
>
> Key: PROTON-1324
> URL: https://issues.apache.org/jira/browse/PROTON-1324
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: cpp-binding
>Reporter: Adel Boutros
>Assignee: Cliff Jansen
> Attachments: 0010-SunStudio-Fix-the-interpretation-of-int8_t.patch
>
>
> Looking at the standard, there are actually 3 ways to define a char:
> * char
> * signed char
> * unsigned char
> There are no specificatoins regarding what "char" will be interperted as 
> either "signed char" or "unsigned char". This is left to the OS/Compiler to 
> choose.
> Solaris: int8_t --> char
> Linux: int8_t --> signed char
> You can check here: http://en.cppreference.com/w/cpp/language/types
> {quote}
> char - type for character representation which can be most efficiently 
> processed on the target system (has the same representation and alignment as 
> either signed char or unsigned char, but is always a distinct type). 
> Multibyte characters strings use this type to represent code units.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-7447) Java Broker tuning improvements for v6.1 release

2016-10-20 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15592224#comment-15592224
 ] 

ASF subversion and git services commented on QPID-7447:
---

Commit 1765843 from [~godfrer] in branch 'java/trunk'
[ https://svn.apache.org/r1765843 ]

QPID-7447 : Address review comments

> Java Broker tuning improvements for v6.1 release
> 
>
> Key: QPID-7447
> URL: https://issues.apache.org/jira/browse/QPID-7447
> Project: Qpid
>  Issue Type: Improvement
>  Components: Java Broker
>Reporter: Keith Wall
>Assignee: Keith Wall
> Fix For: qpid-java-6.1
>
>
> Java Broker tuning improvements for v6.1 release



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1324) Interpretation of "int8_t" on Solaris using SunStudio is different from GCC one

2016-10-20 Thread Andrew Stitcher (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15592219#comment-15592219
 ] 

Andrew Stitcher commented on PROTON-1324:
-

This has nothing to do with the type int8_t. I'm not sure why you even mention 
it.
It is entirely true that whether char is signed or not is not language defined.

However I think this test is wrong (as is the original code unfortunately).
gcc actually has a compiler flag which overrides the default char being signed 
and I'm pretty sure SunPro does too.
So the original code is wrong beacuse it has no way to know what this flags 
setting is.

(For gcc the flag is "-funsigned-char")

In terms of actually fixing this bug I'd strongly suggest using the Sunpro 
equivalent of "-fsigned-char". instead of the conditional compile.

> Interpretation of "int8_t" on Solaris using SunStudio is different from GCC 
> one
> ---
>
> Key: PROTON-1324
> URL: https://issues.apache.org/jira/browse/PROTON-1324
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: cpp-binding
>Reporter: Adel Boutros
>Assignee: Cliff Jansen
> Attachments: 0010-SunStudio-Fix-the-interpretation-of-int8_t.patch
>
>
> Looking at the standard, there are actually 3 ways to define a char:
> * char
> * signed char
> * unsigned char
> There are no specificatoins regarding what "char" will be interperted as 
> either "signed char" or "unsigned char". This is left to the OS/Compiler to 
> choose.
> Solaris: int8_t --> char
> Linux: int8_t --> signed char
> You can check here: http://en.cppreference.com/w/cpp/language/types
> {quote}
> char - type for character representation which can be most efficiently 
> processed on the target system (has the same representation and alignment as 
> either signed char or unsigned char, but is always a distinct type). 
> Multibyte characters strings use this type to represent code units.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1324) Interpretation of "int8_t" on Solaris using SunStudio is different from GCC one

2016-10-20 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15592216#comment-15592216
 ] 

ASF subversion and git services commented on PROTON-1324:
-

Commit a1f0dd167563bd9643c7d06419da11244d119752 in qpid-proton's branch 
refs/heads/master from [~aconway]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=a1f0dd1 ]

PROTON-1324: c++ correct implementation of proton::is_signed

This uses std::numeric_limits to get the platform setting, which works on
C++03 and should be portable.


> Interpretation of "int8_t" on Solaris using SunStudio is different from GCC 
> one
> ---
>
> Key: PROTON-1324
> URL: https://issues.apache.org/jira/browse/PROTON-1324
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: cpp-binding
>Reporter: Adel Boutros
>Assignee: Cliff Jansen
> Attachments: 0010-SunStudio-Fix-the-interpretation-of-int8_t.patch
>
>
> Looking at the standard, there are actually 3 ways to define a char:
> * char
> * signed char
> * unsigned char
> There are no specificatoins regarding what "char" will be interperted as 
> either "signed char" or "unsigned char". This is left to the OS/Compiler to 
> choose.
> Solaris: int8_t --> char
> Linux: int8_t --> signed char
> You can check here: http://en.cppreference.com/w/cpp/language/types
> {quote}
> char - type for character representation which can be most efficiently 
> processed on the target system (has the same representation and alignment as 
> either signed char or unsigned char, but is always a distinct type). 
> Multibyte characters strings use this type to represent code units.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Updated] (QPID-7368) CancelledKeyException from accepting socket during Broker shutdown

2016-10-20 Thread Alex Rudyy (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-7368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alex Rudyy updated QPID-7368:
-
Attachment: 0001-QPID-7368-Wait-for-cancellation-of-accept-selection-.patch

> CancelledKeyException from accepting socket during Broker shutdown
> --
>
> Key: QPID-7368
> URL: https://issues.apache.org/jira/browse/QPID-7368
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-6.1
>
> Attachments: 0001-QPID-7368-Handle-cancelled-selected-key.patch, 
> 0001-QPID-7368-Wait-for-cancellation-of-accept-selection-.patch, 
> TEST-org.apache.qpid.transport.ProtocolNegotiationTest.testWrongProtocolHeaderSent_BrokerRespondsWithSupportedProtocol.txt
>
>
> We saw the following test failure on trunk whilst the test was shutting down 
> a Broker.
> https://builds.apache.org/view/M-R/view/Qpid/job/Qpid-Java-Java-Test-JDK1.8/lastCompletedBuild/testReport/org.apache.qpid.transport/ProtocolNegotiationTest/testWrongProtocolHeaderSent_BrokerRespondsWithSupportedProtocol/
> Thread terminated due to uncaught exception
> {noformat}
> java.nio.channels.CancelledKeyException
>   at sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:73)
>   at sun.nio.ch.SelectionKeyImpl.readyOps(SelectionKeyImpl.java:87)
>   at java.nio.channels.SelectionKey.isAcceptable(SelectionKey.java:360)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.processSelectionKeys(SelectorThread.java:167)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:305)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:87)
>   at 
> org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:462)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Updated] (QPID-7465) [Java Broker] Stop ServerEncoder from unnecessarily allocating ByteBuffers

2016-10-20 Thread Lorenz Quack (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-7465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lorenz Quack updated QPID-7465:
---
Assignee: (was: Lorenz Quack)

> [Java Broker] Stop ServerEncoder from unnecessarily allocating ByteBuffers
> --
>
> Key: QPID-7465
> URL: https://issues.apache.org/jira/browse/QPID-7465
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Lorenz Quack
> Attachments: QPID-7465.diff, QPID-7465_v2.diff, QPID-7465_v2.diff
>
>
> As reported by [this email 
> thread|http://qpid.2158936.n2.nabble.com/java-broker-6-0-2-OOM-tp7651831.html]
>  the broker can currently run out of direct memory without flow-to-disk ever 
> kicking in.
> A defect in {{SeverEncoder#init()}} means that we allocate a new 8 kB direct 
> bytebuffer everytime it is called (i.e. on every AMQP 0-10 method or 
> command). This is wasteful and in some cases the GC does not collect these 
> direct byte buffers fast enough leading to the OOM.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Updated] (QPID-7465) [Java Broker] Stop ServerEncoder from unnecessarily allocating ByteBuffers

2016-10-20 Thread Lorenz Quack (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-7465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lorenz Quack updated QPID-7465:
---
Status: Reviewable  (was: In Progress)

> [Java Broker] Stop ServerEncoder from unnecessarily allocating ByteBuffers
> --
>
> Key: QPID-7465
> URL: https://issues.apache.org/jira/browse/QPID-7465
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Lorenz Quack
>Assignee: Lorenz Quack
> Attachments: QPID-7465.diff, QPID-7465_v2.diff, QPID-7465_v2.diff
>
>
> As reported by [this email 
> thread|http://qpid.2158936.n2.nabble.com/java-broker-6-0-2-OOM-tp7651831.html]
>  the broker can currently run out of direct memory without flow-to-disk ever 
> kicking in.
> A defect in {{SeverEncoder#init()}} means that we allocate a new 8 kB direct 
> bytebuffer everytime it is called (i.e. on every AMQP 0-10 method or 
> command). This is wasteful and in some cases the GC does not collect these 
> direct byte buffers fast enough leading to the OOM.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Assigned] (QPID-7465) [Java Broker] Stop ServerEncoder from unnecessarily allocating ByteBuffers

2016-10-20 Thread Lorenz Quack (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-7465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lorenz Quack reassigned QPID-7465:
--

Assignee: Lorenz Quack

> [Java Broker] Stop ServerEncoder from unnecessarily allocating ByteBuffers
> --
>
> Key: QPID-7465
> URL: https://issues.apache.org/jira/browse/QPID-7465
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Lorenz Quack
>Assignee: Lorenz Quack
> Attachments: QPID-7465.diff, QPID-7465_v2.diff, QPID-7465_v2.diff
>
>
> As reported by [this email 
> thread|http://qpid.2158936.n2.nabble.com/java-broker-6-0-2-OOM-tp7651831.html]
>  the broker can currently run out of direct memory without flow-to-disk ever 
> kicking in.
> A defect in {{SeverEncoder#init()}} means that we allocate a new 8 kB direct 
> bytebuffer everytime it is called (i.e. on every AMQP 0-10 method or 
> command). This is wasteful and in some cases the GC does not collect these 
> direct byte buffers fast enough leading to the OOM.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-7465) [Java Broker] Stop ServerEncoder from unnecessarily allocating ByteBuffers

2016-10-20 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15592071#comment-15592071
 ] 

ASF subversion and git services commented on QPID-7465:
---

Commit 1765828 from [~lorenz.quack] in branch 'java/trunk'
[ https://svn.apache.org/r1765828 ]

QPID-7465: [Java Broker] Free memory in MessageMetaData_0_10 when it is no 
longer needed

> [Java Broker] Stop ServerEncoder from unnecessarily allocating ByteBuffers
> --
>
> Key: QPID-7465
> URL: https://issues.apache.org/jira/browse/QPID-7465
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Lorenz Quack
> Attachments: QPID-7465.diff, QPID-7465_v2.diff, QPID-7465_v2.diff
>
>
> As reported by [this email 
> thread|http://qpid.2158936.n2.nabble.com/java-broker-6-0-2-OOM-tp7651831.html]
>  the broker can currently run out of direct memory without flow-to-disk ever 
> kicking in.
> A defect in {{SeverEncoder#init()}} means that we allocate a new 8 kB direct 
> bytebuffer everytime it is called (i.e. on every AMQP 0-10 method or 
> command). This is wasteful and in some cases the GC does not collect these 
> direct byte buffers fast enough leading to the OOM.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-7368) CancelledKeyException from accepting socket during Broker shutdown

2016-10-20 Thread Alex Rudyy (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15591858#comment-15591858
 ] 

Alex Rudyy commented on QPID-7368:
--

I looked through our IO layer implementation and came to conclusion that 
canceling of  SelectionKey for client SocketChannel from NonBlockingConnection 
as part of NonBlockingConnection#shudown() invoked from 
NonBlockingConnection#doWork() cannot cause the reported issue (as Lorenz 
suggested): NonBlockingConnection#doWork() is invoked after registering of 0 
interest on a selector; as result, no SlectionKey can be returned from 
Selector#selectedKeys() for closing NonBlockingConnection. It seems that 
Selector#selectedKeys() returned SelectionKey for the ServerSocketChannel which 
was canceled as part of invocation of ServerSocket#close() in result of 
NonBlockingNetworkTransport#close() on AmqpPort close. I think that Keith's 
suggestion to deregister  OP_ACCEPT interest from the accepting socket channel 
before closing the socket should fix the issue.


> CancelledKeyException from accepting socket during Broker shutdown
> --
>
> Key: QPID-7368
> URL: https://issues.apache.org/jira/browse/QPID-7368
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-6.1
>
> Attachments: 0001-QPID-7368-Handle-cancelled-selected-key.patch, 
> TEST-org.apache.qpid.transport.ProtocolNegotiationTest.testWrongProtocolHeaderSent_BrokerRespondsWithSupportedProtocol.txt
>
>
> We saw the following test failure on trunk whilst the test was shutting down 
> a Broker.
> https://builds.apache.org/view/M-R/view/Qpid/job/Qpid-Java-Java-Test-JDK1.8/lastCompletedBuild/testReport/org.apache.qpid.transport/ProtocolNegotiationTest/testWrongProtocolHeaderSent_BrokerRespondsWithSupportedProtocol/
> Thread terminated due to uncaught exception
> {noformat}
> java.nio.channels.CancelledKeyException
>   at sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:73)
>   at sun.nio.ch.SelectionKeyImpl.readyOps(SelectionKeyImpl.java:87)
>   at java.nio.channels.SelectionKey.isAcceptable(SelectionKey.java:360)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.processSelectionKeys(SelectorThread.java:167)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:305)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:87)
>   at 
> org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:462)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Created] (PROTON-1330) Include the C sources in the python source distribution

2016-10-20 Thread Ken Giusti (JIRA)
Ken Giusti created PROTON-1330:
--

 Summary: Include the C sources in the python source distribution
 Key: PROTON-1330
 URL: https://issues.apache.org/jira/browse/PROTON-1330
 Project: Qpid Proton
  Issue Type: Bug
  Components: python-binding
Affects Versions: 0.15.0
Reporter: Ken Giusti
Assignee: Ken Giusti
Priority: Blocker
 Fix For: 0.16.0


setup.py in the python bindings will download the proton-c sources from the 
apache dist url if proton is not installed.

The source tarballs hosted at apache dist may be deleted at any time by apache 
infrastructure maintainers.  This will lead to failures when installing python 
via setup.py (as is done via pip for the pypi packages).

We should modify the cmake build of the python bindings to package up the 
necessary proton-c source files for inclusion in the python bindings package.  
Instead of fetching the necessary sources from apache, setup.py can simply 
build and install the proton library using the bundled sources.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



Re: [Proton-c][Solaris][SunStudio-2.1] Compiling Qpid Proton-c and C++ bindings on Solaris

2016-10-20 Thread Adel Boutros
Thanks alot Alan and Andrew for your help!!


However, it seems one patch has slipped. It is about "int8_t".


PROTON-1324: Interpretation of "int8_t" on Solaris using SunStudio is different 
from GCC one

https://issues.apache.org/jira/browse/PROTON-1324


Regards,

Adel


From: Alan Conway 
Sent: Thursday, October 20, 2016 2:27:10 PM
To: Adel Boutros; Andrew Stitcher; dev
Cc: rabih.prom...@gmail.com
Subject: Re: [Proton-c][Solaris][SunStudio-2.1] Compiling Qpid Proton-c and C++ 
bindings on Solaris

On Thu, 2016-10-20 at 07:27 +, Adel Boutros wrote:
>
> >>> Symbol hiding: PROTON-1316 removes symbol hiding for gcc
> completely, so that change can't go in as is. I'm sure that wasn't
> intentional, just a side effect of doing what was necessary for
> Solaris without checking properly again on Linux.
>
> This is not true, the patch is protected by "if" which will only
> execute the code for SunStudio compiler and will not affect GCC in
> any way (elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "SunPro" in
> CMakeLists.txt and elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
> in code).
>

The original patch did delete the HIDE lines in the GCC section - I'm
sure this was an accident, I restored them as intended.

> >>> This change doesn't quite address my concerns: For SunPro the
> ENABLE_HIDE_UNEXPORTED_SYMBOLS toggle is not honoured.
>
> I apologise for the error in the CMakeLists.txt. We missed the "if
> (ENABLE_HIDE_UNEXPORTED_SYMBOLS) " for the code submitted.
> @Alan
> Will you handle updating the patch here?

Done. I made the minimal change to respect the ENABLE_HIDE... flag for
solaris, I haven't re-factored the flag-setting section.

I've committed the patches,  any further improvements can be made
directly on master.

Cheers,
Alan.


Re: [Proton-c][Solaris][SunStudio-2.1] Compiling Qpid Proton-c and C++ bindings on Solaris

2016-10-20 Thread Alan Conway
On Thu, 2016-10-20 at 07:27 +, Adel Boutros wrote:
> 
> >>> Symbol hiding: PROTON-1316 removes symbol hiding for gcc
> completely, so that change can't go in as is. I'm sure that wasn't
> intentional, just a side effect of doing what was necessary for
> Solaris without checking properly again on Linux.
> 
> This is not true, the patch is protected by "if" which will only
> execute the code for SunStudio compiler and will not affect GCC in
> any way (elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "SunPro" in
> CMakeLists.txt and elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
> in code).
> 

The original patch did delete the HIDE lines in the GCC section - I'm
sure this was an accident, I restored them as intended.

> >>> This change doesn't quite address my concerns: For SunPro the
> ENABLE_HIDE_UNEXPORTED_SYMBOLS toggle is not honoured.
> 
> I apologise for the error in the CMakeLists.txt. We missed the "if
> (ENABLE_HIDE_UNEXPORTED_SYMBOLS) " for the code submitted.
> @Alan
> Will you handle updating the patch here?

Done. I made the minimal change to respect the ENABLE_HIDE... flag for
solaris, I haven't re-factored the flag-setting section.

I've committed the patches,  any further improvements can be made
directly on master.

Cheers,
Alan.

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1314) Fixing SIGPIPE ignore on Solaris OS

2016-10-20 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15591678#comment-15591678
 ] 

ASF subversion and git services commented on PROTON-1314:
-

Commit 3dd7be374d0eb69dc9cf70e793de11bd765050a3 in qpid-proton's branch 
refs/heads/master from aboutros
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=3dd7be3 ]

PROTON-1314: Fixing SIGPIPE ignore on Solaris OS

Signed-off-by: aboutros 


> Fixing SIGPIPE ignore on Solaris OS
> ---
>
> Key: PROTON-1314
> URL: https://issues.apache.org/jira/browse/PROTON-1314
> Project: Qpid Proton
>  Issue Type: Improvement
>  Components: proton-c
>Reporter: Adel Boutros
> Attachments: 0001-Fixing-SIGPIPE-ignore-on-Solaris-OS.patch
>
>
> Fixing SIGPIPE ignore on Solaris OS



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1319) [SunStudio] Move internal header files of cpp bindings from src to their own directory

2016-10-20 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15591683#comment-15591683
 ] 

ASF subversion and git services commented on PROTON-1319:
-

Commit 8c3aa3a5155432b5a94ff830481f0663caddce89 in qpid-proton's branch 
refs/heads/master from aboutros
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=8c3aa3a ]

PROTON-1319: C++ SunStudo: Move internal header files of cpp bindings

Sun compiler searches all include paths to build template-DB, creates problems
if from src files are in the path.

Signed-off-by: aboutros 


> [SunStudio] Move internal header files of cpp bindings from src to their own 
> directory
> --
>
> Key: PROTON-1319
> URL: https://issues.apache.org/jira/browse/PROTON-1319
> Project: Qpid Proton
>  Issue Type: Improvement
>  Components: cpp-binding
>Reporter: Adel Boutros
>Assignee: Cliff Jansen
> Attachments: 
> 0006-Move-internal-header-files-of-cpp-bindings-from-src-.patch
>
>
> SunStudio adds all files mentioned in the include directories of CMake even 
> the CPP files. So we end up with the same methods defined multiple times



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1317) Add template parameter because SunStudio 12.1 doesn't handle templated method signature detection when using an "extern c" parameter

2016-10-20 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15591681#comment-15591681
 ] 

ASF subversion and git services commented on PROTON-1317:
-

Commit 1a20faa3910ecef380b47f560047eec576362ffa in qpid-proton's branch 
refs/heads/master from aboutros
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=1a20faa ]

PROTON-1317: c++ SunStudio: Add template parameter

SunStudio 12.1 doesn't handle templated method signature detection when using an
"extern c" parameter

Signed-off-by: aboutros 


> Add template parameter because SunStudio 12.1 doesn't handle templated method 
> signature detection when using an "extern c" parameter
> 
>
> Key: PROTON-1317
> URL: https://issues.apache.org/jira/browse/PROTON-1317
> Project: Qpid Proton
>  Issue Type: Improvement
>  Components: cpp-binding
>Reporter: Adel Boutros
>Assignee: Cliff Jansen
> Attachments: 
> 0004-Add-template-parameter-because-SunStudio-12.1-doesn-.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1322) Fix Sunstudio unable to find templated method when parameter can be constructed by an intermediate class (proton::scalar --> proton::value)

2016-10-20 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15591687#comment-15591687
 ] 

ASF subversion and git services commented on PROTON-1322:
-

Commit d280f8fad07a8c38e05dc2009fd4ee7d1682a56b in qpid-proton's branch 
refs/heads/master from aboutros
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=d280f8f ]

PROTON-1322: c++ Sunstudio: unable to find templated method

Sunstudio can't find templated method when parameter can be constructed by an
intermediate class (proton::scalar --> proton::value)

Signed-off-by: aboutros 


> Fix Sunstudio unable to find templated method when parameter can be 
> constructed by an intermediate class (proton::scalar --> proton::value)
> ---
>
> Key: PROTON-1322
> URL: https://issues.apache.org/jira/browse/PROTON-1322
> Project: Qpid Proton
>  Issue Type: Improvement
>  Components: cpp-binding
>Reporter: Adel Boutros
>Assignee: Cliff Jansen
> Attachments: 
> 0009-Fix-Sunstudio-unable-to-find-templated-method-when-p.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1316) Add a way to set visibility of exportable symbols on Solaris

2016-10-20 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15591680#comment-15591680
 ] 

ASF subversion and git services commented on PROTON-1316:
-

Commit dae0c55acffc77f23c548f4d23b6dc166c388ac1 in qpid-proton's branch 
refs/heads/master from aboutros
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=dae0c55 ]

PROTON-1316 Set visibility of exportable symbols on Solaris

Signed-off-by: aboutros 


> Add a way to set visibility of exportable symbols on Solaris
> 
>
> Key: PROTON-1316
> URL: https://issues.apache.org/jira/browse/PROTON-1316
> Project: Qpid Proton
>  Issue Type: Improvement
>  Components: proton-c
>Reporter: Adel Boutros
> Attachments: 
> 0003-Add-a-way-to-set-visibility-of-exportable-symbols.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1312) BlockingConnection leaks Proton-C memory

2016-10-20 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15591686#comment-15591686
 ] 

ASF subversion and git services commented on PROTON-1312:
-

Commit af17dead2e31364d6741833c2884f83ae78663f8 in qpid-proton's branch 
refs/heads/master from aboutros
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=af17dea ]

PROTON-1312: c++ Sunstudio does not compile "++vector.begin()"

Error message:"Operand for operator "++" must be an lvalue.". We used a local
variable to bypass that.

Signed-off-by: aboutros 


> BlockingConnection leaks Proton-C memory
> 
>
> Key: PROTON-1312
> URL: https://issues.apache.org/jira/browse/PROTON-1312
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: python-binding
>Affects Versions: 0.9, 0.15.0
>Reporter: Cliff Jansen
> Attachments: ml8.py
>
>
> The attached program leaks the underlying connection (the C proton
> object) associated with the BlockingConnection on each loop iteration
> on proton 0.9 as used by Satellite.  Without the receiver, it cleans
> up fine.
> On master, the program leaks both the reactor and the connection
> associated with the BlockingConnection for each loop.  The receiver
> creation can be commented out and it still leaks both objects.
> Other objects may leak too (presumably session), but I have not
> examined further.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1320) Add namespace prefix to srand and rand

2016-10-20 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15591685#comment-15591685
 ] 

ASF subversion and git services commented on PROTON-1320:
-

Commit cca892e6c7b88d0cd65aa3c1074fd4570f28d881 in qpid-proton's branch 
refs/heads/master from aboutros
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=cca892e ]

PROTON-1320: c++ Add std:: namespace prefix to srand and rand

Signed-off-by: aboutros 


> Add namespace prefix to srand and rand
> --
>
> Key: PROTON-1320
> URL: https://issues.apache.org/jira/browse/PROTON-1320
> Project: Qpid Proton
>  Issue Type: Improvement
>  Components: cpp-binding
>Reporter: Adel Boutros
>Assignee: Cliff Jansen
> Attachments: 0007-Add-namespace-prefix-to-srand-and-rand.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1318) Replace variadic constructror of "sfinae::wildcard" with template for SunStudio

2016-10-20 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15591682#comment-15591682
 ] 

ASF subversion and git services commented on PROTON-1318:
-

Commit 795278665fc90b96ec1091e878972b9112f91569 in qpid-proton's branch 
refs/heads/master from aboutros
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=7952786 ]

PROTON-1318: c++ SunStudio: Replace variadic constructor

Variadic constructor of "sfinae::wildcard" not supported on SunStudio.

Signed-off-by: aboutros 


> Replace variadic constructror of "sfinae::wildcard" with template for 
> SunStudio
> ---
>
> Key: PROTON-1318
> URL: https://issues.apache.org/jira/browse/PROTON-1318
> Project: Qpid Proton
>  Issue Type: Improvement
>  Components: cpp-binding
>Reporter: Adel Boutros
>Assignee: Cliff Jansen
> Attachments: 
> 0005-Replace-variadic-constructror-of-sfinae-wildcard-wit.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1315) Force compilation in multi-threading mode for Solaris SunStudio

2016-10-20 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15591679#comment-15591679
 ] 

ASF subversion and git services commented on PROTON-1315:
-

Commit 68f64e0fbcec30b05324d46550591b0a5846f280 in qpid-proton's branch 
refs/heads/master from aboutros
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=68f64e0 ]

PROTON-1315: Force compilation in multi-threading mode for Solaris SunStudio

Signed-off-by: aboutros 


> Force compilation in multi-threading mode for Solaris SunStudio
> ---
>
> Key: PROTON-1315
> URL: https://issues.apache.org/jira/browse/PROTON-1315
> Project: Qpid Proton
>  Issue Type: Improvement
>  Components: proton-c
>Reporter: Adel Boutros
> Attachments: 
> 0002-Force-compilation-in-multi-threading-mode-for-Solari.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Updated] (QPID-7368) CancelledKeyException from accepting socket during Broker shutdown

2016-10-20 Thread Alex Rudyy (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-7368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alex Rudyy updated QPID-7368:
-
Attachment: 0001-QPID-7368-Handle-cancelled-selected-key.patch

> CancelledKeyException from accepting socket during Broker shutdown
> --
>
> Key: QPID-7368
> URL: https://issues.apache.org/jira/browse/QPID-7368
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-6.1
>
> Attachments: 0001-QPID-7368-Handle-cancelled-selected-key.patch, 
> TEST-org.apache.qpid.transport.ProtocolNegotiationTest.testWrongProtocolHeaderSent_BrokerRespondsWithSupportedProtocol.txt
>
>
> We saw the following test failure on trunk whilst the test was shutting down 
> a Broker.
> https://builds.apache.org/view/M-R/view/Qpid/job/Qpid-Java-Java-Test-JDK1.8/lastCompletedBuild/testReport/org.apache.qpid.transport/ProtocolNegotiationTest/testWrongProtocolHeaderSent_BrokerRespondsWithSupportedProtocol/
> Thread terminated due to uncaught exception
> {noformat}
> java.nio.channels.CancelledKeyException
>   at sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:73)
>   at sun.nio.ch.SelectionKeyImpl.readyOps(SelectionKeyImpl.java:87)
>   at java.nio.channels.SelectionKey.isAcceptable(SelectionKey.java:360)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.processSelectionKeys(SelectorThread.java:167)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:305)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:87)
>   at 
> org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:462)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



Re: [Proton-c][Solaris][SunStudio-2.1] Compiling Qpid Proton-c and C++ bindings on Solaris

2016-10-20 Thread Adel Boutros

Hello Andrew,


Before I reply to your comments, I would like to clarify that although the 
patches seem easy and minor, it took us (Rabih and myself) 2 weeks full time to 
find the root causes of the issues, prepare a clean patch which will be 
accepted by the community and has no side effects. This is because we have no 
expertise on the Proton code and the errors were not straightforward.


>>> Solaris should have SO_NOSIGPIPE, so the new code in PROTON-1314 should not 
>>> be needed (although there's nothing wrong with the code as far as I can 
>>> see).


Apologies for not mentioning it, but we are using SunOs (x86 and sparc) which 
are not BSD OS. If you google about SO_NOSIGPIPE and sunos (or even Solaris), 
you will find a lot of articles mentioning this issue.  Also doing a quick grep 
will show this signal is not supported.


[host] / # man getsockopt | grep SO_NOSIGPIPE
Reformatting page.  Please Wait... done
[host] / # man signal | grep SIGPIPE
Reformatting page.  Please Wait... done
[host] / #

>>> Symbol hiding: PROTON-1316 removes symbol hiding for gcc completely, so 
>>> that change can't go in as is. I'm sure that wasn't intentional, just a 
>>> side effect of doing what was necessary for Solaris without checking 
>>> properly again on Linux.

This is not true, the patch is protected by "if" which will only execute the 
code for SunStudio compiler and will not affect GCC in any way (elseif 
(${CMAKE_CXX_COMPILER_ID} STREQUAL "SunPro" in CMakeLists.txt and elif 
defined(__SUNPRO_C) || defined(__SUNPRO_CC) in code).

>>> This change doesn't quite address my concerns: For SunPro the 
>>> ENABLE_HIDE_UNEXPORTED_SYMBOLS toggle is not honoured.

I apologise for the error in the CMakeLists.txt. We missed the "if 
(ENABLE_HIDE_UNEXPORTED_SYMBOLS) " for the code submitted.
@Alan
Will you handle updating the patch here?

Just a bit of context for this issue (You can correct me if I said something 
wrong):

When we asked on the mailing list, we were told there are 2 parts here: The 1st 
is setting export of symbols to hidden by default (implemented in 
CMakeLists.txt) and the 2nd part is explicitly exporting symbols (implemented 
in the code)

Hide Symbols
--
GCC: "-fvisibility=hidden": This causes all inlined class member functions to 
have hidden visibility (https://gcc.gnu.org/wiki/Visibility)

SunStudio: "-xldscope=hidden": Hidden scope is easiest to describe as it just 
means that the symbol can only be seen within the module and is not exported 
for applications or libraries to 
use(https://blogs.oracle.com/d/entry/using_symbol_scoping_libraries_and)


Export Symbols explicitly

--

GCC: "__attribute ((visibility ("default")))" : In your header files, wherever 
you want an interface or API made public outside the current DSO 
(https://gcc.gnu.org/wiki/Visibility)


SunStudio: "define PN_CPP_EXPORT __global" __declspec(dllimport) is equivalent 
to __global (https://docs.oracle.com/cd/E24457_01/html/E21991/bkaee.html)


Regards,

Adel


From: Andrew Stitcher 
Sent: Thursday, October 20, 2016 12:45:14 AM
To: Alan Conway; Adel Boutros; dev
Cc: rabih.prom...@gmail.com
Subject: Re: [Proton-c][Solaris][SunStudio-2.1] Compiling Qpid Proton-c and C++ 
bindings on Solaris

On Wed, 2016-10-19 at 17:30 -0400, Alan Conway wrote:
> On Tue, 2016-10-18 at 13:24 -0400, Alan Conway wrote:
> >
> > Hi Adel,
> >
> > I've got your Solaris fixes and my (minor) changes up on
> >  https://github.com/alanconway/qpid-proton/tree/absolaris
[https://avatars3.githubusercontent.com/u/7780958?v=3=400]

alanconway/qpid-proton
github.com
qpid-proton - Mirror of Apache Qpid Proton



> >
> > I'd like Andrew to take a look (he's back tomorrow), unless he has
> > anything to add I'll commit them.
>
> I think I've addressed all Andrew's comments on the github branch,
> will
> wait for one more go-round from him.

I'm happy except for PROTON-1316. I've made a comment on the new github
branch.

Andrew