HelloZeroNet / HelloZeroNet/ZeroNet
Rebuilding content.db used alot of RAM and end up my PC not responding
- Ngôn ngữ chính
- JavaScript
- Star
- 18.8k
- Fork
- 2.3k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
### Step 1: Please describe your environment
* ZeroNet version: 0.6.4 r3703, Python 2.7.11
* Operating system: Linux Debian
* Tor status: not available
* Opened port: no
* Special configuration: multiuser_local
### Step 2: Describe the problem:
Hello, since i deleted the data/content.db (log said that the database is malformed) when i attempt to launch ZeroNet, it begin to rebuild the database. The RAM usage of the Zeronet"s python process was growing to the point it used like 70% of the memory (4GB RAM, swappiness 10) according to htop, ps auxf.
```
user 7517 0.0 0.0 48064 924 pts/0 S+ 16:28 0:00 | | \_ grep py
user 6569 0.0 0.0 46476 572 pts/1 S+ 16:18 0:00 | | \_ /bin/bash ../Python/python start.py
user 6571 101 **61.9** 3664920 2504984 pts/1 R+ 16:18 10:09 | | \_ ../Python/python2.7 start.py
user 3854 0.0 0.0 283204 3944 ? Sl 15:58 0:00 \_ /usr/bin/python3 /usr/share/system-config-printer/applet.py
```
The debug.log shows alot of lines that seems alright, there is repetition of lines like:
[2018-11-09 ***] WARNING Site:1EEZTd..7X3t data/users/content.json parse error: OSError: [Errno 2] No such file or directory: 'media/veracrypt1/ZeroNet/data/1EEZTdR6oFdeuLzryXE7ga5Y2dijmK7X3t/data/users/' in ContentManager.py line 236
Within a few minutes, computer gets trapped into constant primary/system HDD fulldisk activity (i thing because caching or such), primary/system HDD do not contain my data/ dir, only zeronet app files.), data dir is on ext. HDD (which was almost idle (according to noise) while my primary HDD was fully utilized for many minutes) and computer not responding or with like minute delay.
I had to reset my computer, it happened 2 times, then third time i let it continue hammering my HDD, it took maybe 30 minutes, then i found:
[16:58:10] - Creating UiServer....
../Python/python: line 4: 5851 Killed $DIR/python2.7 "$@"
launching ZN says "DatabaseError: database disk image is malformed" so probably incomplete db rebuild.
I sent the log to the mailbox hello@zero***.io as requested here.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Bắt đầu bằng cách xem lại ContentManager.py quanh dòng 236 và các mục trong debug.log về các lỗi phân tích content.json lặp lại trong quá trình xây dựng lại data/content.db. Tái hiện quá trình xây dựng lại với cấu hình multiuser_local được báo cáo và theo dõi mức sử dụng bộ nhớ và ổ đĩa; hoàn tất khi quá trình xây dựng lại cơ sở dữ liệu hoàn thành mà không làm cạn bộ nhớ hoặc để cơ sở dữ liệu ở trạng thái không hợp lệ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- databases
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100