You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Arvind Narain (JIRA)" <ji...@apache.org> on 2017/03/30 23:13:42 UTC

[jira] [Commented] (TRAFODION-2565) JDBC T2 Vproc needs updating . Causes build or initialize issues for 2.1 release

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

Arvind Narain commented on TRAFODION-2565:
------------------------------------------

Build issue happens only if the build is attempted in a non-git environment.

In this case we setup PV_BUILDID at the shell prompt and the script core/sqf/build-scripts/build.branch sets revision (rev) to PV_BUILDID. In a git environment "rev" gets set to git revision (short form). 

Earlier (2.0) in a non-git environment "rev" was setup as empty. The following change now sets it to PV_BUILDID. It should ideally be set to the short revision number. The long form of PV_BUILDID led to the compilation errors in T2's native/Vproc.h

https://github.com/apache/incubator-trafodion/commit/e93d518

Above change also touched core/sqf/build-scripts/build.id file that sets the buildid to a formatted date in a non-git environment. This id is used by T2's java vproc.

This buildid should match the Vproc of the native side. If they don't match the code logic asserts. 

JNIEXPORT void JNICALL Java_org_trafodion_jdbc_t2_T2Driver_checkLibraryVersion
     . . .  
     if (javaVproc && !driverVersionChecked)
        {
                const char *java_vproc_str = JNI_GetStringUTFChars(jenv,javaVproc, NULL);
                if (java_vproc_str)
                {
                        if (strcmp(java_vproc_str,driverVproc)!=0)
                        {
                                printf("JDBC Library Version Error - Jar: %s Jni: %s\n",
                                        java_vproc_str,driverVproc);
                                abort();
                        }
                        JNI_ReleaseStringUTFChars(jenv,javaVproc, java_vproc_str);
                        driverVersionChecked = true;
                }
        }


Since the two were different (even after using a different formatted PV_BUILDID), initialization failed.

Plan to use the same formatted date for setting rev in core/sqf/build-scripts/build.branch script.




