linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: memory leak in call_usermodehelper()
@ 2003-12-30 17:14 Srikumar Subramanian
  0 siblings, 0 replies; 6+ messages in thread
From: Srikumar Subramanian @ 2003-12-30 17:14 UTC (permalink / raw)
  To: 'Andrew Morton'
  Cc: linux-kernel, Srikumar Subramanian, Boopathi Veerappan

Hi,
I am using 2.4.20-8 Redhat 9 kernel. 

-----Original Message-----
From: Andrew Morton [mailto:akpm@osdl.org]
Sent: Tuesday, December 30, 2003 6:20 AM
To: Srikumar Subramanian
Cc: linux-kernel@vger.kernel.org; SrikumarS@ami.com; BoopathiV@ami.com
Subject: Re: memory leak in call_usermodehelper()

Srikumar Subramanian <SrikumarS@ami.com> wrote:
>
> Hi All,
>
> >From my customized system call, I merely call call_usermodehelper() to
spawn
> a process. When I call my_system_call around 1000 times in order to spawn
> 'hello world' program, I noticed in 'top' program that system has lost 200
> KB of free memory.
> I just increased the iteration to 700000, I lost the entire 128 MB free
> memory from my system and eventually the system is freezed.
>

What version of the kernel were you using?

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

* RE: memory leak in call_usermodehelper()
@ 2003-12-31 19:43 Srikumar Subramanian
  0 siblings, 0 replies; 6+ messages in thread
From: Srikumar Subramanian @ 2003-12-31 19:43 UTC (permalink / raw)
  To: 'arjanv@redhat.com', Srikumar Subramanian
  Cc: 'Andrew Morton', 'linux-kernel@vger.kernel.org',
	Boopathi Veerappan

Basically, I am not intended to have my own syscall.

I am generating a report on all deleted file and directory. For that I
trapped sys_unlink() function and calling a external program using
call_usermodehelper(). Since sys_unlink() is called very frequently in my
case, memory leak caused by calling call_usermodehelper kills all the
process in the system.

Just to narrow down the problem, I introduced my own syscall.

-----Original Message-----
From: Arjan van de Ven [mailto:arjanv@redhat.com]
Sent: Wednesday, December 31, 2003 7:13 AM
To: Srikumar Subramanian
Cc: 'Andrew Morton'; 'linux-kernel@vger.kernel.org'; Boopathi Veerappan
Subject: RE: memory leak in call_usermodehelper()

On Wed, 2003-12-31 at 06:22, Srikumar Subramanian wrote:

>
> Is there any alternative to call_usermodehelper in kernel 2.4.20?
>
most of all don't implement your own syscalls!

> Hi,
> I am using 2.4.20-8 Redhat 9 kernel.
>

well clearly not quite since you're adding syscalls to it.
Also 2.4.20-8 isn't the current Red Hat Linux 9 kernel; 2.4.20-27.9 is.

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

* RE: memory leak in call_usermodehelper()
  2003-12-31  5:22 Srikumar Subramanian
@ 2003-12-31 12:12 ` Arjan van de Ven
  0 siblings, 0 replies; 6+ messages in thread
From: Arjan van de Ven @ 2003-12-31 12:12 UTC (permalink / raw)
  To: Srikumar Subramanian
  Cc: 'Andrew Morton', 'linux-kernel@vger.kernel.org',
	Boopathi Veerappan

[-- Attachment #1: Type: text/plain, Size: 375 bytes --]

On Wed, 2003-12-31 at 06:22, Srikumar Subramanian wrote:

> 
> Is there any alternative to call_usermodehelper in kernel 2.4.20?
> 
most of all don't implement your own syscalls!

> Hi,
> I am using 2.4.20-8 Redhat 9 kernel.
> 

well clearly not quite since you're adding syscalls to it.
Also 2.4.20-8 isn't the current Red Hat Linux 9 kernel; 2.4.20-27.9 is.


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* RE: memory leak in call_usermodehelper()
@ 2003-12-31  5:22 Srikumar Subramanian
  2003-12-31 12:12 ` Arjan van de Ven
  0 siblings, 1 reply; 6+ messages in thread
