You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by mtaylor <gi...@git.apache.org> on 2017/08/17 13:42:14 UTC

[GitHub] activemq-artemis pull request #1468: ARTEMIS-1354 Critical IO Error on AIO w...

GitHub user mtaylor opened a pull request:

    https://github.com/apache/activemq-artemis/pull/1468

    ARTEMIS-1354 Critical IO Error on AIO write failure

    

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

    $ git pull https://github.com/mtaylor/activemq-artemis ARTEMIS-1354

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

    https://github.com/apache/activemq-artemis/pull/1468.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 #1468
    
----
commit 26eb07746afd5fac8ddd93a47948bee58a294563
Author: Martyn Taylor <mt...@redhat.com>
Date:   2017-08-17T13:41:49Z

    ARTEMIS-1354 Critical IO Error on AIO write failure

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #1468: ARTEMIS-1354 Critical IO Error on AIO w...

Posted by mtaylor <gi...@git.apache.org>.
Github user mtaylor commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1468#discussion_r133750467
  
    --- Diff: artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFileFactory.java ---
    @@ -304,7 +304,7 @@ public void run() {
              try {
                 libaioFile.write(position, bytes, buffer, this);
              } catch (IOException e) {
    -            callback.onError(-1, e.getMessage());
    --- End diff --
    
    OK fair enough.  I will update accordingly.  Thanks for taking a look.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #1468: ARTEMIS-1354 Critical IO Error on AIO w...

Posted by mtaylor <gi...@git.apache.org>.
Github user mtaylor commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1468#discussion_r133750815
  
    --- Diff: artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFileFactory.java ---
    @@ -304,7 +304,7 @@ public void run() {
              try {
                 libaioFile.write(position, bytes, buffer, this);
              } catch (IOException e) {
    -            callback.onError(-1, e.getMessage());
    --- End diff --
    
    NIO should be fixed separately,  I don't want to include change here, since the JIRA is specifically about the bug.  NIO change is an enhancement.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis issue #1468: ARTEMIS-1354 Critical IO Error on AIO write fa...

Posted by mtaylor <gi...@git.apache.org>.
Github user mtaylor commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1468
  
    @clebertsuconic Note that with this code change I could no longer reproduce the shared store issue described above.



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #1468: ARTEMIS-1354 Critical IO Error on AIO w...

Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1468#discussion_r133722903
  
    --- Diff: artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFileFactory.java ---
    @@ -304,7 +304,7 @@ public void run() {
              try {
                 libaioFile.write(position, bytes, buffer, this);
              } catch (IOException e) {
    -            callback.onError(-1, e.getMessage());
    --- End diff --
    
    hmmm.. nice catch...
    
    I though other things would catch the failures..
    
    
    The proper fix should been:
    
    ```
                callback.onError(-1, errorMessage);
                onIOError(e, "Failed to write to file", sequentialFile);
    ```


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #1468: ARTEMIS-1354 Critical IO Error on AIO w...

Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1468#discussion_r133722980
  
    --- Diff: artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFileFactory.java ---
    @@ -304,7 +304,7 @@ public void run() {
              try {
                 libaioFile.write(position, bytes, buffer, this);
              } catch (IOException e) {
    -            callback.onError(-1, e.getMessage());
    --- End diff --
    
    basically calling callbackOnError before


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis issue #1468: ARTEMIS-1354 Critical IO Error on AIO write fa...

Posted by mtaylor <gi...@git.apache.org>.
Github user mtaylor commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1468
  
    @clebertsuconic This is your neck of the woods.  I've seen this cause loss of availability on shared store when the SAN network is down.  However, this is old code and I am always dubious about changing journal level code that's been around for a while.  Could you please verify.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #1468: ARTEMIS-1354 Critical IO Error on AIO w...

Posted by mtaylor <gi...@git.apache.org>.
Github user mtaylor commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1468#discussion_r133746311
  
    --- Diff: artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFileFactory.java ---
    @@ -304,7 +304,7 @@ public void run() {
              try {
                 libaioFile.write(position, bytes, buffer, this);
              } catch (IOException e) {
    -            callback.onError(-1, e.getMessage());
    --- End diff --
    
    What difference does it make?  The server is shutting down.  Also we don't do this for NIO: https://github.com/apache/activemq-artemis/blob/master/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/nio/NIOSequentialFile.java#L286


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #1468: ARTEMIS-1354 Critical IO Error on AIO w...

Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1468#discussion_r133749125
  
    --- Diff: artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFileFactory.java ---
    @@ -304,7 +304,7 @@ public void run() {
              try {
                 libaioFile.write(position, bytes, buffer, this);
              } catch (IOException e) {
    -            callback.onError(-1, e.getMessage());
    --- End diff --
    
    @mtaylor we should do on NIO as well..
    
    The difference I see is testcases.... I would keep it for consistency.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #1468: ARTEMIS-1354 Critical IO Error on AIO w...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/activemq-artemis/pull/1468


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---