TDengine icon indicating copy to clipboard operation
TDengine copied to clipboard

java connect TDengineV2.0.0.2,case jre a fatal error!

Open frankhepeng opened this issue 6 years ago • 8 comments

A fatal error has been detected by the Java Runtime Environment:

SIGSEGV (0xb) at pc=0x00007f1a0a86efa6, pid=6553, tid=0x00007f1a5c16c700

JRE version: Java(TM) SE Runtime Environment (8.0_201-b09) (build 1.8.0_201-b09)

Java VM: Java HotSpot(TM) 64-Bit Server VM (25.201-b09 mixed mode linux-amd64 compressed oops)

Problematic frame:

C [libtaos.so.2.0.0.0+0x29fa6] Java_com_taosdata_jdbc_TSDBJNIConnector_getResultSetImp+0xf7

Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again

An error report file with more information is saved as:

/root/hs_err_pid6553.log

If you would like to submit a bug report, please visit:

http://bugreport.java.com/bugreport/crash.jsp

The crash happened outside the Java Virtual Machine in native code.

See problematic frame for where to report the bug.

frankhepeng avatar Aug 12 '20 07:08 frankhepeng

请提供更详细的报错信息,please show us more information for you issue.

zyyang90 avatar Aug 12 '20 08:08 zyyang90

 将jre dump file( hs_err_pid19193.lg)和 TDengine 系统日志发给你!

------------------ 原始邮件 ------------------ 发件人: "taosdata/TDengine" <[email protected]>; 发送时间: 2020年8月12日(星期三) 下午4:41 收件人: "taosdata/TDengine"<[email protected]>; 抄送: "大浪淘沙!"<[email protected]>;"Author"<[email protected]>; 主题: Re: [taosdata/TDengine] java connect TDengineV2.0.0.2,case jre a fatal error! (#3037)

请提供更详细的报错信息

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

frankhepeng avatar Aug 12 '20 08:08 frankhepeng

jre dump显示的是在java调用TDengine的本地方法getResultSetImp的时候报错,但我看不到您具体的报错环境。请描述清楚具体报错场景,使用jdbc查询报错么?使用的taos-jdbcdriver的版本等信息

zyyang90 avatar Aug 12 '20 09:08 zyyang90

使用你们的jdbe-demo,在创建数据库的时候报错。但是数据库已经创建成功,是获取返回值时报错。taos-jdbcdriver版本是1.0.3 。

------------------ 原始邮件 ------------------ 发件人: "taosdata/TDengine" <[email protected]>; 发送时间: 2020年8月12日(星期三) 下午5:04 收件人: "taosdata/TDengine"<[email protected]>; 抄送: "大浪淘沙!"<[email protected]>;"Author"<[email protected]>; 主题: Re: [taosdata/TDengine] java connect TDengineV2.0.0.2,case jre a fatal error! (#3037)

jre dump显示的是在java调用TDengine的本地方法getResultSetImp的时候报错,但我看不到您具体的报错环境。请描述清楚具体报错场景,使用jdbc查询报错么?使用的taos-jdbcdriver的版本等信息

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

frankhepeng avatar Aug 12 '20 09:08 frankhepeng

目前,jdbc链接TDengine2.0版本以上的实例,请使用taos-jdbcdriver-2.0.2这个版本。如果你是maven引入的依赖:

<dependencies>
    <dependency>
        <groupId>com.taosdata.jdbc</groupId>
        <artifactId>taos-jdbcdriver</artifactId>
        <version>2.0.2</version>
    </dependency>
</dependencies>

参考:jdbc connector

zyyang90 avatar Aug 12 '20 09:08 zyyang90

可以了,谢谢!

------------------ 原始邮件 ------------------ 发件人: "taosdata/TDengine" <[email protected]>; 发送时间: 2020年8月12日(星期三) 下午5:19 收件人: "taosdata/TDengine"<[email protected]>; 抄送: "大浪淘沙!"<[email protected]>;"Author"<[email protected]>; 主题: Re: [taosdata/TDengine] java connect TDengineV2.0.0.2,case jre a fatal error! (#3037)

目前,jdbc链接TDengine2.0版本以上的实例,请使用taos-jdbcdriver-2.0.2这个版本。如果你是maven引入的依赖: <dependencies> <dependency> <groupId>com.taosdata.jdbc</groupId> <artifactId>taos-jdbcdriver</artifactId> <version>2.0.2</version> </dependency> </dependencies>
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

frankhepeng avatar Aug 12 '20 09:08 frankhepeng

maybe it's easy to reproduce

  • Step1

    Dockerfile

    FROM openjdk:8-jre-alpine
    
    COPY TDengine-client /tmp/tdegine
    
    RUN sed 's/http:\/\/dl-cdn.alpinelinux.org/https:\/\/mirrors.aliyun.com/g' -i /etc/apk/repositories \
        && apk --update add --no-cache ca-certificates tzdata gcompat \
        && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone \
        && cd /tmp/tdegine && mkdir -p /usr/include && sh ./install_client.sh \
        && rm -rf /var/cache/apk/* /tmp/*
    

    NOTICE: need prepare TDengine-client dir locally

    Then using docker build -t x . to build image for test

  • Step2

    Compile TDengine/tests/examples/JDBC/springbootdemo

    mvn -Dmaven.test.skip=true clean package
    

    at same dir using

    docker run -it -w target -v `pwd`/target:/target x sh
    

    then at running container using java -jar *.jar to start test

elvizlai avatar Aug 12 '20 09:08 elvizlai

@zhiyuYang90 PTAL, it's not working on alpine.

elvizlai avatar Aug 13 '20 01:08 elvizlai