Memory leak in uClinux 2.4.24

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Memory leak in uClinux 2.4.24

Petersen, Joel  (GE Healthcare)
Hello
 
I have a system using uClinux 2.4.24 on Coldfire 5282, slaved to a host PC. I was investigating a problem when I found that the way I was setting the system date and time from the host PC with my application generated a memory leak. The application memory space grows by 96 bytes on every call. I can't tell if the memory leak is the problem I'm chasing, but I want to fix the leak.
 
The call I use is:
    sprintf(msg, "busybox date %s", dateTimeStr);
    system(msg);
 
For testing, I changed the call to:
    system("busybox echo test");
and I still saw the memory leak.
 
It looks like calling busybox is the problem. Upgrading uClinux (e.g. to 2.6.x) is not an option. I took a look at moving the busybox date source to my application, but found that the stime( ) call wouldn't run in user space.
 
1. Is this a known bug in busybox?
2. Am I invoking busybox wrong?
3. Is there an alternative way to set the date and time?
4. I have my own drivers. Can I set date and time from a driver?
 
Thanks in advance.

Joel Petersen

GE Healthcare

 

 
[hidden email] Send a post to the list. [hidden email] Join the list. [hidden email] Join the list in digest mode. [hidden email] Leave the list.
Reply | Threaded
Open this post in threaded view
|

RE: Memory leak in uClinux 2.4.24

Ken Kerr

We set the date as follows (no busybox) :

 

    sprintf(msg, "date %s", dateTimeStr);  where dateTimeStr = MMDDHHMMYYYY

    system(msg);

 

Ken Kerr

Synchrony, Inc

(540) 444-4226

 

This email may contain information that is proprietary, privileged, and/or confidential and is intended exclusively for the person(s) to whom it is addressed. Any use, copying, retention, or disclosure by any person other than the intended recipient or the intended recipient's designees is strictly prohibited. If you are not the intended recipient or their designee, please notify the sender immediately by return email and delete all copies of this email.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Petersen, Joel (GE Healthcare)
Sent: Monday, June 21, 2010 9:50 AM
To: Ken Kerr
Subject: [ColdFire] Memory leak in uClinux 2.4.24

 

Hello

 

I have a system using uClinux 2.4.24 on Coldfire 5282, slaved to a host PC. I was investigating a problem when I found that the way I was setting the system date and time from the host PC with my application generated a memory leak. The application memory space grows by 96 bytes on every call. I can't tell if the memory leak is the problem I'm chasing, but I want to fix the leak.

 

The call I use is:

    sprintf(msg, "busybox date %s", dateTimeStr);

    system(msg);

 

For testing, I changed the call to:

    system("busybox echo test");

and I still saw the memory leak.

 

It looks like calling busybox is the problem. Upgrading uClinux (e.g. to 2.6.x) is not an option. I took a look at moving the busybox date source to my application, but found that the stime( ) call wouldn't run in user space.

 

1. Is this a known bug in busybox?

2. Am I invoking busybox wrong?

3. Is there an alternative way to set the date and time?

4. I have my own drivers. Can I set date and time from a driver?

 

Thanks in advance.

Joel Petersen

GE Healthcare

 

 

[hidden email] Send a post to the list. [hidden email] Join the list. [hidden email] Join the list in digest mode. [hidden email] Leave the list.

[hidden email] Send a post to the list. [hidden email] Join the list. [hidden email] Join the list in digest mode. [hidden email] Leave the list.
Reply | Threaded
Open this post in threaded view
|

RE: Memory leak in uClinux 2.4.24

Petersen, Joel  (GE Healthcare)
I had built my kernel to use the busybox version of date, echo, and others. So "date" is the same as "busybox date." I tried it anyway to verify that the leak is there either way.
 
Joel


From: [hidden email] [mailto:[hidden email]] On Behalf Of Ken Kerr
Sent: Monday, June 21, 2010 9:06 AM
To: Petersen, Joel (GE Healthcare)
Subject: RE: [ColdFire] Memory leak in uClinux 2.4.24

We set the date as follows (no busybox) :

 

    sprintf(msg, "date %s", dateTimeStr);  where dateTimeStr = MMDDHHMMYYYY

    system(msg);

 

Ken Kerr

Synchrony, Inc

(540) 444-4226

 

This email may contain information that is proprietary, privileged, and/or confidential and is intended exclusively for the person(s) to whom it is addressed. Any use, copying, retention, or disclosure by any person other than the intended recipient or the intended recipient's designees is strictly prohibited. If you are not the intended recipient or their designee, please notify the sender immediately by return email and delete all copies of this email.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Petersen, Joel (GE Healthcare)
Sent: Monday, June 21, 2010 9:50 AM
To: Ken Kerr
Subject: [ColdFire] Memory leak in uClinux 2.4.24

 

