-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handle-search is getting stuck when using "containing..." #515
Comments
Which ZIM file exactly? Which search pattern exactly? |
I thought all of the ones I have installed are affected, WikiMed, Chemistry, Mathematics |
I'm having the same problem on Win10 64 with kiwix-serve version 3.1.2. Trying to open
If I try that search on and old zim I have around ( In fact, it works with: |
I confirm, kiwix-serve get stuck... but does not crash and does not returns anything. |
Observed this here as well. Win10, with kiwix-serve.exe from kiwix-tools_win-i686-3.1.2-4.zip. Run: Loads fine in the browser, but full-text search hangs indefinitely, while trying to load URL: |
@MananJethwani @mgautierfr This bug HAS to be fixed before next release. |
After investigation, there are several points : The bug should appears with libzim 6.3.0 AND zim file using zstd compression. With a default cache of 16 cluster, this means we allocate 2Gb. What to do :
A workaround for this bug is to reduce the cluster cache size by setting the env variable |
Ping @veloman-yunkan in case you miss this discussion. |
@mgautierfr Thank you for the investigation and the analysis. Your two proposal look good to me. This should be quickly implemented and one time merged, we should backport them and release a libzim 6.3.1. We should as well quickly if this resolve as well #513 |
If somehow `Decoder::stream_run_encode` fails, `m_decoderState.avail_out` will never be updated and we are in a infinite loop. We must exit the loop at a moment. Raising a exception may crash the user code if it doesn't catch it. For kiwix-serve, we will return a 500 error code but we will still be running. See kiwix/libkiwix#515
The max level (22) set a huge windowSize (128Mb). It if far too much and we don't even need it (most of our compressed content is about 1Mb). By setting a level of 19, the windowSize is 8Mb and the compression ratio is relativly equivalent. From lzbench https://github.com/inikep/lzbench the ratio is 24.88 for level 22 and 25.33 for level 18. See kiwix/libkiwix#515
@mgautierfr With the fix how many zim can beliaded in parallel in a RPI W Zero? |
The max level (22) set a huge windowSize (128Mb). It if far too much and we don't even need it (most of our compressed content is about 1Mb). By setting a level of 19, the windowSize is 8Mb and the compression ratio is relativly equivalent. From lzbench https://github.com/inikep/lzbench the ratio is 24.88 for level 22 and 25.33 for level 18. See kiwix/libkiwix#515
`CompStatus::OTHER` is not really used and is mainly used as a error code (if used). Let's remove it and directly throw a exception instead of returning it. This commit make the ZSTD/LZMA error correctly handled (at least not silently ignored) during (de)compression. See kiwix/libkiwix#515
We must handle exception raised in the callable in `getOrPut`. If not, we would have a broken promise in the cache. It is better to have no promise in the cache at all if we fail to create the value. (The concurent cache user as no notion of promise). And sometime, the creation of the value is temporarly failing. For exemple, in kiwix/libkiwix#515, if some memory is free, we would be able to create a cluster even if we failed the last time.
`CompStatus::OTHER` is not really used and is mainly used as a error code (if used). Let's remove it and directly throw a exception instead of returning it. This commit make the ZSTD/LZMA error correctly handled (at least not silently ignored) during (de)compression. See kiwix/libkiwix#515
We must handle exception raised in the callable in `getOrPut`. If not, we would have a broken promise in the cache. It is better to have no promise in the cache at all if we fail to create the value. (The concurent cache user as no notion of promise). And sometime, the creation of the value is temporarly failing. For exemple, in kiwix/libkiwix#515, if some memory is free, we would be able to create a cluster even if we failed the last time.
`CompStatus::OTHER` is not really used and is mainly used as a error code (if used). Let's remove it and directly throw a exception instead of returning it. This commit make the ZSTD/LZMA error correctly handled (at least not silently ignored) during (de)compression. See kiwix/libkiwix#515
We must handle exception raised in the callable in `getOrPut`. If not, we would have a broken promise in the cache. It is better to have no promise in the cache at all if we fail to create the value. (The concurent cache user as no notion of promise). And sometime, the creation of the value is temporarly failing. For exemple, in kiwix/libkiwix#515, if some memory is free, we would be able to create a cluster even if we failed the last time.
`CompStatus::OTHER` is not really used and is mainly used as a error code (if used). Let's remove it and directly throw a exception instead of returning it. This commit make the ZSTD/LZMA error correctly handled (at least not silently ignored) during (de)compression. See kiwix/libkiwix#515
We must handle exception raised in the callable in `getOrPut`. If not, we would have a broken promise in the cache. It is better to have no promise in the cache at all if we fail to create the value. (The concurent cache user as no notion of promise). And sometime, the creation of the value is temporarly failing. For exemple, in kiwix/libkiwix#515, if some memory is free, we would be able to create a cluster even if we failed the last time.
We must handle exception raised in the callable in `getOrPut`. If not, we would have a broken promise in the cache. It is better to have no promise in the cache at all if we fail to create the value. (The concurent cache user as no notion of promise). And sometime, the creation of the value is temporarly failing. For exemple, in kiwix/libkiwix#515, if some memory is free, we would be able to create a cluster even if we failed the last time.
The max level (22) set a huge windowSize (128Mb). It if far too much and we don't even need it (most of our compressed content is about 1Mb). By setting a level of 19, the windowSize is 8Mb and the compression ratio is relativly equivalent. From lzbench https://github.com/inikep/lzbench the ratio is 24.88 for level 22 and 25.33 for level 18. See kiwix/libkiwix#515
The max level (22) set a huge windowSize (128Mb). It if far too much and we don't even need it (most of our compressed content is about 1Mb). By setting a level of 19, the windowSize is 8Mb and the compression ratio is relativly equivalent. From lzbench https://github.com/inikep/lzbench the ratio is 24.88 for level 22 and 25.33 for level 18. See kiwix/libkiwix#515
The max level (22) set a huge windowSize (128Mb). It if far too much and we don't even need it (most of our compressed content is about 1Mb). By setting a level of 19, the windowSize is 8Mb and the compression ratio is relativly equivalent. From lzbench https://github.com/inikep/lzbench the ratio is 24.88 for level 22 and 25.33 for level 18. See kiwix/libkiwix#515
The max level (22) set a huge windowSize (128Mb). It if far too much and we don't even need it (most of our compressed content is about 1Mb). By setting a level of 19, the windowSize is 8Mb and the compression ratio is relativly equivalent. From lzbench https://github.com/inikep/lzbench the ratio is 24.88 for level 22 and 25.33 for level 18. See kiwix/libkiwix#515
Please test with binaries in http://tmp.kiwix.org/kiwix-tools_3.1.2-5/ |
I can confirm that |
@jamalex Thank you for testing again. An official new maintenance release of kiwix-tools will be done in the next days. Closing the ticket. |
@kelson42: Just to add another data point (sorry for not replying sooner)... With the test binaries (from Thanks to all of you for your work. It is appreciated! |
Hi,
I am using wiki-serve 3.1.2-4 for windows with the latest .zim.
When using the search bar and selecting "containing..."
Doing the verbose, it gets stuck on the handle search.
Is it possible to disable this feature with a start option!
The normal search where the suggestions are popping up is working.
I tried out the kiwix reader on mac and it seems to have a similar issue when doing several searches, that it crashes.
The plugin for the webbrowser seems to be fine.
My work around is to stop the process every 30 seconds and restart it.
The text was updated successfully, but these errors were encountered: