Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.development.apps > #179

Re: Application process starts multiple times

From Grant Edwards <invalid@invalid.invalid>
Newsgroups comp.os.linux.development.apps
Subject Re: Application process starts multiple times
Date 2011-07-15 14:25 +0000
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <ivpikr$i4i$1@reader1.panix.com> (permalink)
References <e5c7658e-bea3-493e-a325-7d2c15d79a35@d14g2000yqb.googlegroups.com> <87d3hb4p2j.fsf@araminta.anjou.terraraq.org.uk>

Show all headers | View raw


On 2011-07-15, Richard Kettlewell <rjk@greenend.org.uk> wrote:
> "elonica.pl" <bartlomiej.grzeskowiak@gmail.com> writes:
>> I'm porting C++ application from ARM to MIPS platform. It works now,
>> but I'm facing some strange timing problems. I've seen now that My app
>> process is called multiply time. Here is "top" output:
>>
>> Mem: 24592K used, 102084K free, 0K shrd, 0K buff, 16864K cached
>> CPU: 0% usr 99% sys 0% nice 0% idle 0% io 0% irq 0% softirq
>> Load average: 4.02 2.17 0.95
>> PID PPID USER STAT VSZ %MEM %CPU COMMAND
>> 1888 1875 admin R 12096 10% 98% ./my_app.exe
>> 1897 1875 admin R 12096 10% 1% ./my_app.exe
>> 1894 1893 admin R 1768 1% 0% top
>> 1877 1875 admin S 12096 10% 0% ./my_app.exe
>> 1923 1875 admin S 12096 10% 0% ./my_app.exe
>> 1874 1187 admin S 12096 10% 0% ./my_app.exe
>> 1876 1875 admin R 12096 10% 0% ./my_app.exe
>> 1926 1875 admin S 12096 10% 0% ./my_app.exe
>> 1921 1875 admin S 12096 10% 0% ./my_app.exe
>> 1922 1875 admin S 12096 10% 0% ./my_app.exe
>> 1925 1875 admin S 12096 10% 0% ./my_app.exe
>> 1884 1875 admin S 12096 10% 0% ./my_app.exe
>> 1920 1875 admin S 12096 10% 0% ./my_app.exe
>> 1890 1875 admin R 12096 10% 0% ./my_app.exe
>> 1891 1875 admin S 12096 10% 0% ./my_app.exe
>> 1875 1874 admin S 12096 10% 0% ./my_app.exe
>> 1889 1875 admin R 12096 10% 0% ./my_app.exe
>> 1924 1875 admin S 12096 10% 0% ./my_app.exe
>> 1896 1875 admin S 12096 10% 0% ./my_app.exe
>> 1892 1875 admin S 12096 10% 0% ./my_app.exe
>>
>> I don't see something like this when I compile it for x86, nor ARM.
>> On MIPS I use uClibc instead of glibc.
>>
>> Does someone know the reason, or can give some hints ?
>
> At a guess, your process is multithreaded and the version of ps you have
> on your MIPS platform doesn't know how to tell the difference between
> threads and processes.

Indeed.  Until recently uClibc didn't support NPTL and used the older
LinuxThreads library.  One side effect of this is that each thread
shows up in the output of programs like "ps" and "top".  [There's also
an extra "manager" thread that's part of the overhead of
linuxthreads.]

-- 
Grant Edwards               grant.b.edwards        Yow! Hello, GORRY-O!!
                                  at               I'm a GENIUS from HARVARD!!
                              gmail.com            

Back to comp.os.linux.development.apps | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Application process starts multiple times "elonica.pl" <bartlomiej.grzeskowiak@gmail.com> - 2011-07-15 06:13 -0700
  Re: Application process starts multiple times Richard Kettlewell <rjk@greenend.org.uk> - 2011-07-15 15:05 +0100
    Re: Application process starts multiple times Grant Edwards <invalid@invalid.invalid> - 2011-07-15 14:25 +0000
      Re: Application process starts multiple times "elonica.pl" <bartlomiej.grzeskowiak@gmail.com> - 2011-07-18 01:32 -0700
        Re: Application process starts multiple times "elonica.pl" <bartlomiej.grzeskowiak@gmail.com> - 2011-07-19 06:01 -0700

csiph-web