Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* C library upgrade question
@ 1999-09-06 15:55 Christian Iseli
  1999-09-07 13:05 ` Jeff Johnson
  0 siblings, 1 reply; 10+ messages in thread
From: Christian Iseli @ 1999-09-06 15:55 UTC (permalink / raw)
  To: axp-list

Hi folks,

Here is a (maybe stupid) question that's been bugging me for a while: whenever
I upgrade my C library (rpm -U glibc*2.1.2preX*), the next time I reboot, the /
(root directory) cannot be properly unmounted, which leads to a rather lengthy
(though harmless) fsck upon reboot.

What is causing it, and can it be avoided ?

TIA.  Cheers,
					Christian



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: C library upgrade question
  1999-09-06 15:55 C library upgrade question Christian Iseli
@ 1999-09-07 13:05 ` Jeff Johnson
  1999-09-07 13:19   ` Christian Iseli
  0 siblings, 1 reply; 10+ messages in thread
From: Jeff Johnson @ 1999-09-07 13:05 UTC (permalink / raw)
  To: axp-list, Christian Iseli

Christian Iseli wrote:
> 
> Hi folks,
> 
> Here is a (maybe stupid) question that's been bugging me for a while: whenever
> I upgrade my C library (rpm -U glibc*2.1.2preX*), the next time I reboot, the /
> (root directory) cannot be properly unmounted, which leads to a rather lengthy
> (though harmless) fsck upon reboot.
> 
> What is causing it, and can it be avoided ?
>

I believe the fsck is caused by a lingering reference count to the old
shared libc from running daemons. It conceivably could be avoided by
killing/restarting all processes except init but that's hardly worth the
trouble.

73 de Jeff

-- 
Jeff Johnson	ARS N3NPQ
jbj@redhat.com (jbj@jbj.org)
Chapel Hill, NC


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: C library upgrade question
  1999-09-07 13:05 ` Jeff Johnson
@ 1999-09-07 13:19   ` Christian Iseli
  1999-09-08  3:49     ` Richard Henderson
  0 siblings, 1 reply; 10+ messages in thread
From: Christian Iseli @ 1999-09-07 13:19 UTC (permalink / raw)
  To: Jeff Johnson; +Cc: axp-list


jbj@redhat.com said:
> I believe the fsck is caused by a lingering reference count to the old
> shared libc from running daemons. It conceivably could be avoided by
> killing/restarting all processes except init but that's hardly worth
> the trouble. 

You're probably right, but I was under the impression that init goes to a lot 
of trouble to try to kill all the running processes before unmounting the root 
partition.  If it didn't kill them, it wouldn't be able to unmount root at all 
(even without changing the C library).  Somehow, I fail to see what is so 
different after a C library upgrade.  Is it one of those cases of a deleted 
file that is not really unlinked until after the process that uses it dies ?  
But assuming that init kills all such processes, why would it still be linked?

Still puzzled...

Cheers,
					Christian



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: C library upgrade question
  1999-09-07 13:19   ` Christian Iseli
@ 1999-09-08  3:49     ` Richard Henderson
  1999-09-08 11:23       ` Christian Iseli
  0 siblings, 1 reply; 10+ messages in thread
From: Richard Henderson @ 1999-09-08  3:49 UTC (permalink / raw)
  To: axp-list; +Cc: Jeff Johnson

On Tue, Sep 07, 1999 at 03:19:57PM +0200, Christian Iseli wrote:
> But assuming that init kills all such processes, why would it still be linked?

Because init is using it still.



r~


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: C library upgrade question
  1999-09-08  3:49     ` Richard Henderson
@ 1999-09-08 11:23       ` Christian Iseli
  1999-09-08 11:33         ` Richard Henderson
  1999-09-08 11:55         ` Uncle George
  0 siblings, 2 replies; 10+ messages in thread
From: Christian Iseli @ 1999-09-08 11:23 UTC (permalink / raw)
  To: axp-list; +Cc: Richard Henderson


rth@twiddle.net said:
> Because init is using it still. 

Ok.  So, if I get this straight, init is using libc itself.  Thus what happens 
is that after init quits, the last link to the deleted libc is severed, the 
file is unlinked completely, but at this point nothing performs a sync.

Guess I could avoid this by keeping a link to libc in the filesystem until 
after the reboot (something like "ln /lib/libc.so.6.1 /lib/libc.old" before 
upgrading the library) ?

Thanks,
					Christian



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: C library upgrade question
  1999-09-08 11:23       ` Christian Iseli
@ 1999-09-08 11:33         ` Richard Henderson
  1999-09-08 11:53           ` Christian Iseli
  1999-09-08 11:55         ` Uncle George
  1 sibling, 1 reply; 10+ messages in thread
From: Richard Henderson @ 1999-09-08 11:33 UTC (permalink / raw)
  To: Christian Iseli; +Cc: axp-list

On Wed, Sep 08, 1999 at 01:23:13PM +0200, Christian Iseli wrote:
> Ok.  So, if I get this straight, init is using libc itself.  Thus what
> happens is that after init quits, the last link to the deleted libc is
> severed, the file is unlinked completely, but at this point nothing
> performs a sync.

Something like that.  I remember a detailed explanation of the 
problem came up on one of the libc lists.

I think the actual problem is more like (1) init keeps the refcount
of the old libc non-zero, (2) the remount ro of / with open deleted
files forced the dirty bit set (3) init dies.

> Guess I could avoid this by keeping a link to libc in the filesystem until 
> after the reboot (something like "ln /lib/libc.so.6.1 /lib/libc.old" before 
> upgrading the library) ?

That plus a bit in /etc/rc.d/rc.sysinit or something to delete the
old library would probably be ideal.  My / is only 150M and takes
near zero time to fsck, so I just don't bother.


r~


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: C library upgrade question
  1999-09-08 11:33         ` Richard Henderson
