Linux-Development-Sys Digest #394, Volume #8 Sat, 6 Jan 01 19:13:14 EST
Contents:
Re: getpwuid() ("Peter T. Breuer")
Re: Kernel Memory Sizeing ("Peter T. Breuer")
Re: Library dependencies ("Peter T. Breuer")
Re: ISA/PCI resource management (Kasper Dupont)
Re: kernel 2.4.0 + RAID causes problems (Kasper Dupont)
Re: Generating core file (Kasper Dupont)
Re: Yamaha CDRW 4416E (Kasper Dupont)
Re: Kernel2.4.0 - Unusual panic (Kasper Dupont)
Re: Extending /proc filesystem on Solaris 7/8? (Casper H.S. Dik - Network Security
Engineer)
Re: Kernel 2.4 ("mpierce")
Re: Kernel Non-boot (Paul Sack)
Re: Kernel2.4.0 - Unusual panic (Paul Sack)
Re: Extending /proc filesystem on Solaris 7/8? (Kaelin Colclasure)
How Do I Compile C++ Code With pid_t? (Larry Lindstrom)
Re: How Do I Compile C++ Code With pid_t? ([EMAIL PROTECTED])
Re: How Do I Compile C++ Code With pid_t? (Larry Lindstrom)
Signals and threads in Linux (Kaelin Colclasure)
Re: Kernel2.4.0 - Unusual panic (Will Slater)
#ifdef < You're compiling for Linux with g++ > (Larry Lindstrom)
----------------------------------------------------------------------------
From: "Peter T. Breuer" <[EMAIL PROTECTED]>
Subject: Re: getpwuid()
Date: Sat, 06 Jan 2001 10:55:03 GMT
mike harris <[EMAIL PROTECTED]> wrote:
> Thanks Peter, but it still doesn't work
Yes it does. Why do you say it doesn't?
> i've checked all that...
What?
> And.. i've tried tracing the call. But i'm not the best programmer ... and i cant
strace. You don't have to be a programmer. All you have to look at
(and tell us) is which files it opens. So don't be coy. TELL US.
> understand what that code is doing.
Why should you care?
> The Specific errors that are returned to me are: "passwd: Can not identify you!"
Not interesting. Show us the strace -eopen output.
> and shutdown: "You don't exist. Go away." (yes i'm serious about that one)
Peter
------------------------------
From: "Peter T. Breuer" <[EMAIL PROTECTED]>
Subject: Re: Kernel Memory Sizeing
Date: Sat, 06 Jan 2001 11:05:05 GMT
Nathan Dyer <[EMAIL PROTECTED]> wrote:
> Does anyone have any information on how the linux kernel finds out how much
> physical RAM is installed in the computer?
read setup.c.
It uses several different tests. And can be overridden from the command
line, of course.
Peter
------------------------------
From: "Peter T. Breuer" <[EMAIL PROTECTED]>
Subject: Re: Library dependencies
Date: Sat, 06 Jan 2001 11:05:06 GMT
Fruitbat <[EMAIL PROTECTED]> wrote:
> thanx,
> I won't even pretend to understand it, I'll just use it :)
look for binstats. A useful program that shows you all that kind of
info (bin <-> lib dependency summaries).
Peter
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: ISA/PCI resource management
Date: Sat, 06 Jan 2001 11:02:52 +0000
Max Ischenko wrote:
>
> At Fri, 05 Jan 2001 15:59:41 +0000 Kasper Dupont wrote:
>
> > Max Ischenko wrote:
> >>
> >> Hi there.
> >>
> >> I've heard that Linux 2.4 has much imporoved resource management
> >> facilities. I've searched Documentation but didn't find anything.
> >>
> >> What I look for is how to query the kernel what hardware is present on
> >> the system.
>
> > The program can get a lot of information by reading
> > /proc/pci or /proc/bus/pci.
>
> And where the format of that file is described?
>
> --
> Computers are good at following instructions, but not at reading your mind.
> -- D. Knuth
The code generating /proc/bus/pci can be found in
linux/drivers/pci/proc.c, /proc/pci is only present
for backward compability it is generated by
linux/drivers/pci/oldproc.c.
You could look at linux/Documentation/pci.txt and
linux/Documentation/proc.txt, but I don't know how
much information you will get there.
--
Kasper Dupont
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: kernel 2.4.0 + RAID causes problems
Date: Sat, 06 Jan 2001 11:09:36 +0000
Oliver Kowalke wrote:
>
> Hi,
>
> my system is a debian2.2r2 (i386) with software raid (level 0,1). I'm using
> a 2.2.16 kernel (raid patches) - no problems. Today I compiled a 2.4.0
> kernel with the same options. If I try to boot - the kernel fails to boot:
>
> on boot prompt:
>
> fsck.ext2 : no such file on directory while trying to open /dev/md0 (null):
> superblock could not be read or does not describe a correct ext2 filesystem
>
> Why can kernel 2.2.16 mount the / (/dev/md0) and the 2.4.0 kernel doesn't?
> under 2.2.16 cfdsik can read the partition tables of devices which build the
> raid system.
>
> please help!
>
> thanks,
> Oliver
Since you get an error message from fsck.ext2 that program must
have been loaded from a mounted filesystem, which filesystem is
that file loaded from? Initrd, a harddiskpartition or the raid?
If this filesystem contains a shell and a few basic utilities
you could try booting with an init=/bin/sh option and then do
"ls /dev/md*" and maybee try mounting /proc and look at the
files in there.
--
Kasper Dupont
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Generating core file
Date: Sat, 06 Jan 2001 11:17:02 +0000
Gene Chang wrote:
>
> Hi there:
>
> I am writing an application which uses a shared library(.so). My problem is
> this:
> If my application has a default, it will create a core file.
> If the segfault is in the shared lib, I only get a Segmentation fault
> message but not core dump.
>
> Anybody has an idea why? I have the source code and build environment for
> all the code.
>
> Thanks.
Normally a segfault in a shared library result in a core dump,
so there must be some other reason why there is no core dump.
Here are the posible reasons I now for a segfault
not causing a core dump:
Current directory not writeable.
core exists and is a directory or not writeable.
Core dump larger than the limit.
Core dump larger than free disk space.
Program is setuid.
Executable is not readable.
Segfault occured in kernel space.
The last reason mentioned is a bug in the kernel
or a kernelmodule, that should result in a lot
of messages in /var/log/messages.
--
Kasper Dupont
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Yamaha CDRW 4416E
Date: Sat, 06 Jan 2001 11:20:16 +0000
Rob King wrote:
>
> Hi i have this burner as my secondary ide slave with a pioneer 16x
> dvd-rom as it's primary, and when i boot in linux, the burner won't read
> anything, i would like to now, if this is a problem with my system, or
> if it is uncommon.
It definitely should work, what happens when you try to read
something? What messages does the kernel write when detecting
IDE units at bootup. Look in /var/log/messages.
--
Kasper Dupont
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Kernel2.4.0 - Unusual panic
Date: Sat, 06 Jan 2001 11:32:30 +0000
Nic wrote:
>
> mpierce wrote:
> >
> > System is LM7.2 - fresh install; kernel 2.2.17-21mdk
> > Downloaded and compiled new 2.4.0 release w/o any runs, drips or errors.
> > Have not had any luck getting a 2.4.0 to boot on my Mandrake system and
> > need this kernel for USB.
> >
> > Unusual kernel panic problem:
> > request_module[block-major -3] root fs not mounted
> > VFS: Cannot open root device "hda1" or 03:01
>
> Make sure whatever you're using for a root filesystem (ext2, reiser,
> whatever) is compiled into the kernel, not as a module, or the
> chicken-and-egg rule applies.
>
> Regards,
> Nic.
>
> --
> Nic Bellamy's non-official mailbox: < sky at wibble dot net >
> IT Consultant, Asterisk Limited - http://www.asterisk.co.nz/
Also remember the blockdevice. You need both blockdevice
and filesystem to mount root.
--
Kasper Dupont
------------------------------
From: [EMAIL PROTECTED] (Casper H.S. Dik - Network Security Engineer)
Crossposted-To: comp.unix.solaris
Subject: Re: Extending /proc filesystem on Solaris 7/8?
Date: 6 Jan 2001 11:41:29 GMT
[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]
Kaelin Colclasure <[EMAIL PROTECTED]> writes:
>My module creates the following tree of /proc entries on Linux:
>* New /proc file entries:
> - /proc/tnf root of OpenTNF's proc filesystem entries
> - +/status cat for status of kernel subsystem [incomplete]
> - +/trace write interface to kernel subsystem [incomplete]
> - +/0 trace data directories (0 .. TNF_MAXTRACES)
> - +/cpu0 trace event buffer(s) (one for each CPU)
> - +/probes buffers all probes registered during trace
Ah, so you are using it for kernel state and not for process state.
>My decision to use /proc vs. /dev on Linux was largely driven by my desire
>that the module be self-configuring when dynamically loaded. E.g. you
>load the kernel module and the /proc/tnf tree springs into existance,
>configured exactly to match the module's compile-time configuration. And
>when you unload the module from the Linux kernel, the /proc entries go
>away leaving no dangling special file entries in the host file system.
You can do that with /dev in Solaris. Especially in Solaris 8,
where nodes are created more and more on the fly.
>I take it, Casper, that your recommendation would be to stick with the
>traditional /dev entries on Solaris? Forgive my ignorance -- I just got
>my Solaris reference material from Fatbrain yesterday -- but is there
>a way to dynamically create /dev entries at module load time on Solaris?
>Short of augmenting the load process with a script?
Yes, but I think it only works in Slaris 8 and possible latest S7
updates.
/proc is certainly not the place to put non-process stuff in Solaris.
BTW, your module is called "OpenTNF"; what does it
more or differently from TNF in Solaris?
Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
------------------------------
From: "mpierce" <[EMAIL PROTECTED]>
Subject: Re: Kernel 2.4
Date: Sat, 06 Jan 2001 13:17:50 GMT
I've compiled 2.4.0 from source and cannot get it to boot due to some
changes in how it treats devices. Can you email me either a copy of your
grub or lilo.conf or post these for me to look at?
Marvin
In article <xEg56.380$[EMAIL PROTECTED]>, "David Findlay"
<[EMAIL PROTECTED]> wrote:
> I just loaded Kernel 2.4. I thought I'd share these observations:
>
> - loaded very nicely
> - system seems faster on boot and multitasking
> - grub doesn't like it - it produces CRC errors, so you need to use LILO
> - NVdriver can't be insmod'ed.
>
> Has anyone got NVdriver to go, with any patching? Anyone interested in
> reverse engineering a open source Nvidia 3D driver?
>
> David
------------------------------
From: [EMAIL PROTECTED] (Paul Sack)
Subject: Re: Kernel Non-boot
Reply-To: [EMAIL PROTECTED]
Date: Sat, 06 Jan 2001 14:01:11 GMT
In article <MzS46.44119$[EMAIL PROTECTED]>, mpierce wrote:
>When I try to boot vmlinuz-2.4.0-test12, it starts as normal and then...
> Uncompressing linux ... OK, booting the kernel
This is *exactly* what I was pulling my hair out over last night. I saw
(Pentium III system) in the menuconfig and I thought that was some menu with
Pentium III options so I didn't change it. (I have a Pentium.) It's kind of
strange how mutually-exclusive options are done in the menuconfig now. (with
the selected option shown in the menu above it.) (Or maybe I have forgotten a
bit since I compiled a kernel last.)
Anyways, 2.4 is very nice.
Paul
--
In those days he was wiser than he is now -- he used to frequently take
my advice.
-- Winston Churchill
------------------------------
From: [EMAIL PROTECTED] (Paul Sack)
Subject: Re: Kernel2.4.0 - Unusual panic
Reply-To: [EMAIL PROTECTED]
Date: Sat, 06 Jan 2001 16:01:13 GMT
In article <iPx56.47276$[EMAIL PROTECTED]>, mpierce wrote:
>System is LM7.2 - fresh install; kernel 2.2.17-21mdk
>Downloaded and compiled new 2.4.0 release w/o any runs, drips or errors.
>Have not had any luck getting a 2.4.0 to boot on my Mandrake system and
>need this kernel for USB.
Did you compile in ext2 filesystem support as a module or in the kernel?
Anyways, it looks to me like you might have compiled it as a module. Compile it
straight into the kernel.
--
Neckties strangle clear thinking.
-- Lin Yutang
------------------------------
From: Kaelin Colclasure <[EMAIL PROTECTED]>
Crossposted-To: comp.unix.solaris
Subject: Re: Extending /proc filesystem on Solaris 7/8?
Date: 06 Jan 2001 10:37:26 -0800
[EMAIL PROTECTED] (Casper H.S. Dik - Network Security Engineer) writes:
[...]
> You can do that with /dev in Solaris. Especially in Solaris 8,
> where nodes are created more and more on the fly.
I'll investigate this -- although unfortunately the Solaris machines I
have access to are all still Solaris 7. :-/
[...]
> BTW, your module is called "OpenTNF"; what does it
> more or differently from TNF in Solaris?
I initially wanted to clone the Solaris TNF facility on Linux, where I do
most of my development these days. As the project has progressed, however,
I've diverged somewhat from that goal. OpenTNF is source-compatible with
the basic C macros (TNF_PROBE_0, etc.) defined by Solaris TNF, but beyond
that they differ significantly.
For example, OpenTNF can support probes from languages other than C/C++.
Today (in addition to C/C++) we have Java and Common Lisp support. And
(at least in principal) any language that can call (or define a foreign
interface to) the open, ioctl, write, and close system calls can be
probe-enabled.
Also, the file format produced by OpenTNF's version of tnfdump is
easily machine-readable, and intended as a truly "normal form" for
trace-style information. The idea is to collect a set of tools for
manipulating / visualizing traces that use this format, and then
augmenting other data-collecting facilities (like, for example, a packet
sniffer) to produce TNF files.
And, obviously, OpenTNF is... well... open! :-) I'm implementing it on
Linux as an open-source (GPL) project at SourceForge:
<https://sourceforge.net/projects/opentnf/>
This means the same basic facility and tools can theoretically be made
available across all interesting (e.g. Unix) platforms. Hence my Solaris
questions... :-)
Note, however, that it's still early days. I've still got some
significant implementation hurdles to clear before OpenTNF is usable
to the general developer population. But interested parties are, of
course, welcome to have a look at the pre-release versions. And
potential contributors (for instance, to take on the Solaris port) are
welcome to drop me an email... :-)
-- Kaelin
------------------------------
From: Larry Lindstrom <[EMAIL PROTECTED]>
Crossposted-To: linux.redhat.misc,comp.os.linux.development.apps
Subject: How Do I Compile C++ Code With pid_t?
Date: Sat, 06 Jan 2001 12:45:31 -0800
I'm porting code from Solaris, Sun's Forte C++, to
whatever ships with Redhat 6.2. It's a slow and painful
process.
I'm stumped. What the am I doing wrong now?
#include <unistd.h>
void test_funct(void)
{
pid_t terminal_group_id;
terminal_group_id = getpid();
}
Which produces the following messages:
test.cpp: In function `void test_funct()':
test.cpp:5: `pid_t' undeclared (first use this function)
test.cpp:5: (Each undeclared identifier is reported only once
test.cpp:5: for each function it appears in.)
test.cpp:5: parse error before `;'
test.cpp:6: `terminal_group_id' undeclared (first use this
function)
The man page for getpid() shows "#include <unistd.h>" as the
only required header.
I've looked at unistd.h, but it's too tangled for me to figure
out. Compiling with "-E" generates a listing with:
extern __pid_t getpid (void) throw ()
But "pid_t" isn't referenced until I use it in the offending
declaration in my code.
I love Solaris. I realize that to those who post here, Linux
is a warm an cozy home, but I feel like I just stepped off a boat
whenever I try to do anything with it. But people are doing real
work with Linux. So I guess it's just me.
I'm sorry about the crossposts. Pointers to FAQs are
appreciated. I didn't find anything relevent with a search of
"pid_t" in Deja.
Thanks
Larry
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: How Do I Compile C++ Code With pid_t?
Crossposted-To: linux.redhat.misc,comp.os.linux.development.apps
Date: Sat, 06 Jan 2001 20:49:51 GMT
In comp.os.linux.development.system Larry Lindstrom <[EMAIL PROTECTED]> wrote:
> The man page for getpid() shows "#include <unistd.h>" as the
> only required header.
The man page is incorrect. <sys/types.h> and <unistd.h> are the
required headers for getpid().
--
Matt Gauthier <[EMAIL PROTECTED]>
------------------------------
From: Larry Lindstrom <[EMAIL PROTECTED]>
Crossposted-To: linux.redhat.misc,comp.os.linux.development.apps
Subject: Re: How Do I Compile C++ Code With pid_t?
Date: Sat, 06 Jan 2001 15:29:22 -0800
[EMAIL PROTECTED] wrote:
>
> In comp.os.linux.development.system Larry Lindstrom <[EMAIL PROTECTED]> wrote:
> > The man page for getpid() shows "#include <unistd.h>" as the
> > only required header.
>
> The man page is incorrect. <sys/types.h> and <unistd.h> are the
> required headers for getpid().
Yikes!
I appreciate this info Matt. I'm glad kind folks like you are
here.
Thanks
Larry
------------------------------
From: Kaelin Colclasure <[EMAIL PROTECTED]>
Subject: Signals and threads in Linux
Date: 06 Jan 2001 15:31:44 -0800
How do POSIX signals interact with threads under Linux? Since each
thread in a process has its own pid, does it have its own signal mask
and sigaction set too? Or do all of the pids somehow share this state?
In general, I am assuming that a signal sent to a specific pid is
delivered to that pid -- regardless if it's the main thread of a
process or not.
-- Kaelin
------------------------------
From: Will Slater <[EMAIL PROTECTED]>
Subject: Re: Kernel2.4.0 - Unusual panic
Date: Sat, 06 Jan 2001 23:37:48 +0000
Have you compiled in devfs? If so /dev is now a virtual filesystem with
a somewhat different layout.
Compatibility links should be setup as part of the boot process if your
distribution is aware of devfs. There is also a deamon, devfsd, which
will help with managing the devices, you may well find that it is
available as a package for your distribution.
for example on my box
571 $ ls -l /dev/hda1
lr-xr-xr-x 1 root root 33 Dec 26 16:51 /dev/hda1 ->
ide/host0/bus0/target0/lun0/part1
alternatively you could rebuild your kernel without devfs support.
Will
mpierce wrote:
>
> System is LM7.2 - fresh install; kernel 2.2.17-21mdk
> Downloaded and compiled new 2.4.0 release w/o any runs, drips or errors.
> Have not had any luck getting a 2.4.0 to boot on my Mandrake system and
> need this kernel for USB.
>
> Unusual kernel panic problem:
> request_module[block-major -3] root fs not mounted
> VFS: Cannot open root device "hda1" or 03:01
> Please append a correct "root=" boot option
> Kernel panic: VFS: Unable to mount root fs on 03:01
> - Computer freezes at this point -
>
> I tried using both grub and lilo. My lilo.conf setup is:
>
> boot=/dev/hda
> map=/boot/map
> install=/boot/boot.b
> vga=normal
> default=linux
> keytable=/boot/us.klt
> lba32
> prompt
> timeout=300
> message=/boot/message
> menu-scheme=wb:bw:wb:bw
> image=/boot/vmlinuz
> label=linux
> root=/dev/hda1
> append=" ide1=autotune ide0=autotune"
> vga=788
> read-only
> image=/boot/bzImage
> label=linux-new
> root=/dev/hda1
> #append=" ide1=autotune ide0=autotune"
> #vga=788
> read-only
> image=/boot/vmlinuz
> label=linux-nonfb
> root=/dev/hda1
> append=" ide1=autotune ide0=autotune"
> read-only
> image=/boot/vmlinuz
> label=failsafe
> root=/dev/hda1
> append=" ide1=autotune ide0=autotune failsafe"
> read-only
> other=/dev/fd0
> label=floppy
> unsafe
>
> My grub setup is:
> timeout 10
> color black/cyan yellow/cyan
> i18n (hd0,0)/boot/grub/messages
> keytable (hd0,0)/boot/us.klt
> altconfigfile (hd0,0)/boot/grub/menu.once
> default 0
>
> title linux
> kernel (hd0,0)/boot/vmlinuz root=/dev/hda1 ide1=autotune ide0=autotune vga=788
>
> title linux-2.4.0
> kernel (hd0,0)/boot/bzImage root=/dev/hda1
>
> title linux-nonfb
> kernel (hd0,0)/boot/vmlinuz root=/dev/hda1 ide1=autotune ide0=autotune
>
> title failsafe
> kernel (hd0,0)/boot/vmlinuz root=/dev/hda1 ide1=autotune ide0=autotune failsafe
> title floppy
> root (fd0)
> chainloader +1
>
> Does anyone have a clue as to why 2.4.0 refuses to boot on a newly
> installed Mandrake 7.2 with the kernel panic error?
--
Will Slater [EMAIL PROTECTED]
Orbis Tel: +44 (0)20 8742 1600
www.orbisuk.com Fax: +44 (0)20 8742 2649
------------------------------
From: Larry Lindstrom <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,linux.redhat.misc
Subject: #ifdef < You're compiling for Linux with g++ >
Date: Sat, 06 Jan 2001 15:40:51 -0800
I'm porting some C++ to Linux.
Are there compiler defined constants that I can use to ifdef
around the inconsistencies? I can always use -DCOMPILING_FOR_LINUX,
but I'd rather use facilities of the compiler.
Thanks
Larry
------------------------------
** 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 by posting to the
comp.os.linux.development.system newsgroup.
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
******************************