Menu

#84 [Perl]A lot of error information appear when just calling cubrid_lob_close once after twice calling cubrid_lob_get()

open
nobody
None
5
2012-02-11
2012-02-11
Jira Trac
No

Test Build: CUBRID 2008 R4.1 (8.4.1.1005) (64bit release build for linux_gnu)
OS: Linux 64
Description: A lot of error information appear when just calling cubrid_lob_close once after twice calling cubrid_lob_get()

Repro Steps:
perl lob_get_2.pl lob_get.result

Statements in lob_get_2.pl
{noformat}
$dbh - do(drop table if EXISTS doc_t;) or die drop error: $dbh-errstr;
$dbh-do(CREATE TABLE doc_t (doc_id VARCHAR(64) PRIMARY KEY, content CLOB);) or die create error: $dbh-errstr;
$dbh-do(INSERT INTO doc_t (doc_id, content) VALUES ('doc-1', CHAR_TO_CLOB('This is a Dog'));) or die insert error: $dbh-errstr;
$dbh-do(INSERT INTO doc_t (doc_id, content) VALUES ('doc-2', CHAR_TO_CLOB('This is a Cat'));) or die insert error: $dbh-errstr;

my $sth=$dbh-prepare(select * from doc_t) or die prepare error: $dbh-errstr;
$sth-execute() or die execute error: $dbh-errstr;

my $value=$sth-cubrid_lob_get (1) . \n; # fetch the second column
print value: $value\n;
print $dbh-errstr . :lob_get(0) error\n;
#my $closeValue=$sth-cubrid_lob_close();

my $value=$sth-cubrid_lob_get (0) . \n; # fetch the second column
print value: $value\n;
print $dbh-errstr . :lob_get(0) error\n;

my $closeValue=$sth-cubrid_lob_close();
print closeValue: $closeValue\n;
{noformat}

Actual result
{noformat}
*** glibc detected *** perl: free(): invalid pointer: 0x0000003005b53a48 ***
======= Backtrace: =========
/lib64/libc.so.6[0x300587245f]
/lib64/libc.so.6(cfree+0x4b)[0x30058728bb]
/home/perl/CUBRID/lib/libcascci.so.8(cci_clob_free+0x30)[0x2b4f22eed0b0]
/home/perl/opt/perl5/lib/site_perl/5.14.1/x86_64-linux/auto/DBD/cubrid/cubrid.so[0x2b4f22cdbad6]
/home/perl/opt/perl5/lib/site_perl/5.14.1/x86_64-linux/auto/DBD/cubrid/cubrid.so[0x2b4f22cdbb24]
/home/perl/opt/perl5/lib/site_perl/5.14.1/x86_64-linux/auto/DBD/cubrid/cubrid.so(cubrid_st_lob_close+0x5f)[0x2b4f22cdbb9f]
/home/perl/opt/perl5/lib/site_perl/5.14.1/x86_64-linux/auto/DBD/cubrid/cubrid.so(XS_DBD__cubrid__st_cubrid_lob_close+0x73)[0x2b4f22cd6483]
/home/perl/opt/perl5/lib/site_perl/5.14.1/x86_64-linux/auto/DBI/DBI.so(XS_DBI_dispatch+0x1bf5)[0x2b4f228c5505]
perl(Perl_pp_entersub+0x5dc)[0x48c0dc]
perl(Perl_runops_standard+0x13)[0x48a873]
perl(perl_run+0x1c6)[0x42fa26]
perl(main+0xf5)[0x41bfe5]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x300581d994]
perl(sin+0xd1)[0x41be39]
======= Memory map: ========
00400000-0053f000 r-xp 00000000 fd:00 90475867 /home/perl/opt/perl5/bin/perl
0073e000-00742000 rw-p 0013e000 fd:00 90475867 /home/perl/opt/perl5/bin/perl
00742000-00743000 rw-p 00742000 00:00 0
00dd3000-0110d000 rw-p 00dd3000 00:00 0 [heap]
3005400000-300541c000 r-xp 00000000 fd:00 1114114 /lib64/ld-2.5.so
300561c000-300561d000 r--p 0001c000 fd:00 1114114 /lib64/ld-2.5.so
300561d000-300561e000 rw-p 0001d000 fd:00 1114114 /lib64/ld-2.5.so
3005800000-300594e000 r-xp 00000000 fd:00 1114121 /lib64/libc-2.5.so
300594e000-3005b4e000 ---p 0014e000 fd:00 1114121 /lib64/libc-2.5.so
3005b4e000-3005b52000 r--p 0014e000 fd:00 1114121 /lib64/libc-2.5.so
3005b52000-3005b53000 rw-p 00152000 fd:00 1114121 /lib64/libc-2.5.so
3005b53000-3005b58000 rw-p 3005b53000 00:00 0
3005c00000-3005c02000 r-xp 00000000 fd:00 1114131 /lib64/libdl-2.5.so
3005c02000-3005e02000 ---p 00002000 fd:00 1114131 /lib64/libdl-2.5.so
3005e02000-3005e03000 r--p 00002000 fd:00 1114131 /lib64/libdl-2.5.so
3005e03000-3005e04000 rw-p 00003000 fd:00 1114131 /lib64/libdl-2.5.so
3006000000-3006016000 r-xp 00000000 fd:00 1114153 /lib64/libpthread-2.5.so

........................
linux/auto/List/Util/Util.so
2b4f22cd1000-2b4f22cd2000 rw-p 00005000 fd:00 90505557 /home/perl/opt/perl5/lib/5.14.1/x86_64-linux/auto/List/Util/Util.so
2b4f22cd2000-2b4f22ce2000 r-xp 00000000 fd:00 90539192 /home/perl/opt/perl5/lib/site_perl/5.14.1/x86_64-linux/auto/DBD/cubrid/cubrid.so
2b4f22ce2000-2b4f22ee2000 ---p 00010000 fd:00 90539192 /home/perl/opt/perl5/lib/site_perl/5.14.1/x86_64-linux/auto/DBD/cubrid/cubrid.so
2b4f22ee2000-2b4f22ee3000 rw-p 00010000 fd:00 90539192 /home/perl/opt/perl5/lib/site_perl/5.14.1/x86_64-linux/auto/DBD/cubrid/cubrid.so
2b4f22ee3000-2b4f22ee6000 rw-p 2b4f22ee3000 00:00 0
2b4f22ee6000-2b4f22f03000 r-xp 00000000 fd:00 88604841 /home/perl/CUBRID/lib/libcascci.so.8.4.1
2b4f22f03000-2b4f23103000 ---p 0001d000 fd:00 88604841 /home/perl/CUBRID/lib/libcascci.so.8.4.1
..........................
Aborted
{noformat}

Comments:
Perhaps the error information can be more user-friendly when i run this cases.

In error information:
1.*** glibc detected *** perl: free(): invalid pointer: 0x0000003005b53a48 ***
pointer: 0x0000003005b53a48
2.======= Memory map: ========
3005b52000-3005b53000 rw-p 00152000 fd:00 1114121 /lib64/libc-2.5.so
3005b53000-3005b58000 rw-p 3005b53000 00:00 0
3005c00000-3005c02000 r-xp 00000000 fd:00 1114131 /lib64/libdl-2.5.so
3005c02000-3005e02000 ---p 00002000 fd:00 1114131 /lib64/libdl-2.5.so
pointer: 0x0000003005b53a48 this pointer in memory map is empty.

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.