Linux-Development-Sys Digest #614, Volume #6 Mon, 12 Apr 99 03:14:26 EDT
Contents:
Re: GDB broken in Redhat 5.2? (Louis S Leclerc -- Personal Account)
Re: Linux NFS server, Solaris cient, bad news ... (Leslie Mikesell)
Re: Redhat Linux L10N (Todd Graham Lewis)
threads and C++ exceptions (Rich)
Device Driver security issues ("T.D. Brown")
Re: Linux NFS server, Solaris cient, bad news ... (Leslie Mikesell)
Re: How to test if /dev/fd0 exists (H. Peter Anvin)
SIGCHLD and zombie ([EMAIL PROTECTED])
gdb and mapped symbol table (Arun Sharma)
Re: clone() creates zombies (Andreas Schwab)
Re: threads and C++ exceptions (Justin Vallon)
HELP PLEASE: ioremap/mmap/vma_operations?? (jeff)
Re: MPEG player source code for Linux? (Andrea Borgia)
Re: Debuging system calls (Peter Samuelson)
Re: GDB broken in Redhat 5.2? (Peter Samuelson)
Re: SIGCHLD and zombie (Peter Samuelson)
Re: non-buffering device i/o ("Sascha Bohnenkamp")
----------------------------------------------------------------------------
From: [EMAIL PROTECTED] (Louis S Leclerc -- Personal Account)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: GDB broken in Redhat 5.2?
Date: 12 Apr 1999 01:18:36 GMT
Hi all,
thanks for all your tips. I did get this to work.
For some reason, Redhat compiles glibc with debug flags on.
(maybe this is an error, as when redhat does this, it
breaks their other applications on the CD like xxgdb and
gdb...I think apps like this on the CD (like gdb, xxgdb..etc)
should work out of the box really).
Anyways, this problems,will cause gdb to try to trace into
glibc functions, and then get stuck when the source files
aren't found.
The fix, (from the following reply) I used was:
1.) Install the original source rpm of the redhat distribution
rpm -i glibc.....
2.) Edit the glibc-spec file /usr/src/redhat/SPECS/glibc....
(There should be some Entry line CCFLAGS = "-g",
one should simply delete it)
3.) Rebuild the source and binary rpms
cd /usr/src/redhat/SPEC ; rpm -ba glibc....spec
4.) Install the final binary rpm-s:
cd /usr/src/redhat/RPMS/i386
rpm -Uvh glibc*
5.) You might want to remove the remaining Sources afterwards:
rm -rf /usr/src/redhat/SOURCES/*
rm -rf /usr/src/redhat/BUILD/*
rm -rf /usr/src/redhat/SPECS/glibc*
I also found that for glibc the package manager in redhat seems
to get mixed up, and when you try to uninstall glibc, it says
its not installed, and when you try to install it, it says its
already there. Using the "--force" flag when running RPM, I
could force the install of the remade glibc, and everything was
fine after that..
Thanks everyone;
Lou L.
---
Louis S Leclerc -- Personal Account ([EMAIL PROTECTED]) wrote:
: Hi,
: I have a problem with gdb, which I recently installed on Linux.
: This is for a high visability project in a bank in which we
: wish to prove Linux as a better alternative over NT4.0 (which
: we currently use) for future installations, so your
: assistance is appreciated if we are to succeed.
: When stepping a program (any program, even "hello,world"),
: when I 'step' to a c function call, the gdb gets stuck and
: says in the bottom white window (ie. when I hit printf)
: strcmp (p1=0x40018dc1 "fopen", p2=0x80482ff "printf") at
:../sysdeps/generic/strcmp.c:30
: ../sysdeps/generic/strcmp.c:30: No such file or directory.
: Looking in dejanews and the redhat sites, this appears to
: be a *very* *very* common problem with gdb in redhat 5.2
: on Intel boxes. However,
: aside from general type answers from folks (ie. install
: sources for libc, compile with different
: options..etc..etc), there has been no clear resolution of
: this over the past 12 months' articles that I searched.
: (people have put in sources..still broken..etc..etc..etc).,
: no set solution found so far...
: Any idea what is happening, or how to fix this problem?
: Has anyone gotten gdb to work right in redhat 5.2? How did
: you do it?
: Research shows that something
: happened after redhat 4.2 breaking gdb so that it doesn't
: work anymore in 5.1 / 5.2 when hitting libc function calls.
: SO it doesn't look like it is the basic stuff like compiling
: with '-g',..etc..etc, something else happened it looks like
: in redhat 5.1/5.2
: I am running:
: Redhat 5.2
: gdb 4.17.0.4
: I have installed the regular, development and profile versions
: of libc, but the path of usr/src/redhat is still empty. If
: these need to be filled, which package exactly should I install?
: And..is this even related to the problem (dont make assumptions
: unless you are sure it applied to redhat 5.2, as I also know
: the obvious answer here, people have installed the sources
: to no avail... in solving this problem).
: I am looking for *very specific* instructions on how to
: get this to work in redhat 5.2 (ie. if to install a
: libc package, what is it called (exactly)..etc), or whatever,
: or if it is just broken so badly that it can't work in linux
: 5.2 (if so, how does anyone write C programs in linux?)
: This is a new installation and there is nothing unusual/
: strange about the setup. most of us are rather new to linux here
: (solaris & NT backgrounds), so please don't make any assumptions
: of what we might know in your replies. We have the CD's and
: access to the web, so if you can please tell us how to fix
: this, with specifics, it would be great in advancing this
: project as so far we like what we see with Redhat linux
: except for this problem.
: Thank you;
: Lou Leclerc
------------------------------
From: [EMAIL PROTECTED] (Leslie Mikesell)
Crossposted-To: matrix.lists.linux.kernel
Subject: Re: Linux NFS server, Solaris cient, bad news ...
Date: 11 Apr 1999 20:54:23 -0500
In article <[EMAIL PROTECTED]>,
David T. Blake <[EMAIL PROTECTED]> wrote:
>mlw <[EMAIL PROTECTED]> writes:
>
>>Sorry guys, 2.2.5 doesn't work either.
>>I have seen this very problem. It seems as though when a file is
>>created,deleted, then mkdir creates a directory, on NFS fom solaris. The
>>Solaris box refuses to think the directory is a directory.
>>
>>I would love to see this fixed, I got people giving me sh$t about it.
>
>
>http://sunsolve.Sun.COM/pub-cgi/us/pubpatchpage.pl
>might help. All releases of Solaris have nfs patches
>available. The standard Solaris release nfs has bugs
>that make Sun server:linux client not work quite
>right.
>
>Note: This may or may not solve your problem, but it
>would be the first thing to verify - that the Sun NFS
>patches are applied.
It isn't just Solaris, though. My problems are with freebsd
clients and a linux server, and they seem to be fixed with
the 2.2.3 patches except for the quirk that I get an error
when trying to mount a remote filesystem in it's relative location
on another mounted filesystem (i.e. mounting /n/machine, then
/n/machine/home). Still haven't tried the 2.2.5 version.
Les Mikesell
[EMAIL PROTECTED]
------------------------------
From: Todd Graham Lewis <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.questions
Subject: Re: Redhat Linux L10N
Date: Sun, 11 Apr 1999 22:32:58 -0400
On Sun, 11 Apr 1999, Song Yang wrote:
> Are there Localized versions/extensions of Redhat distribution in
> Chinese, Korean, German or French?
As I recall, RH5.2 ships with 7 official languages supported and 1
unofficial (redneck.) Maybe this is some indication:
reflections% find -name fileutils.mo /usr/share/locale
./de/LC_MESSAGES/fileutils.mo
./es/LC_MESSAGES/fileutils.mo
./fr/LC_MESSAGES/fileutils.mo
./nl/LC_MESSAGES/fileutils.mo
./pl/LC_MESSAGES/fileutils.mo
./sv/LC_MESSAGES/fileutils.mo
./sl/LC_MESSAGES/fileutils.mo
./pt/LC_MESSAGES/fileutils.mo
So, it looks like German and French are probably well-supported.
Additionally, Pacific HiTech specialized in Asian-language distribs,
and I think that they are working on a Chinese version. Don't know
in particular about Korean; a search for "Korean & Linux" on any
search engine should turn up what you need.
The dictate comes from Stallman and is taken seriously by most everyone
in free software, though: i18n matters.
--
Todd Graham Lewis 32�49'N,83�36'W (800) 719-4664, x22804
******Linux****** MindSpring Enterprises [EMAIL PROTECTED]
"A pint of sweat will save a gallon of blood." -- George S. Patton
------------------------------
From: Rich <[EMAIL PROTECTED]>
Subject: threads and C++ exceptions
Date: Sun, 11 Apr 1999 21:48:54 -0400
I keep getting SIGSEGV errors when my code executing in a
pthread_create() created thread tries throws an exception. The class
that I'm throwing for the exception is a very simple exception derived
class and after some debugging I'm convinced that the class being thrown
has nothing to do with the problem.
Is there some sort of no-no about threads throwing exceptions in Linux?
Are there special attributes that need to be set for threads when
exceptions will be thrown by the code they execute?
-Rich
[EMAIL PROTECTED]
------------------------------
From: "T.D. Brown" <[EMAIL PROTECTED]>
Subject: Device Driver security issues
Date: Sun, 11 Apr 1999 18:31:15 -0700
I am writing a character device driver which allows a user to obtain
information about the virtual memory pages of any process running on the
system. What security issues for the device driver do I need to be aware
of?
Thank you,
Tom
------------------------------
From: [EMAIL PROTECTED] (Leslie Mikesell)
Crossposted-To: matrix.lists.linux.kernel
Subject: Re: Linux NFS server, Solaris cient, bad news ...
Date: 11 Apr 1999 20:49:08 -0500
In article <[EMAIL PROTECTED]>,
mlw <[EMAIL PROTECTED]> wrote:
>Leslie Mikesell wrote:
>>
>> In article <[EMAIL PROTECTED]>,
>> <[EMAIL PROTECTED]> wrote:
>> >I've got my home directory on a Linux box, running Redhat 5.2, kernel
>> >2.2.5, and the appropriate Redhat 2.2 patches. It's mounted on a
>> >Solaris 2.5.1 box, and I try to configure and compile gcc.
>> >
>> >During the configure process, I get write error failures writing to
>> >files, either creating the spec.h file at the end of configure, or cc
>> >complains about not being able to create executables during
>> >configure. A couple of times, ex started up for some reason, and once,
>> >a .h file in the parent directory got overwritten by an object file.
>> >
>> >When it failed on the spec.h file, the file was created with 0 length,
>> >it was owned by me, mode 644, (ls on server and client) but the client
>> >system bechaved as if it was owned by some other user.
>> >
>> >I tried 2.0.36, 2.2.4-ac1, and 2.2.5 on the server, and two Solaris
>> >clients running 2.5.1 and 2.6
>> >
>> >If no-one's seen (and fixed) this already, I'll turn on NFSD_DEBUG and
>> >try to get some data next week.
>>
>> I think the only thing that even has a chance of interoperating
>> correctly with non-linux systems is kernel 2.2.3 and patches
>> included in knfsd-1.2.2. It looks like there may be a new
>> version just out for 2.2.5 but I haven't tried to install it
>> yet. See ftp://ftp.varesearch.com/pub/support/hjl/knfsd/.
>> Also, there are some rpm updates in
>> ftp://ftp.varesearch.com/pub/support/hjl/linux-2.2/RPMS/i386/
>> but I'm not sure if they need 2.2.3 or will also work with
>> the new patches for 2.2.5.
>>
>Sorry guys, 2.2.5 doesn't work either.
>I have seen this very problem. It seems as though when a file is
>created,deleted, then mkdir creates a directory, on NFS fom solaris. The
>Solaris box refuses to think the directory is a directory.
>
>I would love to see this fixed, I got people giving me sh$t about it.
Is this with or without the patches I mentioned?
Les Mikesell
[EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED] (H. Peter Anvin)
Subject: Re: How to test if /dev/fd0 exists
Date: 12 Apr 1999 03:26:27 GMT
Reply-To: [EMAIL PROTECTED] (H. Peter Anvin)
Followup to: <kSGP2.497$[EMAIL PROTECTED]>
By author: [EMAIL PROTECTED] (Phil Howard)
In newsgroup: comp.os.linux.development.system
>
> On Fri, 9 Apr 1999 12:51:28 GMT [EMAIL PROTECTED] wrote:
>
> | Phil Howard <[EMAIL PROTECTED]> wrote:
> |
> | > The output from the "dmesg" command also shows the floppy even
> | > if it is not physically there. Apparently the floppy driver
> | > doesn't actually care if the
> |
> | Is this perhaps because it is seeing the floppy disk controller rather
> | than the bit of metal that a disk goes into ?
> | All of the Compaqs here come with ls-120 drives and no floppy drive, but
> | linux still shows an FDC as being present.
>
> It probably is seeing the controller. One of the messages confirms the
> controller type.
>
> I believe LS-120's actually include floppy because you can use it as a
> floppy and it has to be able to boot a normal floppy that has boot sectors
> that expect to read via BIOS device 0x00. Of course a BIOS could emulate
> 0x00 on another LS-120 mechanism much like El Torito does for CD.
LS-120 aware BIOSes let you access it through the BIOS as if it was a
floppy. Under Linux it is accessed using the IDE floppy driver, using
a /dev/hdX device name.
Nice device, by the way. Much nicer than Zips IMNSHO...
-hpa
--
"The user's computer downloads the ActiveX code and simulates a 'Blue
Screen' crash, a generally benign event most users are familiar with
and that would not necessarily arouse suspicions."
-- Security exploit description on http://www.zks.net/p3/how.asp
------------------------------
From: [EMAIL PROTECTED]
Subject: SIGCHLD and zombie
Date: Mon, 12 Apr 1999 02:58:54 GMT
Does a child process send a SIGCHLD when it becomes a zombie on linux? Is
there any difference in the way SIGCHLD is handled between solaris and linux?
============= Posted via Deja News, The Discussion Network ============
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
From: [EMAIL PROTECTED] (Arun Sharma)
Subject: gdb and mapped symbol table
Date: Mon, 12 Apr 1999 04:01:34 GMT
On a Redhat Linux 5.2 box:
$ gdb -batch -nx -mapped -readnow apprunner
warning: mapped symbol tables are not supported on this machine; missing
or broken mmap().
What's broken with Linux mmap ?
-Arun
------------------------------
From: Andreas Schwab <[EMAIL PROTECTED]>
Subject: Re: clone() creates zombies
Date: 06 Apr 1999 12:26:09 +0200
[EMAIL PROTECTED] (Matthew D Allen) writes:
|> When a child forks off of a parent, (and clone is a type of fork) the parent
|> has to wait for the child to finish out. When a parent dies without watching
|> for the childs signal, you can get a zombie.
This is wrong. An orphaned child is always adopted by init, which wait()s
for every children. You can only get a zombie if the parent is still
running but never calls wait().
--
Andreas Schwab "And now for something
[EMAIL PROTECTED] completely different"
[EMAIL PROTECTED]
------------------------------
From: Justin Vallon <[EMAIL PROTECTED]>
Subject: Re: threads and C++ exceptions
Date: 12 Apr 1999 01:32:52 -0400
Rich <[EMAIL PROTECTED]> writes:
> I keep getting SIGSEGV errors when my code executing in a
> pthread_create() created thread tries throws an exception. The class
> that I'm throwing for the exception is a very simple exception derived
> class and after some debugging I'm convinced that the class being thrown
> has nothing to do with the problem.
>
> Is there some sort of no-no about threads throwing exceptions in Linux?
> Are there special attributes that need to be set for threads when
> exceptions will be thrown by the code they execute?
The exception code (generated by the compiler), but typically be
deemed to be thread-safe.
In the single-threaded case, exception code may push objects onto an
"exception unwinding" stack. If such a stack is global, your threads
will get tangled up in each other's winding and unwinding.
If such a stack is stored in a register, your thread switch will
switch exception stacks, and all will be ok.
Are your exceptions caught? In any C++-invoked thread_main(), I would
guard the code with:
try {
return real_thread_main();
} catch (...) {
cerr << "Caught an exception in a thread!" << endl;
return 0; // ?
}
In terms of specifics, I think I have avoided
exceptions+multithreading (in gcc).
--
-Justin
[EMAIL PROTECTED]
------------------------------
From: jeff <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: HELP PLEASE: ioremap/mmap/vma_operations??
Date: Mon, 12 Apr 1999 01:10:12 -0500
Reply-To: [EMAIL PROTECTED]
Hi All,
I am sure this has been probably answered before... I am a beginner
programmer (coming from the h/w design world..) so some of these kernel
calls are not very clear to me... I am trying to understand how all
these calls relate to each other:
I believe 'ioremap' is used by the kernel driver module to map a devices
control registers (i.e. pci device control registers)...right?
I think 'mmap' is equivalent of 'ioremap' at the user space level.
right? But what about vma_operations (i.e, open, close). Is this needed
before an application program can use 'mmap' call??
My goal is to write a PCI device driver which has it is control
registers memory mapped. I would like to map these to kernel space by
'ioremap' (I think) and then use 'mmap' in the user application program
to access to these register (I think)... But when do I use the
vma_operations?? Am I on the right track??
Any help or links to prior explanations will be GREATLY appreciated!!!
thanks a lot!
jeff-
[EMAIL PROTECTED]
------------------------------
From: Andrea Borgia <[EMAIL PROTECTED]>
Subject: Re: MPEG player source code for Linux?
Date: Mon, 12 Apr 1999 06:34:21 GMT
On 10 Apr 1999 01:54:01 -0400,
in article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Adam P. Jenkins) wrote:
>mpeg players, and you'll find a bunch. Do a keyword search for
>"mpeg". xanim is probably the most common mpeg player on Linux. For
>DVD try MpegTV.
xanim does not work with most of the mpegs I find... be it that
they're windows-made or just that xanim is lagging behind in
supporting the newer formats, imho mpegtv is the only viable choice
for playing mpegs under Linux.
Bye
--
Alias: [EMAIL PROTECTED]
sysadm on cantina.students.cs.unibo.it
ftp and mirror administrator on ftp.students.cs.unibo.it
Homepage: http://caristudenti.students.cs.unibo.it/~borgia/
------------------------------
From: [EMAIL PROTECTED] (Peter Samuelson)
Subject: Re: Debuging system calls
Date: 12 Apr 1999 01:59:25 -0500
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>
[Wlmet <[EMAIL PROTECTED]>]
> Let us compile the C library with the -g option, then compile the
> kernel with the -g option. Let us then run a program using gdb.
> Will this allow us to trace the system calls?
Compiling the kernel with -g will not help you here. If you are
intending to debug inside the kernel itself, you can't do it this way.
However, the C library can be compiled with -g. If you do not want to
compile it yourself, note that Red Hat Linux 5.2 uses a `-g' libc6.
If you really want to debug the kernel itself, there are different
approaches. You can compile it with -g and run gdb on a running
kernel and its "core file":
gdb /usr/src/linux/vmlinux /proc/kcore
and it will let you look at what it is doing, to an extent. However I
have not tried this, and don't remember if a kernel patch is required
or not. Also, for obvious reasons, you cannot do anything interactive,
e.g. set breakpoints.
Another way, cleaner since it doesn't involve running gdb off the same
kernel instance you are debugging, is to run gdb over a serial line
from another computer. This does require a kernel patch, and I haven't
done this either.
> Is there any other way to do this? I found that strace was not
> informative enough for me in some situations.
What information did you want from strace that it was not giving you?
--
Peter Samuelson
<sampo.creighton.edu!psamuels>
------------------------------
From: [EMAIL PROTECTED] (Peter Samuelson)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: GDB broken in Redhat 5.2?
Date: 12 Apr 1999 02:04:44 -0500
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>
[Louis S Leclerc <[EMAIL PROTECTED]>]
> The fix I used was:
>
> 1.) Install the original source rpm of the redhat distribution
> rpm -i glibc.....
> 2.) Edit the glibc-spec file /usr/src/redhat/SPECS/glibc....
> (There should be some Entry line CCFLAGS = "-g",
> one should simply delete it)
I still think
strip --strip-debug /lib/libc.so.6
would be a lot easier, and several orders of magnitude faster.
--
Peter Samuelson
<sampo.creighton.edu!psamuels>
------------------------------
From: [EMAIL PROTECTED] (Peter Samuelson)
Subject: Re: SIGCHLD and zombie
Date: 12 Apr 1999 02:10:59 -0500
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>
[<[EMAIL PROTECTED]>]
> Does a child process send a SIGCHLD when it becomes a zombie on
> linux?
Yes, but don't take my word for it. It would take maybe five minutes
to verify, and even less time to look up and read the appropriate man
pages. (Hint: `man 7 signal'.)
Quick question: if you lack the programming ability to test this, the
background to know how to look up the answer, and/or the Linux system
to test it on, why on Earth do you want to know?
--
Peter Samuelson
<sampo.creighton.edu!psamuels>
------------------------------
From: "Sascha Bohnenkamp" <[EMAIL PROTECTED]>
Subject: Re: non-buffering device i/o
Date: Mon, 12 Apr 1999 09:16:51 +0200
>is it possible to access block devices without effecting the buffer cache??
yes
>we want to read / write large files in a sequential manner, and we don't
>want to plug up the buffer cache.
you could set a sync-flag what makes your accesses 'direct'
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list (and comp.os.linux.development.system) via:
Internet: [EMAIL PROTECTED]
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Development-System Digest
******************************