Uploaded image for project: 'TrueNAS'
  1. TrueNAS
  2. NAS-101425

Log an error if a dependency loop occurs in /etc/mail/aliases



    • Type: Bug
    • Status: Done (View Workflow)
    • Priority: Low
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 11.2-U4
    • Component/s: Middleware
    • Labels:


      Forum reference:



      This is a fringe case but can still be easily replicated. The issue is that the root user's email was accidentally removed from the root user's details screen. This then caused one CPU thread to peg out at 100% each day there was supposed to be an alert mail sent? (sorry, I'm not sure how your system works). 

      How it happened:

      I use Bitwarden to store my passwords. I have the Bitwarden addon for Firefox installed and my FreeNAS webui is set to autofill once Bitwarden detects the login and password fields for the 192.168.x.x login screen.

      With Bitwarden still active (database not locked), I was poking around the root user's account screen. Well, Bitwarden decided to autofill a new password in the password fields. I'm not sure what transpired next, but I must have also erased the email from the email field. I then saved the changes and didn't check back until a few days later and that's when I noticed the CPU usage on 5 threads was pegged at 100%.

      Here is what was reported in my forum thread as to the issue I saw:


      I just noticed that over the past four days my CPU usage has increased 20% each day and is now maxed out on five threads at 100%. I ran top and got a few PIDs so I could run

      procstat -c PID

      The result is

      78164 bzip2 /usr/bin/bzip2 -f /var/log/maillog.3

      The other codes are showing the same thing with various maillog.x numbers. Killing those PIDs brought my CPU back down to idle.


      After killing the rogue bzip2' s, I went to the root user account screen and put in a vaild email address so that alerts could be sent. After 24 hours, my machine has been happy and there have been no rogue processes. That was the solution, ensure the root user has a valid email.

      Suggested fix:

      Make it a requirement to have a valid email for the root user. The email field should be a required field and if it's blank, then you cannot save your changes to the root user.






                william William Grzybowski
                diedrichg Diedrich Guenther
                Bug Clerk, Diedrich Guenther, Warren Block (Inactive), William Grzybowski
                0 Vote for this issue
                4 Start watching this issue