From: naveen yadav <yad.naveen@gmail.com>
To: Steve Chen <schen@mvista.com>
Cc: linux-arm-kernel@lists.infradead.org, linux-mm <linux-mm@kvack.org>
Subject: Re: Kernel panic in 2.6.35.12 kernel
Date: Fri, 26 Aug 2011 10:38:14 +0530 [thread overview]
Message-ID: <CAJ8eaTxmZm6yw1YWhdfaxwuf0mF+sOfX6RUPfcu-qiHYu+D4CA@mail.gmail.com> (raw)
In-Reply-To: <CAHKQLBH2d-DzzMfP9QOUmz6brT7BfPdwY6JfEUUYxzaTDTo=wg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1378 bytes --]
Hi Steve.
Pls find attached code for stress application. The test code is very
simple. Just alloc memory.
we got this issue on embedded Target.
After analysis we found that most of task(stress_application) is in D
for uninterruptible sleep.
application state
stress x
stress D
stress x
stress D
stress x
stress D
stress x
sleep D
Thanks
On Thu, Aug 25, 2011 at 7:27 PM, Steve Chen <schen@mvista.com> wrote:
> On Thu, Aug 25, 2011 at 1:06 AM, naveen yadav <yad.naveen@gmail.com> wrote:
>> I am paste only small crash log due to size problem.
>>
>>
>>
>>
>>> Hi All,
>>>
>>> We are running one malloc testprogram using below script.
>>>
>>> while true
>>> do
>>> ./stress &
>>> sleep 1
>>> done
>>>
>>>
>>>
>>>
>>> After 10-15 min we observe following crash in kernel
>>>
>>>
>>> Kernel panic - not syncing: Out of memory and no killable processes...
>>>
>>> attaching log also.
>>>
>>> Thanks
>>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>>
>>
>
> Can you share the code in ./stress?
>
> Thanks,
>
> Steve
>
[-- Attachment #2: stress_application.c --]
[-- Type: text/x-csrc, Size: 1426 bytes --]
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
#include <unistd.h>
#define ALLOC_BYTE 512*1024
#define COUNT 500
void *alloc_function( void *ptr );
int main(int argc, char *argv[])
{
pthread_t thread1, thread2;
char *message1 = "Thread 1";
int iret1, iret2;
iret1 = pthread_create( &thread1, NULL, alloc_function, (void*) message1);
pthread_join( thread1, NULL);
printf("Thread 1 returns: %d\n",iret1);
exit(0);
}
void *alloc_function( void *ptr )
{
char *message;
message = (char *) ptr;
void *myblock[COUNT];
int i= 0,j=0;
int freed=0;
printf("message_alloc \n");
while(1)
{
memset(myblock,0,sizeof(myblock));
printf("message_alloc %s \n",message);
for(i=0;i< COUNT ;i++)
{
myblock[i] = (void *) malloc(ALLOC_BYTE);
if (!myblock[i])
{
printf("No memory for allocating: freeing \n");
printf("OOM may kill ME \n");
for(j=0;j < i;j++)
{
freed = 1;
free(myblock[j]);
printf("Currently freeing %d * %d Bytes \n",j,ALLOC_BYTE);
}
break;
}
memset(myblock[i],1, ALLOC_BYTE);
// printf("Currently allocating %d * %d Bytes \n",i,ALLOC_BYTE);
}
sleep(1);
#if 1
if(!freed) {
for(i=0;i< COUNT;i++)
{
free(myblock[i]);
// printf("Currently freeing %d * %d Bytes \n",i,ALLOC_BYTE);
}
}
sleep(1);
#endif
}
}
next prev parent reply other threads:[~2011-08-26 5:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAJ8eaTyeQj5_EAsCFDMmDs3faiVptuccmq3VJLjG-QnYG038=A@mail.gmail.com>
[not found] ` <CAJ8eaTw=dKUNE8h-HD7RWxXHcTEuxJH4AfcOO44RSF7QdC5arQ@mail.gmail.com>
2011-08-25 6:38 ` naveen yadav
2011-08-25 6:45 ` naveen yadav
2011-09-01 10:16 ` Russell King - ARM Linux
[not found] ` <CAHKQLBH2d-DzzMfP9QOUmz6brT7BfPdwY6JfEUUYxzaTDTo=wg@mail.gmail.com>
2011-08-26 5:08 ` naveen yadav [this message]
[not found] ` <CAJ8eaTz_zYYwG5HqTgU4=mbPwh=4rT9L-awJ-zO5QTsmP+GjOQ@mail.gmail.com>
2011-08-30 5:19 ` Kautuk Consul
2011-08-30 16:25 ` Steve Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJ8eaTxmZm6yw1YWhdfaxwuf0mF+sOfX6RUPfcu-qiHYu+D4CA@mail.gmail.com \
--to=yad.naveen@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mm@kvack.org \
--cc=schen@mvista.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox