Re: Port update hosed entire system

2012-10-02 Thread Polytropon
On Tue, 2 Oct 2012 06:20:45 -0400, Rod Person wrote:
 It would never have occured to me that updating a port that
 has to do with audio and video containers would totally leave me unable
 to login into my system or issue and shell commands without getting
 a segmentation fault.

I find it very hard to see a correlation here. Coincidence? Yes,
but I cannot imagine a way a port can dmage the system in that
way so not even shell commands keep working...



 I did discover that my / file system had run out of space -131MB.

That could show that some part of important content on / has
not been written yet - it's still held in write buffers
pending. So you could first check what takes up space in /
that is not required to be there, and remove it, then the
write buffers will be written properly. A sync command
could do this on request.

Check with df -h for _no_ negative values before rebooting
the system into SUM. I'm not sure if the write buffers can
survive a shutdown.



 I'm still able to issue sudo, so using sudo rm -r I was able to free up
 25GB...but still, /bin/sh, ls, clear all seg fault and su doesn't work
 and switching consoles doesn't let me log in.

That sounds that somehow calling programs (executing / forking)
is not working properly anymore. As this is one of the most
fundamental mechanisms of the systems, it's hard to believe
that this can be triggered through a port update...



 I maybe be left with attempting a single user boot, but I'm still not
 that comfortable at attempting such as I don't want to have a totally
 useless box.

You'd have to find out the exact problem first, maybe the
solution is simple. However, how is a ports update supposed
to change stuff on /? I assume you have a partitioned system
with functional separation, e. g. /, /var, /tmp and /usr
(where /usr/local and maybe /usr/home are located). When
updating a port, data in /var/db, /usr/ports and /usr/local
will be dealt with. Nothing of that should happen on /, or
even touch system shells...

I assume you have no script of what happened during the
port's upgrade? Using script (see man script for details)
is a convenient solution if you want to run upgrades while
not being able to monitor them constantly.




On Tue, 2 Oct 2012 06:12:27 -0400, Rod Person wrote:
 This is the default shell. I didn't try that yet, because I don't want
 to be left with no way to login at all if something is really messed up.

You have a stand-alone emergency shell in /rescue/sh (which is
on the / partition, so it can even be started in single-user
mode with / mounted read-only).



 Since I could not even switch to a no console (ctrl+alt+f2...) and
 login I'm not really wanting to reboot at this point.

From within X, you need Ctrl+Alt+PF2; from text mode, only Alt+PF2
is needed (even though I checked... Ctrl+Alt+ also works in text
mode). So you can't even switch VTs? Interesting, makes the problem
much more strange...




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Port update hosed entire system

2012-10-02 Thread Steve O'Hara-Smith
On Tue, 2 Oct 2012 09:16:43 +0200
Polytropon free...@edvax.de wrote:

 On Tue, 2 Oct 2012 06:20:45 -0400, Rod Person wrote:
  It would never have occured to me that updating a port that
  has to do with audio and video containers would totally leave me unable
  to login into my system or issue and shell commands without getting
  a segmentation fault.
 
 I find it very hard to see a correlation here. Coincidence? Yes,
 but I cannot imagine a way a port can dmage the system in that
 way so not even shell commands keep working...
 
 
 
  I did discover that my / file system had run out of space -131MB.
 
 That could show that some part of important content on / has
 not been written yet - it's still held in write buffers

No, the negative free space simply means that you have encroached
on to the reserved space (only root can do this) which is usually used to
optimise the layout when writing new data.

 pending. So you could first check what takes up space in /
 that is not required to be there, and remove it, then the
 write buffers will be written properly. A sync command
 could do this on request.

Having negative free space will prevent non root users from writing
data, but that will be returned to the applications as error returns to
write calls not held in write buffers.

 Check with df -h for _no_ negative values before rebooting
 the system into SUM. I'm not sure if the write buffers can
 survive a shutdown.

