Last Comment Bug 774243 - [Linux] Process name changes to RunProcess
: [Linux] Process name changes to RunProcess
Status: VERIFIED FIXED
: regression
Product: Core
Classification: Components
Component: General (show other bugs)
: Trunk
: x86_64 Linux
: -- normal with 2 votes (vote)
: mozilla17
Assigned To: Honza Bambas (:mayhemer)
:
Mentors:
Depends on:
Blocks: 720778
  Show dependency treegraph
 
Reported: 2012-07-16 05:48 PDT by Honza Bambas (:mayhemer)
Modified: 2012-08-18 11:12 PDT (History)
10 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
unaffected
fixed
verified


Attachments
v1 (2.67 KB, patch)
2012-07-16 07:00 PDT, Honza Bambas (:mayhemer)
benjamin: review+
gavin.sharp: approval‑mozilla‑aurora+
honzab.moz: checkin+
Details | Diff | Review

Description Honza Bambas (:mayhemer) 2012-07-16 05:48:35 PDT
+++ This bug was initially created as a clone of Bug #765158 +++

Worth a new bug.

I don't think this is related to thread naming, but cannot confirm atm.  I will look at this soon.

(In reply to Tony Mechelynck [:tonymec] from Bug #765158 comment #21)
> (In reply to omeringen from Bug #765158 comment #20)
> > Thanks for the fix it looks fine but i've just realized that thread name
> > becomed "Runprocess" somehow. Restarted Firefox, it's fine now. I'm gonna
> > try to find a way to repoduce it.
> 
> Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/16.0 Firefox/16.0
> SeaMonkey/2.13a1 ID:20120715003006 CSet: a52505700b63
> 
> Here too, I see the SeaMonkey executable process change name from
> seamonkey-bin to (ultimately) RunProcess, as in my earlier comment #12 and
> as Firefox did for ttaubert in comment #1. I just did the following while
> the above build (the one I use to type this comment, almost 3 days later
> than comment #17) was running:
> 
> linux:~ # echo $(pidof seamonkey)
> 14173
> linux:~ # ps -l 14173
> F S   UID   PID  PPID  C PRI  NI ADDR SZ WCHAN  TTY        TIME CMD
> 4 S     0 14173 14171 27  80   0 - 481601 -     ?         95:57 seamonkey -P
> default
> linux:~ # ps -l --pid 14173
> F S   UID   PID  PPID  C PRI  NI ADDR SZ WCHAN  TTY          TIME CMD
> 4 S     0 14173 14171 27  80   0 - 481729 -     ?        01:35:59 RunProcess
> linux:~ # ps -lC seamonkey,RunProcess
> F S   UID   PID  PPID  C PRI  NI ADDR SZ WCHAN  TTY          TIME CMD
> 4 R     0 14173 14171 27  80   0 - 521555 -     ?        01:36:39 RunProcess
> 
> Notice the difference depending on calling with one PID (and no selection
> switch) or with a (singleton) list of PIDs (--pid). When selecting by
> program name (-C) on both "seamonkey" and "RunProcess", only the latter
> appears. When selecting on only "-C seamonkey" (not shown) ps outputs only
> column headings, no processes.
> 
> The PPID points to the script which I use to start SeaMonkey with the
> correct profile and logfile, as follows:
> 
> linux:~ # ps -l 14171
> F S   UID   PID  PPID  C PRI  NI ADDR SZ WCHAN  TTY        TIME CMD
> 1 S     0 14171     1  0  80   0 -  3270 wait   ?          0:00 /bin/bash
> /usr/local/bin/start-sm-all
> linux:~ # cat /usr/local/bin/start-sm-all
> #!/bin/bash
> (date && seamonkey -P default) >> ~/seamonkey.log 2>&1 &
Comment 1 Mike Hommey [:glandium] 2012-07-16 05:53:15 PDT
It has everything to do with thread naming:
http://mxr.mozilla.org/mozilla-central/source/xpcom/threads/nsProcessCommon.cpp#225
Comment 2 Honza Bambas (:mayhemer) 2012-07-16 05:58:48 PDT
(In reply to Mike Hommey [:glandium] from comment #1)
> It has everything to do with thread naming:
> http://mxr.mozilla.org/mozilla-central/source/xpcom/threads/nsProcessCommon.
> cpp#225

Ha!  Thanks.  I will fix this... not sure how this snippet got to this place...
Comment 3 Mike Hommey [:glandium] 2012-07-16 06:05:58 PDT
(In reply to Honza Bambas (:mayhemer) from comment #2)
> Ha!  Thanks.  I will fix this... not sure how this snippet got to this
> place...

You added it in bug 720778 ;)
Comment 4 Mike Hommey [:glandium] 2012-07-16 06:07:41 PDT
(In reply to Mike Hommey [:glandium] from comment #3)
> (In reply to Honza Bambas (:mayhemer) from comment #2)
> > Ha!  Thanks.  I will fix this... not sure how this snippet got to this
> > place...
> 
> You added it in bug 720778 ;)

legitimately, i must add, except the Monitor function is sometimes called in a separate thread, and sometimes not.
Comment 5 Honza Bambas (:mayhemer) 2012-07-16 07:00:29 PDT
Created attachment 642571 [details] [diff] [review]
v1

I'll submit a try build links soon.
Comment 6 Honza Bambas (:mayhemer) 2012-07-16 07:04:50 PDT
Here soon (hour) will be build to test: http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/honzab.moz@firemni.cz-5a536d9749a9
Comment 7 Honza Bambas (:mayhemer) 2012-07-16 07:05:33 PDT
(In reply to Honza Bambas (:mayhemer) from comment #6)
> Here soon (hour) will be build to test:
> http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/honzab.moz@firemni.
> cz-5a536d9749a9

Sorry, bad link, this is the one: 
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/honzab.moz@firemni.cz-686dc670b21c
Comment 8 Tony Mechelynck [:tonymec] 2012-07-16 16:35:25 PDT
(In reply to Honza Bambas (:mayhemer) from comment #7)
> (In reply to Honza Bambas (:mayhemer) from comment #6)
> > Here soon (hour) will be build to test:
> > http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/honzab.moz@firemni.
> > cz-5a536d9749a9
> 
> Sorry, bad link, this is the one: 
> http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/honzab.moz@firemni.
> cz-686dc670b21c

The x86_64 build in that try set, when started in a new profile, appears in top as "firefox", alongside RunProcess (which is my SeaMonkey nightly). I selected processes with a -C list including firefox, seamonkey, RunProcess, bash, and several other names.

Opening http://www.rtbf.be/radio/liveradio/lapremiere (a radio station, available as both FM and web radio) in a new tab opened a new "plugin-container" process but its parent process remained "firefox".
Comment 10 Honza Bambas (:mayhemer) 2012-07-31 12:03:54 PDT
https://tbpl.mozilla.org/?tree=Try&rev=6c65467433ca
Comment 11 Ed Morley [:emorley] 2012-08-01 02:54:05 PDT
https://hg.mozilla.org/mozilla-central/rev/7ab3af6a212d
Comment 12 Tony Mechelynck [:tonymec] 2012-08-01 12:12:09 PDT
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Firefox/17.0 SeaMonkey/2.14a1 ID:20120801032540 c-c: 54f3c239ef7a m-c: f6daa7cc4dd9

Process is now listed as "seamonkey" where it was "RunProcess" with the nightly (which was built from m-c e5000bb5fa03, i.e. without the fix), as follows:
- "COMMAND" column from "top" utility
- "CMD" column from ps -l --pid <PID>, where <PID> is the PID found with top.

I'm not setting VERIFIED yet because I haven't checked Firefox.
Comment 13 Mike Hommey [:glandium] 2012-08-12 02:45:41 PDT
Comment on attachment 642571 [details] [diff] [review]
v1

[Approval Request Comment]
Regression caused by bug 720778/bug 765158
User impact if declined: On Linux, Firefox appears as "RunProcess" in system process management tools such as ps or top, under some circumstances.
Testing completed (on m-c, etc.): On m-c for 10 days.
Risk to taking this patch (and alternatives if risky): Low
String or UUID changes made by this patch: None
Comment 14 omeringen 2012-08-12 03:15:39 PDT
i haven't seen any issue since patch landed.
Comment 15 Mike Hommey [:glandium] 2012-08-12 23:48:28 PDT
https://hg.mozilla.org/releases/mozilla-aurora/rev/6de83f12aa1d
Comment 16 Tony Mechelynck [:tonymec] 2012-08-18 11:08:31 PDT
Setting VERIFIED on the basis of:
- comment #12 for SeaMonkey on Linux64
- comment #14 for Firefox on Linux (32? or 64?)
- no adverse comments since the fix landed
Comment 17 Tony Mechelynck [:tonymec] 2012-08-18 11:10:19 PDT
Don't know why the tracking flags went away… :-?

Note You need to log in before you can comment on or make changes to this bug.