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

insert into resulted in tr_update_delta: Assertion `cur->T->heap.storage != 2' failed. #2670

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working major MAL/M5

Comments

@monetdb-team
Copy link

Date: 2010-09-14 01:24:18 +0200
From: @skinkie
To: MonetDB5 devs <>
Version: 5.22.1 (Oct2010) [obsolete]
CC: alexandr.kulik1988

Blocker for: #2665
Last updated: 2010-11-15 09:38:59 +0100

Comment 14903

Date: 2010-09-14 01:24:18 +0200
From: @skinkie

sql>CREATE TABLE "sys"."kvk_tmp" (
more> "kvk" BIGINT,
more> "bedrijfsnaam" VARCHAR(256),
more> "kvks" INTEGER,
more> "sub" INTEGER,
more> "adres" VARCHAR(256),
more> "postcode" VARCHAR(10),
more> "plaats" VARCHAR(32),
more> "type" VARCHAR(14),
more>"website" VARCHAR(128)
more>);
operation successful
sql>
sql>insert into kvk_tmp select *, null from kvk_pf where kvk not in (select kvk from kvk_suggest);
2520626 affected rows (18.1s)
sql>insert into kvk_tmp select kvk_pf.kvk, kvk_suggest.bedrijfsnaam, kvk_pf.kvks, kvk_pf.sub, kvk_pf.adres, kvk_pf.postcode, kvk_pf.plaats, kvk_pf.type, kvk_suggest.website from kvk_pf, kvk_suggest where kvk_suggest.status = null and kvk_pf.kvk = kvk_suggest.kvk;
syntax error, unexpected sqlNULL in: "insert into kvk_tmp select kvk_pf.kvk, kvk_suggest.bedrijfsnaam, kvk_pf.kvks, kvk_pf.sub, kvk_pf.adres, kvk_pf.postcode, kvk_pf.plaats, kvk_pf.type, kvk_suggest.website from kvk_pf, kvk_suggest where kvk_suggest.status = null"
sql>insert into kvk_tmp select kvk_pf.kvk, kvk_suggest.bedrijfsnaam, kvk_pf.kvks, kvk_pf.sub, kvk_pf.adres, kvk_pf.postcode, kvk_pf.plaats, kvk_pf.type, kvk_suggest.website from kvk_pf, kvk_suggest where kvk_suggest.status is null and kvk_pf.kvk = kvk_suggest.kvk;
44835 affected rows (1.2s)
sql>insert into kvk_tmp select kvk, bedrijfsnaam, kvks, sub, straat||' '||nummer, postcode, plaats, type, website from kvk_suggest where kvk not in (select kvk from kvk_pf) and status is null and toevoeging is null;

mserver5: ../../../../src/storage/bat/bat_storage.mx:1389: tr_update_delta: Assertion `cur->T->heap.storage != 2' failed.

Second run the data was just inserted.

MonetDB server v5.23.0 (64-bit), based on kernel v1.41.0 (64-bit oids)
Not released
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
Visit http://monetdb.cwi.nl/ for further information
Found 3.9GiB available memory, 2 available cpu cores
Configured for prefix: /opt/monetdb-testing
Libraries:
libpcre: 8.02 2010-03-19 (compiled with 8.02)
openssl: OpenSSL 1.0.0a 1 Jun 2010 (compiled with OpenSSL 1.0.0a 1 Jun 2010)
libxml2: 2.7.7 (compiled with 2.7.7)
Compiled by: skinkie@openkvk (x86_64-unknown-linux-gnu)
Compilation: gcc -Wall -Wextra -fno-strict-aliasing -g -Werror-implicit-function-declaration -Werror -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/x86_64-pc-linux-gnu/bin/ld -IPA -m elf_x86_64

Comment 14904

Date: 2010-09-14 01:55:35 +0200
From: @skinkie

From my observations I see that the actual data seems to be inserted in the table. While command fails afterwards;

sql>insert into kvk_suggest select kvk_extra.* from kvk_extra, kvk_pf where kvk_pf.kvk = kvk_extra.kvk and kvk_pf.postcode = kvk_extra.postcode and website is not null and kvk_pf.kvk not in (select kvk from kvk_suggest);
MAPI = monetdb@localhost:60005
ACTION= read_line
QUERY = insert into kvk_suggest select kvk_extra.* from kvk_extra, kvk_pf where kvk_pf.kvk = kvk_extra.kvk and kvk_pf.postcode = kvk_extra.postcode and website is not null and kvk_pf.kvk not in (select kvk from kvk_suggest);
ERROR = !Connection terminated
skinkie@openkvk ~ $ /opt/monetdb-testing/bin/mclient -p 60005
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v5.23.0, 'kvk-new'
Type \q to quit, ? for a list of available commands
auto commit mode: on
sql>insert into kvk_suggest select kvk_extra.* from kvk_extra, kvk_pf where kvk_pf.kvk = kvk_extra.kvk and kvk_pf.postcode = kvk_extra.postcode and website is not null and kvk_pf.kvk not in (select kvk from kvk_suggest);
0 affected rows (1.1s)

