You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then run main instance - ./searchd -c manticore.conf, and perform
mysql -h0 -P9307
SELECT Id, SNIPPET(Body, QUERY()) FROM WebPagesLB WHERE MATCH('maintenant');
Repeat last query several times (it will most probably return ERROR 1064 (42000): index WebPagesLB: agent localhost:9312: connect timed out - that is perfectly ok).
After several tries searchd crashes.
(That is best to run it under debugger to localize the problem).
Reason is that with kqueue we invoke 'minimal' syscall, as kqueue allows to do.
That is - we collect all changes to sockets polling, and then invoke one single kqueue() call, which performs everything, as - schedule all new conditions, then wait for new changes until timeout.
However for timed-outed connections it causes a race: we schedule removing of such connection, then finally delete it. And then, on actual invoking of kqueue, this scheduled connection is both deleted and closed. Invoking callback over it causes UB, which is in some cases falls to crash (and in other cases still be UB - that is - undefined behavior).
The text was updated successfully, but these errors were encountered:
Recognized on the base of #2164 with these configs:
1-st instance - manticorel.conf
2-nd instance (main one)
Run 1-st instance -
./searchd -c manticorel.conf
Then run main instance -
./searchd -c manticore.conf
, and performmysql -h0 -P9307
Repeat last query several times (it will most probably return
ERROR 1064 (42000): index WebPagesLB: agent localhost:9312: connect timed out
- that is perfectly ok).After several tries searchd crashes.
(That is best to run it under debugger to localize the problem).
Reason is that with kqueue we invoke 'minimal' syscall, as kqueue allows to do.
That is - we collect all changes to sockets polling, and then invoke one single kqueue() call, which performs everything, as - schedule all new conditions, then wait for new changes until timeout.
However for timed-outed connections it causes a race: we schedule removing of such connection, then finally delete it. And then, on actual invoking of kqueue, this scheduled connection is both deleted and closed. Invoking callback over it causes UB, which is in some cases falls to crash (and in other cases still be UB - that is - undefined behavior).
The text was updated successfully, but these errors were encountered: