stolk/chiaharvestgraph

Failure to run when fewer than 8 log files exist

Closed this issue · 3 comments

After some harvester downtime and a reboot from hardware upgrades, I get this on Ubuntu 21:

tiger@***:~/chiaharvestgraph$ ./chiaharvestgraph ~/.chia/mainnet/log
Monitoring directory /home/tiger/.chia/mainnet/log
Failed to open log file '/home/tiger/.chia/mainnet/log/debug.log.7'
Failed to open log file '/home/tiger/.chia/mainnet/log/debug.log.6'
Failed to open log file '/home/tiger/.chia/mainnet/log/debug.log.5'
Failed to open log file '/home/tiger/.chia/mainnet/log/debug.log.4'
Failed to open log file '/home/tiger/.chia/mainnet/log/debug.log.3'
chiaharvestgraph: chiaharvestgraph.c:134: add_entry: Assertion `s>=0' failed.
Aborted (core dumped)

Sure enough, ls of my Chia log directory reveals only debug.log, debug.log.1, and debug.log.2.

If I let the system run long enough that all 8 logfiles are generated, then re-run chiaharvestgraph, it works fine, but it seems like it would be ideal for it to operate regardless of the number of available log files.

stolk commented

This is a different issue. The missing log files are benign, as long as you have at least one log file, it should work.

Also, you seem to have an old version, as line 134 of chiaharvestgraph.c looks different in the current repository.

Please do:

$ git pull
$ make
$ ./chiaharvestgraph ~/.chia/mainnet/log

thx

Yep, that fixed it - still get the log errors, but I guess those are actually warnings, as it then proceeds to load the graph correctly. I had tried pulling, but had not realized I also needed to remake. Sorry!

stolk commented

Thanks for letting me know.