Linux-Development-Sys Digest #68, Volume #8 Sun, 6 Aug 00 12:13:15 EDT
Contents:
Re: Kernel Panic - SCSI not syncing? (Bakki Kudva)
When large malloc does swap get written? (Randall Parker)
Re: When large malloc does swap get written? (Casper H.S. Dik - Network Security
Engineer)
Re: Kernel Versions and depmod (Paul Kimoto)
Re: When large malloc does swap get written? (China Black & Blue)
Re: Kernel Panic - SCSI not syncing? ("D. Stimits")
Re: When large malloc does swap get written? (Alan Coopersmith)
Here is the policy (Serge B Bromow)
LILO over serial line broke? (Cory Papenfuss)
Writing a small Linux kernel module (Hugo Varotto)
Re: Writing a small Linux kernel module (Pete Zaitcev)
Low cost development board ("deb")
do_try_to_free_pages failed (marian)
Re: do_try_to_free_pages failed (Paul Kimoto)
----------------------------------------------------------------------------
From: [EMAIL PROTECTED] (Bakki Kudva)
Subject: Re: Kernel Panic - SCSI not syncing?
Date: Sat, 05 Aug 2000 16:34:54 GMT
[posted and mailed]
[EMAIL PROTECTED] (Dave Platt) wrote in
<[EMAIL PROTECTED]>:
Dave,
Thank you for your explanations and help.
>In article <[EMAIL PROTECTED]>,
>Bakki Kudva <[EMAIL PROTECTED]> wrote:
>>It started some time back with this error at the login prompt.
>>
>>manx login: SCSI0 Tagged Queing now active for Target 2.
>
>That isn't really an error. That's the SCSI driver telling you that
>it has enabled SCSI tagged queueing for device #2 on your SCSI bus.
>This message may show up after a SCSI reset, or the first time you
>access a SCSI device after boot.
>
>>Recently the machine would randomly lock up which I thought initially
>>was the jdk in Netscape. Then I got ..
>>
>>SCSI host0 abort (pid 368471) timed out.
>>Resetting Buslogic BT958 due to target1
>>SCSI bus is being reset for host 0 channel 0
>
>This might indicate any of several bad things.
>
>Your SCSI device #1 may itself be bad.
>
>You may have a cabling or termination problem on your SCSI bus. Make
>sure you're using a high-quality SCSI cable, and that your devices are
>properly terminated. Use active (regulated) termination wherever
>possible.
This is easy enough and I will try that. However this computer has been in
VERY dependable service for 3-4 years. Can cabling problems develop over
time?
>You may have a device on the bus which does implement SCSI tagged
>queueing, but does so badly. I've run into a number of devices with
>tagged-queueing bugs. Some devices say that they handle tagged
>queueing, but will hang if you actually send them a command with the
>tag feature (had this problem with a Ricoh MP6201S CD-RW drive).
>Other devices handle tagged queueing well enough as long as you don't
>try to queue up more than a modest number of commands... if you send
>too many tagged commands, and overflow their queue, they hang (had
>this problem with a Quantum hard drive).
I am running Redhat6.1 on a Tyan dual PPro 200MHz S1668 motherboard. I have
the following devices
id 0: Seagate ST34371W (running NT4.0)
id 1: IBM DDRS 39130W (Linux)
id 2: Seagate ST32155W (Linux)
..
id 4: Archive Python 28849 DAT
id 5: NEC CD-ROM
I built the system about 3-4 years ago.
>If you do have a tagged-queueing problem, it would tend to show up as
>a hang, crash, or data corruption during times of extremely intense
>disk activity. In particular, if you do a big compilation, or
>something else which "touches" a lot of blocks on disk, you might find
>the system freezing up or panicing or doing SCSI resets when the
>kernel tries to flush large numbers of "dirty" blocks out to disk.
Again if this is a tagged-queueing problem can it develop over time?
I used to routinely build Apache/mod_perl which never caused problems. But
using Netscape for a long time would lock up the GUI which usually I could
get out of by ctrl-alt-backspace..howeve recently the machine just would
lock up completely and I couldn't access the virtual consoles either. Then
I knew I had a problem and started using it without the GUI which is when I
started seeing all the SCSI messages.
>The BusLogic SCSI driver is rather aggressive about enabling SCSI
>tagged command queueing. Fortunately, it's pretty good about letting
>you control the driver options at boot time. You'd need to add an
>option to your kernel boot parameters (typically via LILO).
>Specifically, you'd say something like
>
>LILO: vmlinux BusLogic=QueueDepth:4;TaggedQueueing:XXN
>
>This would tell the driver to limit the maximum tagged-queue depth to
>4 entries (that is, it will send no more than 4 tagged commands to any
>given SCSI device, and will wait for one of them to complete before
>sending a fifth, and so forth). This will also tell the driver to
>_not_ use tagged queueing for SCSI device #2 on the first controller
>(the "N"); tagged queueing may still be used on devices 0 and 1 if
>the devices say they're capable of it.
>
>See /usr/src/linux/drivers/scsi/README.BusLogic for further details.
>
I will certainly read this and do as you say. Are there any SCSI
diagnostics which you can run from a DOS diskette or from the Bootable RH
CD? which can help me pinpoint the problem?
thank you again,
bakki
------------------------------
From: Randall Parker <[EMAIL PROTECTED]>
Crossposted-To:
comp.os.linux.development.apps,comp.unix.aix,comp.unix.bsd.freebsd.misc,comp.unix.bsd.openbsd.misc,comp.unix.programmer,comp.unix.sco.programmer,comp.unix.solaris,comp.unix.ultrix
Subject: When large malloc does swap get written?
Date: Sat, 05 Aug 2000 17:12:58 GMT
Suppose one does a large malloc that is larger than available physical
RAM. Okay, what happens with swap disk on various Unixes and on Linux?
Possibilities I can see:
1) The OS just makes the swap file larger. But the OS doesn't write to
swap since the new pages in the process's virtual address space have not
been written to by the application.
2) The OS writes out all the pages that can't fit in physical memory by
just writing out the random values of some page.
3) The OS writes out all the pages to the swap but zeroes them out first.
I'm asking this question because I've seen talk in a database support
group about database instances taking very long to start up because the
administrators have set the buffers of the database in question to be way
too big for the amount of RAM available. So as the database starts up it
allocates lots of virtual extent and the disk churns expanding the swap
file.
I'm wondering whether the answer is the same on all Unixes and Linux. My
guess is that most operating systems do number 2 here or maybe number 3.
But I'd like to know for sure.
This is purely a curiosity question...
------------------------------
From: [EMAIL PROTECTED] (Casper H.S. Dik - Network Security Engineer)
Crossposted-To:
comp.os.linux.development.apps,comp.unix.aix,comp.unix.bsd.freebsd.misc,comp.unix.bsd.openbsd.misc,comp.unix.programmer,comp.unix.sco.programmer,comp.unix.solaris,comp.unix.ultrix
Subject: Re: When large malloc does swap get written?
Date: 5 Aug 2000 18:20:45 GMT
[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]
Randall Parker <[EMAIL PROTECTED]> writes:
>Suppose one does a large malloc that is larger than available physical
When a large malloc extends the address space, the kernel
just notes that the address spaces has grown. Optionally, it
will reserve as much swap as has just been allocated. (There is
lazy swap allocation and safe swap allocation; some OSes give
you an option, some only use one allocation policy).
No pages are written, freed or whatever.
When the memory is used, a page fault occurs. A page is taken
from the freelist and is zeroed.
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: [EMAIL PROTECTED] (Paul Kimoto)
Subject: Re: Kernel Versions and depmod
Date: 5 Aug 2000 19:09:01 -0500
Reply-To: [EMAIL PROTECTED]
In article <[EMAIL PROTECTED]>, Mike wrote:
> I recently moved from a test kernel to the last 2.2.xx kernel. I had to do
> this due to the fact that the tdfx.o module currently will not compile on
> the text kernel. The problem I am having is this. When I compile my
> modules and do depmod - it uses the 2.4 test kernel directory instead of my
> 2.2 module directory, and I also get loads of unresolved symbol errors.
I hope that this is not too silly a response:
Are you now running the 2.2.* kernel? By default depmod(8) assumes the
currently running kernel. You can probably convince current versions of
depmod to do what you want by supplying it with enough options, though;
see the man page.
--
Paul Kimoto
Disclaimer: Other than explicit citations of URLs, hyperlinks appearing
in this article have been inserted without the permission of the author.
------------------------------
From: [EMAIL PROTECTED] (China Black & Blue)
Crossposted-To:
comp.os.linux.development.apps,comp.unix.aix,comp.unix.bsd.freebsd.misc,comp.unix.programmer
Subject: Re: When large malloc does swap get written?
Date: Sat, 05 Aug 2000 16:06:41 -0700
/ >Suppose one does a large malloc that is larger than available physical
/
/ No pages are written, freed or whatever.
/
/ When the memory is used, a page fault occurs. A page is taken
/ from the freelist and is zeroed.
It could be the buffer allocation is not just allocating, but allocating
and zeroing each byte. This can happen with the programmer's realisation
if calloc is used.
You should not post to more than 5 groups. I have to trim to respond and I
don't know what you're watching.
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
Sign up for WASHINGTON MUTUAL BANK's special
We Rob You While You Sleep Service TODAY!
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
CACS: Collective Against Consensual Sanity v0.123
Now a text site map http://www.tsoft.com/~wyrmwif/cacs/
pretty? http://www.geocities.com/SoHo/Studios/5079/
:)-free zone. Elect LUM World Dictator!
------------------------------
Date: Sat, 05 Aug 2000 19:47:56 -0600
From: "D. Stimits" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Re: Kernel Panic - SCSI not syncing?
Bakki Kudva wrote:
>
...snip...
> >possible.
>
> This is easy enough and I will try that. However this computer has been in
> VERY dependable service for 3-4 years. Can cabling problems develop over
> time?
Cables can be a problem at any time. There is a nearly continuous change
of temperature, even in a controlled environment, with expansions and
contractions. They do work loose, and so do chips in sockets, or
expansion boards in regular slots. Re-seating the cables and any related
controller boards wouldn't be a bad idea.
>
> >You may have a device on the bus which does implement SCSI tagged
> >queueing, but does so badly. I've run into a number of devices with
...snip...
>
> thank you again,
>
> bakki
------------------------------
From: Alan Coopersmith <[EMAIL PROTECTED]>
Crossposted-To:
comp.os.linux.development.apps,comp.unix.bsd.freebsd.misc,comp.unix.bsd.openbsd.misc,comp.unix.programmer,comp.unix.sco.programmer,comp.unix.solaris
Subject: Re: When large malloc does swap get written?
Date: 6 Aug 2000 03:19:19 GMT
Randall Parker <[EMAIL PROTECTED]> writes in comp.unix.solaris:
|Suppose one does a large malloc that is larger than available physical
|RAM. Okay, what happens with swap disk on various Unixes and on Linux?
|
|Possibilities I can see:
|
|1) The OS just makes the swap file larger. But the OS doesn't write to
|swap since the new pages in the process's virtual address space have not
|been written to by the application.
This is close to what happens - it actually just marks the virtual
memory as allocated (and depending on the OS marks an associated amount
of swap space on disk as allocated). The only OS I've worked with that
actually increases the size of the swap file for new allocations was
Apollo Domain/OS - most Unix-like systems have disk space preallocated
for swap. (Running Domain/OS was sort of like putting everything in
tmpfs - if a user filled the disk, no more programs could run on the
system, and if a process used too much VM, no more disk space was
available for files.)
--
________________________________________________________________________
Alan Coopersmith [EMAIL PROTECTED]
http://soar.Berkeley.EDU/~alanc/ aka: [EMAIL PROTECTED]
Working for, but definitely not speaking for, Sun Microsystems, Inc.
------------------------------
From: Serge B Bromow <[EMAIL PROTECTED]>
Subject: Here is the policy
Date: Sat, 05 Aug 2000 23:19:58 -0400
http://www.fsf.org/
GNU is NOT Unix (|| linux)
Follow the yellow fiber road.
Your firm has no legal problems.
------------------------------
From: Cory Papenfuss <[EMAIL PROTECTED]>
Subject: LILO over serial line broke?
Date: Sun, 06 Aug 2000 04:50:41 GMT
I'm trying to use LILO over the serial line on a headless PC
running rtlinux for control. I've got the line
serial=0,38400n8
in the lilo.conf, and although I can see it on bootup, I cannot type any
commands to it from another linux machine running minicom. I also have
the console=ttyS0,38400 as a kernel append and run agetty once the system
is up. All of this works fine, and if I soft reboot from that, *then* the
LILO pays attention to what I type to it. Hard reboot kills it again.
So, is LILO not initializing the serial port properly (half-duplex
or something like that? Looking for DTR line change? ...) If so,
anything that can be done?
Thanks,
-Cory
------------------------------
From: Hugo Varotto <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Writing a small Linux kernel module
Date: Sun, 06 Aug 2000 01:34:54 -0400
Hi to all
I'm trying to write a small kernel module for Linux ( I'm using the
kernel that comes with RH 6.1, 2.2.14 ). For that I'm following the
"Linux Kernel Module Progr. Guide"; however, I'm having some
compilng/running problems. After tbanging my head for several days, I
decide to seek some help.
Basically, right now I'm trying to scan for a specific PCI device. THe
relevant portion looks something like this
==================
int jogdial_init( void )
{
struct pci_dev *pci_dev = NULL;
int found = 0;
do
{
pci_dev = pci_find_device (PCI_VENDOR_ID_SONY,
PCI_DEVICE_ID_SONY_VAIO, pci_dev);
if (pci_dev)
{
printk ( "JOGDIAL: Found VAIO chip at 0x%0lx irq %d\n",
pci_dev->base_address[0] &
PCI_BASE_ADDRESS_IO_MASK,
pci_dev->irq);
found++;
}
}
while (pci_dev);
if (found)
return 0;
return -ENODEV;
}
===================
And the Makefile looks like
# Makefile for a basic kernel module
CC=gcc
MODCFLAGS := -Wall -DMODULE -D__KERNEL__ -DLINUX -I/usr/include/linux/
-O6
jogdial.o: jogdial.c /usr/include/linux/version.h
$(CC) $(MODCFLAGS) -c jogdial.c
===================
However, I'm getting this errors when compiling:
jogdial.c: In function `init_module':
jogdial.c:63: warning: implicit declaration of function
`printk_R1b7d4074'
jogdial.c: In function `jogdial_init':
jogdial.c:88: warning: implicit declaration of function
`pci_find_device_R0ee75d4c'
jogdial.c:89: warning: assignment makes pointer from integer without a
cast
====================
and the output of doing an insmod of the module is:
Aug 6 01:29:23 hal kernel: Hello, world - this is the kernel speaking
Aug 6 01:29:23 hal kernel: JOGDIAL: Found VAIO chip at 0x0 irq 0
====================
Obviously, there's something wrong, but I cannot figure out what's going
on ( seems that somehow I need to tell the system that the pci functions
do indeed exist, right ? ). I am #including the pci.h header
file ( besides some other ). Is there something else that I need to add
?
Any help solving this problem this would be greatly appreciated.
Thanks in advance,
Hugo
------------------------------
From: [EMAIL PROTECTED] (Pete Zaitcev)
Subject: Re: Writing a small Linux kernel module
Date: Sun, 06 Aug 2000 07:09:54 GMT
> printk ( "JOGDIAL: Found VAIO chip at 0x%0lx irq %d\n",
^^^^^^^^^^^
Are you sure the format %0lx works in kernel? Try without 0 first.
Otherwise, look good sans the weird combo of
do { if (cond) {} } while (cond);
> do indeed exist, right ? ). I am #including the pci.h header
> file ( besides some other ). Is there something else that I need to add
> ?
You need to pick the versioning right, I think when modules are
compiled together with kernel, there is an "-include" option
that pulls in necessary prototypes.
Just do "make modules > xxx 2>&1", then look into xxx and see what
options the proper kernel compile uses.
--Pete
------------------------------
From: "deb" <[EMAIL PROTECTED]>
Subject: Low cost development board
Date: Sat, 5 Aug 2000 12:41:06 -0700
Hello Gurus,
Can you suggest a lowcost development board and software for linux.
Thanks
Deb
------------------------------
From: marian <[EMAIL PROTECTED]>
Subject: do_try_to_free_pages failed
Date: Sun, 06 Aug 2000 16:12:15 +0200
Since I compiled and installed kernel 2.2.17pre5 I receive from time to
time the message:
kernel: VM: do_try_to_free_pages failed for kswapd
or
kernel: VM: do_try_to_free_pages failed for pine
What does it mean? Is it dangerous?
Or it simply mean that I have not enough memory? (I have 16MB RAM)
marian
------------------------------
From: [EMAIL PROTECTED] (Paul Kimoto)
Subject: Re: do_try_to_free_pages failed
Date: 6 Aug 2000 11:19:22 -0500
Reply-To: [EMAIL PROTECTED]
In article <[EMAIL PROTECTED]>, marian wrote:
> Since I compiled and installed kernel 2.2.17pre5 I receive from time to
> time the message:
>
> kernel: VM: do_try_to_free_pages failed for kswapd
> or
> kernel: VM: do_try_to_free_pages failed for pine
>
> What does it mean? Is it dangerous?
It means that there was a small memory-handling problem in that kernel.
But the latest is 2.2.17pre15, and the bug seems to be gone now.
--
Paul Kimoto
Disclaimer: Other than explicit citations of URLs, hyperlinks appearing
in this article have been inserted without the permission of the author.
------------------------------
** 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
******************************