You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2010/11/02 06:21:25 UTC

[jira] Created: (CASSANDRA-1694) fix jna errno reporting

fix jna errno reporting
-----------------------

                 Key: CASSANDRA-1694
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1694
             Project: Cassandra
          Issue Type: Bug
          Components: Core
    Affects Versions: 0.6.5
            Reporter: Jonathan Ellis
            Assignee: Jonathan Ellis
            Priority: Minor
             Fix For: 0.6.7, 0.7.0
         Attachments: jna.patch



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1694) fix jna errno reporting

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12927502#action_12927502 ] 

Jonathan Ellis commented on CASSANDRA-1694:
-------------------------------------------

-take-2 patch adds a pre-emptive call to getLastError in an attempt to fix the problem a different way.
{code}
            // calling getLastError involves system calls that can reset errno, so you don't
            // want the first time you call it to be when you actually have an error to diagnose
{code}

> fix jna errno reporting
> -----------------------
>
>                 Key: CASSANDRA-1694
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1694
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.6.5
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.6.7, 0.7.0
>
>         Attachments: 1694-take-2.txt, 1694-v3.txt, jna-3.2.7.jar, jna.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1694) fix jna errno reporting

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1694?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-1694:
--------------------------------------

    Attachment: 1694-v2.txt

v2 adds support for crappy old jna versions

> fix jna errno reporting
> -----------------------
>
>                 Key: CASSANDRA-1694
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1694
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.6.5
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.6.7, 0.7.0
>
>         Attachments: 1694-v2.txt, jna-3.2.7.jar, jna.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1694) fix jna errno reporting

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1694?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-1694:
--------------------------------------

    Attachment: jna-3.2.7.jar

> fix jna errno reporting
> -----------------------
>
>                 Key: CASSANDRA-1694
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1694
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.6.5
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.6.7, 0.7.0
>
>         Attachments: jna-3.2.7.jar, jna.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1694) fix jna errno reporting

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12927314#action_12927314 ] 

Brandon Williams commented on CASSANDRA-1694:
---------------------------------------------

+1.  Needs jna 3.2.7 to compile, but will run (with inferior logging) with lesser jna versions.

> fix jna errno reporting
> -----------------------
>
>                 Key: CASSANDRA-1694
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1694
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.6.5
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.6.7, 0.7.0
>
>         Attachments: 1694-v3.txt, jna-3.2.7.jar, jna.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1694) fix jna errno reporting

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1694?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-1694:
--------------------------------------

    Attachment: 1694-take-2.txt

> fix jna errno reporting
> -----------------------
>
>                 Key: CASSANDRA-1694
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1694
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.6.5
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.6.7, 0.7.0
>
>         Attachments: 1694-take-2.txt, 1694-v3.txt, jna-3.2.7.jar, jna.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1694) fix jna errno reporting

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1694?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-1694:
--------------------------------------

    Attachment: 1694-v3.txt

> fix jna errno reporting
> -----------------------
>
>                 Key: CASSANDRA-1694
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1694
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.6.5
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.6.7, 0.7.0
>
>         Attachments: 1694-v2.txt, 1694-v3.txt, jna-3.2.7.jar, jna.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (CASSANDRA-1694) fix jna errno reporting

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1694?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis reopened CASSANDRA-1694:
---------------------------------------


This causes
{code}
ERROR 12:11:56,633 Exception encountered during startup.
java.lang.NoClassDefFoundError: com/sun/jna/LastErrorException
	at org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:67)
	at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:224)
Caused by: java.lang.ClassNotFoundException: com.sun.jna.LastErrorException
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
{code}

when jna is not present at runtime.  reverted for now.

> fix jna errno reporting
> -----------------------
>
>                 Key: CASSANDRA-1694
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1694
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.6.5
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.6.7, 0.7.0
>
>         Attachments: 1694-v3.txt, jna-3.2.7.jar, jna.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1694) fix jna errno reporting

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1694?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-1694:
--------------------------------------

    Attachment: jna.patch

> fix jna errno reporting
> -----------------------
>
>                 Key: CASSANDRA-1694
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1694
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.6.5
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.6.7, 0.7.0
>
>         Attachments: jna.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1694) fix jna errno reporting

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1694?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-1694:
--------------------------------------

    Attachment:     (was: 1694-v2.txt)

> fix jna errno reporting
> -----------------------
>
>                 Key: CASSANDRA-1694
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1694
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.6.5
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.6.7, 0.7.0
>
>         Attachments: 1694-v3.txt, jna-3.2.7.jar, jna.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1694) fix jna errno reporting

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12927503#action_12927503 ] 

Brandon Williams commented on CASSANDRA-1694:
---------------------------------------------

Take-2 has no effect for me regardless of jna version.

> fix jna errno reporting
> -----------------------
>
>                 Key: CASSANDRA-1694
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1694
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.6.5
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.6.7, 0.7.0
>
>         Attachments: 1694-take-2.txt, 1694-v3.txt, jna-3.2.7.jar, jna.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CASSANDRA-1694) fix jna errno reporting

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1694?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis resolved CASSANDRA-1694.
---------------------------------------

    Resolution: Fixed

re-committed v3 with catches changed to look like this instead:
{code}
        catch (RuntimeException e)
        {
            if (!(e instanceof LastErrorException))
                throw e;

            ... handle errno ...
        }
{code}

> fix jna errno reporting
> -----------------------
>
>                 Key: CASSANDRA-1694
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1694
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.6.5
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.6.7, 0.7.0
>
>         Attachments: 1694-take-2.txt, 1694-v3.txt, jna-3.2.7.jar, jna.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.