Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Using "DASHDOT_ENABLE_CPU_TEMPS=true" gives a large error message (crashes the container) #706

Closed
ghost opened this issue Apr 24, 2023 · 11 comments

Comments

@ghost
Copy link

ghost commented Apr 24, 2023

Description of the bug

As the title says, enabling the environment DASHDOT_ENABLE_CPU_TEMPS makes my docker container go haywire.

How to reproduce

I use this docker compose example:

version: "3.9"

services:
  dash:
    container_name: dash
    image: mauricenino/dashdot:latest
    privileged: true
    labels:
     - "org.hotio.pullio.notify=true"
     - "org.hotio.pullio.update=true"
     - "org.hotio.pullio.generic.webhook=https://notifiarr.com/api/v1/notification/pullio/xxxxx-xxxxx-xxxxx-xxxx"
    environment:
      - DASHDOT_ENABLE_CPU_TEMPS=true
      - DASHDOT_FS_VIRTUAL_MOUNTS=gcd-crypt:plex
      - DASHDOT_OVERRIDE_RAM_TYPE=DDR5
      - DASHDOT_DISABLE_INTEGRATIONS=true
    ports:
      - 3001:3001
    volumes:
      - /:/mnt/host:ro
    restart: unless-stopped

So I guess using that example, with the DASHDOT_ENABLE_CPU_TEMPS set to true makes it give the error mentioned down below.
It happens as soon as I try to load the webpage http://ip.of.server:3001 or the reverse proxied url https://dash.domain.com - otherwise it just hangs if I use the docker logs -tf dash and monitor what's happening. It gets stuck after completing the speedtest - and then if I try and load the webpage, it gives the error message.

Relevant log output

Posted the log here:

https://paste.ec/paste/6q3Vq2F4#YfDR+R0YqYAwBDZONFSq3dxY0pvsEajiBhKCp-Sl6Ht


Tried again after a reboot, since I added some entries into the `/etc/modules` to see if that helped - can't figure out if it's the same error or not:
https://paste.ec/paste/S8X1MfgW#wxTj8SyUFPcGyl6bYYqNGgrcYqUeNkPh-0E1Pb0ccnx

Info output of dashdot cli

INFO
=========
Yarn: 1.22.19
Node: v18.15.0
Dash: 5.1.3

Cwd: /app
Hash: 386191c474baca48d35d655bf77a8b4953e8645b
In Docker: true
In Podman: false
In Docker (env): true
Done in 0.17s.

What browsers are you seeing the problem on?

Chrome

Where is your instance running?

Linux Server

Additional context

I've added the correct things in my /etc/modules as well:

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.


# Generated by sensors-detect on Mon Apr 24 22:57:12 2023
# Chip drivers
coretemp
nct6775
@ghost ghost added the type: bug label Apr 24, 2023
@ghost ghost changed the title [Bug] Using "DASHDOT_ENABLE_CPU_TEMPS=true" gives a large error message (doesn't load properly) [Bug] Using "DASHDOT_ENABLE_CPU_TEMPS=true" gives a large error message (crashes the container) Apr 24, 2023
@MauriceNino
Copy link
Owner

Hi there, thanks for creating an issue. Can you please run the following on your system and paste the output?

docker container run -it --rm -v /:/mnt/host:ro --privileged mauricenino/dashdot yarn cli raw-data --storage --cpu

The CPU temperature flag shouldn't be able to crash the container, normally.

@ghost
Copy link
Author

ghost commented Apr 25, 2023

Hi there, thanks for creating an issue. Can you please run the following on your system and paste the output?

docker container run -it --rm -v /:/mnt/host:ro --privileged mauricenino/dashdot yarn cli raw-data --storage --cpu

The CPU temperature flag shouldn't be able to crash the container, normally.

Here you go :)

docker container run -it --rm -v /:/mnt/host:ro --privileged mauricenino/dashdot yarn cli raw-data --storage --cpu

Output:
https://paste.ec/paste/laUDDZIt#nwFhx-ZtIznFxFt5fCQ9CriVzJ4/aaDXYmvwCpHvUQU

@MauriceNino
Copy link
Owner

Can you please test it again with the latest release and see if there is any new log output?

@ghost
Copy link
Author

ghost commented Apr 29, 2023

Can you please test it again with the latest release and see if there is any new log output?

Different error now:

2023-04-29T23:02:40.765308520Z RangeError: Invalid array length
2023-04-29T23:02:40.765323412Z     at /app/dist/apps/api/main.js:2:915270
2023-04-29T23:02:40.765325492Z     at Array.flatMap (<anonymous>)
2023-04-29T23:02:40.765326838Z     at /app/dist/apps/api/main.js:2:915255
2023-04-29T23:02:40.765327956Z     at Generator.next (<anonymous>)
2023-04-29T23:02:40.765329066Z     at fulfilled (/app/dist/apps/api/main.js:12:23343)
2023-04-29T23:02:40.765330311Z     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-04-29T23:02:40.775738409Z error Command failed with exit code 1.
2023-04-29T23:02:40.775788463Z info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Full log output:
https://paste.ec/paste/8ZCQdeQT#cpOH+V9ayIyKQTHFFtkceivNEI2jhvuRrcp3Xbnz6fI

Also did the yarn cli raw-data --storage --cpu run again on the new version:
https://paste.ec/paste/OK4jd7fT#PKSedsWEckRld8PYOzD1HYgYgME7T2Iwe+5YYyg-y5C

@MauriceNino
Copy link
Owner

Thanks a lot! I now know what's causing this issue and will try my best to fix it!

@MauriceNino
Copy link
Owner

Can you please try the latest dev build mauricenino/dashdot:dev and see if that fixes your problem?

@ghost
Copy link
Author

ghost commented Apr 30, 2023

Can you please try the latest dev build mauricenino/dashdot:dev and see if that fixes your problem?

Slightly new error now :)

2023-04-30T12:22:03.977927595Z RangeError: Invalid array length
2023-04-30T12:22:03.977945599Z     at /app/dist/apps/api/main.js:2:915273
2023-04-30T12:22:03.977947441Z     at Array.flatMap (<anonymous>)
2023-04-30T12:22:03.977948768Z     at /app/dist/apps/api/main.js:2:915241
2023-04-30T12:22:03.977949880Z     at Generator.next (<anonymous>)
2023-04-30T12:22:03.977951045Z     at fulfilled (/app/dist/apps/api/main.js:12:23361)
2023-04-30T12:22:03.987801533Z error Command failed with exit code 1.
2023-04-30T12:22:03.987859433Z info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Full log:
https://paste.ec/paste/1P8Y9XPV#ZHo3Q+prMs-ICYw1jO16jHRom8wiBOI4qrxPVgI6jFN

Also did the yarn cli raw-data --storage --cpu run again on the dev version:
Full output:
https://paste.ec/paste/8PTlRkgC#NaaChIABLbPV2mHra0J5ZCtNoc69aVrVI8+gprrh23e

@MauriceNino
Copy link
Owner

Ahh sorry, I made a typo. Can you please pull the dev image again and re-test?

@ghost
Copy link
Author

ghost commented Apr 30, 2023

Ahh sorry, I made a typo. Can you please pull the dev image again and re-test?

It works now 👍♥️
Thanks for the quick work 😁😁

@ghost ghost closed this as completed Apr 30, 2023
@MauriceNino
Copy link
Owner

Perfect, thanks for the continuous help with investigating!
The fixes will be in the next main release.

github-actions bot added a commit that referenced this issue Aug 23, 2023
## [5.2.2](v5.2.1...v5.2.2) (2023-08-23)

### Bug Fixes

* **api:** calculation for cpus with E/P cores not working ([3386923](3386923)), closes [#706](#706)
* checksum for typescript ([6a14829](6a14829))
* **speedtest:** not working on windows install ([#731](#731)) ([423837b](423837b)), closes [#729](#729)

### Reverts

* upgrade prism-react-renderer to v2 ([6d60009](6d60009))
@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 5.2.2

Please check the changelog for more details.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant