I am looking at committing this one, unless someone is already looking
at it.
Sunitha Kambhampati wrote:
> This patch fixes derbynet/testSecMec.java test failure on 131 vms.
>
> Problem - with 131 vms, if server and client are in the same jvm, on a
> second get connection with create=true attribute in the url, there is a
> hang.
>
> Basically,
> -- the first getConnection works ok
> -- but on the second getConnection, a SQLWarning needs to be generated
> to say that the database already exists and in this scenario, it seems
> like at the point where it is creating a SQLWarning , there is a
> deadlock. The call to SQLWarning constructor does not return. On doing a
> java core dump , the thread in question seems to be in a wait state
> (conditional wait). Guess is it has to do with the driver manager lock
>
> I will file a jira entry to track this issue but for the test in
> question, changes were made to not use create=true except for the first
> connection.
> -- ran this test for both DerbyClient and JCC driver on both
> corresponding versions 131,141 ,142 on both IBM and Sun jdks. Also
> tested it on sun jdk 1.5.0.
> -- ran derbynetmats on jdk142 ok.
> -- ran derbynetclientmats on ibm131 ok.
>
> svn stat
> M
> java\testing\org\apache\derbyTesting\functionTests\tests\derbynet\testSecMec.java
>
> M
> java\testing\org\apache\derbyTesting\functionTests\master\DerbyNet\testSecMec.out
>
> M
> java\testing\org\apache\derbyTesting\functionTests\master\DerbyNetClient\testSecMec.out
>
>
> If it looks ok, can a committer please commit these test changes.
>
> Thanks,
> Sunitha.
>
>
> ------------------------------------------------------------------------
>
> Index:
> java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testSecMec.java
> ===================================================================
> ---
> java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testSecMec.java
> (revision 170422)
> +++
> java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testSecMec.java
> (working copy)
> @@ -145,18 +145,18 @@
> // different security mechanisms.
> // Network server supports SECMEC_USRIDPWD,
> SECMEC_USRIDONL,SECMEC_EUSRIDPWD
> System.out.println("Checking security mechanism authentication
> with DriverManager");
> -
> getConnectionUsingDriverManager(getJDBCUrl("wombat;create=true",null),"T1:");
> -
> getConnectionUsingDriverManager(getJDBCUrl("wombat;create=true","user=max"),"T2:");
> -
> getConnectionUsingDriverManager(getJDBCUrl("wombat;create=true","user=neelima;password=lee"),"T3:");
>
> getConnectionUsingDriverManager(getJDBCUrl("wombat;create=true","user=neelima;password=lee;securityMechanism="+SECMEC_USRIDPWD),"T4:");
> +
> getConnectionUsingDriverManager(getJDBCUrl("wombat",null),"T1:");
> +
> getConnectionUsingDriverManager(getJDBCUrl("wombat","user=max"),"T2:");
> +
> getConnectionUsingDriverManager(getJDBCUrl("wombat","user=neelima;password=lee"),"T3:");
> // Disable because ibm142 doesnt support DiffieHelman prime
> of 32 bytes
> // Also Sun JCE doesnt support it.
> -
> //getConnectionUsingDriverManager(getJDBCUrl("wombat;create=true","user=neelima;password=lee;securityMechanism="+SECMEC_EUSRIDPWD),"T5:");
> -
> getConnectionUsingDriverManager(getJDBCUrl("wombat;create=true","user=neelima;securityMechanism="+SECMEC_USRIDONL),"T6:");
> +
> //getConnectionUsingDriverManager(getJDBCUrl("wombat","user=neelima;password=lee;securityMechanism="+SECMEC_EUSRIDPWD),"T5:");
> +
> getConnectionUsingDriverManager(getJDBCUrl("wombat","user=neelima;securityMechanism="+SECMEC_USRIDONL),"T6:");
>
> // disable as ibm142 and sun jce doesnt support DH prime of
> 32 bytes
> -
> //getConnectionUsingDriverManager(getJDBCUrl("wombat;create=true","user=neelima;password=lee;securityMechanism="+SECMEC_USRENCPWD),"T7:");
> -
> getConnectionUsingDriverManager(getJDBCUrl("wombat;create=true","user=neelima;password=lee;securityMechanism="+SECMEC_USRIDONL),"T8:");
> +
> //getConnectionUsingDriverManager(getJDBCUrl("wombat","user=neelima;password=lee;securityMechanism="+SECMEC_USRENCPWD),"T7:");
> +
> getConnectionUsingDriverManager(getJDBCUrl("wombat","user=neelima;password=lee;securityMechanism="+SECMEC_USRIDONL),"T8:");
>
> getConnectionUsingDataSource();
>
> Index:
> java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/testSecMec.out
> ===================================================================
> ---
> java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/testSecMec.out
> (revision 170422)
> +++
> java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/testSecMec.out
> (working copy)
> @@ -1,9 +1,9 @@
> Checking security mechanism authentication with DriverManager
> -T1: jdbc:derby:net://localhost:20000/wombat;create=true - EXCEPTION null
> userid not supported
> -T2: jdbc:derby:net://localhost:20000/wombat;create=true:user=max; -
> EXCEPTION null password not supported
> -T3:
> jdbc:derby:net://localhost:20000/wombat;create=true:user=neelima;password=lee;
> T4:
> jdbc:derby:net://localhost:20000/wombat;create=true:user=neelima;password=lee;securityMechanism=3;
> -T6:
> jdbc:derby:net://localhost:20000/wombat;create=true:user=neelima;securityMechanism=4;
> -T8:
> jdbc:derby:net://localhost:20000/wombat;create=true:user=neelima;password=lee;securityMechanism=4;
> +T1: jdbc:derby:net://localhost:20000/wombat - EXCEPTION null userid not
> supported
> +T2: jdbc:derby:net://localhost:20000/wombat:user=max; - EXCEPTION null
> password not supported
> +T3: jdbc:derby:net://localhost:20000/wombat:user=neelima;password=lee;
> +T6: jdbc:derby:net://localhost:20000/wombat:user=neelima;securityMechanism=4;
> +T8:
> jdbc:derby:net://localhost:20000/wombat:user=neelima;password=lee;securityMechanism=4;
> SECMEC_USRIDPWD: OK
> Completed testSecMec
> Index:
> java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/testSecMec.out
> ===================================================================
> ---
> java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/testSecMec.out
> (revision 170422)
> +++
> java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/testSecMec.out
> (working copy)
> @@ -1,9 +1,9 @@
> Checking security mechanism authentication with DriverManager
> -T1: jdbc:derby://localhost:20000/wombat;create=true
> -T2: jdbc:derby://localhost:20000/wombat;create=true;user=max
> -T3: jdbc:derby://localhost:20000/wombat;create=true;user=neelima;password=lee
> T4:
> jdbc:derby://localhost:20000/wombat;create=true;user=neelima;password=lee;securityMechanism=3
> -T6:
> jdbc:derby://localhost:20000/wombat;create=true;user=neelima;securityMechanism=4
> -T8:
> jdbc:derby://localhost:20000/wombat;create=true;user=neelima;password=lee;securityMechanism=4
> +T1: jdbc:derby://localhost:20000/wombat
> +T2: jdbc:derby://localhost:20000/wombat;user=max
> +T3: jdbc:derby://localhost:20000/wombat;user=neelima;password=lee
> +T6: jdbc:derby://localhost:20000/wombat;user=neelima;securityMechanism=4
> +T8:
> jdbc:derby://localhost:20000/wombat;user=neelima;password=lee;securityMechanism=4
> SECMEC_USRIDPWD: OK
> Completed testSecMec