sbws icon indicating copy to clipboard operation
sbws copied to clipboard

Warning when running scanner does not match with reason

Open juga0 opened this issue 7 years ago • 3 comments

Right now running:

sbws init
sbws --log-level DEBUG scanner

Gives the message:

[2018-05-18 07:41:45,800] [sbws.globals] [CRITICAL] No enabled destinations in config
[2018-05-18 07:41:45,818] [sbws.lib.resultdump] [DEBUG] Keeping 0/0 results
[2018-05-18 07:41:45,818] [sbws.lib.resultdump] [WARNING] Results files that are valid not found. Probably sbws scanner was not run first or it ran more than 7 days ago or it was using a different datadir than /home/foo/.sbws/datadir.

The critical info is correct, but not the warning.

juga0 avatar May 18 '18 07:05 juga0

I see the same thing.

It's because the resultdump lines are generated in a different thread.

One possible fix would be to add a start_event that isn't set until the main thread is ready and everything looks fine. Then the first thing ResultDump.enter() would do is wait for either start_event or end_event to be set.

pastly avatar May 18 '18 12:05 pastly

I think this can be closed now, right?

juga0 avatar Jun 06 '18 09:06 juga0

This is still a bug. Low priority IMHO, but still a bug.

(venv-editable) cranium:simple-bw-scanner mtraudt$ sbws -d /tmp/sbws --log-level DEBUG scanner
[2018-06-12 10:41:11,342] [sbws.globals] [DEBUG] /tmp/sbws seems initialized.
[2018-06-12 10:41:11,343] [sbws.core.scanner] [INFO] Scanner started at 2018-06-12T14:41:11
[2018-06-12 10:41:11,343] [sbws.util.filelock] [DEBUG] Going to lock /tmp/sbws/started_at.lockfile
[2018-06-12 10:41:11,343] [sbws.util.filelock] [DEBUG] Received lock /tmp/sbws/started_at.lockfile
[2018-06-12 10:41:11,343] [sbws.util.filelock] [DEBUG] Releasing lock /tmp/sbws/started_at.lockfile
[2018-06-12 10:41:11,344] [sbws.util.stem] [INFO] Adding "Socks5Proxy 127.0.0.1:2343" to torrc with which we are launching Tor
[2018-06-12 10:41:11,386] [sbws.util.stem] [DEBUG] Jun 12 10:41:11.386 [notice] Tor 0.3.2.10 (git-31cc63deb69db819) running on Darwin with Libevent 2.1.8-stable, OpenSSL 1.0.2o, Zlib 1.2.5, Liblzma N/A, and Libzstd N/A.
[2018-06-12 10:41:11,387] [sbws.util.stem] [DEBUG] Jun 12 10:41:11.386 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
[... snip Tor bootstrapping ...]
[2018-06-12 10:41:20,807] [sbws.util.stem] [DEBUG] Jun 12 10:41:20.000 [notice] Bootstrapped 100%: Done
[2018-06-12 10:41:20,829] [sbws.util.stem] [INFO] Started and connected to Tor 0.3.2.10 (git-31cc63deb69db819) via /tmp/sbws/tor/control_socket
[2018-06-12 10:41:28,528] [sbws.lib.destination] [DEBUG] freebird is disabled; not loading it
[2018-06-12 10:41:28,528] [sbws.lib.destination] [DEBUG] foo is disabled; not loading it
[2018-06-12 10:41:28,528] [sbws.globals] [CRITICAL] No enabled destinations in config
[2018-06-12 10:41:28,626] [sbws.lib.resultdump] [DEBUG] Keeping 0/0 results after removing old ones
[2018-06-12 10:41:28,626] [sbws.lib.resultdump] [WARNING] Results files that are valid not found. Probably sbws scanner was not run first or it ran more than 7 days ago or it was using a different datadir than /tmp/sbws/datadir.

pastly avatar Jun 12 '18 14:06 pastly