Linux-Development-Sys Digest #168, Volume #8     Sun, 24 Sep 00 11:13:12 EDT

Contents:
  bad magic, wq bug -- HELP ! ([EMAIL PROTECTED])
  Re: Wait queues and a race condition on 2.2.x (Lee Cremeans)
  Re: Looking for Timer functions (Tom Herman)
  Re: High precision timer needed (Tom Herman)
  Re: new windowing system ([EMAIL PROTECTED])
  Kernel 2.4.0-test8 hang at boot (Frank M. Krauss)
  Re: Kernel space vs User space (Karl Heyes)
  enable the user account to access the device driver ("Peter Huang")
  bottom half ("Peter Huang")
  KDE menu items no longer wrap (George Hostler)
  Link problem (Lee Kang Won)
  gdb ("Paul")
  Re: gdb ("Paul")
  Re: Kernel panic: VFS :Unable to mount root (Konrad Mierendorff)
  Re: new windowing system (Nix)
  Re: new windowing system (Nix)
  Re: new windowing system (Christopher Browne)
  Q: network driver interface changes between 2.2.x and 2.4.x (Shmulik Hen)

----------------------------------------------------------------------------

From: [EMAIL PROTECTED]
Subject: bad magic, wq bug -- HELP !
Date: Sat, 23 Sep 2000 18:21:10 GMT

Hi everybody,

please find below a kernel OOPS on wq. Used kernel was 2.3.99-pre9 but
same things happen w/ 2.4.0-test8 (sometimes w/ sometimes w/o OOPS.) In
any case: the machine crashes.
To (re)produce the behaviour, I started ca. 600 ftp clients, getting a
10mb file -- well, yes, 600 ftp sessions is a lot, but I need to test
load, so I use whatever I can get (and 600 shouldn't be the limit,
should it ?)  Anyways, I've tuned up the NR_TASKS to 4090 and the
NR_FILES to 32768 -- ftp is not the only way to crash the system wq but
the easiest one...
Is there any HELP - any idea, what I can do/tune?
Thanks a lot,

Immanuel


Sep 22 00:43:33 ipat01 kernel: bad magic d897e060 (should be d897e020),
wq bug, forcing oops.
Sep 22 00:43:33 ipat01 kernel: kernel BUG at
/usr/src/linux/include/linux/wait.h:196!
Sep 22 00:43:33 ipat01 kernel: invalid operand: 0000
Sep 22 00:43:33 ipat01 kernel: CPU:    0
Sep 22 00:43:33 ipat01 kernel: EIP:    0010:[free_wait+154/284]
Sep 22 00:43:33 ipat01 kernel: EFLAGS: 00010086
Sep 22 00:43:33 ipat01 kernel: eax: 00000037   ebx: d897e020   ecx:
0000007c   e
dx: c02b66b4
Sep 22 00:43:33 ipat01 kernel: esi: d897e00c   edi: d897e000   ebp:
00000287   e
sp: e137ff10
Sep 22 00:43:33 ipat01 kernel: ds: 0018   es: 0018   ss: 0018
Sep 22 00:43:33 ipat01 kernel: Process atAgent_01.tcl (pid: 814,
stackpage=e137f
000)
Sep 22 00:43:33 ipat01 kernel: Stack: c024f904 c024f8e0 000000c4
00000000 de766e
a0 de766ea0 00000000 c013d947
Sep 22 00:43:33 ipat01 kernel:        d897e000 00000001 00000004
e5054ef8 000000
00 e137e000 00000104 00000100
Sep 22 00:43:33 ipat01 kernel:        e137e000 00000000 00000009
d897e000 000000
00 00000009 c013dcd2 00000009
Sep 22 00:43:33 ipat01 kernel: Call Trace: [tvecs+26816/144476]
[tvecs+26780/144476] [do_select+579/604] [sys_select+882/1192]
[system_call+52/64]
Sep 22 00:43:33 ipat01 kernel: Code: 0f 0b 83 c4 0c 90 8d 74 26 00 8b 43
fc 8b 53 f8 89 42 04 89


Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: Lee Cremeans <[EMAIL PROTECTED]>
Subject: Re: Wait queues and a race condition on 2.2.x
Date: Sat, 23 Sep 2000 18:51:20 GMT

In article <[EMAIL PROTECTED]>,
  [EMAIL PROTECTED] (Pete Zaitcev) wrote:
