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

You could boot the host in emergency mode (https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/sec-emergency_mode) if you have access to the console, and then check the filesystem out and look at root's (.profile, .bashrc) RC files to see if anything has recently changed.

/var/log/yum.log might be a good place to check to see if anyone touched up the host at all recently.

Hey,

I have full access to my OS, if I wasn't clear. I checked those files (I don't have .profile) and I have already reverted them to default. Nothing interesting in the .log file either. Another weird symptom is that Firefox became awfully slow. Chrome is fine.

Update: It's fixed now. Thanks