Hello

 

I have a system using uClinux 2.4.24 on Coldfire 5282, slaved to a host PC. I was investigating a problem when I found that the way I was setting the system date and time from the host PC with my application generated a memory leak. The application memory space grows by 96 bytes on every call. I can't tell if the memory leak is the problem I'm chasing, but I want to fix the leak.

 

The call I use is:

    sprintf(msg, "busybox date %s", dateTimeStr);

    system(msg);

 

For testing, I changed the call to:

    system("busybox echo test");

and I still saw the memory leak.

 

It looks like calling busybox is the problem. Upgrading uClinux (e.g. to 2.6.x) is not an option. I took a look at moving the busybox date source to my application, but found that the stime( ) call wouldn't run in user space.

 

1. Is this a known bug in busybox?

2. Am I invoking busybox wrong?

3. Is there an alternative way to set the date and time?

4. I have my own drivers. Can I set date and time from a driver?

 

Thanks in advance.

Joel Petersen

GE Healthcare

 

 

[hidden email] Send a post to the list. [hidden email] Join the list. [hidden email] Join the list in digest mode. [hidden email] Leave the list.

[hidden email] Send a post to the list. [hidden email] Join the list. [hidden email] Join the list in digest mode. [hidden email] Leave the list. [hidden email] Send a post to the list. [hidden email] Join the list. [hidden email] Join the list in digest mode. [hidden email] Leave the list.
Reply | Threaded
Open this post in threaded view
|

RE: Memory leak in uClinux 2.4.24

Petersen, Joel  (GE Healthcare)
Upon further investigation, all of my system( ) calls leak. Not just the "busybox" ones.
 
Is this related to the shell I have installed? It's been a while since I configured the kernel so it'll take a while to figure out which one I have.
 
Joel


From: [hidden email] [mailto:[hidden email]] On Behalf Of Petersen, Joel (GE Healthcare)
Sent: Monday, June 21, 2010 12:43 PM
To: Petersen, Joel (GE Healthcare)
Subject: RE: [ColdFire] Memory leak in uClinux 2.4.24

I had built my kernel to use the busybox version of date, echo, and others. So "date" is the same as "busybox date." I tried it anyway to verify that the leak is there either way.
 
Joel


From: [hidden email] [mailto:[hidden email]] On Behalf Of Ken Kerr
Sent: Monday, June 21, 2010 9:06 AM
To: Petersen, Joel (GE Healthcare)
Subject: RE: [ColdFire] Memory leak in uClinux 2.4.24

We set the date as follows (no busybox) :

 

    sprintf(msg, "date %s", dateTimeStr);  where dateTimeStr = MMDDHHMMYYYY

    system(msg);

 

Ken Kerr

Synchrony, Inc

(540) 444-4226

 

This email may contain information that is proprietary, privileged, and/or confidential and is intended exclusively for the person(s) to whom it is addressed. Any use, copying, retention, or disclosure by any person other than the intended recipient or the intended recipient's designees is strictly prohibited. If you are not the intended recipient or their designee, please notify the sender immediately by return email and delete all copies of this email.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Petersen, Joel (GE Healthcare)
Sent: Monday, June 21, 2010 9:50 AM
To: Ken Kerr
Subject: [ColdFire] Memory leak in uClinux 2.4.24

 

Hello

 

I have a system using uClinux 2.4.24 on Coldfire 5282, slaved to a host PC. I was investigating a problem when I found that the way I was setting the system date and time from the host PC with my application generated a memory leak. The application memory space grows by 96 bytes on every call. I can't tell if the memory leak is the problem I'm chasing, but I want to fix the leak.

 

The call I use is:

    sprintf(msg, "busybox date %s", dateTimeStr);

    system(msg);

 

For testing, I changed the call to:

    system("busybox echo test");

and I still saw the memory leak.

 

It looks like calling busybox is the problem. Upgrading uClinux (e.g. to 2.6.x) is not an option. I took a look at moving the busybox date source to my application, but found that the stime( ) call wouldn't run in user space.

 

1. Is this a known bug in busybox?

2. Am I invoking busybox wrong?

3. Is there an alternative way to set the date and time?

4. I have my own drivers. Can I set date and time from a driver?

 

Thanks in advance.

Joel Petersen

GE Healthcare

 

 

[hidden email] Send a post to the list. [hidden email] Join the list. [hidden email] Join the list in digest mode. [hidden email] Leave the list.

[hidden email] Send a post to the list. [hidden email] Join the list. [hidden email] Join the list in digest mode. [hidden email] Leave the list. [hidden email] Send a post to the list. [hidden email] Join the list. [hidden email] Join the list in digest mode. [hidden email] Leave the list. [hidden email] Send a post to the list. [hidden email] Join the list. [hidden email] Join the list in digest mode. [hidden email] Leave the list.