> > .
> > .
> > /* send a encrypt/decrypt request to the other part of the driver
here
> > */
> > save_flags(flags);
> > cli();
> > interruptible_sleep_on_timeout(&waitq, HZ) /* 1 second timeout */
> > restore_flags(flags);
> > if(timeout == 0) {
> >         /* We timed out. Abort the request */
> >         /* cleanup stuff goes here */
> >         return -EIO;
> > }
> > .
> > .
>
> What is ``timeout''? I guess it races right there.

I had it set up so that if the other side of the driver didn't come back
within HZ jiffies (1 second), and the timeout thus went to zero, it'd
abort the request. It's a workaround for problems one customer was
complaining about.

> BTW, sleep_on is quite tricky to get right,
> you would be safer using schedule(), add_to_wait_queue(),
> remove_from_wait_queue().

Okay. I'll plug this in on Monday (and read the log you pasted), and see
what happens. Thanks for the help!

-lee



Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

Date: Sat, 23 Sep 2000 15:30:49 -0400
From: Tom Herman <[EMAIL PROTECTED]>
Subject: Re: Looking for Timer functions

How about select() with different fds?

#include <sys/time.h>

int isready (int fd, int seconds)
{
  int fdno;
  fd_set set;
  struct timeval timeout;

  FD_ZERO (&set);   /* empties the set */
  FD_SET (fd, &set);  /* adds FD to the set */
  timeout.tv_sec = seconds; /* seconds */
  timeout.tv_usec = 0;  /* microseconds */

  fdno = select (fd+1, &set, NULL, NULL, &timeout);
    if (fdno < 0)
     return -1;

...
}



Stephane St-Hilaire wrote:

> I'm new to Linux development so this question could be an easy one to
> answer....
> I need to be able to start multiple timers on a Linux application I'm
> developping, all I've found is the signal capability but this limits me
> to one timer which is not good enought.
>
> Any ideas ? I assume there are function calls out there that will do it
> without requiring any patches to the OS.
>
> Thanks for your help
>
> Steph

--
Tom Herman
SAIC Charleston, SC
(843) 740-7734
[EMAIL PROTECTED]




------------------------------

Date: Sat, 23 Sep 2000 15:27:17 -0400
From: Tom Herman <[EMAIL PROTECTED]>
Subject: Re: High precision timer needed

How about gettimeofday()?

#include <sys/time.h>

  struct timeval tv;

        /* Timestamp */
        gettimeofday (&tv, &tz);
        printf ("%s:%d: time = [%ld.%ld]\n",
                        __FILE__, __LINE__, tv.tv_sec, tv.tv_usec);


Stefor-6 wrote:

> I'm looking for a timer function just like times(2), but with higher
> precision.
> As far as I know the kernel only keeps track of how many jiffies a
> process
> has used the processor, but that's not accurate enough. So I was
> thinking
> of augment the task_struct with a field that  holds the clock cycle
> count for
> each process.  The problem is that I don't know where it is best to put
> the code
> that reads the rdtsc register and does the calculations so that I get
> the counts
> only for the current process. I don't plan to make a difference between
> system
> time and user time as times(2) does, but the time used by other
> processes and
> the time used by clock interrupts must not  be added to the field in the
> struct.
>
> After that I'm planning to make as syscall to return the count field for
> the
> current process.
>
> Can anyone help me with some hints to where to put my code. I assume
> that
> it could be done in sched.c, but I'm not sure in which function.
> If all this seems like a bad idea or waste of time, please express your
> oppinion
> why I shouldn't waste my time on doing it. (It already exists, it can't
> be done,
> just use rdtsc as is in the process instead, etc)
>
> /Stefan

--
Tom Herman
SAIC Charleston, SC
(843) 740-7734
[EMAIL PROTECTED]




------------------------------

From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.x,comp.windows.x
Subject: Re: new windowing system
Date: Sat, 23 Sep 2000 20:28:42 GMT



> FYI, "modicum" means "a moderate quantity".

Not in English, it doesn't. If the original Latin meant
moderate, it now means small.

Merriam Webster dictionary says this:

Main Entry: mo�di�cum
Pronunciation: 'm�-di-k&m also 'mO-
Function: noun
Etymology: Middle English, from Latin, neuter of modicus moderate,
from modus measure
Date: 15th century
  : a small portion : a limited quantity
      ^^^^^
English speakers use the word sarcastically in my experience,
hence my use of the word "twerp".

uwuh


Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: Frank M. Krauss <[EMAIL PROTECTED]>
Subject: Kernel 2.4.0-test8 hang at boot
Date: Sat, 23 Sep 2000 17:30:53 -0400

I'm attempting to update my Linux System to the Latest Kernel
I downloaded and installed Kernel 2.4.0-test8.
After running <make zdisk> I attempted to boot with the Floppy disk.
It just ran for a moment and then sat there.

