minetest-mapserver / mapserver

Minetest realtime mapserver, written in go
Other
101 stars 22 forks source link

[BUG] Memory leak on the browser's side which crashes the tab #410

Open Monniasza opened 2 weeks ago

Monniasza commented 2 weeks ago

Hi. I've seen that leaving the mapserver running on a busy server causes a memory leak that crashes the tab after about 1 hour from the load.

To reproduce:

I expected the mapserver to run indefinitely

The system has about 16 GB of RAM.

System:
  Kernel: 6.8.0-48-generic arch: x86_64 bits: 64 compiler: gcc v: 13.2.0 clocksource: tsc
  Desktop: Cinnamon v: 6.2.9 tk: GTK v: 3.24.41 wm: Muffin v: 6.2.0 with: plank vt: 7 dm: LightDM
    v: 1.30.0 Distro: Linux Mint 22 Wilma base: Ubuntu 24.04 noble
Machine:
  Type: Laptop System: Dell product: Inspiron 5577 v: 1.1.2 serial: <superuser required> Chassis:
    type: 10 serial: <superuser required>
  Mobo: Dell model: 090HMC v: A00 serial: <superuser required> part-nu: 07E1
    uuid: <superuser required> UEFI: Dell v: 1.1.2 date: 12/01/2018
Battery:
  ID-1: BAT0 charge: 1.1 Wh (100.0%) condition: 1.1/74.0 Wh (1.5%) volts: 12.3 min: 11.4
    model: SIMPLO Dell type: Unknown serial: <filter> status: full
CPU:
  Info: quad core model: Intel Core i5-7300HQ bits: 64 type: MCP smt: <unsupported> arch: Kaby Lake
    rev: 9 cache: L1: 256 KiB L2: 1024 KiB L3: 6 MiB
  Speed (MHz): avg: 800 min/max: 800/3500 cores: 1: 800 2: 800 3: 800 4: 800 bogomips: 19999
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel HD Graphics 630 vendor: Dell driver: i915 v: kernel arch: Gen-9.5 ports:
    active: eDP-1 empty: HDMI-A-1 bus-ID: 00:02.0 chip-ID: 8086:591b class-ID: 0300
  Device-2: NVIDIA GP107M [GeForce GTX 1050 Mobile] vendor: Dell driver: nvidia v: 535.183.01
    arch: Pascal pcie: speed: 8 GT/s lanes: 8 bus-ID: 01:00.0 chip-ID: 10de:1c8d class-ID: 0302
  Device-3: Sunplus Innovation Integrated_Webcam_HD driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 bus-ID: 1-4:4 chip-ID: 1bcf:28b0 class-ID: 0e02
  Display: x11 server: X.Org v: 21.1.11 with: Xwayland v: 23.2.6 driver: X:
    loaded: modesetting,nvidia unloaded: fbdev,nouveau,vesa dri: iris gpu: i915 display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 102 s-size: 480x270mm (18.90x10.63") s-diag: 551mm (21.68")
  Monitor-1: eDP-1 mapped: eDP-1-1 model: BOE Display 0x06a9 res: 1920x1080 hz: 60 dpi: 142
    size: 344x193mm (13.54x7.6") diag: 394mm (15.5") modes: 1920x1080
  API: EGL Message: No EGL data available.
  API: OpenGL v: 4.6.0 vendor: nvidia v: 535.183.01 glx-v: 1.4 direct-render: yes renderer: NVIDIA
    GeForce GTX 1050/PCIe/SSE2
Audio:
  Device-1: Intel CM238 HD Audio vendor: Dell driver: snd_hda_intel v: kernel bus-ID: 00:1f.3
    chip-ID: 8086:a171 class-ID: 0403
  API: ALSA v: k6.8.0-48-generic status: kernel-api
  Server-1: PipeWire v: 1.0.5 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: active 3: pipewire-alsa type: plugin
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Dell RTL8111/8168/8411 driver: r8169 v: kernel pcie: speed: 2.5 GT/s lanes: 1 port: d000
    bus-ID: 02:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp2s0 state: down mac: <filter>
  Device-2: Intel Wireless 3165 driver: iwlwifi v: kernel pcie: speed: 2.5 GT/s lanes: 1
    bus-ID: 03:00.0 chip-ID: 8086:3165 class-ID: 0280
  IF: wlp3s0 state: up mac: <filter>
Bluetooth:
  Device-1: Intel Bluetooth wireless interface driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 bus-ID: 1-5:5 chip-ID: 8087:0a2a class-ID: e001
  Report: hciconfig ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 4.2 lmp-v: 8 sub-v: 1000
    hci-v: 8 rev: 1000 class-ID: 7c010c
