HelloZeroNet / HelloZeroNet/ZeroNet

ContentDbPlugin.py - loadFilesOptional - KeyError: u'siteaddress'

Ouverte
#1,932 0 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
18.8k
Forks
2.3k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

### Step 1: Please describe your environment

* ZeroNet version: 3853
* Operating system: Linux
* Special configuration: Bootstrapper plugin, multiuser local plugin; Python 2.7.12

### Step 2: Describe the problem:

When i try to download any site:
python ../zeronet.py --silent siteDownload "15mQd6kBRzriaVEjdELujex2YKFfWaA8JQ"

it returns this:

```
- Unhandled exception
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 766, in gevent._greenlet.Greenlet.run
File "/root/ZeroNet-master/plugins/OptionalManager/ContentDbPlugin.py", line 97, in loadFilesOptional
site = self.sites[site_address]
KeyError: u'1GrwWFTmrKgUGQsGxrKSsRbb2dt8UJaBPN'
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 766, in gevent._greenlet.Greenlet.run
File "/root/ZeroNet-master/plugins/OptionalManager/ContentDbPlugin.py", line 97, in loadFilesOptional
site = self.sites[site_address]
KeyError: u'1GrwWFTmrKgUGQsGxrKSsRbb2dt8UJaBPN'
```

The KeyError is always about site "1GrwWFTmrKgUGQsGxrKSsRbb2dt8UJaBPN".

The memory usage rise like 100MB or more due to siteDownload command and as a result the primary zeronet that is running crash. Also i see 2 same siteDownload processes for same site at same time, which is strange, then like 30 seconds later i see 5+ same processes of siteDownload (for same site) showing like 40% RAM usage. Then the siteDownload command gets killed.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Start by reproducing the siteDownload command with the reported ZeroNet version and inspect plugins/OptionalManager/ContentDbPlugin.py at loadFilesOptional line 97. Trace why the requested site address is absent from self.sites and why duplicate downloads accumulate. Done means the KeyError and duplicate processes no longer occur and siteDownload does not cause the reported memory growth or crash.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
backend
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.