ericaltendorf / plotman

Chia plotting manager
Apache License 2.0
909 stars 280 forks source link

Plotman died #267

Open igorcarrasco opened 3 years ago

igorcarrasco commented 3 years ago
$ plotman status
Traceback (most recent call last):
  File "/usr/local/bin/plotman", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/plotman/plotman.py", line 160, in main
    jobs = Job.get_running_jobs(cfg.directories.log)
  File "/usr/local/lib/python3.8/dist-packages/plotman/job.py", line 94, in get_running_jobs
    job = Job(proc, logroot)
  File "/usr/local/lib/python3.8/dist-packages/plotman/job.py", line 115, in __init__
    val = None if arg in {'-e', '--nobitfield', '-h', '--help', '--override-k'} else next(args_iter)
StopIteration

$ plotman interactive
Traceback (most recent call last):
  File "/usr/local/bin/plotman", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/plotman/plotman.py", line 160, in main
    jobs = Job.get_running_jobs(cfg.directories.log)
  File "/usr/local/lib/python3.8/dist-packages/plotman/job.py", line 94, in get_running_jobs
    job = Job(proc, logroot)
  File "/usr/local/lib/python3.8/dist-packages/plotman/job.py", line 115, in __init__
    val = None if arg in {'-e', '--nobitfield', '-h', '--help', '--override-k'} else next(args_iter)
StopIteration

I started an extra job throught the GUI for a new SSD was this what messed things? I had a couple of plots over 80% gone and I see the process running should I wait or killall ?

altendky commented 3 years ago

That is likely what is causing the issue. Try installing the development branch of plotman instead of main. It has a number of fixes for this. All the plotting processes should be continuing just fine.

igorcarrasco commented 3 years ago

Thanks, That helped, at least plotman status is working so I can use it to check progress:

 plot id    k                                                        tmp       dst    wall   phase    tmp      pid   stat      mem   user    sys     io
--------   32   /media/utiger/846b9006-16a5-4be6-b9e1-0dc292298990/Temp2   /mnt/E1    0:21     ?:?      0   100444    SLP     6.0G   0:27   0:01    11s
--------   32   /media/utiger/846b9006-16a5-4be6-b9e1-0dc292298990/Temp1   /mnt/E2    0:22     ?:?      0    99791    SLP     5.5G   0:29   0:01    14s
74fbbaf1   32                                                  /mnt/ssd1   /mnt/E1    6:43     2:2   210G    70043    RUN     1.7G   4:53   0:11   0:31
3a48b35e   32                                                  /mnt/ssd1   /mnt/E3    6:51     2:3   197G    69051    RUN     1.5G   4:58   0:11   0:34
83939539   32                                                  /mnt/ssd1   /mnt/E3    7:00     2:3   208G    68087    RUN     1.7G   5:03   0:11   0:37
b2526dc3   32                                                  /mnt/ssd2   /mnt/E2    7:35     2:5   227G    65083    RUN     1.7G   5:31   0:12   0:49
bfd04f36   32                                                  /mnt/ssd2   /mnt/E1    7:40     2:5   239G    64335    RUN     1.7G   5:34   0:12   0:48
17c9992d   32                                                  /mnt/ssd2   /mnt/E3    7:50     3:1   234G    63224    RUN     5.9G   5:42   0:12   0:55
9c5f007f   32                                                  /mnt/ssd1   /mnt/E2   13:39     3:6   167G    36087    RUN     5.3G   8:36   0:21   4:38
a0bb5419   32                                                  /mnt/ssd1   /mnt/E2   13:45     3:6   168G    35304    RUN     5.3G   8:37   0:21   4:43
01e60d07   32                                                  /mnt/ssd1   /mnt/E2   13:50     3:6   169G    34565    DSK     5.3G   8:44   0:21   4:44
5a89bdcc   32                                                  /mnt/ssd2   /mnt/E2   13:59     4:0   109G    33535    DSK   421.0M   9:02   0:23   5:00
c8e1bbdc   32                                                  /mnt/ssd2   /mnt/E1   13:59     4:0   109G    32740    DSK   421.0M   8:58   0:24   5:04
2c12b55a   32                                                  /mnt/ssd2   /mnt/E3   14:04     4:0   109G    32090    RUN   432.5M   8:55   0:25   5:13

plotman status does show the new process it can t find logs of(it also lists all the temp files but I omitted that part):

Found plotting process PID 99791, but could not find logfile in its open files:
/home/utiger/.chia/mainnet/plotter/plotter_log_8f106c99-ad32-4319-a694-8d6602a72bb6.txt

Found plotting process PID 100444, but could not find logfile in its open files:
/home/utiger/.chia/mainnet/plotter/plotter_log_b720405e-2c12-443c-b150-a75304c25cae.txt

plotman interactive however is still caput:

Traceback (most recent call last):
  File "/usr/local/bin/plotman", line 8, in <module>
    sys.exit(main())
  File "/home/utiger/.local/lib/python3.8/site-packages/plotman/plotman.py", line 171, in main
    interactive.run_interactive()
  File "/home/utiger/.local/lib/python3.8/site-packages/plotman/interactive.py", line 332, in run_interactive
    curses.wrapper(curses_main)
  File "/usr/lib/python3.8/curses/__init__.py", line 105, in wrapper
    return func(stdscr, *args, **kwds)
  File "/home/utiger/.local/lib/python3.8/site-packages/plotman/interactive.py", line 178, in curses_main
    dst_report = reporting.dst_dir_report(
  File "/home/utiger/.local/lib/python3.8/site-packages/plotman/reporting.py", line 149, in dst_dir_report
    dir2oldphase = manager.dstdirs_to_furthest_phase(jobs)
  File "/home/utiger/.local/lib/python3.8/site-packages/plotman/manager.py", line 31, in dstdirs_to_furthest_phase
    if not j.dstdir in result.keys() or result[j.dstdir] < j.progress():
TypeError: '<' not supported between instances of 'int' and 'NoneType'

It gives the same warnings as plotman status does, regarding the list of the logs and temp files. thanks for all the help

altendky commented 3 years ago

It looks like you installed plotman as root at some point. Don't use your system pip, especially not as root such as with sudo or otherwise.

A similar issue is being addressed in https://github.com/ericaltendorf/plotman/pull/258. But you have uncovered another situation. I think I need to do a more comprehensive change to address this robustly.

igorcarrasco commented 3 years ago

Greetings, I was unable to install plotman using pip, I'm not certain atm but I think I had to install a version of pip3 from python and then I used pip3 to install plotman. I might have used sudo along the way if the command asked for it. Should I remove plotman and atempt a new install?

This probably isn't the place but is there a command that allows you "reload" the plotman config.yaml (so you can change something in the config without having to stop the whole process)

thanks for the help

altendky commented 3 years ago

When you change the config, just stop plotman and restart it. It will redetect existing plots etc.

To be clear, installing Python stuff with pip as root is mostly bad since it is hazardous to the operating system. It also can keep pip from doing a good job of getting compatible dependency versions. This is unrelated though to your reported issue. I would probably tend to uninstall plotman (yes, you would need sudo with this again).

How did you install Chia?

igorcarrasco commented 3 years ago

Thanks for the reply, that's what I've been doing but It seemed not to be taking the update config, I'm probably mistaken. To install chia I followed the instructions for Ubuntu, no thing extra was required as far as I recall.

altendky commented 3 years ago

There are multiple options for installation.

furqanarda commented 3 years ago

When you change the config, just stop plotman and restart it. It will redetect existing plots etc.

To be clear, installing Python stuff with pip as root is mostly bad since it is hazardous to the operating system. It also can keep pip from doing a good job of getting compatible dependency versions. This is unrelated though to your reported issue. I would probably tend to uninstall plotman (yes, you would need sudo with this again).

How did you install Chia?

How can we stop plotman? Which code line? Because when i write: plotman kill [idprefix ...] one of plotting is stopping but new one is starting immediately. And new plotting is not taking a new config.yaml settings.

altendky commented 3 years ago

@furqanarda is this question related to this existing issue? If not, perhaps open a discussion or join #plotman on the chia keybase team to ask about usage.

furqanarda commented 3 years ago

@altendky I can open a discussion.

Thank you.