Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copy into results into gdk_utils.c:728: GDKfree_: Assertion `(size & 2) == 0' failed. #3269

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working normal SQL

Comments

@monetdb-team
Copy link

Date: 2013-04-03 02:10:56 +0200
From: @skinkie
To: SQL devs <>
Version: 11.15.3 (Feb2013-SP1)
CC: jpfourny, @njnes

Last updated: 2013-07-03 08:47:59 +0200

Comment 18666

Date: 2013-04-03 02:10:56 +0200
From: @skinkie

User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.40 Safari/537.31
Build Identifier:

I did the following query;

sql>copy 8583682 records into adres from '/mnt/database/openkvk/adres.tsv' delimiters '\n','\t' null as '';

With the result:

mserver5: gdk_utils.c:728: GDKfree_: Assertion `(size & 2) == 0' failed.

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffeb774700 (LWP 15358)]
0x00007ffff49625b5 in raise () from /lib64/libc.so.6
(gdb) bt
0 0x00007ffff49625b5 in raise () from /lib64/libc.so.6
1 0x00007ffff4963a38 in abort () from /lib64/libc.so.6
2 0x00007ffff495b632 in ?? () from /lib64/libc.so.6
3 0x00007ffff495b6e2 in _assert_fail () from /lib64/libc.so.6
4 0x00007ffff6fa70b1 in GDKfree
(blk=0x7fffbba7f020) at gdk_utils.c:728
5 0x00007ffff6fa71ae in GDKfree (blk=0x7fffbba7f020) at gdk_utils.c:757
6 0x00007ffff7a5a485 in SQLload_file (cntxt=0x649168, as=0x7fffeb773190, b=0x7fffdc0ae020, out=0x0, csep=0x7fffdc0ae110 "\n", rsep=0x7fffdc0ae000 "\t", quote=0 '\000', skip=-3623171,
maxrow=8583682) at tablet.c:1701
7 0x00007fffec1e2698 in mvc_import_table (cntxt=0x649168, m=0x7fffdc005470, bs=0x7fffdc0ae020, sname=0x7fffdc0a96a0 "sys", tname=0x7fffdc0ace90 "adres", sep=0x7fffdc0ae110 "\n",
rsep=0x7fffdc0ae000 "\t", ssep=0x0, ns=0x7fffdc0ad7c0 "", sz=8583682, offset=0, locked=0) at sql_result.c:675
8 0x00007fffec1f2668 in mvc_import_table_wrap (cntxt=0x649168, mb=0x7fffdc082380, stk=0x7fffdc0bb890, pci=0x7fffdc0b6350) at sql.mx:4185
9 0x00007ffff7827828 in runMALsequence (cntxt=0x649168, mb=0x7fffdc082380, startpc=1, stoppc=0, stk=0x7fffdc0bb890, env=0x0, pcicaller=0x0) at mal_interpreter.c:642
10 0x00007ffff7826ced in callMAL (cntxt=0x649168, mb=0x7fffdc082380, env=0x7fffeb773cb8, argv=0x7fffeb773d10, debug=0 '\000') at mal_interpreter.c:469
11 0x00007fffec1b4a2e in SQLexecutePrepared (c=0x649168, be=0x7fffdc05cf80, q=0x7fffdc088a00) at sql_scenario.c:1844
12 0x00007fffec1b4e12 in SQLengineIntern (c=0x649168, be=0x7fffdc05cf80) at sql_scenario.c:1911
13 0x00007fffec1b5383 in SQLengine (c=0x649168) at sql_scenario.c:2012
14 0x00007ffff7854c36 in runPhase (c=0x649168, phase=4) at mal_scenario.c:522
15 0x00007ffff7854e1f in runScenarioBody (c=0x649168) at mal_scenario.c:566
16 0x00007ffff7854f42 in runScenario (c=0x649168) at mal_scenario.c:586
17 0x00007ffff7855fb4 in MSserveClient (dummy=0x649168) at mal_session.c:431
18 0x00007ffff4cddf3b in start_thread () from /lib64/libpthread.so.0
19 0x00007ffff4a1865d in clone () from /lib64/libc.so.6

Reproducible: Always

MonetDB 5 server v11.15.4 (64-bit, 64-bit oids)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2013 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 15.6GiB available memory, 4 available cpu cores
Libraries:
libpcre: 8.32 2012-11-30 (compiled with 8.32)
openssl: OpenSSL 1.0.1e 11 Feb 2013 (compiled with OpenSSL 1.0.1e 11 Feb 2013)
libxml2: 2.9.0 (compiled with 2.9.0)
Compiled by: root@openkvk.nl (x86_64-unknown-linux-gnu)
Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code
Linking : /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64

Comment 18667

Date: 2013-04-03 02:16:18 +0200
From: @skinkie

I am aware that I reversed the \n and \t.

Comment 18734

Date: 2013-05-15 23:08:20 +0200
From: Joseph <>

I am seeing this, too. Every CSV I tried to bulk-load MonetDB with causes a crash. I am using the 64-bit Windows build (same release date).

Comment 18789

Date: 2013-06-07 13:35:41 +0200
From: @njnes

we need an example to be able to fix this problem. Ie ddl and update statements, including data to be loaded.

Comment 18790

Date: 2013-06-07 14:05:44 +0200
From: @skinkie

CREATE TABLE "sys"."adres" (
"openbareruimtenaam" VARCHAR(80),
"huisnummer" DECIMAL(5),
"huisletter" CHAR(1),
"huisnummertoevoeging" VARCHAR(4),
"postcode" VARCHAR(6),
"woonplaatsnaam" VARCHAR(80),
"gemeentenaam" VARCHAR(80),
"provincienaam" VARCHAR(16),
"typeadresseerbaarobject" VARCHAR(3),
"adresseerbaarobject" DECIMAL(16),
"nummeraanduiding" DECIMAL(16),
"x" INTEGER,
"y" INTEGER
);

Link to the data data will fly to you in a private mail.

Comment 18792

Date: 2013-06-07 15:19:48 +0200
From: @njnes

out of bounds problem. We now properly check for this.

Comment 18795

Date: 2013-06-07 15:49:17 +0200
From: MonetDB Mercurial Repository <>

Changeset 11a7d8d94a7b made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=11a7d8d94a7b

Changeset description:

fixed bug #3269, ie out of bounds write.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working normal SQL
Projects
None yet
Development

No branches or pull requests

2 participants