Drives:
  Local Storage: total: 942.7 GiB used: 170.69 GiB (18.1%)
  ID-1: /dev/nvme0n1 vendor: Silicon Power model: SPCC M.2 PCIe SSD size: 476.94 GiB
    speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter> fw-rev: S0614B0 temp: 54.9 C scheme: GPT
  ID-2: /dev/sda vendor: Toshiba model: MQ01ABD050 size: 465.76 GiB speed: 6.0 Gb/s tech: HDD
    rpm: 5400 serial: <filter> fw-rev: 2J scheme: MBR
Partition:
  ID-1: / size: 195.8 GiB used: 169.83 GiB (86.7%) fs: ext4 dev: /dev/nvme0n1p6
  ID-2: /boot/efi size: 511 MiB used: 35.2 MiB (6.9%) fs: vfat dev: /dev/nvme0n1p7
Swap:
  ID-1: swap-1 type: partition size: 61.31 GiB used: 844.5 MiB (1.3%) priority: -2
    dev: /dev/nvme0n1p8
USB:
  Hub-1: 1-0:1 info: hi-speed hub with single TT ports: 16 rev: 2.0 speed: 480 Mb/s lanes: 1
    chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 1-2:2 info: [Maxxter] Optical gaming mouse type: mouse,keyboard
    driver: hid-generic,usbhid interfaces: 2 rev: 1.1 speed: 1.5 Mb/s lanes: 1 power: 100mA
    chip-ID: 18f8:0f99 class-ID: 0300
  Device-2: 1-3:3 info: Noll LLC Nolltronics Picosteno
    type: keyboard,HID,abstract (modem),CDC-data driver: cdc_acm,hid-generic,usbhid interfaces: 5
    rev: 2.0 speed: 12 Mb/s lanes: 1 power: 500mA chip-ID: feed:3721 class-ID: 0a00
  Device-3: 1-4:4 info: Sunplus Innovation Integrated_Webcam_HD type: video driver: uvcvideo
    interfaces: 2 rev: 2.0 speed: 480 Mb/s lanes: 1 power: 500mA chip-ID: 1bcf:28b0 class-ID: 0e02
  Device-4: 1-5:5 info: Intel Bluetooth wireless interface type: bluetooth driver: btusb
    interfaces: 2 rev: 2.0 speed: 12 Mb/s lanes: 1 power: 100mA chip-ID: 8087:0a2a class-ID: e001
  Device-5: 1-7:6 info: Realtek RTS5129 Card Reader Controller type: <vendor specific>
    driver: rtsx_usb,rtsx_usb_ms,rtsx_usb_sdmmc interfaces: 1 rev: 2.0 speed: 480 Mb/s lanes: 1
    power: 500mA chip-ID: 0bda:0129 class-ID: ff00 serial: <filter>
  Hub-2: 2-0:1 info: super-speed hub ports: 8 rev: 3.0 speed: 5 Gb/s lanes: 1 chip-ID: 1d6b:0003
    class-ID: 0900
Sensors:
  System Temperatures: cpu: 57.0 C pch: 56.0 C mobo: N/A sodimm: SODIMM C gpu: nvidia temp: 35 C
  Fan Speeds (rpm): cpu: 1946
Repos:
  Packages: 3743 pm: dpkg pkgs: 3682 pm: flatpak pkgs: 61
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/brave-browser-release.list
    1: deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https: //brave-browser-apt-release.s3.brave.com/ stable main
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
    1: deb https: //ftp.psnc.pl/linux/linuxmint/packages wilma main upstream import backport
    2: deb http: //ubuntu.man.lodz.pl/ubuntu noble main restricted universe multiverse
    3: deb http: //ubuntu.man.lodz.pl/ubuntu noble-updates main restricted universe multiverse
    4: deb http: //ubuntu.man.lodz.pl/ubuntu noble-backports main restricted universe multiverse
    5: deb http: //security.ubuntu.com/ubuntu/ noble-security main restricted universe multiverse
  Active apt repos in: /etc/apt/sources.list.d/scorpio-qelectrotech-dev-noble.list
    1: deb [signed-by=/etc/apt/keyrings/scorpio-qelectrotech-dev-noble.gpg] https: //ppa.launchpadcontent.net/scorpio/qelectrotech-dev/ubuntu noble main
Info:
  Memory: total: 16 GiB note: est. available: 15.39 GiB used: 4.92 GiB (31.9%)
  Processes: 314 Power: uptime: 2h 43m states: freeze,mem,disk suspend: deep wakeups: 0
    hibernate: platform Init: systemd v: 255 target: graphical (5) default: graphical
  Compilers: gcc: 13.2.0 alt: 11/12 Client: Cinnamon v: 6.2.9 inxi: 3.3.34
Monniasza commented 2 weeks ago

Dragging the map releases memory