[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Some glibc 2.1 related notes



Hi,

I am experimenting with glibc 2.1 and have a few notes which the
developers may or may not be aware of so I thought I'd post them here.  My
appologies if they are already known.

Ok with regards to utmpd, when glibc 2.1 is upgraded to a later version of
glibc 2.1 using dselect or apt, it stops and restarts utmpd.  This seems
to cause both utmpx and utmp files to be emptied and things like screen
really don't work.  Also, when root does a shutdown now to go down to
single user, utmpd gets killed which is fine, the problem is, when the
system comes back up, utmpd doesn't get restarted because it starts from
/etc/rcS.d.  Perhapse a shutdown now or init 1 shouldn't kill utmpd.

Although most programs now are using things like logwtmp which write to
/var/log/wtmpx, some critical ones are still writing to wtmp.  Most
notably wu-ftpd which might have to be fixed.  Also, last(1) is reading
through wtmp and not wtmpx for it's data.  Therefore, when I do a last, it
only shows ftp sessions.  I looked at the code and it seems to have some
optimized reading routines in place for wtmp and there might have to be
some major modifications happening there.

What about something which runs as a daemon or from cron that keeps wtmp
and wtmpx in sync.  Essentially what utmpd does except for the wtmp files.
Does anyone see a problem with this.

The one other thing I have noticed is static compiling doesn't work when
linking in other libraries other than libc.  Here's an example.
continuum:~/progs/cgi$ gcc -o counter.cgi -O2 -Wall counter.c cgic.c
/usr/lib/libmysqlclient.a -lm -static
/usr/lib/libmysqlclient.a(net.o): In function `my_net_read':
net.o(.text+0x4ed): undefined reference to `_IO_stderr_'
net.o(.text+0x5b8): undefined reference to `_IO_stderr_'
/usr/lib/libmysqlclient.a(my_init.o): In function `my_end':
my_init.o(.text+0x6d): undefined reference to `_IO_stderr_'
my_init.o(.text+0xb6): undefined reference to `_IO_stderr_'
/usr/lib/libmysqlclient.a(my_messnc.o): In function
`my_message_no_curses':
my_messnc.o(.text+0xc): undefined reference to `_IO_stdout_'
my_messnc.o(.text+0x1e): undefined reference to `_IO_stderr_'
my_messnc.o(.text+0x36): undefined reference to `_IO_stderr_'
my_messnc.o(.text+0x41): undefined reference to `_IO_stderr_'
my_messnc.o(.text+0x53): undefined reference to `_IO_stderr_'
my_messnc.o(.text+0x5e): undefined reference to `_IO_stderr_'
/usr/lib/libmysqlclient.a(my_messnc.o)(.text+0x6a): more undefined
references to `_IO_stderr_' follow
collect2: ld returned 1 exit status
continuum:~/progs/cgi$ gcc -o counter.cgi -O2 -Wall -lmysqlclient -lm
counter.c cgic.c
continuum:~/progs/cgi$
I am not sure if the mysql stuff is the only thing effected or if this is
just an error on my part but since it's those _symbols that are coming up,
it might be a problem with those static libraries.  Anyone know a way to
check what is effected by this on a Debian system?

-- 
Shane Wegner: shane@cm.nu
Tel: (604) 930-0530
Sysadmin, Continuum Systems: http://www.cm.nu
Personal website: http://www.cm.nu/~shane
ICQ UIN: 120000
PGP: keyid:       2048/F5C2BD91
     Fingerprint: 8C 48 B9 D8 53 BB D8 EF
                  76 BB DB A2 1C 0D 1D 87

Attachment: pgpAwFTRoZyxm.pgp
Description: PGP signature


Reply to: