linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Kernel doesn't create core for threads
@ 2001-05-02 20:53 Zdenek Kabelac
  2001-05-02 21:03 ` Don Dugger
  0 siblings, 1 reply; 2+ messages in thread
From: Zdenek Kabelac @ 2001-05-02 20:53 UTC (permalink / raw)


Hello

Looks to me like the latest 2.4.5-pre1 is not creating
coredump for multithreaded aplications:

----
$ ulimit  -a
core file size (blocks)     unlimited
data seg size (kbytes)      unlimited
file size (blocks)          unlimited
max locked memory (kbytes)  unlimited
max memory size (kbytes)    unlimited
open files                  1024
pipe size (512 bytes)       8
stack size (kbytes)         8192
cpu time (seconds)          unlimited
max user processes          6144
virtual memory (kbytes)     unlimited

$ ./testcore 
Segmentation fault


--- test program --

#include <stdio.h>
#include <pthread.h>

#define TASKS 10

void* thread(void* arg)
{
    printf("yuk %s\n", 0xffff0000);
    return 0;
}

int main(int argc, char *argv[])
{
    pthread_t task[TASKS];
    void* ret;
    int i = 0;
    for(i = 0; i < TASKS; i++)
	pthread_create(&task[i], NULL, thread, 0);
    for(i = 0; i < TASKS; i++)
	pthread_join(task[i], &ret);

    return 0;
}
---


for single threadad apps there is no problem:
(just put printf after int i declaration)
$ ./testcore 
Segmentation fault (core dumped)

---

Am I doing something wrong ???

Also for quite a long time Alan's AC patches were efictively locking
my machine when threaded application was crashing - resolvin
almost original behaviour solved this problem - but I like 
per-thread coredump - is there any special reason why this is still
not present in the current 2.4.4 kernel as I can see this as quite
usefull.


bye


kabi@i.am


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Kernel doesn't create core for threads
  2001-05-02 20:53 Kernel doesn't create core for threads Zdenek Kabelac
@ 2001-05-02 21:03 ` Don Dugger
  0 siblings, 0 replies; 2+ messages in thread
From: Don Dugger @ 2001-05-02 21:03 UTC (permalink / raw)
  To: Zdenek Kabelac; +Cc: linux-kernel

Zdenek-

Yes, this is a known problem.  I sent out a patch last month that
fixed this problem.  Unfortunately, the patch caused some kernel
hangs that I just fixed today.  I'm testing the fix now so expect
a new patch either this afternoon or tomorrow that will fix this.

On Wed, May 02, 2001 at 08:53:00PM +0000, Zdenek Kabelac wrote:
> Hello
> 
> Looks to me like the latest 2.4.5-pre1 is not creating
> coredump for multithreaded aplications:
> 
> ----
> $ ulimit  -a
> core file size (blocks)     unlimited
> data seg size (kbytes)      unlimited
> file size (blocks)          unlimited
> max locked memory (kbytes)  unlimited
> max memory size (kbytes)    unlimited
> open files                  1024
> pipe size (512 bytes)       8
> stack size (kbytes)         8192
> cpu time (seconds)          unlimited
> max user processes          6144
> virtual memory (kbytes)     unlimited
> 
> $ ./testcore 
> Segmentation fault
> 
> 
> --- test program --
> 
> #include <stdio.h>
> #include <pthread.h>
> 
> #define TASKS 10
> 
> void* thread(void* arg)
> {
>     printf("yuk %s\n", 0xffff0000);
>     return 0;
> }
> 
> int main(int argc, char *argv[])
> {
>     pthread_t task[TASKS];
>     void* ret;
>     int i = 0;
>     for(i = 0; i < TASKS; i++)
> 	pthread_create(&task[i], NULL, thread, 0);
>     for(i = 0; i < TASKS; i++)
> 	pthread_join(task[i], &ret);
> 
>     return 0;
> }
> ---
> 
> 
> for single threadad apps there is no problem:
> (just put printf after int i declaration)
> $ ./testcore 
> Segmentation fault (core dumped)
> 
> ---
> 
> Am I doing something wrong ???
> 
> Also for quite a long time Alan's AC patches were efictively locking
> my machine when threaded application was crashing - resolvin
> almost original behaviour solved this problem - but I like 
> per-thread coredump - is there any special reason why this is still
> not present in the current 2.4.4 kernel as I can see this as quite
> usefull.
> 
> 
> bye
> 
> 
> kabi@i.am
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
Don Dugger
"Censeo Toto nos in Kansa esse decisse." - D. Gale
n0ano@valinux.com
Ph: 303/938-9838

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-05-02 21:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-02 20:53 Kernel doesn't create core for threads Zdenek Kabelac
2001-05-02 21:03 ` Don Dugger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).