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

Unhandled Exception in Neo4j 5.18 #13457

Open
Aurora-yzj opened this issue May 10, 2024 · 1 comment
Open

Unhandled Exception in Neo4j 5.18 #13457

Aurora-yzj opened this issue May 10, 2024 · 1 comment

Comments

@Aurora-yzj
Copy link

Hello! I discovered a bug that Neo4j incorrectly throws an exception. The detailed queries are listed below.
Neo4j Version: 5.17.0 Community
Operating System: Ubuntu 22.04
API: Docker

Steps to reproduce

  1. Pull the image: docker pull neo4j
  2. Create a directory on the host that will be a mount for the data: mkdir $HOME/neo4j-data
  3. Start a new container that mounts to this directory: sudo docker run -d --name neo4j-test -p 17474:7474 -p 17687:7687 -v $HOME/neo4j-data:/data neo4j
  4. Go to the web interface at "http://127.0.0.1:17474", login and execute the following series of queries to build the database:
CREATE TEXT INDEX i60 IF NOT EXISTS FOR (n:L7) ON (n.k43);
CREATE INDEX i113 IF NOT EXISTS FOR (n:L23) ON (n.k141);
CREATE INDEX i115 IF NOT EXISTS FOR (n:L24) ON (n.k147);
CREATE INDEX i122 IF NOT EXISTS FOR (n:L25) ON (n.k158);
CREATE INDEX i126 IF NOT EXISTS FOR (n:L27) ON (n.k169);
CREATE INDEX i129 IF NOT EXISTS FOR (n:L28) ON (n.k175);
CREATE INDEX i140 IF NOT EXISTS FOR (n:L33) ON (n.k201);
CREATE INDEX i152 IF NOT EXISTS FOR (n:L0) ON (n.k0, n.k2, n.k4);
CREATE (n0 :L7:L27{k165 : "2abRSB2", k167 : "3Q4zI", k166 : false, k169 : 3378268841254646182, k44 : 3444424086105308503, id : 1, k43 : "gpjIJXm", k46 : 5677244593294931543, k45 : -6069803344773233809, k48 : "DMxM12"});
CREATE (n0 :L7{id : 2, k43 : "iPmGTRN1e", k46 : -1337815414587049885, k45 : -996267167788763577, k48 : "1VPko2Iz", k47 : "bohXo9r"});
CREATE (n0 :L7:L27:L9{k60 : -622976568888589534, k61 : "tt70u", k44 : -1744771433796030518, k43 : "kGFar", k46 : -1321433378907142886, k57 : "V3320he", k45 : -3136664127836480337, k56 : "saIJj", k48 : "9Ljj7Xn", k59 : "Kp8ks", k47 : "3VlRfk", k58 : "RRWT4x", k165 : "j0NvF", k167 : "LYtsYn", k166 : false, k169 : 5304919125189700281, k168 : true, id : 3});
CREATE (n0 :L7:L27:L9{k60 : -681364666991414548, k61 : "TcMKse", k44 : 8106991369248141010, k43 : "NPGHT", k46 : 6821351104928649541, k57 : "yzhY9", k45 : -1405831091924987053, k56 : "uBx9kfP4", k48 : "ogxL4n", k59 : "mmBA5l", k58 : "8E0lt", k165 : "JdG6Zp", k167 : "t60U2r", k166 : false, k169 : 3866898015213032436, k168 : false, id : 5});
CREATE (n0 :L7:L27:L9{k60 : -715310319003590877, k61 : "Ht8jQi", k44 : -7603328931733920159, k43 : "yVM4k", k46 : 3826746449982973377, k57 : "AowHjW", k45 : -662617420611172426, k56 : "yH48c", k48 : "RGMN3nw3N", k59 : "kMbL3W1z", k47 : "AqAb2JjI", k58 : "SAlknOfL", k165 : "kVC0P", k167 : "hDRwwlz", k166 : true, k169 : 2974501618691830922, k168 : false, id : 6});
CREATE (n0 {id : 7});
CREATE (n0 :L7{k44 : 2502917823926058705, id : 8, k43 : "I8Q6Q", k46 : -4495445071789910778, k45 : -7330482254023967028, k48 : "SmRe5FkE"});
CREATE (n0 :L7:L27{k165 : "j9he2A0hj", k167 : "qaQJ8", k166 : false, k169 : -7803884710706592372, k168 : true, k44 : 4999142654052706226, id : 9, k43 : "4Ptkf", k46 : -163482843651340081, k45 : 3879936628811955668, k48 : "sP6sqIMmM", k47 : "Cc6SJN8F"});
CREATE (n0 :L7{k44 : -2049989739614215458, id : 11, k43 : "QuCnFj7U", k46 : -2117983574171754151, k45 : -5386885018658482679, k48 : "cO1BXeOr", k47 : "Gca2l6Q0e"});
MATCH (n0 {id : 7}), (n1 {id : 3}) MERGE(n0)-[r :T8{k260 : true, k261 : false, k257 : -5419615637530388005, k256 : false, k259 : false, id : 12, k258 : false}]->(n1);
MATCH (n0 {id : 2}), (n1 {id : 3}) MERGE(n0)-[r :T8{k260 : true, k261 : true, k257 : 8253360270382938307, k256 : true, k259 : false, id : 13, k258 : false}]->(n1);
MATCH (n0 {id : 2}), (n1 {id : 6}) MERGE(n0)-[r :T8{k260 : false, k261 : false, k257 : -6773088119061562282, k256 : true, k259 : true, id : 15, k258 : true}]->(n1);
MATCH (n0 {id : 11}), (n1 {id : 9}) MERGE(n0)-[r :T8{k260 : true, k261 : false, k257 : 4544166730396800840, k256 : true, k259 : false, id : 16, k258 : false}]->(n1);
MATCH (n0 {id : 5}), (n1 {id : 8}) MERGE(n0)-[r :T8{k260 : false, k261 : true, k257 : 1362860895737004855, k256 : false, k259 : true, id : 17, k258 : false}]->(n1);
  1. Run the query:
MATCH (n0)-[r0 :T8]->(n1 :L7 :L27 :L9) WHERE true OPTIONAL MATCH (n2 :L7{k43:'QuCnFj7U'})-[r1 :T8]->(n3 :L7 :L27), (n4)-[r2 :T8]->(n5 :L7 :L27 :L9{k57:'V3320he'}) WHERE (n5.k167) is not null AND (r0.k259) OR (r0.k261) MATCH (n6{id:4})-[r3 :T8]-(n7 :L27 :L9{k57:'yzhY9'})-[r4 :T8]->(n8 :L7) WHERE (n0.k48)+(n5.k48) ENDS WITH (n5.k48) return *

Expected behavior

It is a legitimate query, so it should output the result normally.

Actual behavior

Neo4j threw an exception unexpectedly.

image

Thank you so much for the help!

@LinneaAndersson
Copy link
Contributor

Hello @Aurora-yzj, thanks for reporting this bug. We will have a look at it and get back to you once we have more information.

@LinneaAndersson LinneaAndersson self-assigned this May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants