MathWebSearch / mws

MathWebSearch Implementation
https://search.mathweb.org/
GNU General Public License v3.0
46 stars 12 forks source link

runtime error #79

Closed physikerwelt closed 9 years ago

physikerwelt commented 9 years ago

After indexing a document collection I got an runtime error I cannot interpret.

computer-user@computer-1:/var/lib/mws/inst1$ tail /var/log/mwsd_inst1.log
Loading /home/computer-user/ms/ntcir11/dbDump/noref/./math000000300000.xml... 671258 loaded
Loading /home/computer-user/ms/ntcir11/dbDump/noref/./math000000325000.xml... 611417 loaded
Loading /home/computer-user/ms/ntcir11/dbDump/noref/./math000000350000.xml... 701878 loaded
Loading /home/computer-user/ms/ntcir11/dbDump/noref/./math000000375000.xml... 703952 loaded
Loading /home/computer-user/ms/ntcir11/dbDump/noref/./math000000400000.xml... 676883 loaded
Loading /home/computer-user/ms/ntcir11/dbDump/noref/./math000000425000.xml... 705003 loaded
Loading /home/computer-user/ms/ntcir11/dbDump/noref/./math000000450000.xml... 705447 loaded
Loading /home/computer-user/ms/ntcir11/dbDump/noref/./math000000475000.xml... 481233 loaded
13841154 expressions loaded.
mwsd: /home/computer-user/ms/mws/src/mws/index/TmpIndex.cpp:105: static memsector_long_off_t mws::index::TmpIndex::_writeChildrenOffsets(memsector_writer_t*, const mws::index::TmpIndexNode*, const std::vector<long unsigned int>&): Assertion `node->children.size() == offsets.size()' failed.
Raduh commented 9 years ago

Did you get the error after sending a query? Also, have you tried mws-index? If yes, does it complete fine?

physikerwelt commented 9 years ago

No the error ocvoured right after indexing and the mwsd process disapeared from the task manager. I habe not tried mws-index but I did follow the procedure desctibed here #66.

physikerwelt commented 9 years ago

Is there a way to get more debug output?

physikerwelt commented 9 years ago

Maybe this is connect to a config problem. In the init.d file the config files are included from /usr/local//etc/mws/configs/inst1 even thoug in the config step I configured /etc/mws as the config location

Raduh commented 9 years ago

You can get more verbose output by providing the -v flag to mwsd. What system did you run it on? What does make test report?

physikerwelt commented 9 years ago

make test seems to run fine for me https://gist.github.com/physikerwelt/8423ce24243eae173051 the system is $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.1 LTS Release: 14.04 Codename: trusty Can you give me a hint where I can add the option -v?

physikerwelt commented 9 years ago

... is that the right way to add the -v flag? https://gist.github.com/physikerwelt/dd7ffe6676249e9c166b

physikerwelt commented 9 years ago

^^ that seems to have worked... at least the log file is a little bit more verbose now

physikerwelt commented 9 years ago

I don't see much more information in the verbose version. https://gist.github.com/physikerwelt/b35695d464310c5dc963

physikerwelt commented 9 years ago

Which is the latest stable version? I also tried with the v0.8.0 branch but that did not help... it crashed without any notice.

Raduh commented 9 years ago

v0.8.0 is the last stable version. Can you try to run a fresh build manually?:

git clone git@github.com:KWARC/mws.git &&
cd mws &&
make -j &&
cd bin &&
./mwsd -I <path_to_harvests> -e xml
physikerwelt commented 9 years ago

Yes that seems to work... unfortunately I crashed the server imediately with an empty post request

Index built successfully.
Listening on port 9090
mwsd: /home/computer-user/ms/mws/src/mws/daemon/Daemon.cpp:113: FILE* mws::daemon::MemStream::getOutputFile(): Assertion `_output != nullptr' failed.
Fatal error in GNU libmicrohttpd daemon.c:3885: Failed to join a thread

Index was unmmapped.
Aborted (core dumped)
Raduh commented 9 years ago

Hmm, I found the cause for crashing on empty POSTs and will release a patch soon. I think the fresh build works for everything else, right?

If so, the original error you reported might be because of a bad config (for some reason, mwsd was trying to export the index, but in the config file you shared, there was no flag to cause this, so I think it was taking the wrong config file).