-
Notifications
You must be signed in to change notification settings - Fork 75
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
MemoryError and no partitions found #41
Comments
I see that '0 partitions' is also part of #17 - so it might be unrelated to my shortcutting the scan process.
While at it: the save-file contains 3.7 million lines.... |
Can you provide detailed specifications about your environment, the Python version (and implementation), system architecture, OS, etcetera? Also, how large is the disk image you are analyzing? Do you have enough swap? |
The disk image is roughly 630GB. This is a Linux amd64 environment better known as sysresccd 4.14.32-std522 with python 3.6.3 (I am not sure what you mean with 'implementation'). The system has 24G available and that is not the limit (no OOM action or whatever), so swap is not used (the counter stays 0). |
It shouldn't even run on Python 3, given that it uses Python 2 syntax.
I meant cPython vs Pypy. |
Sorry... my bad... I run it with Python 2 (2.7.14)
cPython |
The fact that it stops at precisely 4GB looks a bit strange. Have you checked the Python executable is really 64bits? Could you try with Pypy? Unfortunately some large disks or disks that were very fragmented currently require a lot of memory. |
Although 'uname -m' reports this system as being 64bit, all binaries - including python2 - are 32bit. So that is the 4G limit solved. As I am on systemrescuecd the possibilities are limited, 'pypy' for instance is not available. So I fear it stops here - although it would help if we could think of a mechanism that allows partial recovery. |
You could opt for a different live distro (ensuring it's 64-bit) and try if it still crashes. Pypy can be usually installed from the repositories of several distributions. |
I had to physically get to the system, but it is now running a proper 64bit environment and I have pypy available. That solves the crashing bit and it gets a great deal further (I see MATCH lines), but it gets killed off eventually due to being too memory consuming (> 16GB). It hasn't recovered anything when killed :( |
I wish I could say I have an easy solution for that, but currently... I don't. In the future RecuperaBit might (should ?) use a SQLite file to store thousands of information, artifacts, etc but that would require a rewrite that at this time I cannot promise due to lack of time. What I can suggest as a workaround is one of the following:
|
OK, adding swap did not help much (tried that before I read your comment) but the pruning bit did wonders. I now got through to the recovery state. Nice! Perhaps the pruning bit could be a command line option, or even some intelligent feature based on the number of partitions found? |
The problem is that with pruning you are discarding valuable information and you might be recovering less files (there is no way to figure out if those partitions you discard are indeed useless). The user interface might definitely benefit from some improvement but also hopefully the backend can be optimized a bit. |
|
@mirh I understand your concern, currently most of the processing for the reconstruction is done in RAM. Ideally, RecuperaBit should leverage a SQLite DB for much better efficiency. |
Would be cool to see that drop by a factor of 3 to 5... |
Regarding the process that figures out the partition boundaries, it could probably be parallelized partially. That is indeed quite an interesting suggestion. I am really sad that in this period my amount of free time that I can dedicate to improving the tool is near zero. 😢 |
RecuperaBit consistently drops out of warp with a memory error:
Carefully following the process via top I see that in fact the memory in use rises up to 4G and then the process dies. It looks as if it is really the amount of files (or whatever) it finds that causes this.
I found that 'partitioned_files' grows beyond 100000 so around line 720 in ntfs.py I added some code to stop the process when it reached 50000. This "solves" the MemoryError, but now I end up with "0 partitions found" :-(
I already used photorec on this imagefile and that resulted in a lot of files, but obviously all named cryptic, so I hoped recuperabit would rush to the rescue... Any help is appreciated (and if not then perhaps this can help so the tool will exit nicely when it grows irratically).
The text was updated successfully, but these errors were encountered: