[Downloader] Downloader unloads on bot restart. #3415

Closed
opened 2020-01-19 14:04:00 +01:00 by Dav-Git · 16 comments
Dav-Git commented 2020-01-19 14:04:00 +01:00 (Migrated from github.com)

Other bugs

What were you trying to do?

I wanted to update my cogs by running [p]cog update

What were you expecting to happen?

My cogs to update

What actually happened?

Nothing, because downloader was unloaded. I did some troubleshooting and noticed that this happens at every restart.

How can we reproduce this issue?

  1. Load downloader
  2. Install a 3rd party cog
  3. Restart server/machine (Bot as systemd service active)
  4. Try to update cog
# Other bugs <!-- Did you find a bug with something other than a command? Fill out the following: --> #### What were you trying to do? I wanted to update my cogs by running ``[p]cog update`` #### What were you expecting to happen? My cogs to update #### What actually happened? Nothing, because downloader was unloaded. I did some troubleshooting and noticed that this happens at every restart. #### How can we reproduce this issue? 1. Load downloader 2. Install a 3rd party cog 3. Restart server/machine (Bot as systemd service active) 4. Try to update cog
Flame442 commented 2020-01-19 16:12:25 +01:00 (Migrated from github.com)

I can't seem to reproduce this. If you could start your bot and look through the logs above where the logo is, there might be an error message there. When the bot encounters an error loading a cog on startup, it is automatically unloaded. That is what I suspect to be happening (for some reason).

I can't seem to reproduce this. If you could start your bot and look through the logs above where the logo is, there might be an error message there. When the bot encounters an error loading a cog on startup, it is automatically unloaded. That is what I suspect to be happening (for some reason).
mikeshardmind commented 2020-01-19 16:12:32 +01:00 (Migrated from github.com)

Can't seem to reproduce this issue either.

Can't seem to reproduce this issue either.
Dav-Git commented 2020-01-19 16:59:18 +01:00 (Migrated from github.com)

Logs show nothing. Possibly after update? I actually can't reproduce it anymore myself.
It's like just the action of opening an issue on GitHub will solve all of my problems. (Stupid thing literally unloaded 3 times on two different bots before... oh well.)

Logs show nothing. Possibly after update? I actually can't reproduce it anymore myself. It's like just the action of opening an issue on GitHub will solve all of my problems. (Stupid thing literally unloaded 3 times on two different bots before... oh well.)
Dav-Git commented 2020-01-23 02:46:07 +01:00 (Migrated from github.com)

I found the issue! It unloads on server/system reboot, not on bot restart. The restart on itself is fine but as soon as I reboot the entire machine the bot runs on, downloader gets unloaded.

I'll update the issue description with the new steps to reproduce

I found the issue! It unloads on server/system reboot, not on bot restart. The restart on itself is fine but as soon as I reboot the entire machine the bot runs on, downloader gets unloaded. I'll update the issue description with the new steps to reproduce
yamikaitou commented 2020-01-23 03:04:38 +01:00 (Migrated from github.com)

What OS, Arch, Version? Are you using the service file as written in the guide (with python or with redbot?)? Have you looked in the journalctl to see if anything is printed? It would be before the RedBot text box.

What OS, Arch, Version? Are you using the service file as written in the guide (with python or with redbot?)? Have you looked in the journalctl to see if anything is printed? It would be before the RedBot text box.
Dav-Git commented 2020-01-23 03:15:46 +01:00 (Migrated from github.com)

Ubuntu18.04.3 LTS
Service file with python, not the redbot entrypoint.
No logs (journalctl as expected just displays the redbot textbox)

Ubuntu18.04.3 LTS Service file with python, not the redbot entrypoint. No logs (journalctl as expected just displays the redbot textbox)
yamikaitou commented 2020-01-23 04:01:59 +01:00 (Migrated from github.com)

Just tried it on a new droplet, didn't happen to me. Tried a reboot with shutdown -r now as well as flipping the On/Off switch in DO's panel (this one cause uvloop to error). Each time the bot started up with the same 3 cogs I had loaded before (downloader, rolemanagement, retrigger)

Just tried it on a new droplet, didn't happen to me. Tried a reboot with `shutdown -r now` as well as flipping the On/Off switch in DO's panel (this one cause uvloop to error). Each time the bot started up with the same 3 cogs I had loaded before (downloader, rolemanagement, retrigger)
Dav-Git commented 2020-01-24 11:40:02 +01:00 (Migrated from github.com)

I really can't explain it. I have 3 bits on that machine all in seperate venvs and they all show the same behaviour.

