Git Product home page Git Product logo

Comments (10)

stgraber avatar stgraber commented on August 17, 2024

Can you also check if you have a libraft or similar package installed and what version?

from go-dqlite.

richard-hajek avatar richard-hajek commented on August 17, 2024

Certainly, I have

➜  ~ pacman -Q | grep raft
raft 0.11.3-1

Also possibly useful:

➜  ~ cat /usr/lib/pkgconfig/raft.pc
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: raft
Description: C implementation of the Raft Consensus protocol
Version:  0.11.2
Libs: -L${libdir} -lraft
Cflags: -I${includedir}
➜  ~ pacman -Ql raft 
raft /usr/
raft /usr/include/
raft /usr/include/raft.h
raft /usr/include/raft/
raft /usr/include/raft/fixture.h
raft /usr/include/raft/uv.h
raft /usr/lib/
raft /usr/lib/libraft.so
raft /usr/lib/libraft.so.0
raft /usr/lib/libraft.so.0.0.7
raft /usr/lib/pkgconfig/
raft /usr/lib/pkgconfig/raft.pc
raft /usr/share/
raft /usr/share/licenses/
raft /usr/share/licenses/raft/
raft /usr/share/licenses/raft/LICENSE

from go-dqlite.

MathieuBordere avatar MathieuBordere commented on August 17, 2024

what's the output of cat /lib/modules/$(uname -r)/build/.config | grep AIO ?

from go-dqlite.

richard-hajek avatar richard-hajek commented on August 17, 2024

It is

➜  ~ cat /lib/modules/$(uname -r)/build/.config | grep AIO
CONFIG_AIO=y
CONFIG_DELL_WMI_AIO=m

from go-dqlite.

richard-hajek avatar richard-hajek commented on August 17, 2024

As this bug is being a particulate annoyance to me, I am willing to help in any way. If you would like I can recompile this library with any debug code injected here at the exception place.

Except I don't know go so you would have to exactly tell me what to print and how

from go-dqlite.

stgraber avatar stgraber commented on August 17, 2024

It'd likely help a fair bit if you could rebuild libraft and libdqlite to use the current master version, that would remove some potential variables and help with debugging.

If you have the debug symbols (which will be the case with a rebuild), then you should be able to run gdb against LXD and get a backtrace.

from go-dqlite.

MathieuBordere avatar MathieuBordere commented on August 17, 2024

Looks like node is NULL here https://github.com/canonical/dqlite/blob/22edfc5453d9046e6cfedbcb1b67af3a7a85a7f7/src/server.c#L662

The node output parameter of https://github.com/canonical/dqlite/blob/22edfc5453d9046e6cfedbcb1b67af3a7a85a7f7/src/server.c#L149 is probably NULL because this https://github.com/canonical/dqlite/blob/22edfc5453d9046e6cfedbcb1b67af3a7a85a7f7/src/server.c#L22 fails.

You can try setting the environment variables LIBRAFT_TRACE=1 and LIBDQLITE_TRACE=1 before starting lxd but I doubt they will give much extra information in this case.

You could already try and recompile dqlite and spread some printf statements in dqlite__init to see which call actually fails, if it's a raft call you will probably need to do the same printf debugging after recompiling https://github.com/canonical/raft

I will try to look at this beginning of the week, this PR canonical/dqlite#351 should already eliminate the segfault.

from go-dqlite.

richard-hajek avatar richard-hajek commented on August 17, 2024

I have made some debugging sessions, see them here (in retrospect, you can completely ignore these, as I already found the issue) :

https://asciinema.org/a/5TkKsFWPmqyOt1UNefjCkH9YE
https://asciinema.org/a/x08wglxLX5ctPvAXbMGELHCEg

And most importantly:

https://asciinema.org/a/ngZtefehDcYQcUx9z41eZNrQR

The error seems to be related to a failed filesystem check, specifically call probeDirectIO returns 18 ( which would make sense, as my root as mentioned earlier is... hackily built together aufs)

from go-dqlite.

richard-hajek avatar richard-hajek commented on August 17, 2024

Even more specifically, call rv = fcntl(fd, F_SETFL, flags | UV_FS_O_DIRECT); in UvOsSetDirectIo returns -1

from go-dqlite.

richard-hajek avatar richard-hajek commented on August 17, 2024

I mitigated the problem by creating a logical volume and mounted it over /var/lib/lxd

As far as I am immediately concerned this problem is mitigated however something like "Unsupported filesystem" message would be nice

from go-dqlite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.