Comment 14916

Date: 2010-09-20 11:09:44 +0200
From: @skinkie

This bug prevents me from automatic updating my database. Because I plainly don't know when the asserts hits and why.

Comment 14942

Date: 2010-09-27 21:13:14 +0200
From: Alexandr Kulik <<alexandr.kulik1988>>

Created attachment 37
Got same problem

Have almost same problem. On huge file load via copy into.

Attached file: log.txt (text/plain, 8830 bytes)
Description: Got same problem

Comment 14943

Date: 2010-09-27 22:13:49 +0200
From: @skinkie

(In reply to comment 3)

Created attachment 37 [details]
Got same problem

Have almost same problem. On huge file load via copy into.

For me it is definitely not related to huge. I forwarded Niels my backtrace, but for example today I didn't have it at all. While last week I had it about 2 times a day. The key seems to be some column that is bugging, but I have to reproduce it in a non-production environment to search deeper once the assert triggers.

Comment 14962

Date: 2010-10-03 20:07:21 +0200
From: @grobian

bug #2680 mentions this is in Oct2010 too, which makes this thing a blocker for an Oct2010 release.

Comment 14965

Date: 2010-10-04 09:29:40 +0200
From: @sjoerdmullender

I wonder if my checkin on the Oct2010 branch last Friday in changeset c9fbf6050938 (merged into default in changeset a8cfb61a0d46) fixed this problem. It seems to me, it directly addressed this issue.
Can you check?

Comment 14967

Date: 2010-10-04 10:34:50 +0200
From: @skinkie

I'll upgrade and test.

Comment 14974

Date: 2010-10-05 15:31:04 +0200
From: @skinkie

(In reply to comment 6)

I wonder if my checkin on the Oct2010 branch last Friday in changeset
c9fbf6050938 (merged into default in changeset a8cfb61a0d46) fixed this
problem. It seems to me, it directly addressed this issue.
Can you check?

I did not get the specific assert anymore. But it did get worse: client could connect but never get a prompt. I don't know if this is a related issue or not. (I'm updating again...)

Comment 14981

Date: 2010-10-05 17:54:44 +0200
From: @skinkie

Sjoerd please tell me if this is a new bug, or a result of your fix. Clients hang.

(gdb) bt
0 0x00007fb07d44653d in read () from /lib/libpthread.so.0
1 0x00007fb07fef16ae in rl_getc () from /lib/libreadline.so.6
2 0x00007fb07fef1b80 in rl_read_key () from /lib/libreadline.so.6
3 0x00007fb07fedf9d6 in readline_internal_char () from /lib/libreadline.so.6
4 0x00007fb07fedfeaa in readline () from /lib/libreadline.so.6
5 0x00007fb08040bd5d in getConsoleInput (c=0x605560, prompt=0xa67858 ">", linemode=0, exit_on_error=1) at ../../../src/mal/mal_readline.mx:343
6 0x00007fb08040c429 in readConsole (cntxt=0x605560) at ../../../src/mal/mal_readline.mx:502
7 0x00007fb0803ac616 in MALreader (c=0x605560) at ../../../src/mal/mal_session.mx:538
8 0x00007fb0803ff42a in runPhase (c=0x605560, phase=0) at ../../../src/mal/mal_scenario.mx:604
9 0x00007fb0803ff50f in runScenarioBody (c=0x605560) at ../../../src/mal/mal_scenario.mx:641
10 0x00007fb0803ff7e9 in runScenario (c=0x605560) at ../../../src/mal/mal_scenario.mx:682
11 0x00007fb0803ac447 in MSserveClient (dummy=0x605560) at ../../../src/mal/mal_session.mx:473
12 0x0000000000403508 in main (argc=6, av=0x7fffcdbec428) at ../../../src/tools/mserver5.mx:656
(gdb) thread apply all bt

Thread 8 (Thread 0x7fb076e83710 (LWP 8434)):
0 0x00007fb07d19d1d3 in select () from /lib/libc.so.6
1 0x00007fb07f92944d in MT_sleep_ms (ms=500) at ../../../src/gdk/gdk_posix.mx:2235
2 0x00007fb07f5207f8 in GDKvmtrim (limit=0x7fb07fc77ef0) at ../../../src/gdk/gdk_utils.mx:1499
3 0x00007fb07d43ec0a in start_thread () from /lib/libpthread.so.0
4 0x00007fb07d1a3a9d in clone () from /lib/libc.so.6