@ 1999-09-08 11:53           ` Christian Iseli
  0 siblings, 0 replies; 10+ messages in thread
From: Christian Iseli @ 1999-09-08 11:53 UTC (permalink / raw)
  To: Richard Henderson; +Cc: axp-list


rth@twiddle.net said:
> Something like that.  I remember a detailed explanation of the
> problem came up on one of the libc lists. 

Ah, I was almost sure someone had already picked this bone ;-)

> I think the actual problem is more like (1) init keeps the refcount of
> the old libc non-zero, (2) the remount ro of / with open deleted files
> forced the dirty bit set (3) init dies. 

Ok.  Makes sense.

> That plus a bit in /etc/rc.d/rc.sysinit or something to delete the
> old library would probably be ideal.  My / is only 150M and takes
> near zero time to fsck, so I just don't bother.

Yup.  Thanks a lot for your time and the info.

Cheers,
					Christian



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: C library upgrade question
  1999-09-08 11:23       ` Christian Iseli
  1999-09-08 11:33         ` Richard Henderson
@ 1999-09-08 11:55         ` Uncle George
  1999-09-08 17:38           ` Michal Jaegermann
  1 sibling, 1 reply; 10+ messages in thread
From: Uncle George @ 1999-09-08 11:55 UTC (permalink / raw)
  To: axp-list

Init also hooked in shared libs? So if the lib gets clobbered, no init/no system.

Isn;t there a set of basic 'utils' that dont rely on shared libs at all,
    or is everything hooked on '.so'
gat
it was some systems that had utils 'non-shared', and the rest used the '.so'
files. Came in real handy when the partition/system started to stagger.


Christian Iseli wrote:

> rth@twiddle.net said:
> > Because init is using it still.
>
> Ok.  So, if I get this straight, init is using libc itself.  Thus what happens
> is that after init quits, the last link to the deleted libc is severed, the
> file is unlinked completely, but at this point nothing performs a sync.
>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: C library upgrade question
  1999-09-08 11:55         ` Uncle George
@ 1999-09-08 17:38           ` Michal Jaegermann
  1999-09-09  7:44             ` Uncle George
  0 siblings, 1 reply; 10+ messages in thread
From: Michal Jaegermann @ 1999-09-08 17:38 UTC (permalink / raw)
  To: axp-list

Uncle George wrote:
> 
> Init also hooked in shared libs? So if the lib gets clobbered, no init/no system.

Relinking 'init' static would solve both problems at once (i.e. "dirty"
shutdown and an initial boot); but clobbered basic shared libraries mean
no much of a system in any case.  Time to boot from a floppy into a ram
disk and refresh libraries from CD - as long as you still have your hard
drive.

If your /lib is gone but a disk is there then you can likely still boot
with an 'init=/bin/ash' kernel option if you have /bin/ash statically
linked (or other small shell of that sort).

  Michal


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: C library upgrade question
  1999-09-08 17:38           ` Michal Jaegermann
@ 1999-09-09  7:44             ` Uncle George
  0 siblings, 0 replies; 10+ messages in thread
From: Uncle George @ 1999-09-09  7:44 UTC (permalink / raw)
  To: axp-list

The Idea would be to not reload the whole sys from floppy/cd.  My libs are not always
at the same level of the outdated 'cd', and would prefer not to trash whole disk
because a 'block' of data inside the 'lib' is corrupted
gat

BTW this is why I have just a 'sys' | '/' partition incase i upgrade, and it goes
badly. I'm just not ready to trash ( lets clean out the whole partition ) my sources,
work whatever else that I may have forgotten. It is also the reason why i have
separate partitions for RH5.x & RH6.0. Oh well.
gat

Michal Jaegermann wrote:

> Uncle George wrote:
> >
> > Init also hooked in shared libs? So if the lib gets clobbered, no init/no system.
>
> Relinking 'init' static would solve both problems at once (i.e. "dirty"
> shutdown and an initial boot); but clobbered basic shared libraries mean
> no much of a system in any case.  Time to boot from a floppy into a ram
> disk and refresh libraries from CD - as long as you still have your hard
> drive.
>
> If your /lib is gone but a disk is there then you can likely still boot
> with an 'init=/bin/ash' kernel option if you have /bin/ash statically
> linked (or other small shell of that sort).
>
>   Michal
>
> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~1999-09-09 18:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-09-06 15:55 C library upgrade question Christian Iseli
1999-09-07 13:05 ` Jeff Johnson
1999-09-07 13:19   ` Christian Iseli
1999-09-08  3:49     ` Richard Henderson
1999-09-08 11:23       ` Christian Iseli
1999-09-08 11:33         ` Richard Henderson
1999-09-08 11:53           ` Christian Iseli
1999-09-08 11:55         ` Uncle George
1999-09-08 17:38           ` Michal Jaegermann
1999-09-09  7:44             ` Uncle George

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox