# /tmp corrupted, can't read or open sockets

## butters

So this is about the weirest problem ever.  While streaming video, something went wrong and X eventually crashed.  Subsequently, GNOME wouldn't start, but XFCE is fine.  However, certain programs, such as Firefox and Thunderbird, no longer start.  They complain about no safe sockets in /tmp.  It turns out that ls /tmp says cannot read /tmp: input/output error.  Everything else in the root filesystem, formatted reiser4, is fine.  I rebooted, thinking that /tmp would be cleaned on reboot anyway.  This doesn't help.  A du -h /tmp reports the same directory size across reboots.  It knows /tmp is there, that it's a directory, and that it's not empty.  However, rm -rf /tmp fails because it can't read the directory.

Any programs that require UNIX sockets no longer work, and I can't figure out how to clean out /tmp without nuking the entire root filesystem.  Any ideas?

----------

## NeddySeagoon

butters,

Cheat - rename /tmp to /tmp_broken and create a new /tmp with makedir /tmp

That gets you going while you think about it.

----------

## moocha

Boot from a Reiser4 LiveCD and fsck that file system.If you manage to fix it that way, mount it, remove the tmp directory, create a new tmp directory, chown it to root:root and chmod it to 1777. If you don't manage to fix it, kiss it goodbye.Yell at Namesys.Edit: NeddySeagoon beat me again to it  :Very Happy: . Didn't think of that solution - I'm curious whether it'll work, since the inode is borked...

----------

## NeddySeagoon

moocha,

Is the the inode or somethinh inside /tmp that doesn't want to play?

My method just abandons the old /tmp if it works. I'm interested in the outcome too.

I didn't know there was a liveCD with reiserfs4 on or I would have suggested the fsck too.

----------

## moocha

I think it's the inode, since butters mentioned an error message along the lines of "cannot read /tmp: input/output error". It'd be much better if I were wrong, of course. I'm really, really curious.

About a LiveCD - back when I used to bother with Reiser4 I used lxnay's RR4 LiveCD. He did a good job with it. The version I have looks pretty good even now - I use it once in a while to fix up things when I bork my playground system since it's got mplayer  :Wink: .

----------

## butters

Solved: Used one of Lxnay's reiser4 LiveCDs and did an fsck on the filesystem.  There were 12 fatal errors.  I did fsck.reiser4 --build-fs on it (according to the suggestion in the output of the fsck), and after a while and way more than 12 modifications, the filesystem was fixed.  Everything works now.  The utilities for reiser4 are pretty good already!

----------