They can't but they're not connected with negative free space
reports. A normal shutdown will flush all the buffers.

  I'm still able to issue sudo, so using sudo rm -r I was able to free up
  25GB...but still, /bin/sh, ls, clear all seg fault and su doesn't work
  and switching consoles doesn't let me log in.
 
 That sounds that somehow calling programs (executing / forking)
 is not working properly anymore. As this is one of the most
 fundamental mechanisms of the systems, it's hard to believe
 that this can be triggered through a port update...

More likely one of the shared libraries they all use has been
overwritten. Updating ports certainly shouldn't be able to do this though.

The stuff in /rescue should work fine for getting a usable
environment to go bug hunting in, but without a deep and intimate knowledge
of how things are supposed to be it's going to be hard short of
reinstalling.

-- 
Steve O'Hara-Smith at...@sohara.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Port update hosed entire system

2012-10-02 Thread Rod Person
Just a little update on this, sorry to be unresponsive but my wife had
a minor surgery yesterday so I been a little busy, going to try and get
back to this today...

The reason I was able to get 25GB back is because there was a
hidden .trash file that some file manager must of created that had
lots of old files in it. 

The drive is only a 68GB drive that only has one partition, originally
I was just testing the uses of gjounal. But somewhere down the line I
forgot about this and just keep using it. /home is on a separate drive
though. But everything else is on this one drive.

/rescue/sh does not segfault.

I still have not rebooted the system, making sure any data updated in
the last to days is backed up. Then I'll have to bit that bullet.

Thanks all for help and suggestions.

Rod

On Tue, 2 Oct 2012 09:12:09 +0100
Steve O'Hara-Smith at...@sohara.org wrote:

 On Tue, 2 Oct 2012 09:16:43 +0200
 Polytropon free...@edvax.de wrote:
 
  On Tue, 2 Oct 2012 06:20:45 -0400, Rod Person wrote:
   It would never have occured to me that updating a port that
   has to do with audio and video containers would totally leave me
   unable to login into my system or issue and shell commands
   without getting a segmentation fault.
  
  I find it very hard to see a correlation here. Coincidence? Yes,
  but I cannot imagine a way a port can dmage the system in that
  way so not even shell commands keep working...
  
  
  
   I did discover that my / file system had run out of space -131MB.
  
  That could show that some part of important content on / has
  not been written yet - it's still held in write buffers
 
   No, the negative free space simply means that you have
 encroached on to the reserved space (only root can do this) which is
 usually used to optimise the layout when writing new data.
 
  pending. So you could first check what takes up space in /
  that is not required to be there, and remove it, then the
  write buffers will be written properly. A sync command
  could do this on request.
 
   Having negative free space will prevent non root users from
 writing data, but that will be returned to the applications as error
 returns to write calls not held in write buffers.
 
  Check with df -h for _no_ negative values before rebooting
  the system into SUM. I'm not sure if the write buffers can
  survive a shutdown.
 
   They can't but they're not connected with negative free space
 reports. A normal shutdown will flush all the buffers.
 
   I'm still able to issue sudo, so using sudo rm -r I was able to
   free up 25GB...but still, /bin/sh, ls, clear all seg fault and su
   doesn't work and switching consoles doesn't let me log in.
  
  That sounds that somehow calling programs (executing / forking)
  is not working properly anymore. As this is one of the most
  fundamental mechanisms of the systems, it's hard to believe
  that this can be triggered through a port update...
 
   More likely one of the shared libraries they all use has been
 overwritten. Updating ports certainly shouldn't be able to do this
 though.
 
   The stuff in /rescue should work fine for getting a usable
 environment to go bug hunting in, but without a deep and intimate
 knowledge of how things are supposed to be it's going to be hard
 short of reinstalling.
 
 -- 
 Steve O'Hara-Smith at...@sohara.org


-- 
Rod Person
http://www.rodperson.com
  
First we got population.  The world today has 6.8 billion people. 
That's headed up to about 9 billion. Now if we do a really great job on 
new vaccines,  health care, reproductive health services, we lower that 
by perhaps 10 or 15 percent.
 - Bill Gates
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Port update hosed entire system

