Re: [gentoo-user] Dumb question

2006-10-12 Thread Boyd Stephen Smith Jr.
On Thursday 12 October 2006 01:42, PaulNM <[EMAIL PROTECTED]> wrote 
about 'Re: [gentoo-user] Dumb question':
> Bo Ørsted Andresen wrote:
> > It would of course solve the issue. *Nothing* short of a kernel
> > upgrade requires a reboot though. And I mean that literally. So
> > usually not.
>
> Just being a bit pedantic here, but what about init?

Modern versions of init will watch not only /etc/initab, but also the path 
they were started from.  If that path is pointed to a different file, it 
will exec() that file in place.

-- 
"If there's one thing we've established over the years,
it's that the vast majority of our users don't have the slightest
clue what's best for them in terms of package stability."
-- Gentoo Developer Ciaran McCreesh


pgpG9PPTtNQys.pgp
Description: PGP signature


Re: [gentoo-user] Dumb question

2006-10-12 Thread Alan McKinnon
On Thursday 12 October 2006 08:42, PaulNM wrote:
> Bo Ørsted Andresen wrote:
> > It would of course solve the issue. *Nothing* short of a kernel
> > upgrade requires a reboot though. And I mean that literally. So
> > usually not.
>
> Just being a bit pedantic here, but what about init? Even switching
> to runlevel 1 would leave it running.  Is it possible to tell the
> kernel to re-run init, and how?

I don't believe so - every attempt i've ever made to kill or restart 
init causes a kernel panic.

It's not init doing this - the same effect is achieved by booting with 
init=/bin/bash and then exiting that bash

alan

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Dumb question

2006-10-12 Thread Alan McKinnon
On Wednesday 11 October 2006 19:43, Michael Sullivan wrote:
> Wow, files can exist without file names.  I think I found a topic for
> discussion in philosophy class...

Nope.

A file is an inode and that either eists or doesn't. A filename is just 
a dentry in a directory, it is not the file itself, it may or may not 
exist, may or may not actually mean something and is there purely for 
*your* benefit in userspace.

So there's no conflict.

alan

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Dumb question

2006-10-12 Thread PaulNM
Bo Ørsted Andresen wrote:
> 
> It would of course solve the issue. *Nothing* short of a kernel upgrade 
> requires a reboot though. And I mean that literally. So usually not.
> 
Just being a bit pedantic here, but what about init? Even switching to
runlevel 1 would leave it running.  Is it possible to tell the kernel to
re-run init, and how?

PaulNM
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Dumb question

2006-10-11 Thread Bo Ørsted Andresen
On Thursday 12 October 2006 08:17, Anthony E. Caudel wrote:
> Thanks all.  I guess I now understand how it works.
>
> Someone noted that if you update sshd for example, a restart would be in
> order afterward.  This would seem to be true of a lot of programs.  So
> would a total restart of the system (just short of a reboot) be warranted?

It would of course solve the issue. *Nothing* short of a kernel upgrade 
requires a reboot though. And I mean that literally. So usually not.

-- 
Bo Andresen


pgpTA2WyrrhPJ.pgp
Description: PGP signature


Re: [gentoo-user] Dumb question

2006-10-11 Thread Neil Bothwick
On Wed, 11 Oct 2006 13:05:12 -0500, Thomas T. Veldhouse wrote:

> And ... if the startup scripts change or a major version bump occurs, a 
> clean shutdown should happen BEFORE the new package is installed.   The 
> portage system really should shutdown any services before an upgrade
> occurs.

So you're updating SSH over a remote link, portage shuts down sshd then
the new version fails to compile, leaving the old version there but not
running and no way to fix it from a hundred miles away.

No thanks! I can live with portage warning me of what needs to be done,
but I'd rather it didn't make unilateral decisions on my behalf.


-- 
Neil Bothwick

I've got a mind like a... a... what's that thing called?


signature.asc
Description: PGP signature


Re: [gentoo-user] Dumb question

2006-10-11 Thread Thomas T. Veldhouse

Nick Rout wrote:

which leads top the point that if you update a daemon like sshd, yopu
need to restart it, or else you are still running the old daemon.

  
And ... if the startup scripts change or a major version bump occurs, a 
clean shutdown should happen BEFORE the new package is installed.   The 
portage system really should shutdown any services before an upgrade occurs.


Tom Veldhouse

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Dumb question