When I attempted to Boot the new Kernel through LILO, I got the 
following data on the Screen:
   boot:
   Loading Linux .......
   <at this point, the system just Hangs,
    I never got the Uncompressing Linux message>

My System is a Compaq Deskpro 66M with 24 Mb of Ram.
The Processor is a I486DX2.
The version of LILO I have is 20.

Thanking everyone for any Help that I can get to solve this Problem.

Yours truly,

Frank Krauss



------------------------------

From: Karl Heyes <[EMAIL PROTECTED]>
Subject: Re: Kernel space vs User space
Date: Sat, 23 Sep 2000 23:45:39 +0000

In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
(Christopher Browne) wrote:

>>resource? CPU, memory, disk ? generally no.
> 
> Well, _in theory_, kernel mode gives the ability to get direct access to
> _anything_ on the whole system before user mode gets access to it.
> 
in theory, yes.

> But if you expect user mode to actually _work_, and if you want to
> "play by the rules," it is vastly _less_ convenient to "play well" and
> use great amounts of resources in kernel mode.
> 
> A "for instance" being that in the kernel, the _proper_ way to allocate
> memory involves using kmalloc() rather than malloc(), where kmalloc() has
> considerably more restrictions in order that the kernel behave well.

Not a good example malloc isn't available in the kernel, kmalloc allocates 
for kernel memory not from virtual process memory.

karl.

------------------------------

From: "Peter Huang" <[EMAIL PROTECTED]>
Subject: enable the user account to access the device driver
Date: Sat, 23 Sep 2000 18:02:13 -0700

I wrote a share library that access a device driver that I had written. When
I execute the program that calls the share library with root, everything
works fine. When I execute it in an user account,  the share library can't
not open the device. I change the permission of the device in the /dev file
and it won't fix the problem. Thanks for the suggests

Peter



------------------------------

From: "Peter Huang" <[EMAIL PROTECTED]>
Subject: bottom half
Date: Sat, 23 Sep 2000 18:17:30 -0700

Does the bottom half has the priority over file_operation functions? Also,
can a process be preempted while executing inside the spin lock by the
timer(its quantum is up)?

Peter



------------------------------

From: George Hostler <[EMAIL PROTECTED]>
Subject: KDE menu items no longer wrap
Date: Sat, 23 Sep 2000 23:24:35 -0600

How do I get menus that are longer than the screen height, to wrap?  I added
some menu items as root, I must have modified something using the kmenueditor. 
Before, it would have a show more button, which would continue the menu list.

Got any clues how I can fix this?

George

------------------------------

From: Lee Kang Won <[EMAIL PROTECTED]>
Subject: Link problem
Date: Sun, 24 Sep 2000 16:14:17 +0900

Hi!

I'm having some problem porting an application from on Solaris7 to
Linux.
When I build on Solaris, I linked a shared object and it is all I have
to do,
but on Linux, I have to link all the so files that is needed to run the
app.
Well, this may sound like it's a problem with makefie, but what I'm
worried about
is that I have to replace the so file(one of many libraries) with the
one some third
party is to provide which reply on many other objects we don't want to
care about.
for example, In my environment I don't have Sybase client module, and I
compile
an app. with dummy funtions which does almost nothing but when it is
replaced
with the real one afterward, it should work fine.. of course with other
files that
I don't have in my system.
I want to prevent building everytime I supply program with other's
solutions.
How can I make it on Linux?

===========================================================
on solaris,

TARGET = target
$(TARGET): target.c
    cc -o target target.c -Imyinclude -Lmylib -lmylib -l3rdlib     => It
works!

============================================================
lib3rdlib.so -> lib3rlib1.so -> lib3rlib2.so

=============================================================
on linux,

TARGET = target
$(TARGET): target.c
    cc -o target target.c -Imyinclude -Lmylib -lmylib -l3rdlib -l3rlib1
-l3rlib2     => T_T

============================================================
lib3rdlib.so -> lib3rlib1.so -> lib3rlib2.so

Any advice/commed appreciated.
Thanks in advance.





------------------------------

From: "Paul" <[EMAIL PROTECTED]>
Subject: gdb
Date: Sun, 24 Sep 2000 18:34:55 +1000

I am trying to debug my application using GDB with no luck.
So I wrote a simple program and tried debugging it - with still no luck.
I have read up on GDB on the RedHat website (using Ver 6.2 of RedHat).
Anyway I'm trying to display some variables using the "print" command as per
doco. after a crash.