2012-10-01 Thread Polytropon
On Mon, 1 Oct 2012 20:08:29 -0400, Rod Person wrote:
 Hi All,
 
 I was attempting to update ports that used libogg with the command
 
 portmaster -d -y -r libogg
 
 I went away and came back some hours later and some updates had failed.
 Now my shell segfaults on any command such as ls, clear or su
 I tried to login on another console as root and after giving the
 password it just goes back to login. I am at a loss as to what to do to
 fix this one.

That sounds like a really weird problem. FreeBSD and the
ports (which portmaster deals with) are separated systems,
so even if you totally hose your ports, the OS should not
be affected.

You're mentioning the shell: Which one is it? In case it's
a shell from ports, _maybe_ that is a problem. In case of
root, it should have the system's default shell /bin/csh;
the system's scripting and emergency shell /bin/sh should
also work.

You can get into a state for tests under mostly defined
circumstances by entering the single user mode and check
things, then continue to boot, and finally install what
was lost. In worst case, reinstall everything (see EXAMPLES
section in man portmaster).

In ultra-worst case, remove the /usr/local subtree (copy
everything you might need afterwards, e. g. config files
and your scripts!), repopulate it using the mtree file,
and reinstall what you need. That will pull in any dependencies
you may not have thought of in the first place.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Port update hosed entire system

2012-10-01 Thread Rod Person
On Mon, 1 Oct 2012 09:47:51 +0700
Olivier Nicole olivier.nic...@cs.ait.ac.th wrote:
 
 Can you run /bin/sh? That would be a start to try reinstalling what
 was lost.
 
 Good luck,
 
 Olivier

Nope. 

$ /bin/sh
Segmentation fault (core dumped)



-- 
Rod Person
http://www.rodperson.com
  
First we got population.  The world today has 6.8 billion people. 
That's headed up to about 9 billion. Now if we do a really great job on 
new vaccines,  health care, reproductive health services, we lower that 
by perhaps 10 or 15 percent.
 - Bill Gates
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Port update hosed entire system

2012-10-01 Thread Rod Person
On Mon, 1 Oct 2012 09:57:05 +0700
Erich Dollansky erichfreebsdl...@ovitrap.com wrote:
  
  Any help or ideas would be appreciated.
  
  
 
 did you try to boot into single user mode?
 
 What shells do you have installed?
 
 Erich

This is the default shell. I didn't try that yet, because I don't want
to be left with no way to login at all if something is really messed up.

Since I could not even switch to a no console (ctrl+alt+f2...) and
login I'm not really wanting to reboot at this point.


-- 
Rod Person
http://www.rodperson.com
  
First we got population.  The world today has 6.8 billion people. 
That's headed up to about 9 billion. Now if we do a really great job on 
new vaccines,  health care, reproductive health services, we lower that 
by perhaps 10 or 15 percent.
 - Bill Gates
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Port update hosed entire system

2012-10-01 Thread Rod Person
On Mon, 1 Oct 2012 08:02:54 +0200
Polytropon free...@edvax.de wrote:

 On Mon, 1 Oct 2012 20:08:29 -0400, Rod Person wrote:
  Hi All,
  
  I was attempting to update ports that used libogg with the command
  
  portmaster -d -y -r libogg
  
  I went away and came back some hours later and some updates had
  failed. Now my shell segfaults on any command such as ls, clear or
  su I tried to login on another console as root and after giving the
  password it just goes back to login. I am at a loss as to what to
  do to fix this one.
 
 That sounds like a really weird problem. FreeBSD and the
 ports (which portmaster deals with) are separated systems,
 so even if you totally hose your ports, the OS should not
 be affected.

I'm well aware of this, and is also why I no clue what could have
happened. It would never have occured to me that updating a port that
has to do with audio and video containers would totally leave me unable
to login into my system or issue and shell commands without getting
a segmentation fault.

I did discover that my / file system had run out of space -131MB.

I'm still able to issue sudo, so using sudo rm -r I was able to free up
25GB...but still, /bin/sh, ls, clear all seg fault and su doesn't work
and switching consoles doesn't let me log in.

I maybe be left with attempting a single user boot, but I'm still not
that comfortable at attempting such as I don't want to have a totally
useless box.


-- 
Rod Person
http://www.rodperson.com
  
First we got population.  The world today has 6.8 billion people. 
That's headed up to about 9 billion. Now if we do a really great job on 
new vaccines,  health care, reproductive health services, we lower that 
by perhaps 10 or 15 percent.
 - Bill Gates
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Port update hosed entire system

2012-10-01 Thread jb
Rod Person rodperson at rodperson.com writes:

 ... 
 I'm still able to issue sudo, so using sudo rm -r I was able to free up
 25GB...but still, /bin/sh, ls, clear all seg fault and su doesn't work
 and switching consoles doesn't let me log in.
 
 I maybe be left with attempting a single user boot, but I'm still not
 that comfortable at attempting such as I don't want to have a totally
 useless box.
 

Well, in emergency:
- add /rescue/sh to /etc/shells
  Anything in /rescue/ is statically compiled.
- change root shell to /rescue/sh
  vipw

jb




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Port update hosed entire system

2012-10-01 Thread Erich Dollansky
Hi,

On Tue, 2 Oct 2012 06:20:45 -0400
Rod Person rodper...@rodperson.com wrote:

 On Mon, 1 Oct 2012 08:02:54 +0200
 Polytropon free...@edvax.de wrote:
 
  On Mon, 1 Oct 2012 20:08:29 -0400, Rod Person wrote:
   Hi All,
   
   I was attempting to update ports that used libogg with the command
   
   portmaster -d -y -r libogg
   
   I went away and came back some hours later and some updates had
   failed. Now my shell segfaults on any command such as ls, clear or
   su I tried to login on another console as root and after giving
   the password it just goes back to login. I am at a loss as to
   what to do to fix this one.
  
  That sounds like a really weird problem. FreeBSD and the
  ports (which portmaster deals with) are separated systems,
  so even if you totally hose your ports, the OS should not
  be affected.
 
 I'm well aware of this, and is also why I no clue what could have
 happened. It would never have occured to me that updating a port that
 has to do with audio and video containers would totally leave me
 unable to login into my system or issue and shell commands without
 getting a segmentation fault.

the ports did nothing of this sort.
 
 I did discover that my / file system had run out of space -131MB.
 
Ah, all red lights are on now.

 I'm still able to issue sudo, so using sudo rm -r I was able to free
 up 25GB...but still, /bin/sh, ls, clear all seg fault and su doesn't
 work and switching consoles doesn't let me log in.
 
You ave now 25GB free on /?

More red lights are on now.

 I maybe be left with attempting a single user boot, but I'm still not
 that comfortable at attempting such as I don't want to have a totally
 useless box.

What partitioning schema do you have?

Could it be that you simply filled the file system and FreeBSD does not
find any space even just for a restart?

Erich
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Port update hosed entire system

2012-10-01 Thread Matthew Seaman
On 02/10/2012 11:10, Rod Person wrote:
 On Mon, 1 Oct 2012 09:47:51 +0700
 Olivier Nicole olivier.nic...@cs.ait.ac.th wrote:

 Can you run /bin/sh? That would be a start to try reinstalling what
 was lost.


 Nope. 
 
 $ /bin/sh
 Segmentation fault (core dumped)

How about /rescue/sh ?  It's statically linked so should continue
working no matter the state of the shared libraries on the system.

Failing that, booting from the install media into a livefs is your best
bet.  You should be able to mount your system disks or import a ZFS pool
and fix their contents.

Also, wondering how exactly your original command managed to hose the
base system.  Did it fill up the disks?  Is it possible that the problem
is actually hardware failure?

Cheers,

Matthew


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Port update hosed entire system

2012-10-01 Thread Arthur Chance

On 10/02/12 11:20, Rod Person wrote:

On Mon, 1 Oct 2012 08:02:54 +0200
Polytropon free...@edvax.de wrote:


On Mon, 1 Oct 2012 20:08:29 -0400, Rod Person wrote:

Hi All,

I was attempting to update ports that used libogg with the command

portmaster -d -y -r libogg

I went away and came back some hours later and some updates had
failed. Now my shell segfaults on any command such as ls, clear or
su I tried to login on another console as root and after giving the
password it just goes back to login. I am at a loss as to what to
do to fix this one.


