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

Bug: Unstable query in Kuzu Nightly Builds 0.4.3.23 #3605

Closed
Tracked by #3666
joyemang33 opened this issue Jun 8, 2024 · 5 comments
Closed
Tracked by #3666

Bug: Unstable query in Kuzu Nightly Builds 0.4.3.23 #3605

joyemang33 opened this issue Jun 8, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@joyemang33
Copy link

Kùzu version

0.4.3.23

What happened?

The following query will result in unstable results even in the nightly builds, i.e., 0 or 109:

MATCH (n1)-[]-(n2:L1:L0) WHERE (n2.p53 <> n1.p43) OR (n2.p29 = n1.p14) RETURN COUNT (*)

1

Are there known steps to reproduce?

The graph data can be imported by the attached JSON file. here

Thank you once again for your kind help in investigating those bug reports!

Best regards,
Qiuyang

@joyemang33 joyemang33 added the bug Something isn't working label Jun 8, 2024
@prrao87
Copy link
Member

prrao87 commented Jun 10, 2024

@joyemang33 could you also let us know what exact OS you are running Kùzu on?

I confirm that I ran this on 0.4.3.dev27 and it returns a different count than the ones you observed.

0.4.3dev27

shape: (1, 1)
┌──────────────┐
│ COUNT_STAR() │
│ ---          │
│ i64          │
╞══════════════╡
│ 126          │
└──────────────┘

However, I also get the same results on the current stable release (0.4.2) of Kuzu:

0.4.2

shape: (1, 1)
┌──────────────┐
│ COUNT_STAR() │
│ ---          │
│ i64          │
╞══════════════╡
│ 126          │
└──────────────┘

0.3.2

In v0.3.2 I get a segfault:

[1]    13609 segmentation fault  python tt.py

0.3.0

In v0.3.0 I get a memory allocation error:

python(13377,0x1e9227ac0) malloc: Region cookie corrupted for region 0x111000000 (value is 0)[0x1110081fc]
python(13377,0x1e9227ac0) malloc: *** set a breakpoint in malloc_error_break to debug
[1]    13377 abort      python tt.py

Here's my code to quickly reproduce the Python errors:

import shutil
import kuzu
import json

shutil.rmtree("./test", ignore_errors=True)
db = kuzu.Database("./test")
conn = kuzu.Connection(db)

queries = []
with open("G_47.json") as f:
    queries = json.load(f)

for query in queries:
    conn.execute(query)

query = "MATCH (n1)-[]-(n2:L1:L0) WHERE (n2.p53 <> n1.p43) OR (n2.p29 = n1.p14) RETURN COUNT (*)"
res = conn.execute(query).get_as_pl()
print(res)

@andyfengHKU
Copy link
Contributor

Ditto I'm getting consistent 126 on 0.4.3dev27

@joyemang33
Copy link
Author

Sorry for missing the information about my OS version.
I executed the query in Ubuntu 20.04 with x86_64 and Kuzu version 0.4.3.23, could you try it again in that version?

Best regards,
Qiuyang

@acquamarin
Copy link
Collaborator

Hi @joyemang33
I just confirmed that the bug is caused by our dictionary compression algorithm. We are going to fix the bug soon.

Thanks,
Ziyi

@ray6080
Copy link
Contributor

ray6080 commented Jul 23, 2024

I cannot reproduce this anymore on latest master, which is after #3718 .

@ray6080 ray6080 closed this as completed Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants