View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
18798 | Bug reports | Statistics | public | 2023-05-02 13:50 | 2023-07-31 15:02 |
Reporter | ollehar | Assigned To | ollehar | ||
Priority | high | Severity | crash | ||
Status | closed | Resolution | fixed | ||
Product Version | 6.0.x | ||||
Summary | 18798: Out-of-memory problem in statistics export | ||||
Description | Response::findAll() cannot work and must be reverted See code in statistics helper functions Old code by Dominik that was not stress tested properly. Now it causes out-of-memory white screen of death. Branch: bug/out-of-memory-statistics (based on 5.x, but needs to be done in master too) | ||||
Steps To Reproduce | Need a survey using encryption and 50k+ responses. | ||||
Tags | No tags attached. | ||||
Bug heat | 12 | ||||
Complete LimeSurvey version number (& build) | v5 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | - | ||||
Database type & version | - | ||||
Server OS (if known) | - | ||||
Webserver software & version (if known) | - | ||||
PHP Version | - | ||||
related to | 18813 | new | Summary table in statistics is missing opening tbody tag | |
related to | 18814 | closed | tibor.pacalat | Array question statistics fail for Remote Control |
Branch: bug/out-of-memory-statistics (based on 5.x, but needs to be done in master too) Started some work here already. The code raw SQL inside displaySimpleResults() needs to be restored and Response::model()->findAll() removed, together with the loops. The raw SQL need to compare with encrypted version of empty string or “-oth-” if the question is encrypted. |
|
|
|
it does not, Denis, but Dominik looped all responses to decrypt them, which obviously will never work with lots of participants. |
|
Right … really complex here What solution we have ? We :
I'm unsure we have a clean solution … |
|
Read my commit in the branch. We don't salt the encryptions, so exact compare is possible, which is all that it takes. Dominik didn't realize, it seems. |
|
Yes, it's a low security encryption here. But it's here : https://github.com/LimeSurvey/LimeSurvey/blob/f0e7e3acbfe76a78237ff8ab4b0989d2acf692d2/application/helpers/admin/statistics_helper.php#L530 (for single choice). Available only for single choice, you can encrypt Answers code value. But if you have 50 free text question : still broken … |
|
From my point of view: For the open text questions,
I believe a list of text answers is also possible to show there. |
|
2 POV About filter
About using to construct the graph (or export etc …)
Maybe : decrypt can use some already Answers->crypted value ? Done at start with all crypted value of single answer ? |
|
Ehm, there's no reason to restrict a feature if we can just fix it, or? Unless the fix is very hard. |
|
Disable filter by free text is a bad idea : it work if you have some response and/or a lot of memory : put an alert is the best . |
|
A checkbox (with explain that can allow to search on big data in case of memory issue) ? |
|
Well,
Yes. We are already doing that in some places.
I don't like the alert. "Use at your own risk. Please take into account this may fail"? :)
Will review it. Bump into this blocking thing. Wanted to solve it as it may guide the rest of the solution. |
|
But remove a feature to all user because some can have issue it's worst … You can not remove the current feature allowing to search in contains on 200 response because you need to disable (maybe) in 5 000 |
|
Well, that's a downside :) haha Would like to hear @ollehar about other probable fixing ideas.
This I think could be a good workaround. |
|
Wasn't the current code already limited to exact match? Maybe I misunderstood it. |
|
Well, there is some work to be done here. |
|
Is that old or current code in your screenshot? |
|
Branch updated: Left fixing of some problems out of the scope as to focus on the memory stuff. |
|
Added a PR for the branch: https://github.com/LimeSurvey/LimeSurvey/pull/3111 |
|
Nice, it works, but customer didn't actually have any encrypted questions, what I can see in the responses view. Sooooo how to test?? |
|
I am actually working on some unit test scripts for it :) |
|
Brilliant! |
|
Initial set of tests: https://github.com/LimeSurvey/LimeSurvey/pull/3121 |
|
Cool. You wanna rebranch it to 5.x? That's where the fix is based on. We need to cherry-pick it to master later. |
|
New PR for master: SimpleStatistics
Sorry, got delayed enhancing the test with more question types. |
|
Status. At the very beginning we had this branch (PR 3121): As we were developing it we stumble with this bug. So then created a new branch (deriving from the first branch) holding the tests for array and the bug fix All this is for v6 By looking at the code we see more bugs similar to 18814. |
|
@ollehar Not sure how you prefer to merge this:
|
|
PR for v5 including fix and tests. |
|
This is the only PR pending for v6 |
|
I rerun failed job to have green and merge if it's OK |
|
I believe the error is coming from master. |
|
It was. I reverted the offending commit, please try to merge again now. :) |
|
Does the person that worked on this fix has some survey file that they can share to test and verify the fix here https://github.com/LimeSurvey/LimeSurvey/pull/3111? |
|
The fix is very wide in terms as it updates some basic queries. |
|
So you are saying it doesn't need testing or? |
|
I am saying the fix is not specific as to have specific testing instructions. |
|
Sure, but what are the steps to reproduce one use case where this happens (plus .lsa file)? |
|
We had a customer report this error, and I could use the customer's data to reproduce it. But which customer... |
|
Fix committed to 5.x branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=34856 |
|
I merged this now, since it's too hard to test anyway. |
|
Fix committed to 5.x branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=34857 |
|
Had to revert, CI got red. Please redo the PR and fix any bugs. |
|
New v5 PR: https://github.com/LimeSurvey/LimeSurvey/pull/3231 |
|
Merged, thank you Gabriel! |
|
Fix committed to 5.x branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=34864 |
|
Fixed in Release 5.6.28+230627 |
|
Need to do it for master as well, right? |
|
Master PR: https://github.com/LimeSurvey/LimeSurvey/pull/3267 |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=35186 |
|
Fixed in Release 6.2.0+230732 |
|
LimeSurvey: 5.x 47c40dbe 2023-06-20 14:02 Committer: GitHub Details Diff |
Fixed issue 18798: Out-of-memory problem in statistics export (#3111) Co-authored-by: lapiudevgit <devgit@lapiu.biz> |
Affected Issues 18798 |
|
mod - application/helpers/admin/statistics_helper.php | Diff File | ||
LimeSurvey: 5.x baeb6afc 2023-06-20 14:59 Details Diff |
Revert "Fixed issue 18798: Out-of-memory problem in statistics export (#3111)" This reverts commit 47c40dbe4f6b381e97d603de174c25503be60176. |
Affected Issues 18798 |
|
mod - application/helpers/admin/statistics_helper.php | Diff File | ||
LimeSurvey: 5.x e9bec13e 2023-06-20 17:53 Gabriel Jenik Committer: GitHub Details Diff |
Fixed issue 18798: Out-of-memory problem in statistics export (#3231) Co-authored-by: lapiudevgit <devgit@lapiu.biz> |
Affected Issues 18798 |
|
mod - application/helpers/admin/statistics_helper.php | Diff File | ||
LimeSurvey: master e581edbc 2023-07-18 17:22 Gabriel Jenik Committer: GitHub Details Diff |
Fixed issue 18798: Out-of-memory problem in statistics export (#3231) (03267) |
Affected Issues 18798 |
|
mod - application/helpers/admin/statistics_helper.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2023-05-02 13:50 | ollehar | New Issue | |
2023-05-02 13:50 | ollehar | Assigned To | => gabrieljenik |
2023-05-02 13:50 | ollehar | Status | new => assigned |
2023-05-02 13:50 | ollehar | Summary | Response::findAll() cannot work and must be reverted => Out-of-memory problem in statistics export |
2023-05-02 13:50 | ollehar | Description Updated | |
2023-05-02 13:51 | ollehar | Steps to Reproduce Updated | |
2023-05-02 13:53 | ollehar | Note Added: 74750 | |
2023-05-02 13:53 | ollehar | Bug heat | 0 => 2 |
2023-05-02 13:53 | ollehar | Description Updated | |
2023-05-02 13:54 | ollehar | Note Edited: 74750 | |
2023-05-02 13:54 | ollehar | Note Edited: 74750 | |
2023-05-02 15:04 | DenisChenu | Note Added: 74752 | |
2023-05-02 15:04 | DenisChenu | Bug heat | 2 => 4 |
2023-05-02 15:39 | ollehar | Note Added: 74755 | |
2023-05-02 16:07 | DenisChenu | Note Added: 74756 | |
2023-05-02 16:07 | DenisChenu | File Added: Capture d’écran du 2023-05-02 16-06-46.png | |
2023-05-02 16:08 | ollehar | Note Added: 74757 | |
2023-05-02 16:09 | ollehar | Note Edited: 74757 | |
2023-05-02 16:16 | DenisChenu | Note Added: 74759 | |
2023-05-02 22:37 | gabrieljenik | Note Added: 74764 | |
2023-05-02 22:37 | gabrieljenik | Bug heat | 4 => 6 |
2023-05-03 08:05 | DenisChenu | Note Added: 74765 | |
2023-05-03 10:13 | ollehar | Note Added: 74767 | |
2023-05-03 10:36 | DenisChenu | Note Added: 74768 | |
2023-05-03 10:36 | DenisChenu | Note Added: 74769 | |
2023-05-03 10:44 | ollehar | Priority | none => high |
2023-05-03 14:29 | gabrieljenik | Note Added: 74778 | |
2023-05-03 14:30 | gabrieljenik | Note Edited: 74778 | |
2023-05-03 14:37 | DenisChenu | Note Added: 74780 | |
2023-05-03 14:48 | gabrieljenik | Note Added: 74783 | |
2023-05-04 13:02 | ollehar | Note Added: 74808 | |
2023-05-04 14:51 | gabrieljenik | Note Added: 74812 | |
2023-05-04 14:51 | gabrieljenik | File Added: image.png | |
2023-05-04 14:56 | ollehar | Note Added: 74814 | |
2023-05-04 23:14 | gabrieljenik | Note Added: 74827 | |
2023-05-05 11:42 | ollehar | Note Added: 74830 | |
2023-05-05 13:14 | ollehar | Note Added: 74838 | |
2023-05-05 15:37 | gabrieljenik | Note Added: 74847 | |
2023-05-05 15:40 | ollehar | Note Added: 74848 | |
2023-05-09 21:17 | gabrieljenik | Note Added: 74906 | |
2023-05-10 11:02 | ollehar | Note Added: 74912 | |
2023-05-11 22:03 | gabrieljenik | Note Added: 74938 | |
2023-05-11 22:09 | gabrieljenik | Issue cloned: 18813 | |
2023-05-11 22:09 | gabrieljenik | Relationship added | related to 18813 |
2023-05-11 22:11 | gabrieljenik | Issue cloned: 18814 | |
2023-05-11 22:11 | gabrieljenik | Relationship added | related to 18814 |
2023-05-15 18:21 | gabrieljenik | Note Added: 74987 | |
2023-05-15 18:27 | gabrieljenik | Note Added: 74990 | |
2023-05-15 23:27 | gabrieljenik | Note Added: 75002 | |
2023-05-17 23:19 | gabrieljenik | Assigned To | gabrieljenik => ollehar |
2023-05-17 23:19 | gabrieljenik | Status | assigned => ready for merge |
2023-05-23 20:18 | gabrieljenik | Note Added: 75201 | |
2023-05-24 07:24 | DenisChenu | Assigned To | ollehar => DenisChenu |
2023-05-24 07:25 | DenisChenu | Note Added: 75203 | |
2023-05-24 15:09 | gabrieljenik | Note Added: 75218 | |
2023-05-24 17:02 | ollehar | Note Added: 75219 | |
2023-05-31 08:35 | DenisChenu | Assigned To | DenisChenu => gabrieljenik |
2023-05-31 15:02 | gabrieljenik | Assigned To | gabrieljenik => ollehar |
2023-06-06 13:43 | tibor.pacalat | Note Added: 75424 | |
2023-06-06 13:43 | tibor.pacalat | Bug heat | 6 => 8 |
2023-06-06 14:34 | gabrieljenik | Note Added: 75426 | |
2023-06-06 14:56 | tibor.pacalat | Note Added: 75427 | |
2023-06-06 15:02 | gabrieljenik | Note Added: 75428 | |
2023-06-06 18:10 | tibor.pacalat | Note Added: 75453 | |
2023-06-07 12:14 | ollehar | Note Added: 75458 | |
2023-06-07 12:14 | ollehar | Note Edited: 75458 | |
2023-06-20 12:02 | ollehar | Changeset attached | => LimeSurvey 5.x 47c40dbe |
2023-06-20 12:02 | ollehar | Note Added: 75728 | |
2023-06-20 12:02 | ollehar | Resolution | open => fixed |
2023-06-20 12:05 | ollehar | Status | ready for merge => resolved |
2023-06-20 12:05 | ollehar | Note Added: 75729 | |
2023-06-20 12:59 | ollehar | Changeset attached | => LimeSurvey 5.x baeb6afc |
2023-06-20 12:59 | ollehar | Note Added: 75730 | |
2023-06-20 13:02 | ollehar | Status | resolved => new |
2023-06-20 13:02 | ollehar | Resolution | fixed => reopened |
2023-06-20 13:02 | ollehar | Note Added: 75731 | |
2023-06-20 13:04 | ollehar | Note Edited: 75731 | |
2023-06-20 15:26 | gabrieljenik | Note Added: 75740 | |
2023-06-20 15:26 | gabrieljenik | Status | new => ready for code review |
2023-06-20 15:26 | gabrieljenik | Complete LimeSurvey version number (& build) | master => v5 |
2023-06-20 15:53 | ollehar | Status | ready for code review => resolved |
2023-06-20 15:53 | ollehar | Note Added: 75745 | |
2023-06-20 16:36 | Changeset attached | => LimeSurvey 5.x e9bec13e | |
2023-06-20 16:36 | guest | Note Added: 75746 | |
2023-06-20 16:36 | guest | Bug heat | 8 => 10 |
2023-06-26 12:04 | LimeBot | Note Added: 75860 | |
2023-06-26 12:04 | LimeBot | Status | resolved => closed |
2023-06-26 12:04 | LimeBot | Resolution | reopened => fixed |
2023-06-26 12:04 | LimeBot | Bug heat | 10 => 12 |
2023-06-26 14:20 | gabrieljenik | Status | closed => assigned |
2023-06-26 14:20 | gabrieljenik | Note Added: 75863 | |
2023-07-03 15:25 | gabrieljenik | Note Added: 75922 | |
2023-07-03 15:25 | gabrieljenik | Status | assigned => ready for code review |
2023-07-18 15:22 | Changeset attached | => LimeSurvey master e581edbc | |
2023-07-18 15:22 | guest | Note Added: 76135 | |
2023-07-31 15:02 | LimeBot | Note Added: 76371 | |
2023-07-31 15:02 | LimeBot | Status | ready for code review => closed |