That sounds like a really weird problem. FreeBSD and the
ports (which portmaster deals with) are separated systems,
so even if you totally hose your ports, the OS should not
be affected.


I'm well aware of this, and is also why I no clue what could have
happened. It would never have occured to me that updating a port that
has to do with audio and video containers would totally leave me unable
to login into my system or issue and shell commands without getting
a segmentation fault.

I did discover that my / file system had run out of space -131MB.

I'm still able to issue sudo, so using sudo rm -r I was able to free up
25GB...but still, /bin/sh, ls, clear all seg fault and su doesn't work
and switching consoles doesn't let me log in.

I maybe be left with attempting a single user boot, but I'm still not
that comfortable at attempting such as I don't want to have a totally
useless box.


Have you tried /rescue/sh? If that fails as well I'd start worrying 
about hardware problems.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Port update hosed entire system

2012-10-01 Thread jb
jb jb.1234abcd at gmail.com writes:

 
 Rod Person rodperson at rodperson.com writes:
 
  ... 
  I'm still able to issue sudo, so using sudo rm -r I was able to free up
  25GB...but still, /bin/sh, ls, clear all seg fault and su doesn't work
  and switching consoles doesn't let me log in.
  
  I maybe be left with attempting a single user boot, but I'm still not
  that comfortable at attempting such as I don't want to have a totally
  useless box.
  
 
 Well, in emergency:
 - add /rescue/sh to /etc/shells
   Anything in /rescue/ is statically compiled.
 - change root shell to /rescue/sh
   vipw
 
 jb

I forgot to mention that you may want to do this:

Save /bin/sh.
mv /bin/sh /bin/sh-saved

Softlink /bin/sh:
ln -s /rescue/sh /bin/sh

jb



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Port update hosed entire system

2012-09-30 Thread Rod Person
Hi All,

I was attempting to update ports that used libogg with the command

portmaster -d -y -r libogg

I went away and came back some hours later and some updates had failed.
Now my shell segfaults on any command such as ls, clear or su
I tried to login on another console as root and after giving the
password it just goes back to login. I am at a loss as to what to do to
fix this one.

$ uname -a
FreeBSD Atomizer64 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12
02:52:29 UTC 2012
r...@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

Any help or ideas would be appreciated.


-- 
Rod Person
http://www.rodperson.com
  
First we got population.  The world today has 6.8 billion people. 
That's headed up to about 9 billion. Now if we do a really great job on 
new vaccines,  health care, reproductive health services, we lower that 
by perhaps 10 or 15 percent.
 - Bill Gates
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Port update hosed entire system

2012-09-30 Thread Olivier Nicole
Rod,

 I was attempting to update ports that used libogg with the command

 portmaster -d -y -r libogg

 I went away and came back some hours later and some updates had failed.
 Now my shell segfaults on any command such as ls, clear or su
 I tried to login on another console as root and after giving the
 password it just goes back to login. I am at a loss as to what to do to
 fix this one.

 $ uname -a
 FreeBSD Atomizer64 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12
 02:52:29 UTC 2012
 r...@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

 Any help or ideas would be appreciated.

Can you run /bin/sh? That would be a start to try reinstalling what was lost.

Good luck,

Olivier
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Port update hosed entire system

2012-09-30 Thread Erich Dollansky
Hi,

On Mon, 1 Oct 2012 20:08:29 -0400
Rod Person rodper...@rodperson.com wrote:

 Hi All,
 
 I was attempting to update ports that used libogg with the command
 
 portmaster -d -y -r libogg
 
 I went away and came back some hours later and some updates had
 failed. Now my shell segfaults on any command such as ls, clear or su
 I tried to login on another console as root and after giving the
 password it just goes back to login. I am at a loss as to what to do
 to fix this one.
 
 $ uname -a
 FreeBSD Atomizer64 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun
 12 02:52:29 UTC 2012
 r...@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
 
 Any help or ideas would be appreciated.
 
 

did you try to boot into single user mode?

What shells do you have installed?

Erich
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org