Luca Barbieri
2010-Aug-12 08:53 UTC
[Xapian-discuss] thread locked while flushing to database
On a multicore Linux platform I'm running a simple c test program, to evaluate xapian performance, and inspect advantages in multiple indexing. I'm starting two threads, and each thread writes to his database. main th -> indexing thread_1 -> db1 (dispatcher) -> indexing thread_2 -> db2 I use sched_setaffinity to bind each indexing thread to a specific core. During indexing phase i see both core running, but when my threads try to flush to the databases one of them keeps working, the other thread stop the execution (0% cpu) and stracing his pid seems that it's blocked in a futex. Why does this happens if the 2 databases are different objects (with different path)? I'm doing something wrong? This seem to happen both with xapian-core.1.1.3 and xapian-core.1.2.2, and different gcc versions. Here are some details, strace outpud, gdb output, and top results: http://pastebin.com/udGQTi6K Cheers. -- --------------------- Luca Barbieri
William Crawford
2010-Aug-12 09:53 UTC
[Xapian-discuss] thread locked while flushing to database
On Thursday 12 August 2010 09:53:42 Luca Barbieri wrote:> Here are some details, strace outpud, gdb output, and top results: > http://pastebin.com/udGQTi6KThe output shows the other thread is blocked trying to call a thread library function (pthread_setcanceltype) from the bowels of libstdc++. While this could be a Xapian bug at heart, it's not obvious without seeing more code what could be causing this (it's basically a threading deadlock of some sort).
Luca Barbieri
2010-Aug-27 09:12 UTC
[Xapian-discuss] thread locked while flushing to database
The execution doesn't change also without the set_affinity :( Here there's a semplified exemple of my indexing thread's code: http://pastebin.com/gy6tJTpr Does anybody see something irregular? -- --------------------- Luca Barbieri