Thread 7 (Thread 0x7fb06bf12710 (LWP 8435)):
0 0x00007fb07d19d1d3 in select () from /lib/libc.so.6
1 0x00007fb06fb1ff26 in SERVERlistenThread (Sock=0x1454c38) at ../../../../src/modules/mal/mal_mapi.mx:495
2 0x00007fb07d43ec0a in start_thread () from /lib/libpthread.so.0
3 0x00007fb07d1a3a9d in clone () from /lib/libc.so.6

Thread 6 (Thread 0x7fb06bd11710 (LWP 8436)):
0 0x00007fb07d19d1d3 in select () from /lib/libc.so.6
1 0x00007fb07f92944d in MT_sleep_ms (ms=30000) at ../../../src/gdk/gdk_posix.mx:2235
2 0x00007fb06c75eed4 in store_manager () at ../../../src/storage/store.c:1519
3 0x00007fb06c6fb1e6 in mvc_exit () at ../../../src/server/sql_mvc.c:122
4 0x00007fb07d43ec0a in start_thread () from /lib/libpthread.so.0
5 0x00007fb07d1a3a9d in clone () from /lib/libc.so.6

Thread 5 (Thread 0x7fb06b504710 (LWP 8439)):
0 0x00007fb07d4457b0 in sem_wait () from /lib/libpthread.so.0
1 0x00007fb0803ce6a0 in q_dequeue (q=0x1270818) at ../../../src/mal/mal_interpreter.mx:929
2 0x00007fb0803d8c14 in runDFLOWworker (t=0xaeaaf8) at ../../../src/mal/mal_interpreter.mx:1123
3 0x00007fb07d43ec0a in start_thread () from /lib/libpthread.so.0
4 0x00007fb07d1a3a9d in clone () from /lib/libc.so.6

Thread 4 (Thread 0x7fb06b303710 (LWP 8440)):
0 0x00007fb07d4457b0 in sem_wait () from /lib/libpthread.so.0
1 0x00007fb0803ce6a0 in q_dequeue (q=0x1270818) at ../../../src/mal/mal_interpreter.mx:929
2 0x00007fb0803d8c14 in runDFLOWworker (t=0xaeab18) at ../../../src/mal/mal_interpreter.mx:1123
3 0x00007fb07d43ec0a in start_thread () from /lib/libpthread.so.0
4 0x00007fb07d1a3a9d in clone () from /lib/libc.so.6

Thread 3 (Thread 0x7faac2c88710 (LWP 23391)):
0 0x00007fb07d4457b0 in sem_wait () from /lib/libpthread.so.0
1 0x00007fb0803ce6a0 in q_dequeue (q=0x1a19a88) at ../../../src/mal/mal_interpreter.mx:929
2 0x00007fb0803d8c14 in runDFLOWworker (t=0x19d9578) at ../../../src/mal/mal_interpreter.mx:1123
3 0x00007fb07d43ec0a in start_thread () from /lib/libpthread.so.0
4 0x00007fb07d1a3a9d in clone () from /lib/libc.so.6

Thread 2 (Thread 0x7faac2a87710 (LWP 23392)):
0 0x00007fb07d4457b0 in sem_wait () from /lib/libpthread.so.0
1 0x00007fb0803ce6a0 in q_dequeue (q=0x1a19a88) at ../../../src/mal/mal_interpreter.mx:929
2 0x00007fb0803d8c14 in runDFLOWworker (t=0x19d9598) at ../../../src/mal/mal_interpreter.mx:1123
3 0x00007fb07d43ec0a in start_thread () from /lib/libpthread.so.0
4 0x00007fb07d1a3a9d in clone () from /lib/libc.so.6

