Memory Leak on latest TOS as well as 4.1.30

CPU, memory, fan, process, services status, system log, tempreture
Locked
User avatar
primeb
Posts: 4
Joined: 25 Mar 2021, 06:13

Memory Leak on latest TOS as well as 4.1.30

Post by primeb »

Hi I'm getting huge issues since updating to the latest TOS version.

I've reinstalled TOS 4.1.30 which is the oldest installer I could find on the support page. This hasn't stopped the problem.

I keep having to turn the NAS off with the power switch. When it's back online the memory slowly fills up within about 5 minutes or so, at 98% the NAS becomes unusable. Details of this plus the version of my Nas (F5-422) are shown on the screenshot attached.

I suspect it's to do with the BTRFS system as it's using 100% cpu in the resource monitor. The process 'BTRFS Cleaner' is using 100% of CPU resource.

There's no other processes showing large use of memory which is strange.

In order to keep the NAS unoccupied I've turned off files saver, and it's only connected via one LAN port.

TOS is struggling to do a clean uninstall of Mediaserver and Snapshot.

Is there a way to get rid of this problem? It's already on a clean install!

What can I do? I'm completely stuck and the NAS is unusable. I don't want to loose the data on the drives.

Thanks
Attachments
Screenshot 2021-03-24 at 22.17.02.png
User avatar
TMRyan
TerraMaster Team
Posts: 817
Joined: 01 Dec 2020, 11:50

Re: Memory Leak on latest TOS as well as 4.1.30

Post by TMRyan »

Hi,
You can first try to reinstall the system using method 2: viewtopic.php?f=75&t=423
Have you installed other applications? Example: Clam AntiVirus.
Can you use SMB access now?
To contact our team, please send email to following addresses, remember to replace (at) with @
Technical team: support(at)terra-master.com (for technical support)
Service team: service(at)terra-master.com (for purchasing, return, replacement)
User avatar
TMroy
TerraMaster Team
Posts: 2578
Joined: 10 Mar 2020, 14:04
China

Re: Memory Leak on latest TOS as well as 4.1.30

Post by TMroy »

{L_BUTTON_AT}primeb
First of all, check process in resource monitor, better to know which process taking your memory exactly.
To contact our team, please send email to following addresses, remember to replace (at) with @:
Support team: support(at)terra-master.com (for technical support only)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
User avatar
primeb
Posts: 4
Joined: 25 Mar 2021, 06:13

Re: Memory Leak on latest TOS as well as 4.1.30

Post by primeb »

Attached are some screenshots of resource monitor.

There's no process that's showing a large (more than 1% utilisation) of RAM.

I've uninstalled the three apps I once had installed (MediaServer, Plex, Snapshot). I did this many times but it appears it never manages to fully remove the programs, every time I reboot the NAS they reappear on the home screen even though I removed them.

SMB file service is not working either.
Attachments
Screenshot 2021-03-25 at 09.30.02.png
Screenshot 2021-03-25 at 09.29.53.png
Screenshot 2021-03-25 at 09.30.14.png
User avatar
TMRyan
TerraMaster Team
Posts: 817
Joined: 01 Dec 2020, 11:50

Re: Memory Leak on latest TOS as well as 4.1.30

Post by TMRyan »

You can try to delete the corresponding application configuration file after uninstalling.
app.png
To contact our team, please send email to following addresses, remember to replace (at) with @
Technical team: support(at)terra-master.com (for technical support)
Service team: service(at)terra-master.com (for purchasing, return, replacement)
User avatar
primeb
Posts: 4
Joined: 25 Mar 2021, 06:13

Re: Memory Leak on latest TOS as well as 4.1.30

Post by primeb »

I've tried this multiple times.

The file explorer is slow/ stuck trying to remove it and the Application manager is stuck uninstalling Plex. It's taking too long and after 3-5 minutes the NAS gets stuck due to the memory issue. see the attached screenshot

What's best to try next? How do I get to a clean system without loosing my shared folders? Reinstalling the TOS system doesn't remove the applications it seems?
Attachments
Screenshot 2021-03-25 at 10.18.34.png
Screenshot 2021-03-25 at 10.18.45.png
Screenshot 2021-03-25 at 10.18.45.png (21.85 KiB) Viewed 3472 times
User avatar
frrrrr
Posts: 1
Joined: 25 Mar 2021, 20:18

Re: Memory Leak on latest TOS as well as 4.1.30

Post by frrrrr »

Hey, primeb,

I just experienced this issue. I took the time to reach out to the support team, but also got a canned "please reinstall" reply. I spent hours and hours trying to figure this out. So many hours. The only thing that helped was getting the data off the drive and reformatting it with ext. I'm trying to decide if I just should return it and how to phrase my Amazon review.
User avatar
TMRyan
TerraMaster Team
Posts: 817
Joined: 01 Dec 2020, 11:50

Re: Memory Leak on latest TOS as well as 4.1.30

Post by TMRyan »

Hi,
Is it possible to let our engineer check it remotely? You can send an email to our tech team: viewtopic.php?f=75&t=608

Kernel threads work in the kernel space, do not belong to any process, and sleep can occur.
The process of BTRFS Cleaner is synchronizing btrfs again to wake up the cleaner system kernel thread "kthread".
When some block group becomes unused, it may be dormant all the time. Synchronizing again will delete unused block groups.
You can wait for a while to allow the cleaner kthread to delete them, and finally make sure to commit the transaction started by the cleaner kthread.
To contact our team, please send email to following addresses, remember to replace (at) with @
Technical team: support(at)terra-master.com (for technical support)
Service team: service(at)terra-master.com (for purchasing, return, replacement)
User avatar
primeb
Posts: 4
Joined: 25 Mar 2021, 06:13

Re: Memory Leak on latest TOS as well as 4.1.30

Post by primeb »

Just checking in to update.

I really couldn't be bothered with the hassle of a remote session or more customer support, judging by the bad reputation this has and the time it would probably take. Just have very little faith it would fix anything and I wasn't going to send it off which I still rely on it daily.

Instead I resolved the issue by using the 5 minutes of responsiveness I had from the NAS after a reboot to copy over my data from my RAID 5 array in chunks to an old external HHD. Took a weekend to do.

I after that I used a separate drive in the 5th drive bay to host the TOS system and then erased and rebuilt the RAID 5 array on the main 4 drives.

Hinted by the 'btrfs cleaner' process, I believed these 4 drives in raid 5 btrfs were causing the memory leak I thought a full erase would fix this and it did.

I'll be keeping the NAS for now as it is working as it should again and I can't afford to replace it and go through the transfer process again.

Won't be updating TOS unless Terramaster actually manages to releases something that doesn't break it. In the end I'm not entirely sure what caused the memory leak - it could be a crash during a transfer, issues with setting a storage quota (which was a newly added feature to the latest TOS update) or something else that bugged it out! my advice - proceed with caution and always keep proper duplicates.
Locked