It happened twice on large wikis when running forceSearchIndex.php after a reindex.
The process prints the last message
Indexed a total of 127258 pages at 2/second
and then hangs (for ever?).
strace seems to report tons of short lived threads being created: P6404
gdb backtrace: P6401
ps and htop show that the process is actively using the CPU:
UID PID PPID C STIME TTY TIME CMD www-data 30146 30144 69 Nov29 pts/4 21:05:32 php5 /srv/mediawiki-staging/multiversion/MWScript.php extensions/CirrusSearch/maintenance/forceSearchIndex.php --wiki enwiki --from 2017-11-27T18:11:01Z
ps -T -o pid,tid,user,tty,stat,pcpu,rss,vsz,time,cmd -g $(ps -o sid= -p 30146) PID TID USER TT STAT %CPU RSS VSZ TIME CMD 17134 17134 dcausse pts/4 S+ 0.0 3028 13264 00:00:00 bash reindex.sh wiki_en_group2.lst 30139 30139 dcausse pts/4 S+ 0.0 3068 13244 00:00:00 /bin/bash /usr/local/bin/mwscript extensions/CirrusSearch/maintenance/forceSearchIndex.php --wiki enwiki --from 2017-11-27T18: 30140 30140 dcausse pts/4 S+ 0.0 1784 5812 00:00:00 tee -a ./cirrus_log/enwiki.reindex.log 30144 30144 root pts/4 S+ 0.0 3504 40544 00:00:00 sudo -u www-data php5 /srv/mediawiki-staging/multiversion/MWScript.php extensions/CirrusSearch/maintenance/forceSearchIndex.ph 30146 30146 www-data pts/4 Rl+ 69.5 4641292 5701404 21:08:55 php5 /srv/mediawiki-staging/multiversion/MWScript.php extensions/CirrusSearch/maintenance/forceSearchIndex.php --wiki enwik 30146 30350 www-data pts/4 Sl+ 0.1 4641292 5701404 00:03:32 php5 /srv/mediawiki-staging/multiversion/MWScript.php extensions/CirrusSearch/maintenance/forceSearchIndex.php --wiki enwik
I'll keep the script running in case someone wants to debug it further.