> JDBC T2 Vproc needs updating . Causes build or initialize issues for 2.1 release 
> ---------------------------------------------------------------------------------
>
>                 Key: TRAFODION-2565
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2565
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: client-jdbc-t2, connectivity-dcs
>            Reporter: Sandhya Sundaresan
>            Priority: Blocker
>
> 2.1 artifacts are not working and fail during Initialize Trafodion. This needs to be fixed before 2.1 release can proceed. 
> The build first failed during the build phase and we worked around the issue . The problem we got was this :
> /usr/bin/g++  -DSQ_PHANDLE_VERIFIER -g -O2 -fno-omit-frame-pointer  -DTRAFODION_JDBCT2_VER_MAJOR=2 -DTRAFODION_JDBCT2_VER_MINOR=1 -D_LP64 -DNA_LINUX -DSIZEOF_LONG_INT=4 -DSQ_GUARDIAN_CALL -DDISABLE_NOWAIT -D_FASTPATH -DTODO -D_SQ64 -w  -fcheck-new -fPIC -I. -I/usr/lib/jvm/java-1.7.0-openjdk.x86_64/include -I/usr/lib/jvm/java-1.7.0-openjdk.x86_64/include/linux -Inative -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/../conn/odbc/src/odbc/Krypton/generated_incs -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/../conn/odbc/src/odbc/dependencies/include -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/../conn/odbc/src/odbc/dependencies/linux -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/export/include/sql -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/inc/tmf_tipapi -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/inc -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/export/include -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/inc/rosetta -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/../sql/cli -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/../sql/common -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/../dbsecurity/cert/inc -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/../dbsecurity/auth/inc -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/commonLogger  -I/opt/home/tools/apache-log4cxx-0.10.0/include -I/opt/home/tools/apache-log4cxx-0.10.0/include/lib4cxx -c -o Linux-x86_64/64/rls/SQLMXDriver.o native/SQLMXDriver.cpp    ##(JDBC_TYPE2)
> /usr/bin/g++  -DSQ_PHANDLE_VERIFIER -g -O2 -fno-omit-frame-pointer  -DTRAFODION_JDBCT2_VER_MAJOR=2 -DTRAFODION_JDBCT2_VER_MINOR=1 -D_LP64 -DNA_LINUX -DSIZEOF_LONG_INT=4 -DSQ_GUARDIAN_CALL -DDISABLE_NOWAIT -D_FASTPATH -DTODO -D_SQ64 -w  -fcheck-new -fPIC -I. -I/usr/lib/jvm/java-1.7.0-openjdk.x86_64/include -I/usr/lib/jvm/java-1.7.0-openjdk.x86_64/include/linux -Inative -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/../conn/odbc/src/odbc/Krypton/generated_incs -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/../conn/odbc/src/odbc/dependencies/include -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/../conn/odbc/src/odbc/dependencies/linux -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/export/include/sql -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/inc/tmf_tipapi -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/inc -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/export/include -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/inc/rosetta -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/../sql/cli -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/../sql/common -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/../dbsecurity/cert/inc -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/../dbsecurity/auth/inc -I/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/sqf/commonLogger  -I/opt/home/tools/apache-log4cxx-0.10.0/include -I/opt/home/tools/apache-log4cxx-0.10.0/include/lib4cxx -c -o Linux-x86_64/64/rls/type2version.o native/type2version.cpp  ##(JDBC_TYPE2)
> In file included from native/Vproc.cpp:24:  ##(JDBC_TYPE2)
> native/Vproc.h:33:1: error: pasting "Traf_JDBC_Type2_Build_" and "2.1.0rc1" does not give a valid preprocessing token  ##(JDBC_TYPE2)
> native/Vproc.h:33:1: error: too many decimal points in number    ##(JDBC_TYPE2)
> native/Vproc.cpp:26:1: error: pasting "Traf_JDBC_Type2_Build" and "2.1.0rc1" does not give a valid preprocessing token   ##(JDBC_TYPE2)
> native/Vproc.cpp:26:1: error: too many decimal points in number  ##(JDBC_TYPE2)
> In file included from native/Vproc.cpp:24:  ##(JDBC_TYPE2)
> native/Vproc.h:33: error: expected initializer before numeric constant     ##(JDBC_TYPE2)
> native/Vproc.cpp:26: error: expected initializer before numeric constant     ##(JDBC_TYPE2)
> make[2]: *** [Linux-x86_64/64/rls/Vproc.o] Error 1    ##(JDBC_TYPE2)
> make[2]: *** Waiting for unfinished jobs....     ##(JDBC_TYPE2)
> In file included from native/SQLMXDriver.cpp:42: ##(JDBC_TYPE2)
> native/Vproc.h:33:1: error: pasting "Traf_JDBC_Type2_Build_" and "2.1.0rc1" does not give a valid preprocessing token  ##(JDBC_TYPE2)
> native/Vproc.h:33:1: error: too many decimal points in number    ##(JDBC_TYPE2)
> In file included from native/SQLMXDriver.cpp:42: ##(JDBC_TYPE2)
> native/Vproc.h:33: error: expected initializer before numeric constant     ##(JDBC_TYPE2)
> make[2]: *** [Linux-x86_64/64/rls/SQLMXDriver.o] Error 1    ##(JDBC_TYPE2)
> make[2]: Leaving directory `/mnt2/sandhyasun/r2.1_bin/apache-trafodion-2.1.0-incubating/core/conn/jdbc_type2' ##(JDBC_TYPE2)
> We worked around the issue by changing hte PV_BUILDID beofre doing hte build and the build worked. But when folks try to use the published artifacts it fails .
> Initialize trafodion is failing with:
> *** ERROR[2034] $Z000HD8:135: Operating system error 201 while communicating with server process $Z000J62:140.
> *** ERROR[8904] SQL did not receive a reply from MXUDR, possibly caused by internal errors when executing user-defined routines.
> *** ERROR[1231] User-defined routine TRAFODION."_LIBMGR_".ADDLIB could not be created.
> --- SQL operation failed with errors.
> This created a core file.  The error is coming from:   JNIEXPORT void JNICALL Java_org_trafodion_jdbc_t2_T2Driver_checkLibraryVersion
> The actual place core’d  below in red:
>      . . .  
>      if (javaVproc && !driverVersionChecked)
>         {
>                 const char *java_vproc_str = JNI_GetStringUTFChars(jenv,javaVproc, NULL);
>                 if (java_vproc_str)
>                 {
>                         if (strcmp(java_vproc_str,driverVproc)!=0)
>                         {
>                                 printf("JDBC Library Version Error - Jar: %s Jni: %s\n",
>                                         java_vproc_str,driverVproc);
>                                 abort();
>                         }
>                         JNI_ReleaseStringUTFChars(jenv,javaVproc, java_vproc_str);
>                         driverVersionChecked = true;
>                 }
>         }
> There seems to be a versioning error with the T2 drivers.
> ---------------------------



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