mhulse / vagrant-latmp

Vagrant LA(T)MP Stack: CentOS 7 + Apache HTTP + Apache Tomcat + MySQL + PHP + Python + Ruby + Node.js
Apache License 2.0
3 stars 3 forks source link

rvm ctrl+c trap bug #123

Open mhulse opened 6 years ago

mhulse commented 6 years ago

The other day, after accidentally running systemctl restart apache, not as root, and I ctrl c out of the process, my terminal froze.

I think it has to do with what I'm doing with inputrc.

Need to test.

mhulse commented 6 years ago

Well, typing reset does the trick when the terminal goes haywire:

https://stackoverflow.com/questions/4921132/how-to-exit-out-of-password-mode

Still not sure if it's my code or just a fact of life.... going to test without any mods.

mhulse commented 6 years ago

Just tested only nothing other than base install and then httpd. Was not able to reproduce. Only seems to happen with full install???? Super strange.

mhulse commented 6 years ago

Strange, I am seeing this bug once everything has been installed????

Example of bug:

vagrant@localhost:~$ systemctl restart httpd
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: root
Password: Failed to restart httpd.service: Access denied
See system logs and 'systemctl status httpd.service' for details.
vagrant@localhost:~$ -bash: jfdkjfkdjfd: command not found
vagrant@localhost:~$

This doesn't say much:

vagrant@localhost:~$ sudo systemctl status httpd.service
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2018-08-21 08:06:23 UTC; 6h ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 2601 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)
 Main PID: 2605 (httpd)
   Status: "Total requests: 0; Current requests/sec: 0; Current traffic:   0 B/sec"
   CGroup: /system.slice/httpd.service
           ├─2605 /usr/sbin/httpd -DFOREGROUND
           ├─2606 /usr/sbin/httpd -DFOREGROUND
           ├─2607 /usr/sbin/httpd -DFOREGROUND
           ├─2608 /usr/sbin/httpd -DFOREGROUND
           ├─2609 /usr/sbin/httpd -DFOREGROUND
           └─2610 /usr/sbin/httpd -DFOREGROUND

Aug 21 08:06:23 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...
Aug 21 08:06:23 localhost.localdomain systemd[1]: Started The Apache HTTP Server.

I guess I need to run provisioning and add one thing at a time to see what's going on here.

Maybe StackOverflow question? This is not a show stopper, but it's annoying.

At least reset works: https://superuser.com/questions/858743/how-do-i-restore-input-echoing-in-the-terminal

mhulse commented 6 years ago

Ok, getting somewhere. Looks like it's boiling down to Ruby.

Going to peel back layers there to see what's up. My guess it has to do with gpg2 stuff?

mhulse commented 6 years ago

Ok, this must be related:

https://github.com/rvm/rvm/issues/4422

Interesting comment:

https://github.com/rvm/rvm/issues/4422#issuecomment-406348867

mhulse commented 6 years ago

Ahhh, so when I run rvm get master, and run something like systemctl restart sshd and do a ctrl + c, it doesn't have issues. So, looks like master has a fix.

From new issue template over at rvm:

Before filling a new issue please verify if your problem still exists with latest RVM. We constantly apply fixes but only release new stable versions once a month.

So, looks like waiting for a few weeks should fix it.