On Fri, Sep 26, 2025 at 11:52:35AM +0200, Jean-Francois Dockes
wrote:> I have a report of a recollindex crash during a Xapian commit. Of couse
> this could be due to previous memory corruption in the Recoll code, but
> there is a stack trace going into Xapian code, so I'm posting this in
case
> this can evoke an idea: https://framagit.org/medoc92/recoll/-/issues/348
The backtrace shows a NULL pointer dereference in std::map in the C++
standard library.
While standard libraries can have bugs, the std::map<> implementation
should be very well exercised and so this seems most likely to be memory
corruption, which could be by Recoll, Xapian, some other library in use,
or a hardware issue.
> The index has been reset at the start of indexing, so this can't be old
> file corruption.
The two things I'd suggest trying are:
* Run a memory tester on the machine (e.g. https://memtest.org/) to
check for bad RAM. Indexing will to push up memory usage which will
tend to use dodgy bits in the RAM more, so I wouldn't rule this out
even if you aren't seeing problems in other applications.
* Run recollindex under valgrind, or rebuilt with ubsan and memsan.
Using valgrind is easier as you can just use the existing recollindex
binary, but recollindex rebuilt with sanitisers should run much closer
to normal speed, and the sanitisers can catch more problems.
Cheers,
Olly