Thread 1 (Thread 0x7fb0808e2700 (LWP 8433)):
0 0x00007fb07d44653d in read () from /lib/libpthread.so.0
---Type to continue, or q to quit---
1 0x00007fb07fef16ae in rl_getc () from /lib/libreadline.so.6
2 0x00007fb07fef1b80 in rl_read_key () from /lib/libreadline.so.6
3 0x00007fb07fedf9d6 in readline_internal_char () from /lib/libreadline.so.6
4 0x00007fb07fedfeaa in readline () from /lib/libreadline.so.6
5 0x00007fb08040bd5d in getConsoleInput (c=0x605560, prompt=0xa67858 ">", linemode=0, exit_on_error=1) at ../../../src/mal/mal_readline.mx:343
6 0x00007fb08040c429 in readConsole (cntxt=0x605560) at ../../../src/mal/mal_readline.mx:502
7 0x00007fb0803ac616 in MALreader (c=0x605560) at ../../../src/mal/mal_session.mx:538
8 0x00007fb0803ff42a in runPhase (c=0x605560, phase=0) at ../../../src/mal/mal_scenario.mx:604
9 0x00007fb0803ff50f in runScenarioBody (c=0x605560) at ../../../src/mal/mal_scenario.mx:641
10 0x00007fb0803ff7e9 in runScenario (c=0x605560) at ../../../src/mal/mal_scenario.mx:682
11 0x00007fb0803ac447 in MSserveClient (dummy=0x605560) at ../../../src/mal/mal_session.mx:473
12 0x0000000000403508 in main (argc=6, av=0x7fffcdbec428) at ../../../src/tools/mserver5.mx:656
(gdb) q
A debugging session is active.

Comment 14984

Date: 2010-10-05 20:22:00 +0200
From: @sjoerdmullender

(In reply to comment 9)

Sjoerd please tell me if this is a new bug, or a result of your fix. Clients
hang.

There is nothing going on:
Thread 1 is waiting for input on the console;
Threads 2, 3, 4 and 5 are worker threads waiting for work;
Thread 6 is the log manager thread which occasionally wakes up to incorporate the write-ahead logs;
Thread 7 is waiting for a connection from a client;
Thread 8 is the virtual memory trim thread which occasionally wakes up to free up virtual memory (by releasing BATs).

If the client hangs, it looks like the problem is on the client's side.

Comment 14985

Date: 2010-10-05 21:12:33 +0200
From: @skinkie

(In reply to comment 10)

(In reply to comment 9)

Sjoerd please tell me if this is a new bug, or a result of your fix. Clients
hang.

There is nothing going on:
...
If the client hangs, it looks like the problem is on the client's side.

Any client connected to the server hangs, including a newly started mclient. It will never get a prompt.

Comment 14986

Date: 2010-10-06 09:34:47 +0200
From: @skinkie

It gets by far more annoying. It seems to be totally unrelated to updates. MonetDB just stops with processing connections at all. If I can do anything next to the backtrace I have already provided let me know.

Comment 14987

Date: 2010-10-06 09:47:24 +0200
From: @sjoerdmullender

(In reply to comment 12)

It gets by far more annoying. It seems to be totally unrelated to updates.
MonetDB just stops with processing connections at all. If I can do anything
next to the backtrace I have already provided let me know.

Perhaps you can run
strace -o output mclient -lsql ...
and attach the output.

Comment 14988

Date: 2010-10-06 10:36:36 +0200
From: @skinkie

Created attachment 41
strace output of mclient

For what is worth, the read seems to fail on the authentication. That might be, but... persistent connections are also completely death.

This starts to be a completely independent issue. But pretty vague such thing suddenly arrives.

Attached file: nothing.txt (text/plain, 14683 bytes)
Description: strace output of mclient

Comment 14991

Date: 2010-10-06 10:48:28 +0200
From: @grobian

server sends challenge
client sends response

client never gets prompt from server

Comment 14992

Date: 2010-10-06 10:56:10 +0200
From: @grobian

I think this is because MSscheduleClient is not called, which means doChallenge doesn't ever get to calling it.

Odd enough, this sort of reduces the possible point of failure to be either the server waiting for data (not seeing the response), or the failure is in MSscheduleClient when it calls AUTHcheckCredentials, an out of memory condition happens, which causes MSscheduleClient to return without disconnecting the client...

Comment 14993

Date: 2010-10-06 11:12:39 +0200
From: @grobian

on a second look (people are loud around me here), I think the problem is in one of MCfindClient, MCinitClient, MSinitClientPrg. If it hangs, there's nothing what we can do, I'll try to at least disconnect the client in case of failure.

Comment 14995

Date: 2010-10-06 12:57:32 +0200
From: @skinkie

Fabian, if your merge did arrive in development. Then it doesn't work, client still hangs with restarted server.

Comment 14997

Date: 2010-10-06 13:29:18 +0200
From: @grobian

I only committed in candidate, didn't merge to default

Comment 14998

Date: 2010-10-06 14:29:37 +0200
From: @sjoerdmullender

It's been merged and pushed now.

Comment 15138

Date: 2010-10-28 13:34:51 +0200
From: @grobian

Stefan reported the original issue seems to be fixed. Closing.
The second issue seems to be bug #2700.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working major MAL/M5
Projects
None yet
Development

No branches or pull requests

2 participants