canonical / dqlite

Embeddable, replicated and fault-tolerant SQL engine.
https://dqlite.io
Other
3.83k stars 216 forks source link

stderr of server threads swallowed during integration tests #488

Closed cole-miller closed 6 days ago

cole-miller commented 1 year ago

Recently I haven't been able to get any tracing or other stderr output from the dqlite server thread(s) when running our integration tests, even when --show-stderr is passed. (stderr of the "client" thread that runs the test harness shows up as expected.) Apparently @MathieuBordere has run into this too. We should fix it!

cole-miller commented 1 year ago

This might have something to do with integration tests inadvertently linking to an installed libdqlite instead of the just-built one, since I was able to "fix" it by blowing away the lib directory where those artifacts were installed. A good sanity check is to replace the definition of tracef by

#define tracef(...) do { \
        if (UNLIKELY(_dqliteTracingEnabled)) { \
            __builtin_trap(); \
        } \
    } while (0)
cole-miller commented 1 year ago

I wonder if the _dqliteTracingEnabled static is getting duplicated somehow.