Linux-Development-Sys Digest #582, Volume #8 Thu, 22 Mar 01 09:13:15 EST
Contents:
Re: How to Kill "unkillable" process (Juergen Heinzl)
Re: How to Kill "unkillable" process (=?iso-8859-1?Q?J=F6rn?= Engel)
Re: Reccomend a good C lib for queue, stack, linklists... ("Paul Pluzhnikov")
Re: How to Kill "unkillable" process (Josef Moellers)
Re: lilo and initrd (Josef Moellers)
Re: UDP Server output limit ("Nick Redshaw")
Re: what means pgrp in the task struct ? (Benjamin Lussier)
smp question ([EMAIL PROTECTED])
Signals (Jan Pietrusky)
Re: Help with inline assembly (Kasper Dupont)
Re: UDP Server output limit (Philip Armstrong)
Re: smp question (Josef Moellers)
Re: Signals (Josef Moellers)
Q: adding a syscall (Holger Eitzenberger)
Re: Signals (Jan Pietrusky)
Re: kernel problem (Kasper Dupont)
linux floopy distro (Serkan Zeren)
Re: How to Kill "unkillable" process ("Martin Collins")
----------------------------------------------------------------------------
From: [EMAIL PROTECTED] (Juergen Heinzl)
Subject: Re: How to Kill "unkillable" process
Date: Wed, 21 Mar 2001 22:11:51 GMT
In article <[EMAIL PROTECTED]>, Ash Bowers wrote:
>This group seemed the most appropriate, so I will ask the question
>here:
>
>How do you get rid of a process which refuses to respond to kill -9
>Without rebooting??????
[-]
Yes, has been discussed often (really) -- if it's in process state D,
uninterruptible sleep, then forget about it.
[-]
>Can anyone help? I don't need a techical manifesto, just a clear "you
>do this" or "it cannot be done" answer.
[-]
If it's the above and usually it means some I/O problem, say you need
to get rid of it, then reboot 8-}
Sorry,
Juergen
--
\ Real name : Juergen Heinzl \ no flames /
\ EMail Private : [EMAIL PROTECTED] \ send money instead /
------------------------------
From: [EMAIL PROTECTED] (=?iso-8859-1?Q?J=F6rn?= Engel)
Subject: Re: How to Kill "unkillable" process
Date: 21 Mar 2001 22:09:07 GMT
Reply-To: [EMAIL PROTECTED]
>How do you get rid of a process which refuses to respond to kill -9
>Without rebooting??????
Sometimes it worked to kill the parent process. Do a pstree to find that
one. Actually, this always works if you go up far enough and kill the mother
of all processes. ;-)
J�rn
------------------------------
From: "Paul Pluzhnikov" <[EMAIL PROTECTED]>
Subject: Re: Reccomend a good C lib for queue, stack, linklists...
Date: Thu, 22 Mar 2001 06:39:29 GMT
"Pjtg0707" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
>
> ... don't feel like writing my own lib right now.
> I am looking for a good C lib for queues, stacks, linklists etc
There is an excellent book:
C Interfaces and Implementations :
Techniques for Creating Reusable Software
David R. Hanson
The source code is available from
http://www.cs.princeton.edu/software/cii/
------------------------------
From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: How to Kill "unkillable" process
Date: Thu, 22 Mar 2001 08:22:33 +0100
Ash Bowers wrote:
> =
> This group seemed the most appropriate, so I will ask the question
> here:
> =
> How do you get rid of a process which refuses to respond to kill -9
> Without rebooting??????
> =
> Presumably this process is waiting for something to finish which
> obviously never will finish!
> =
> I have searched many archives and have found many comments on WHY
> processes don't get the signals, but nowhere have I seen a comment on
> whether or not it possible to clear this process without a reboot.
> =
> Can anyone help? I don't need a techical manifesto, just a clear "you
> do this" or "it cannot be done" answer.
As Roland and Juergen have already pointed out, processes in the D state
cannot be killed. Although you don't want a "technical manifesto",
perhaps a few words on the "why" are in place, even if it is only for
the purpose of others correcting ME, before I spread more of this
rubbish B-{)
A process always "go to sleep" when it waits for a specific event to
occur, e.g. an I/O process to finish or an idle processor to continue
executing on.
Besides the event the process is waiting for, a signal sent to the
process may wake it up. When the process is woken up, it would have to
check whether it was woken up due to the event having arrived or due to
a signal sent to it and in the latter case do some cleanup e.g because
the event should have been handled by other code (lower levels) before
being passed to the process' handler and that code would have done the
cleanup OR the event has a strong relationship to the process and if it
occurs when the process is not around, strange things might happen OR
the I/O device may be blocked if the event is not handled properly.
So, there are a number of reasons why it may not be possible to allow a
process waiting for an event to be interrupted.
If there is a chance that the event may never occur, e.g. due to faulty
hardware (e.g. a SCSI device stopping to tranfer data in the middle of a
block), some timeout mechanism must be implemented that does the cleanup
mentioned.
-- =
Josef M=F6llers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett
------------------------------
From: Josef Moellers <[EMAIL PROTECTED]>
Crossposted-To:
linux.redhat,linux.redhat.devel,linux.redhat.development,linux.redhat.misc,alt.os.linux
Subject: Re: lilo and initrd
Date: Thu, 22 Mar 2001 08:28:57 +0100
Madhava S Bhamy wrote:
> =
> Hi,
> =
> I have Red had 7.0 (linux kernel 2.2.16 ) installed on my system (compa=
q
> deskpro, pentium pro). It has a SCSI BIOS.
[ ... ]
> I made a few changes in the kernel and built a new image. I put this
> image in the lilo.conf file but could not boot the system with this
> image. At first I didn't set initrd for this image (in the lilo.conf)
> and then set it to the same value as that for the above image and then
> tried creating a new initrd (using the command /sbin/mkinitrd
> /boot/initrd-2.2.16-new.img 2.2.16) - but none of them worked.
> =
> What could be the problem? Is there any particular configuration I need=
> to set prior to building the image?
You should quote the error message you get, my crystal ball is in repair
right now, so I must resort to old fashined guesswork:
I assume the kernel panics because it cannot mount the root FS because
it has been unable to load the appropriate SCSI host adapter driver.
RedHat has enabled MODVERSIONS, so when you build a new kernel, you
should also build a new set of kernel modules and install them:
make bzImage modules modules_install
Make sure you have modified the EXTRAVERSION in the
/usr/src/linux/Makefile or you may clobber your current set of modules
rendering you system unusable.
If all fails, you should start with a clean slate by running
make mrproper
Since this will also remove the .config file, make sure you have some
way of restoring it afterwards, e.g. by saving it to another location.
Oh, by the way, crossposting to 6 newsgroups is bad. But so is replying
to 6 newsgroups B-{)
-- =
Josef M=F6llers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett
------------------------------
From: "Nick Redshaw" <[EMAIL PROTECTED]>
Subject: Re: UDP Server output limit
Date: Thu, 22 Mar 2001 10:16:51 -0000
I'm using UDP packets that are 144 bytes long. My application is a UDP
packet reflector. As I increase the number of clients that I'm reflecting to
the network output rate rises as expected but then at around 70 clients
(which equates to 200kbps according to fnetload) the output drop right off
(30kbps).
I looked at ifconfig and found no errors or collisions.
Nick
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]...
> In article <m11u6.5010$Bs4.15329@NewsReader>,
> Nick Redshaw <[EMAIL PROTECTED]> wrote:
>
> >I have a small UDP packet server on RedHat 2.4 which is reaching an
output
> >limit of around 70 kbps. I'm using fnetload to monitor the in / out rate
of
> >the network card.
> >
> >My network card is a realtek rtl8129 (10/100). I am running the tests on
an
> >isolated LAN (100Mbps)
> >
> >Modifying the priority or memory available to the server does not affect
the
> >above limit. Because of this I'm assuming that the problem is I/O based.
> >
> >Questions to the group...
> >
> > Could the driver be the problem?
> > Is there any soft network settings that I should be aware of?
>
> What size packets are you sending? Does ifconfig report any errors
> or collisions? Have you read the driver source to see if it says anything
> about improving throughput?
>
> --
> http://www.spinics.net/linux/
>
------------------------------
From: Benjamin Lussier <[EMAIL PROTECTED]>
Subject: Re: what means pgrp in the task struct ?
Date: Thu, 22 Mar 2001 11:05:29 +0100
Reply-To: [EMAIL PROTECTED]
correct me if I'm wrong, linux community...
each process is assigned to a group and a session.
the process is identified by a process number (its pid), and by the same
way group and session are identified (respectively pgrp and session).
to confuse things a little, the pgrp is often named pgid in linux
documentation or code (exemple : sys_get_pgrp (return the current
process pgrp) and sys_get_pgid (return the pgrp of any process, given
its pid) ).
do not misunderstand pgid and gid :
pgid does with identification and gid with access rights
(in the same way with pid and uid, methinks)
if I get things right, parent process in a group can reparent their
childs to other processes of the group, otherwise childs are re-parented
to the init task
groups serves obviously to ease process manipulation and give easier
access rights to process potentially interested in another process data
(its parent, siblings, etc.. for the more obvious exemples)
Julien Cavoizy wrote:
>
> hi,
>
> I am trying to understand the the task struct in the sched.h file and i
> don't know what is the pgrp field and what it is used to ?
>
> thank for your answer
>
> Julien
>
> [EMAIL PROTECTED]
--
> `Have you guessed the riddle yet?' the Hatter said, turning to Alice again.
> `No, I give it up,' Alice replied: `what's the answer?'
> `I haven't the slightest idea,' said the Hatter.
------------------------------
From: ([EMAIL PROTECTED])
Subject: smp question
Date: Thu, 22 Mar 2001 12:09:23 GMT
For smp's the value smp_num_cpus is used alot.
I wonder what happens to that value when one of the cpus crashes -
assuming linux doesn't crash because of this event.
Thanks,
Bart
------------------------------
From: Jan Pietrusky <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Signals
Date: Thu, 22 Mar 2001 13:25:30 +0100
Hello,
does anyone know, how I use more than one signal in a programm?
Specialy, my prog contains 2 signals, one is SIGINT to catch the ctrl-c
and one timer SIGALRM. If I use the signals several, I take the correct
function. If I use both signals, I get problems and the timer will not
working.
Part of the code
main()
{
struct sigaction sa, rt;
memset( &sa, 0, sizeof(&sa));
memset( &rt, 0, sizeof(&rt));
-> timerinitialisation
sa.sa_handler=CloseApp;
rt.sa_handler=realTimer;
if(sigaction(SIGINT, &sa, NULL)) perror();
if(sigaction(SIGALRM, &rt, NULL)) perror();
}
Jan
--
---------------------------------------------------------------------
| Dipl.-Ing.(FH) Jan Pietrusky | Tel: +49 (0) 3677 678331 |
| Institut fuer Mikroelektronik- und | FAX: +49 (0) 3677 678338 |
| Mechatronik-Systeme | |
| Langewiesener Strasse 22, 98693 Ilmenau | |
|---------------------------------------------------------------------|
| MAIL/WWW: [EMAIL PROTECTED], http://www.imms.de/ |
---------------------------------------------------------------------
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Help with inline assembly
Date: Thu, 22 Mar 2001 12:58:35 +0000
G wrote:
>
> Hi,
> This is wrto inline asm semaphore implementation in linux.
> __asm__ __volatile__(
> "# atomic up operation\n\t"
> LOCK "incl %0\n\t" /* ++sem->count */
> "jle 2f\n"
> "1:\n"
> ".section .text.lock,\"ax\"\n"
> "2:\tcall __up_wakeup\n\t"
> "jmp 1b\n"
> ".previous"
> :"=m" (sem->count)
> :"c" (sem)
> :"memory");
> }
> Can somebody explain what LOCK , .text.lock and .previous mean in this
> context. Went throught the gcc inline asm info page and as pseudo ops info
> pages...but couldn't find what .text.lock or .previous mean .. I know abt
> text, and data sections but what is .text.lock . (Yeah I am a bit green :)
> )pls halp.
>
> K
>
> (btw code is copyright linus trovalds and license as per GNU GPL ..shud i
> include this??)
For the above to make sense LOCK must be a preprocessor
macro defining a string. I found the definition in
include/asm-i386/atomic.h.
The .section directive puts the following code in another
section, and .previous changes section back to the value
before the last section change. (I don't know if multiple
.previous would switch between two sections or pop
sections from a stack.) Without the .previous the
compiler would continue to generate code in the wrong
section after the inline assembly.
The name of the section is probably something arbitrary
choosen for just this single macro. A much more
interesting question is why the code has been moved to
another section. I can think of two posible explanations.
1: Moving the code to another section will speed up the
code in the case where __up_wakeup is not called.
2: A jump to somewhere far away is necesarry to get the
correct semantics.
--
Kasper Dupont
------------------------------
From: [EMAIL PROTECTED] (Philip Armstrong)
Subject: Re: UDP Server output limit
Date: 22 Mar 2001 10:19:09 -0000
In article <h9ku6.5378$Bs4.24735@NewsReader>,
Nick Redshaw <[EMAIL PROTECTED]> wrote:
>I'm using UDP packets that are 144 bytes long. My application is a UDP
>packet reflector. As I increase the number of clients that I'm reflecting to
>the network output rate rises as expected but then at around 70 clients
>(which equates to 200kbps according to fnetload) the output drop right off
>(30kbps).
>
>I looked at ifconfig and found no errors or collisions.
>
What's the system load like on the server (reflector) when you're
doing this ? You're sending lots of small packets + realtek cards have
a horrible interface that necessitates multiple copies being made in
memory before a packet can be sent to the card. It's possible that
you're overloading your server without realising it.
If so, then try a better network card.
You could also see what happens to the total throughput if you
increase the packet size; this would at least give you a better idea
where the bottleneck was.
cheers,
Phil
--
http://www.kantaka.co.uk/ .oOo. public key: http://www.kantaka.co.uk/gpg.txt
------------------------------
From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: smp question
Date: Thu, 22 Mar 2001 14:23:04 +0100
"[EMAIL PROTECTED]" wrote:
> =
> For smp's the value smp_num_cpus is used alot.
> I wonder what happens to that value when one of the cpus crashes -
> assuming linux doesn't crash because of this event.
Linux will not work properly when one of several CPUs crashes.
Most likeley, Linux will crash as a whole.
-- =
Josef M=F6llers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett
------------------------------
From: Josef Moellers <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Signals
Date: Thu, 22 Mar 2001 14:26:04 +0100
Jan Pietrusky wrote:
> =
> Hello,
> does anyone know, how I use more than one signal in a programm?
> Specialy, my prog contains 2 signals, one is SIGINT to catch the ctrl-c=
> and one timer SIGALRM. If I use the signals several, I take the correct=
> function. If I use both signals, I get problems and the timer will not
> working.
> =
> Part of the code
> main()
> {
> struct sigaction sa, rt;
> memset( &sa, 0, sizeof(&sa));
*********************************^
Leave out this address operator.
> memset( &rt, 0, sizeof(&rt));
*********************************^
and this one, too!
> -> timerinitialisation
> sa.sa_handler=3DCloseApp;
> rt.sa_handler=3DrealTimer;
> if(sigaction(SIGINT, &sa, NULL)) perror();
> if(sigaction(SIGALRM, &rt, NULL)) perror();
> }
-- =
Josef M=F6llers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett
------------------------------
From: [EMAIL PROTECTED] (Holger Eitzenberger)
Subject: Q: adding a syscall
Date: 22 Mar 2001 13:28:38 GMT
Hi there.
I want to add a syscall to the kernel (2.4.2) and haven't found
appropriate documentation for it. Help me save some time
figuring it out.
Thanks in advance.
Holger
------------------------------
From: Jan Pietrusky <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Signals
Date: Thu, 22 Mar 2001 14:44:31 +0100
Hi Josef,
I can't believe, that this was my failure. Thanks a lot. But, why is it
so and one signal can received and if I use two signals, it failed?
Jan
--
---------------------------------------------------------------------
| Dipl.-Ing.(FH) Jan Pietrusky | Tel: +49 (0) 3677 678331 |
| Institut fuer Mikroelektronik- und | FAX: +49 (0) 3677 678338 |
| Mechatronik-Systeme | |
| Langewiesener Strasse 22, 98693 Ilmenau | |
|---------------------------------------------------------------------|
| MAIL/WWW: [EMAIL PROTECTED], http://www.imms.de/ |
---------------------------------------------------------------------
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: kernel problem
Date: Thu, 22 Mar 2001 13:50:13 +0000
That is indeed very strange.
At this very early stage of startup the iddle process
is not actually yet iddle.
The error message you get come from the function
do_exit() which is called by a process when it is
about to terminate. do_exit() verifies if the call
comes from the iddle process which is not only
illegal but simply a disaster.
The problem is how did do_exit() get called? Most
of the execution paths leading to do_exit() does
call printk() on the way. printk() does work
because otherwise panic() could not print the error
message. So the execution path must be one of the
few without any printk().
Calling do_exit() without printing anything can
happen through sys_exit(), but the iddle process
should never do any system calls.
It could also happen if the process received a
signal which was not caught, but it should not be
possible to send a signal to the iddle process.
A final posibility is if the IRET instruction on
the return path from system call/interrupt fails.
But the values on the stack should have been setup
correctly on entry to inerrupts.
I have a couple of printk() statements you can put
in the kernel to find out some more about what
happens.
In kernel/exit.c change the two lines:
if (!tsk->pid)
panic("Attempted to kill the idle task!");
into:
if (!tsk->pid)
panic("Attempted to kill the idle task (%d)",code);
And change the line:
do_exit((error_code&0xff)<<8);
into:
printk("sys_exit(%d)\n",error_code);
do_exit((error_code&0xff)<<8);
In arch/i386/kernel/signal.c change the line:
do_exit(exit_code);
into:
printk("%d killed with signal %d\n",current->pid,signr);
do_exit(exit_code);
Dipl. Ing. Werner K�hnert wrote:
>
> Unfortunately this is, besides the banner message, the very first message.
> But beware that this is not on an ordinary PC. I am trying to run a 2.2.16
> kernel on a hardware that is "almost" a PC. It has not a BIOS in the common
> sense as a PC. I verified that the kernel (a bzImage kernel) is loaded to the
> correct address (0x100000) and the command line passed to the kernel is
> something like "mem=64M root=/dev/sda1 single console=ttyS0,115200n8". My
> system does not have a grphics adpater of any kind, so I _have_ to use the
> serial line as console. Everything works fine until the moment interrupts are
> enabled (this seems logical to me). Thins that work are :
> - pintk(banner)
> - setup_arch
> - paging_init
> - trap_init
> - init_IRQ
> - sched_init
> - time_init
> - parse_options
> - console_init
> - init_modules
> - kmem_cache_init
> - sti
> When I write these functions work, I mean they return and I can continue.
> This one then get's me the previously mentioned error message :
> - calibrate_delay
>
> TIA
>
> Werner K�hnert
>
> Kasper Dupont wrote:
>
> > Dipl. Ing. Werner K�hnert wrote:
> > >
> > > Hi all,
> > >
> > > Can anyone give me a hint what the reason for the following message can
> > > be :
> > >
> > > Kernel panic: Attempted to kill the idle task!
> > > In Swapper task - not syncing.
> > >
> > > TIA
> > >
> > > Regards
> > > Werner Kuehnert
> > >
> > > --
> > > Werner Kuehnert Siemens AG Oesterreich PSE ECT IPN 1
> > > E-Mail: [EMAIL PROTECTED]
> >
> > We need some more context to explain what happens,
> > most likely you must have got some other error
> > messages before the two mentioned.
> >
> > What did you do to provoke this message?
> >
> > --
> > Kasper Dupont
>
> --
> Regards
> Werner Kuehnert
>
> Werner Kuehnert Siemens AG Oesterreich PSE EZE PN PS
> E-Mail: [EMAIL PROTECTED]
--
Kasper Dupont
------------------------------
From: Serkan Zeren <[EMAIL PROTECTED]>
Subject: linux floopy distro
Date: Thu, 22 Mar 2001 15:49:53 +0200
i want to make my linux floppy distro.But i need some helps.Where can i
find good sources about floppy distros.
------------------------------
From: "Martin Collins" <[EMAIL PROTECTED]>
Subject: Re: How to Kill "unkillable" process
Date: Thu, 22 Mar 2001 15:06:15 +0100
Hi,
just a comment. This behaviour seems a little strange. Issuing a kill -9
shouldn't result
in the process being signaled. It should just be wiped by the kernel. After
all SIGKILL is
not supposed to be "catchable" at all.
Or am I missing something here?
Martin.
------------------------------
** 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
******************************