[Xapian-tickets] [Xapian] #833: The Xapian 1.4.25 causes the program to crash when performing concurrent multi-threaded queries.

Xapian nobody at xapian.org
Wed Aug 14 16:21:35 BST 2024


#833: The Xapian 1.4.25 causes the program to crash when performing concurrent
multi-threaded queries.
----------------------------------+------------------------
        Reporter:  myx            |      Owner:  Olly Betts
            Type:  defect         |     Status:  new
        Priority:  highest        |  Milestone:
       Component:  Backend-Glass  |    Version:  1.4.25
        Severity:  blocker        |   Keywords:
      Blocked By:                 |   Blocking:
Operating System:  All            |
----------------------------------+------------------------
 Hello!

 I compiled the Xapian 1.4.25 Windows version library using msys2 and MSVC
 2017, and I wrote a test program to test it. During testing, I found that
 when using multithreaded queries in Xapian (with read-write locks), the
 program crashes easily.

 In the test code, I used the TestRead class for multithreaded querying.
 When I pre-construct the Xapian::Query object based on the query
 conditions and pass it to the member variable during the construction of
 TestRead, the program crashes when it is used in the worker thread.
 However, if I create a temporary Xapian::Query object in the worker thread
 based on the same query conditions, the program runs normally(These two
 testing methods can be toggled using the macro
 USE_GLOBAL_XAPIAN_QUERY_OBJECT). I suspect there might be an issue with
 intrusive_ptr regarding reference counting management.

 This same test did not reveal any such exceptions in the Xapian 1.2.25
 version.

 Initially, I doubted whether there was a problem with the compiled Windows
 Xapian library, so I tested it again on a Linux (Suse 12.5) system, where
 the 1.2.25 version worked fine, but the 1.4.25 version still crashed, and
 the crash behavior was consistent.

 You can find the specific code in the attached files, which include a test
 project for MSVC 2017, the Xapian database files, the compiled library
 files, and some screenshots of the stack trace at the time of the crash.

 Please take some time out of your busy schedule to look into what might be
 causing this issue and if there are any solutions. Thank you very much!

 If you have any questions, please feel free to contact me. I look forward
 to your reply. Thank you once again!
-- 
Ticket URL: <https://trac.xapian.org/ticket/833>
Xapian <https://xapian.org/>
Xapian


More information about the Xapian-tickets mailing list