Mango icon indicating copy to clipboard operation
Mango copied to clipboard

[Bug Report] GC warning

Open goldbattle opened this issue 4 years ago • 5 comments

image

I am running on a raspberry pi (I believe 3), and have this issue. I left it overnight and it seems to raised some sort a segfault by the next morning:

image

Is there something I should configure or any logs I can can provide?

goldbattle avatar Mar 02 '21 06:03 goldbattle

I tried v0.20.1 on an ARM64 VPS but couldn't reproduce the issue. Since RPi uses ARM32, it might be an ARM32-specific bug. I will dig out my RPi and see if I can reproduce the issue there.

Is there something I should configure or any logs I can provide?

The GC warning seems to suggest that there's a memory leak. Can you monitor the memory usage and see if it's growing?

hkalexling avatar Mar 02 '21 09:03 hkalexling

Before launch:

pi@raspberrypi:~ $ free -h
              total        used        free      shared  buff/cache   available
Mem:          924Mi        74Mi        83Mi       8.0Mi       766Mi       781Mi
Swap:          99Mi        56Mi        43Mi

Right on startup:

pi@raspberrypi:~ $ free -h
              total        used        free      shared  buff/cache   available
Mem:          924Mi        95Mi        74Mi       8.0Mi       753Mi       760Mi
Swap:          99Mi        56Mi        43Mi

A while it is doing thumbnail generation:


pi@raspberrypi:~ $ free -h
              total        used        free      shared  buff/cache   available
Mem:          924Mi       161Mi        40Mi       8.0Mi       722Mi       697Mi
Swap:          99Mi        56Mi        43Mi
pi@raspberrypi:~ $ free -h
              total        used        free      shared  buff/cache   available
Mem:          924Mi       165Mi        35Mi       7.0Mi       723Mi       694Mi
Swap:          99Mi        57Mi        42Mi
pi@raspberrypi:~ $ free -h
              total        used        free      shared  buff/cache   available
Mem:          924Mi       196Mi        24Mi       7.0Mi       703Mi       664Mi
Swap:          99Mi        58Mi        41Mi

After thumbnail generation completes:

pi@raspberrypi:~ $ free -h
              total        used        free      shared  buff/cache   available
Mem:          924Mi       198Mi        24Mi       6.0Mi       701Mi       663Mi
Swap:          99Mi        59Mi        40Mi

Full console log:

pi@raspberrypi:~/Mango $ docker-compose up
Starting mango ... done
Attaching to mango
mango    |
mango    |
mango    |               _|      _|
mango    |               _|_|  _|_|    _|_|_|  _|_|_|      _|_|_|    _|_|
mango    |               _|  _|  _|  _|    _|  _|    _|  _|    _|  _|    _|
mango    |               _|      _|  _|    _|  _|    _|  _|    _|  _|    _|
mango    |               _|      _|    _|_|_|  _|    _|    _|_|_|    _|_|
mango    |                                                     _|
mango    |                                                 _|_|
mango    |
mango    |
mango    | Mango - Manga Server and Web Reader. Version 0.20.1
mango    |
mango    | [INFO]    2021/03/03 02:23:58 | Scanned 8 titles in 755.430255ms
mango    | [INFO]    2021/03/03 02:24:57 | Starting thumbnail generation
mango    | GC Warning: Repeated allocation of very large block (appr. size 3166208):
mango    |      May lead to memory leak and poor performance.
mango    | GC Warning: Repeated allocation of very large block (appr. size 2543616):
mango    |      May lead to memory leak and poor performance.
mango    | GC Warning: Repeated allocation of very large block (appr. size 634880):
mango    |      May lead to memory leak and poor performance.
mango    | GC Warning: Repeated allocation of very large block (appr. size 704512):
mango    |      May lead to memory leak and poor performance.
mango    | GC Warning: Repeated allocation of very large block (appr. size 237568):
mango    |      May lead to memory leak and poor performance.
mango    | GC Warning: Repeated allocation of very large block (appr. size 704512):
mango    |      May lead to memory leak and poor performance.
mango    | GC Warning: Repeated allocation of very large block (appr. size 204800):
mango    |      May lead to memory leak and poor performance.
mango    | GC Warning: Repeated allocation of very large block (appr. size 204800):
mango    |      May lead to memory leak and poor performance.
mango    | GC Warning: Repeated allocation of very large block (appr. size 704512):
mango    |      May lead to memory leak and poor performance.
mango    | GC Warning: Repeated allocation of very large block (appr. size 634880):
mango    |      May lead to memory leak and poor performance.
mango    | GC Warning: Repeated allocation of very large block (appr. size 724992):
mango    |      May lead to memory leak and poor performance.
mango    | GC Warning: Repeated allocation of very large block (appr. size 180224):
mango    |      May lead to memory leak and poor performance.
mango    | GC Warning: Repeated allocation of very large block (appr. size 278528):
mango    |      May lead to memory leak and poor performance.
mango    | GC Warning: Repeated allocation of very large block (appr. size 188416):
mango    |      May lead to memory leak and poor performance.
mango    | GC Warning: Repeated allocation of very large block (appr. size 188416):
mango    |      May lead to memory leak and poor performance.
mango    | GC Warning: Repeated allocation of very large block (appr. size 217088):
mango    |      May lead to memory leak and poor performance.
mango    | [INFO]    2021/03/03 02:28:56 | Thumbnail generation finished
mango    | [INFO]    2021/03/03 02:28:59 | Scanned 8 titles in 771.768038ms

goldbattle avatar Mar 03 '21 02:03 goldbattle

Thanks for the additional info. I've finally tested it on my RPi but still not seeing the warning :(

It would be great if you could let me know

  1. The size of your library (du -sh /path/to/your/mango/library)
  2. When would the warning appear? Does it only happen during the thumbnail generation?

Thanks!

hkalexling avatar Mar 10 '21 11:03 hkalexling

pi@raspberrypi:~$ du -sh Library/
8.0G    Library/

It seems to happen when I load a chapter in the web reader, but I also saw it right at startup. Maybe this is due to serving the images from disk possibly? It seems to be most consistent, when I open a chapter in the reader and scroll through.

goldbattle avatar Mar 13 '21 19:03 goldbattle

Thanks! I've finally reproduced it by scrolling through an entry. I will investigate and see what I can do.

hkalexling avatar Mar 14 '21 05:03 hkalexling