So here is the code: test.c

====================
#include <stdio.h>

main ( )
{
int     i, count;

        count = 0;
        printf("count=%d\n", count);
        i = 10 / count;
        printf("i=%d\n", i);
}
=======================

Here is my compiler command:

    cc testdb.c -g -otestdb

=====================

When I run it and it crashes, I type in the following to run GDB

    gdb -e testdb -c core

Then at the GDB prompt I want to view the value of the variable "count".
I type in:

    (gdb)   print 'testdb.c'::count

The response from GDB is:

    No symbol "testdb.c" in current context


Can someone help me and tell me why I can't view the value of any variables
???

Thank you in advance
Paul



------------------------------

From: "Paul" <[EMAIL PROTECTED]>
Subject: Re: gdb
Date: Sun, 24 Sep 2000 18:42:39 +1000

Forgot to mention - I did compile/build with GCC, not CC as wrongly stated
below.


Paul <[EMAIL PROTECTED]> wrote in message
news:8qkapj$7o3$[EMAIL PROTECTED]...
> I am trying to debug my application using GDB with no luck.
> So I wrote a simple program and tried debugging it - with still no luck.
> I have read up on GDB on the RedHat website (using Ver 6.2 of RedHat).
> Anyway I'm trying to display some variables using the "print" command as
per
> doco. after a crash.
>
> So here is the code: test.c
>
> ====================
> #include <stdio.h>
>
> main ( )
> {
> int     i, count;
>
>         count = 0;
>         printf("count=%d\n", count);
>         i = 10 / count;
>         printf("i=%d\n", i);
> }
> =======================
>
> Here is my compiler command:
>
>     cc testdb.c -g -otestdb
>
> =====================
>
> When I run it and it crashes, I type in the following to run GDB
>
>     gdb -e testdb -c core
>
> Then at the GDB prompt I want to view the value of the variable "count".
> I type in:
>
>     (gdb)   print 'testdb.c'::count
>
> The response from GDB is:
>
>     No symbol "testdb.c" in current context
>
>
> Can someone help me and tell me why I can't view the value of any
variables
> ???
>
> Thank you in advance
> Paul
>
>



------------------------------

From: Konrad Mierendorff <[EMAIL PROTECTED]>
Subject: Re: Kernel panic: VFS :Unable to mount root
Date: Sun, 24 Sep 2000 16:03:49 +0200

rich wrote:
> 
> Hi all
> 
> I have RedHat 6.2 installed on a Pentium machine with level 1 IDE RAID
> (mirroring) partitioned hard drives, and am now trying to build a
> monolithic kernel.
> 
> As part of rebuilding the kernel, I uninstalled the Kernel RPM package with
> 
>       rpm -e --nodeps kernel-headers kernel
> 
> The following message was reported when trying to boot (I can boot
> successfully off a boot-stiffy):
> 
>      VFS: cannot open root device 09:06
>      Kernel panic: VFS: Unable to mount root fs on 09:06
> 
> I then proceeded with the monolithic kernel build process (make config;
> make dep; make clean; make bzImage etc), which all worked without error.
> 
> After trying to reboot, I still get the Kernel panic message.
> 
> Any suggestions?
> 

No suggestions, but I have a similar problem:

I'm trying to get my Debian 2.2 (i.e. potato) box to work with kernel
2.4.0-test8. However, while booting I get a Kernel panic after the
partition check. This looks as follows:
===================
Partitions check:
hda: hda1 hda2
hdc: hdc1 hdc2 hdc3 hdc4
Kernel panic: VFS: Unable to mount root fs on 16:02
===================
The 2.2.14 kernel does not complain.

The first kernel which produces this error was -test[1 or 2] AFAIR.

I upgraded the packages e2fsprogs, modutils, util-linux and ppp (quite
unimportant) to the versions used in the current unstable Distribution
(woody). (i.e. e2fsprogs_1.19-2, modutils_2.3.16-1, util-linux_2.10o-1)
But this didn't help.

Just to avoid some questions I should mention that Debian 2.2 uses gcc
2.95.2 (which is AFAIK not a recommended compiler for the Linux Kernel),
but rich's problem lets me hope that it is not a compiler problem.

My root device *is* /dev/hdc2 (i.e. 16:02), and I'm using an ASUS P5A
board. Here is the output of lspci:

