Segmentation fault on root login

Latest response

With bash: [: : integer expression expected message.

Reason of crash

bash killed by SIGSEGV

When it happens:

the first few times I open bash;
every time on 'sudo -s';
every time on 'su root', but never on 'su username';
every time on 'su';
never on 'sudo command' (I just type in the password)

'Ctrl + C' few seconds after entering the password in 'sudo -s' will get me logged in as root, but if I wait I get the segmentation fault, and stay as a normal user.
Also, sometimes, I would get a prompt to enter root password to 'see others problems' (in ABRT GUI).

Things that could have could have caused it:

I was configuring my root's user variables, and some where pointing to the same directory twice;
I have had problems with opening account setting for some time, it would hang and ask me to kill the process or wait;
Enabling automatic login in account settings;

Nothing was installed or updated that day;
Laptop fan speeds up for a bit when I run one of the above.

Linux newbie using RHEL 7.5 because some development tools are not available on Ubuntu.

FIXED !

It was in the root's .bashrc! I was looking as root into /home/username/.bashrc
The line that caused all this was ". ~/bash_profile"
I was confused when which file gets read.

Responses