I really can't explain it. I have 3 bits on that machine all in seperate venvs and they all show the same behaviour.
Drapersniper commented 2020-01-24 11:44:43 +01:00 (Migrated from github.com)

@Dav-Git Can you please try to set your service file to start the bot with the --debug flag to generate more detailed bugging log.

Please get full logs from first bootup to restart and running [p]cogs

In adition to this whos your host?

(Note --debug should be on for all the time while you are reproducing this issue)
Also can you post [p]debuginfo for all the bots.
And a screenshot of [p]cogs please

@Dav-Git Can you please try to set your service file to start the bot with the `--debug` flag to generate more detailed bugging log. Please get full logs from first bootup to restart and running `[p]cogs` In adition to this whos your host? (Note `--debug` should be on for all the time while you are reproducing this issue) Also can you post `[p]debuginfo` for all the bots. And a screenshot of `[p]cogs` please
Dav-Git commented 2020-01-24 12:14:45 +01:00 (Migrated from github.com)

This is a mixture of the logs of all 3 instances I'll see if I can untangle them in a minute.

grafik
grafik
grafik
grafik

Output of [p]cogs per instance after reboot (I realized I should've probably done a [p] cogs before reboot too. But you can trust me downloader was loaded)

grafik
grafik
grafik

And here is [p]debuginfo

grafik
grafik
grafik

#### This is a mixture of the logs of all 3 instances I'll see if I can untangle them in a minute. ![grafik](https://user-images.githubusercontent.com/57032623/73064716-22f00200-3ea2-11ea-9d14-7dedd6bf2a7b.png) ![grafik](https://user-images.githubusercontent.com/57032623/73065802-be827200-3ea4-11ea-9d7f-0bce79ab2639.png) ![grafik](https://user-images.githubusercontent.com/57032623/73064753-369b6880-3ea2-11ea-8a25-5a6d80ee1f1f.png) ![grafik](https://user-images.githubusercontent.com/57032623/73064821-56cb2780-3ea2-11ea-9294-b9831e597ab4.png) #### Output of ``[p]cogs`` per instance after reboot (I realized I should've probably done a [p] cogs before reboot too. But you can trust me downloader was loaded) ![grafik](https://user-images.githubusercontent.com/57032623/73064874-7c583100-3ea2-11ea-9489-2c431f35d499.png) ![grafik](https://user-images.githubusercontent.com/57032623/73064886-82e6a880-3ea2-11ea-9dae-8ef08d337aa0.png) ![grafik](https://user-images.githubusercontent.com/57032623/73064961-a90c4880-3ea2-11ea-8a58-70f932434391.png) #### And here is ``[p]debuginfo`` ![grafik](https://user-images.githubusercontent.com/57032623/73065076-f7214c00-3ea2-11ea-84e6-506c20320895.png) ![grafik](https://user-images.githubusercontent.com/57032623/73065099-01dbe100-3ea3-11ea-830a-b8e01d94a129.png) ![grafik](https://user-images.githubusercontent.com/57032623/73065128-0f916680-3ea3-11ea-863a-8ab7e60c2848.png)
Drapersniper commented 2020-01-24 12:22:57 +01:00 (Migrated from github.com)

There's a section of the logs missing between the first and second screenshot

There's a section of the logs missing between the first and second screenshot
Dav-Git commented 2020-01-24 12:25:41 +01:00 (Migrated from github.com)

ah crap i thought the 545 and 546 were the same. Standby i'll edit the comment

ah crap i thought the 545 and 546 were the same. Standby i'll edit the comment
Drapersniper commented 2020-01-24 12:33:03 +01:00 (Migrated from github.com)

Every line between the first line containing ===Basic Congig=== and Invite URL as that will be the part that shows if something is happening

Every line between the first line containing `===Basic Congig===` and `Invite URL` as that will be the part that shows if something is happening
Dav-Git commented 2020-01-24 12:34:42 +01:00 (Migrated from github.com)

They are all there now

They are all there now
Drapersniper commented 2020-01-24 12:40:34 +01:00 (Migrated from github.com)

Awesome have a feeling narrowed down the issue happening here, i'll leave it to Jack to confirm though

Awesome have a feeling narrowed down the issue happening here, i'll leave it to Jack to confirm though
Dav-Git commented 2020-01-24 12:42:05 +01:00 (Migrated from github.com)

Just the actual error for easy readability
grafik

Just the actual error for easy readability ![grafik](https://user-images.githubusercontent.com/57032623/73066699-fdb1c280-3ea6-11ea-9aca-f1817566b8f9.png)
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot#3415
No description provided.