Messed with /proc and broke my system

Unofficial support for the KXStudio Linux distribution and applications.
More info at http://kxstudio.linuxaudio.org/

Moderators: MattKingUSA, khz

Post Reply
Luc
Established Member
Posts: 741
Joined: Fri Mar 27, 2015 1:04 pm
Been thanked: 1 time

Messed with /proc and broke my system

Post by Luc »

I have broken my system and have no idea how to fix it.

I found a large file and wanted to get rid of it. I deleted it, but the disk space was not reclaimed.

Upon investigation, it seemed that deleted files were still in use by processes that had to be killed. I ran 'lsof +L1' and found two Juce processes still using the 1.1 GB /boot/run.log file. They were zombies, so they could not be killed.

I googled some more and found this recipe:

Code: Select all

lsof | grep "(deleted)$" | sed -re 's/^\S+\s+(\S+)\s+\S+\s+([0-9]+).*/\1\/fd\/\2/' | while read file; do bash -c ": > /proc/$file"; done
Explanation:
Grep lsof output to extract only deleted files. Sed extract the process id and filedescriptor id from each line, and create a string in format {pid}/fd/{fid}. While loop and output nothing to each file, setting them to empty.

It worked. The disk space was reclaimed immediately. But I decided to reboot anyway shortly after.

I didn't use sound for a couple of hours, then I did, and noticed that my volume control script was not working anymore:

Code: Select all

[16899-0] > /home/luc/scripts/volumechange.fish up 
amixer: Unable to find simple control 'Master',0

amixer: Unable to find simple control 'Master',0

amixer: Unable to find simple control 'Master',0

osdctl: option requires an argument -- 'b'
Then I ran alsamixer and noticed that it looked different. It was like my sound card was not selected automatically anymore, although I could select it with F6.

Then I ran Catia and now it has 16 alsa_pcm Midi-Through playback ports andd 16 alsa_pcm Midi-Through capture ports that I didn't have before. I used to have just one for each.

Looks like I truncated something in /proc that I shouldn't have. Does anybody know how I can fix this situation?
Luc
Established Member
Posts: 741
Joined: Fri Mar 27, 2015 1:04 pm
Been thanked: 1 time

Re: Messed with /proc and broke my system

Post by Luc »

Bumping this up because it's been a week and I still have this problem. My sound is all messed up. If no idea comes up, I will have to format and reinstall the entire OS. :(
Luc
Established Member
Posts: 741
Joined: Fri Mar 27, 2015 1:04 pm
Been thanked: 1 time

Re: Messed with /proc and broke my system

Post by Luc »

I don't know what I deleted. Something that affected the configuration, because sound/ALSA/JACK still work, they're just messed up and cause very annoying glitches in several places. The order of the sound cards (counting loopback as a sound card) has been shuffled, it seems.
User avatar
English Guy
Established Member
Posts: 525
Joined: Wed Oct 17, 2012 7:28 pm
Location: England
Has thanked: 8 times
Been thanked: 7 times

Re: Messed with /proc and broke my system

Post by English Guy »

Are you able to boot a live disc of your distro, copy its /proc then compare?
glowrak guy
Established Member
Posts: 2315
Joined: Sat Jun 21, 2014 8:37 pm
Been thanked: 251 times

Re: Messed with /proc and broke my system

Post by glowrak guy »

Luc wrote:I don't know what I deleted. Something that affected the configuration, because sound/ALSA/JACK still work, they're just messed up and cause very annoying glitches in several places. The order of the sound cards (counting loopback as a sound card) has been shuffled, it seems.
I'd go for a new install, after backing up your /home/Luc folder, but this time create a second partition for /home/Luc

which in future new installs, you can choose not to reformat that partition,
which will preserve lots of configurations, data, and time. If you have
ardour, mixbus, bitwig, or other big apps that install into

/opt

make sure you make the root partition large enough for them, and for
new versions you may later install for testing. A 500 gig drive could split
50%/50%, a terrabyte drive 25% root 75% /home/Luc

Another benefit of a large root partition will be the disk space needed
to do a remaster, for creating a bootable install dvd of a tested working system.

You could do a system search for all alsa, jackd and pulse config files, remove them,
use the package manager to reinstall all the alsa, pulse, and jackd items you have,
and reboot while holding your breath, and knocking on wood. Or boot an AVLinux dvd,
and compare it's default config files to what you have.

The second partiton is nearly a must, for a busy artist!

(there can be some large housekeeping files a linux system creates for itself,
but they are runtime builds, not installed software, and reappear like a bill collector
no matter how you deal with them. Many linux users have thought they would save disk space
by attempting to remove them...
Cheers
Post Reply