km@legolas:/home/archives/deb > lspci
00:00.0 Host bridge: Acer Laboratories Inc. [ALi] M1541 (rev 04)
00:01.0 PCI bridge: Acer Laboratories Inc. [ALi] M5243 (rev 04)
00:03.0 Bridge: Acer Laboratories Inc. [ALi] M7101 PMU
00:07.0 ISA bridge: Acer Laboratories Inc. [ALi] M1533 PCI to ISA Bridge
[Aladdin IV] (rev c3)
00:0a.0 Multimedia audio controller: Ensoniq ES1371 [AudioPCI-97] (rev
06)
00:0d.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RT8029(AS)
00:0f.0 IDE interface: Acer Laboratories Inc. [ALi] M5229 IDE (rev c1)
01:00.0 VGA compatible controller: ATI Technologies Inc 3D Rage Pro AGP
1X/2X (rev 5c)
km@legolas:/home/archives/deb > 

My hardisks are two Maxtor drives on hda (8 GB) and hdc (30 GB), both
UDMA capable.

The IDE driver is compiled with UDMA support enabled:
        [*]   Generic PCI IDE chipset support
        [*]     Sharing PCI IDE interrupts support
        [*]     Generic PCI bus-master DMA support
        [*]       Use PCI DMA by default when available
        [ ]       ATA Work(s) In Progress (EXPERIMENTAL) 
        [*]     ALI M15x3 chipset support
        [ ]       ALI M15x3 WDC support
(DANGEROUS)                               

Maybe some clever guys can give some hints!

I'm grateful for any help?

You need more information? No problem, contact me.

- Konrad

------------------------------

From: Nix <$}xinix{[email protected]>
Crossposted-To: comp.os.linux.x,comp.windows.x
Subject: Re: new windowing system
Date: 24 Sep 2000 14:53:54 +0100

[EMAIL PROTECTED] (Grant Edwards) writes:

> That's why X doesn't use IP when dealing locally.  Did you really think the
> developers of X are that stupid?
> 
> For high-bandwidth stuff, even the Unix domain sockets are bypassed and
> shared memory is used for transferring data between client and server.

Further, xlib's caching and well-written X applications' eschewing of
round-trip calls on the X server can significantly speed up a local
link, as well; the application is in no way dependent upon the
congestion or load of the local X server (which could well be running on
a different processor on an SMP box).

-- 
`no amount of Zen contemplation will ever make you at one
 with a 3c905B ethernet card.' --- Alan Cox

------------------------------

From: Nix <$}xinix{[email protected]>
Crossposted-To: comp.os.linux.x,comp.windows.x
Subject: Re: new windowing system
Date: 24 Sep 2000 15:05:27 +0100

[EMAIL PROTECTED] (Alexander Viro) writes:

> And yes, I realize that cost of running CDE et.al. outweights that -
> which is a great reason for not touching them with a 10 feet pole...

It seems (thankfully) that Sun agrees with you.

(They're going to GNOME, but at least that has a little bit of flair.
 CDE, well, design-by-committee run rampant. Looks horrible too, even
 if you try to tart it up.)

-- 
`no amount of Zen contemplation will ever make you at one
 with a 3c905B ethernet card.' --- Alan Cox

------------------------------

From: [EMAIL PROTECTED] (Christopher Browne)
Crossposted-To: comp.os.linux.x,comp.windows.x
Subject: Re: new windowing system
Reply-To: [EMAIL PROTECTED]
Date: Sun, 24 Sep 2000 14:49:20 GMT

Centuries ago, Nostradamus foresaw a time when Nix would say:
>[EMAIL PROTECTED] (Alexander Viro) writes:
>
>> And yes, I realize that cost of running CDE et.al. outweights that -
>> which is a great reason for not touching them with a 10 feet pole...
>
>It seems (thankfully) that Sun agrees with you.
>
>(They're going to GNOME, but at least that has a little bit of flair.
> CDE, well, design-by-committee run rampant. Looks horrible too, even
> if you try to tart it up.)

Hmmm...  I thought CDE was essentially an HP 'innovation' that got
redeployed as an Open Group thing.  Or did the committee run rampant
afterwards?
-- 
[EMAIL PROTECTED] - <http://www.ntlug.org/~cbbrowne/lsf.html>
"Why use Windows, since there is a door?"
-- <[EMAIL PROTECTED]> Andre Fachat

------------------------------

From: Shmulik Hen <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.networking,comp.os.linux.development
Subject: Q: network driver interface changes between 2.2.x and 2.4.x
Date: Sun, 24 Sep 2000 17:58:32 +0300

Hello,

Is there a good source of information that I can find about what changed
between 2.2.x and 2.4.x kernels in terms of ethernet device drivers ?


    Thanks,
    Shmulik.


------------------------------


** 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
******************************

Reply via email to