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

Segmentation fault #5

Open
keorn opened this issue May 22, 2020 · 6 comments
Open

Segmentation fault #5

keorn opened this issue May 22, 2020 · 6 comments

Comments

@keorn
Copy link
Contributor

keorn commented May 22, 2020

Actually I realised why I could not use this package before. I intermittently get segmentation fault:

_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2135 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
unknown function (ip: 0x401931)
unknown function (ip: 0x401533)
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x4015d4)
Allocations: 45252668 (Pool: 45245323; Big: 7345); GC: 34
[1]    16489 segmentation fault (core dumped)

Seems like it happens when writing to socket at src/julia_bolt/JuliaBolt.jl:417

@keorn
Copy link
Contributor Author

keorn commented Feb 17, 2021

FYI, PlantingSpace has put a $500 bounty on resolving of this issue: https://gitlab.com/plantingspace/tasks/-/issues/12

@kinow
Copy link

kinow commented Nov 6, 2021

Hi! I thought it would be a fun project for the weekend (and maybe profitable!) to try solving this issue and also learn some Julia (familiar with neo4j, python).

I tried running the code from master, but I hit #7 (solved, I think, in #8 ).

Then started a Neo4J container, and tried the following code:

using Neo4jBolt

driver = Neo4jBoltDriver("bolt://localhost:7687", auth=("neo4j", "s3cr3t"))

for i in range(0, length=1000)
    session(driver) do sess
        result = run(sess, "UNWIND(RANGE(1, 10)) AS z RETURN z")
        for record in result
            println(record["z"])
        end
    end

It took a couple minutes (creating new sessions is probably taking a toll) worked fine.

Tried then using transactions with the same session.

using Neo4jBolt

driver = Neo4jBoltDriver("bolt://localhost:7687", auth=("neo4j", "s3cr3t"))


session(driver) do sess
    begin_transaction(sess) do tx
        for i in range(0, length=1000)
            result = run(sess, "UNWIND(RANGE(1, 10)) AS z RETURN z")
            for record in result
                println(record["z"])
            end
        end
    end
end

No segmentation fault. Maybe it needs to be executed in parallel?

@keorn
Copy link
Contributor Author

keorn commented Nov 6, 2021

Hey, thanks for having a look and sorry you were not able to reproduce. Yes, it was likely happening for parallelized code. Will test with newer version of Julia and see if it can be reproduced and under what conditions.

@kinow
Copy link

kinow commented Nov 6, 2021

Thanks @keorn . In case that happens, my env:

kinow@ranma:~$ julia -v
julia version 1.4.1
kinow@ranma:~$ uname -a
Linux ranma 5.4.0-89-generic #100-Ubuntu SMP Fri Sep 24 14:50:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Used Docker + Neo4J, with JVM 11 (openJDK) and Neo4j 4.3.6.

Thanks!

@virtualgraham
Copy link
Owner

Thank you @kinow for working on this. Sorry I have not dedicated any time to this repository in a while.

@kinow
Copy link

kinow commented Nov 6, 2021

Not a problem @virtualgraham, and thanks for creating & sharing the code :-) . If you have some spare time later to review #8. I'm using that branch to use Neo4jBolt with Neo4j 4.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants