jan icon indicating copy to clipboard operation
jan copied to clipboard

bug: app_gpu_fs container immeidatly crashes upon loading the webUI

Open q23407u892f opened this issue 2 months ago • 1 comments

Describe the bug A clear and concise description of what the bug is.

Upon running docker compose --profile gpu-fs up, I can proceed to localhost:3000, but as soon as i click on anything in the UI, the container crashes

Steps to reproduce Steps to reproduce the behavior:

  1. Download latest docker-compse.yml file linked in your docs
  2. run docker compose --profile gpu-fs up -d
  3. Try and go to any part of the webpage and immediately get an error in the logs (see below)

Expected behavior A clear and concise description of what you expected to happen.

I should be able to use jan with no crashes

Screenshots If applicable, add screenshots to help explain your issue. image

Environment details

  • Operating System: Ubuntu 20.04.6 LTS (Focal Fossa)
  • Jan Version: [e.g., 0.4.3]
  • Processor: AMD Ryzen 5 4600G with Radeon Graphics
  • RAM: 32GB
  • Any additional relevant hardware specifics: NVIDIA GeForce RTX 3050

Logs If the cause of the error is not clear, kindly provide your usage logs:

  • tail -n 50 ~/jan/logs/app.log if you are using the UI
  • tail -n 50 ~/jan/logs/server.log if you are using the local api server
app_gpu_fs-1     | Validating app logs. Next attempt in  120000
app_gpu_fs-1     | 2024-04-14T23:57:06.894Z [APP]::Server listening at http://0.0.0.0:1337
app_gpu_fs-1     | 2024-04-14T23:57:06.895Z [SERVER]::Debug: JAN API listening at: http://0.0.0.0:1337
app_gpu_fs-1     | /app/server/build/jan/extensions/@janhq/monitoring-extension/dist/node/index.cjs.js:1217
app_gpu_fs-1     |         if (!scope && !message.startsWith('[')) {
app_gpu_fs-1     |                                ^
app_gpu_fs-1     |
app_gpu_fs-1     | TypeError: message.startsWith is not a function
app_gpu_fs-1     |     at FileLogger.log (/app/server/build/jan/extensions/@janhq/monitoring-extension/dist/node/index.cjs.js:1217:32)
app_gpu_fs-1     |     at /app/core/dist/node/index.cjs.js:1125:24
app_gpu_fs-1     |     at Map.forEach (<anonymous>)
app_gpu_fs-1     |     at _loop_1 (/app/core/dist/node/index.cjs.js:1124:28)
app_gpu_fs-1     |     at LoggerManager.flushLogs (/app/core/dist/node/index.cjs.js:1130:13)
app_gpu_fs-1     |     at LoggerManager.log (/app/core/dist/node/index.cjs.js:1137:14)
app_gpu_fs-1     |     at log (/app/core/dist/node/index.cjs.js:1162:30)
app_gpu_fs-1     |     at Logger.info (/app/server/build/helpers/logger.js:10:28)
app_gpu_fs-1     |     at onResponseCallback (/app/node_modules/fastify/lib/reply.js:885:13)
app_gpu_fs-1     |     at ServerResponse.onResFinished (/app/node_modules/fastify/lib/reply.js:861:7)

nvidia-smi output

└─$ nvidia-smi
Mon Apr 15 00:02:50 2024
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.154.05             Driver Version: 535.154.05   CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce RTX 3050 OEM    Off | 00000000:01:00.0 Off |                  N/A |
| 30%   25C    P8              12W / 120W |      3MiB /  8192MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|  No running processes found                                                           |

Making sure to redact any private information.

Additional context Add any other context or information that could be helpful in diagnosing the problem.

I have tried commenting out the lines in logger.ts https://github.com/janhq/jan/blob/09fcdac75ce06cc04bdf440b07f72349eab5be54/extensions/monitoring-extension/src/node/logger.ts#L40-L44, as that is the exact string i'm seeing in the crash log, but even after rebuilding the containers, no luck

q23407u892f avatar Apr 15 '24 00:04 q23407u892f