From: Srikumar Subramanian @ 2003-12-31  5:22 UTC (permalink / raw)
  To: 'Andrew Morton', 'linux-kernel@vger.kernel.org'
  Cc: Boopathi Veerappan, Srikumar Subramanian


This is my sample syscall implementation

---
asmlinkage int sys_mysyscall (int arg1, char * arg2)
{
	char * argv[2], * envp[3];
	
	argv[0] = "/usr/test";  //this program does nothing, simply returns
0
	argv[1] = 0;
	
	envp[0] = "HOME=/";
	envp[1] = "PATH=/bin:/sbin/:/usr/bin:/usr/sbin";
	envp[2] = 0;

	call_usermodehelper (argv[0], argv, envp);  //calling this way leads
to memory leak in kernel.

	return 1;
}
---

Is there any alternative to call_usermodehelper in kernel 2.4.20?

Any suggestion of patch will be greatly appreciated.

Thanks & regards,
Srikumar

-----Original Message-----
From: Srikumar Subramanian 
Sent: Tuesday, December 30, 2003 12:14 PM
To: 'Andrew Morton'
Cc: linux-kernel@vger.kernel.org; Srikumar Subramanian; Boopathi Veerappan
Subject: RE: memory leak in call_usermodehelper()

Hi,
I am using 2.4.20-8 Redhat 9 kernel.

-----Original Message-----
From: Andrew Morton [mailto:akpm@osdl.org]
Sent: Tuesday, December 30, 2003 6:20 AM
To: Srikumar Subramanian
Cc: linux-kernel@vger.kernel.org; SrikumarS@ami.com; BoopathiV@ami.com
Subject: Re: memory leak in call_usermodehelper()

Srikumar Subramanian <SrikumarS@ami.com> wrote:
>
> Hi All,
>
> >From my customized system call, I merely call call_usermodehelper() to
spawn
> a process. When I call my_system_call around 1000 times in order to spawn
> 'hello world' program, I noticed in 'top' program that system has lost 200
> KB of free memory.
> I just increased the iteration to 700000, I lost the entire 128 MB free
> memory from my system and eventually the system is freezed.
>

What version of the kernel were you using?

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

* Re: memory leak in call_usermodehelper()
  2003-12-30  7:32 Srikumar Subramanian
@ 2003-12-30 11:20 ` Andrew Morton
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Morton @ 2003-12-30 11:20 UTC (permalink / raw)
  To: Srikumar Subramanian; +Cc: linux-kernel, SrikumarS, BoopathiV

Srikumar Subramanian <SrikumarS@ami.com> wrote:
>
> Hi All,
> 
> >From my customized system call, I merely call call_usermodehelper() to spawn
> a process. When I call my_system_call around 1000 times in order to spawn
> 'hello world' program, I noticed in 'top' program that system has lost 200
> KB of free memory.
> I just increased the iteration to 700000, I lost the entire 128 MB free
> memory from my system and eventually the system is freezed.
> 

What version of the kernel were you using?


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

* memory leak in call_usermodehelper()
@ 2003-12-30  7:32 Srikumar Subramanian
  2003-12-30 11:20 ` Andrew Morton
  0 siblings, 1 reply; 6+ messages in thread
From: Srikumar Subramanian @ 2003-12-30  7:32 UTC (permalink / raw)
  To: 'linux-kernel@vger.kernel.org'
  Cc: Srikumar Subramanian, Boopathi Veerappan

Hi All,

>From my customized system call, I merely call call_usermodehelper() to spawn
a process. When I call my_system_call around 1000 times in order to spawn
'hello world' program, I noticed in 'top' program that system has lost 200
KB of free memory.
I just increased the iteration to 700000, I lost the entire 128 MB free
memory from my system and eventually the system is freezed.

Any suggestion or patch to over come this issue ?

Please 'cc' me in your reply.

Thanks & Regards,
Srikumar.

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

end of thread, other threads:[~2003-12-31 19:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-30 17:14 memory leak in call_usermodehelper() Srikumar Subramanian
  -- strict thread matches above, loose matches on Subject: below --
2003-12-31 19:43 Srikumar Subramanian
2003-12-31  5:22 Srikumar Subramanian
2003-12-31 12:12 ` Arjan van de Ven
2003-12-30  7:32 Srikumar Subramanian
2003-12-30 11:20 ` Andrew Morton

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).