2006-10-11 Thread Michael Sullivan
On Wed, 2006-10-11 at 12:23 -0400, Daniel Barkalow wrote:
> On Tue, 10 Oct 2006, Anthony E. Caudel wrote:
> 
> > I have been using Gentoo for more than 2 years now and have always
> > wondered (but never asked - That's the "dumb" part) how Gentoo manages
> > to update a package that happens to be running at the time.
> > 
> > Given that the old version (the one running) is deleted, how does it
> > manage to keep standing if you just cut its legs off?
> 
> Userspace technically never "deletes" anything in the UNIX model; it 
> either "truncates" it (not what's going on here) or it "unlinks" it. 
> "Unlink" causes the file not to have the filename any more, and the kernel 
> gets rid of files which aren't in use and have no name (of course, nobody 
> can tell when or if this happens, aside from the disk not filling up, 
> because there would be no way to look at the file anyway).
> 
> If you look at /proc//maps for a program you've upgraded, you'll 
> probably find funny notations in there, indicating that the file it's 
> using is not the file that currently has that filename.
> 
> ("truncate" and otherwise openning the file for writing actually affect 
> the file, not the filename, and would therefore cause programs to crash if 
> you overwrote them.)
> 
> Technical terms: the file itself is called an "inode", and the name is a 
> "dentry" (actually, the last part of the path, which is all that goes away 
> in a single operation, is the dentry). A dentry stores the inode number of 
> the inode at that path, and "unlink" removes the dentry. What's actually 
> happening in an upgrade is "rename", which, as a single operation, unlinks 
> any dentry with the destination path, links the source inode to the 
> destination dentry, and unlinks the source dentry. This means that no 
> program can see the path empty or with half of a file or see the file with 
> two names.
> 
>   -Daniel
> *This .sig left intentionally blank*

Wow, files can exist without file names.  I think I found a topic for
discussion in philosophy class...

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Dumb question

2006-10-11 Thread Daniel Barkalow
On Tue, 10 Oct 2006, Anthony E. Caudel wrote:

> I have been using Gentoo for more than 2 years now and have always
> wondered (but never asked - That's the "dumb" part) how Gentoo manages
> to update a package that happens to be running at the time.
> 
> Given that the old version (the one running) is deleted, how does it
> manage to keep standing if you just cut its legs off?

Userspace technically never "deletes" anything in the UNIX model; it 
either "truncates" it (not what's going on here) or it "unlinks" it. 
"Unlink" causes the file not to have the filename any more, and the kernel 
gets rid of files which aren't in use and have no name (of course, nobody 
can tell when or if this happens, aside from the disk not filling up, 
because there would be no way to look at the file anyway).

If you look at /proc//maps for a program you've upgraded, you'll 
probably find funny notations in there, indicating that the file it's 
using is not the file that currently has that filename.

("truncate" and otherwise openning the file for writing actually affect 
the file, not the filename, and would therefore cause programs to crash if 
you overwrote them.)

Technical terms: the file itself is called an "inode", and the name is a 
"dentry" (actually, the last part of the path, which is all that goes away 
in a single operation, is the dentry). A dentry stores the inode number of 
the inode at that path, and "unlink" removes the dentry. What's actually 
happening in an upgrade is "rename", which, as a single operation, unlinks 
any dentry with the destination path, links the source inode to the 
destination dentry, and unlinks the source dentry. This means that no 
program can see the path empty or with half of a file or see the file with 
two names.

-Daniel
*This .sig left intentionally blank*
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Dumb question

2006-10-11 Thread Neil Bothwick
On Wed, 11 Oct 2006 01:30:59 -0500, Anthony E. Caudel wrote:

> I suspected it might be memory. However I still find it difficult.  If
> I'm running KDE for example, it requires at least kdelibs which is a lot
> to hold in memory.

Programs only load the libraries they use, you're unlikely to have all
KDE libraries loaded at once. This can lead to problems if you are
updating KDE and have updated the libs but not the packages. I've had
Konqueror fail to work during an upgrade because of a library mismatch.

The easy way to avoid this is to load all the programs you are likely to
be using before starting the the upgrade. That way you are sure that all
you need is in memory and independent of changes in the on-disk versions.


-- 
Neil Bothwick

I am Flatulus of Borg. Pull my finger.


signature.asc
Description: PGP signature


Re: [gentoo-user] Dumb question

2006-10-11 Thread Pawel Kraszewski
Dnia środa, 11 października 2006 06:21, Anthony E. Caudel napisał:
> I have been using Gentoo for more than 2 years now and have always
> wondered (but never asked - That's the "dumb" part) how Gentoo manages
> to update a package that happens to be running at the time.
>
> Given that the old version (the one running) is deleted, how does it
> manage to keep standing if you just cut its legs off?
>
> I've never seen this discussed anywhere which probably means everyone
> else already knows and are probably thinking to themselves, "Dumb
> question."

Observe CAREFULLY sequence of operations during emerge. It doesn't remove old 
package and install new ones. It installs the new one over the old and then 
removes unnecessary remains.

It may overwrite file in use due to the way Unices handle file management. On 
Windows you can't delete open file. On Unix you can, and process keeping file 
open won't usually notice that. Moreover, as long as the file is open, its 
data isn't removed from disk. Once the process closes it, it is physically 
removed - not sooner.

So after overwriting file (library, application) currently running 
applications (having it open) will still have access to old version and each 
newly run application will use the new one.

Which in turn means - yes, you need to 'power cycle' application to use new 
libraries or new version of executable.

-- 
 Pawel Kraszewski
 www.kraszewscy.net

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Dumb question

2006-10-10 Thread Anthony E. Caudel
Troy Curtis Jr wrote:
> On 10/10/06, Anthony E. Caudel <[EMAIL PROTECTED]> wrote:
>> I have been using Gentoo for more than 2 years now and have always
>> wondered (but never asked - That's the "dumb" part) how Gentoo manages
>> to update a package that happens to be running at the time.
>>
>> Given that the old version (the one running) is deleted, how does it
>> manage to keep standing if you just cut its legs off?
>>
>> I've never seen this discussed anywhere which probably means everyone
>> else already knows and are probably thinking to themselves, "Dumb
>> question."
>>
>> Tony
>> -- 
>> Those who would give up essential Liberty, to purchase a little temporary
>> Safety, deserve neither Liberty nor Safety.
>>-- Benjamin Franklin
>> -- 
>> gentoo-user@gentoo.org mailing list
>>
>>
> 
> Simple and short answer is that at run-time the binary and libraries
> are loaded into memory and run from there.  When you do the update it
> replaces the binary and/or libraries on disk, but you won't actually
> be running those updates until you restart the process.  There may be
> other, more dynamic, cases that I am aware of, but that is the general
> gist of it.
> 
> Troy

I suspected it might be memory. However I still find it difficult.  If
I'm running KDE for example, it requires at least kdelibs which is a lot
to hold in memory.

Tony

-- 
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
   -- Benjamin Franklin
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Dumb question

2006-10-10 Thread Nick Rout
On Tue, 10 Oct 2006 23:42:33 -0500
"Troy Curtis Jr" <[EMAIL PROTECTED]> wrote:

> On 10/10/06, Anthony E. Caudel <[EMAIL PROTECTED]> wrote:
> > I have been using Gentoo for more than 2 years now and have always
> > wondered (but never asked - That's the "dumb" part) how Gentoo manages
> > to update a package that happens to be running at the time.
> >
> > Given that the old version (the one running) is deleted, how does it
> > manage to keep standing if you just cut its legs off?
> >
> > I've never seen this discussed anywhere which probably means everyone
> > else already knows and are probably thinking to themselves, "Dumb question."
> >
> > Tony

which leads top the point that if you update a daemon like sshd, yopu
need to restart it, or else you are still running the old daemon.


-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Dumb question

2006-10-10 Thread Troy Curtis Jr

On 10/10/06, Anthony E. Caudel <[EMAIL PROTECTED]> wrote:

I have been using Gentoo for more than 2 years now and have always
wondered (but never asked - That's the "dumb" part) how Gentoo manages
to update a package that happens to be running at the time.

Given that the old version (the one running) is deleted, how does it
manage to keep standing if you just cut its legs off?

I've never seen this discussed anywhere which probably means everyone
else already knows and are probably thinking to themselves, "Dumb question."

Tony
--
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
   -- Benjamin Franklin
--
gentoo-user@gentoo.org mailing list




Simple and short answer is that at run-time the binary and libraries
are loaded into memory and run from there.  When you do the update it
replaces the binary and/or libraries on disk, but you won't actually
be running those updates until you restart the process.  There may be
other, more dynamic, cases that I am aware of, but that is the general
gist of it.

Troy
--
"Beware of spyware. If you can, use the Firefox browser." - USA Today
Download now at http://getfirefox.com
Registered Linux User #354814 ( http://counter.li.org/)
--
gentoo-user@gentoo.org mailing list



[gentoo-user] Dumb question

2006-10-10 Thread Anthony E. Caudel
I have been using Gentoo for more than 2 years now and have always
wondered (but never asked - That's the "dumb" part) how Gentoo manages
to update a package that happens to be running at the time.

Given that the old version (the one running) is deleted, how does it
manage to keep standing if you just cut its legs off?

I've never seen this discussed anywhere which probably means everyone
else already knows and are probably thinking to themselves, "Dumb question."

Tony
-- 
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
   -- Benjamin Franklin
-- 
gentoo-user@gentoo.org mailing list