Closed Bug 1438486 Opened 6 years ago Closed 6 years ago

Corrupt /proc cmdline on Linux

Categories

(Firefox :: General, defect)

58 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1373157

People

(Reporter: be, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/64.0.3282.140 Chrome/64.0.3282.140 Safari/537.36

Steps to reproduce:

Check ouf the middle of the below blob. Lots of garbage.

$ cat /proc/2764/cmdline | xxd
00000000: 2f75 7372 2f6c 6962 2f66 6972 6566 6f78  /usr/lib/firefox
00000010: 2f66 6972 6566 6f78 002d 636f 6e74 656e  /firefox.-conten
00000020: 7470 726f 6300 2d63 6869 6c64 4944 0031  tproc.-childID.1
00000030: 002d 6973 466f 7242 726f 7773 6572 002d  .-isForBrowser.-
00000040: 696e 7450 7265 6673 0035 3a35 307c 363a  intPrefs.5:50|6:
00000050: 2d31 7c31 383a 307c 3238 3a31 3030 307c  -1|18:0|28:1000|
00000060: 3334 3a32 307c 3335 3a35 7c33 363a 3130  34:20|35:5|36:10
00000070: 7c34 353a 3132 387c 3436 3a31 3030 3030  |45:128|46:10000
00000080: 7c35 313a 307c 3533 3a34 3030 7c35 343a  |51:0|53:400|54:
00000090: 317c 3535 3a30 7c35 363a 307c 3631 3a30  1|55:0|56:0|61:0
000000a0: 7c36 323a 3132 307c 3633 3a31 3230 7c39  |62:120|63:120|9
000000b0: 393a 327c 3130 303a 317c 3131 353a 3530  9:2|100:1|115:50
000000c0: 3030 7c31 3235 3a30 7c31 3237 3a30 7c31  00|125:0|127:0|1
000000d0: 3338 3a31 3030 3030 7c31 3538 3a32 347c  38:10000|158:24|
000000e0: 3135 393a 3332 3736 387c 3136 313a 307c  159:32768|161:0|
000000f0: 3136 323a 307c 3137 303a 357c 3137 343a  162:0|170:5|174:
00000100: 3130 3438 3537 367c 3137 353a 3130 307c  1048576|175:100|
00000110: 3137 363a 3530 3030 7c31 3738 3a36 3030  176:5000|178:600
00000120: 7c31 3739 3a34 7c31 3830 3a31 7c31 3838  |179:4|180:1|188
00000130: 3a32 307c 3139 313a 337c 3230 343a 3630  :20|191:3|204:60
00000140: 3030 307c 002d 626f 6f6c 5072 6566 7300  000|.-boolPrefs.
00000150: 313a 307c 323a 307c 343a 307c 3236 3a31  1:0|2:0|4:0|26:1
00000160: 7c32 373a 317c 3330 3a30 7c33 333a 317c  |27:1|30:0|33:1|
00000170: 3337 3a31 7c33 383a 307c 3339 3a30 7c34  37:1|38:0|39:0|4
00000180: 303a 307c 3433 3a31 7c34 343a 317c 3437  0:0|43:1|44:1|47
00000190: 3a30 7c34 383a 307c 3439 3a30 7c35 303a  :0|48:0|49:0|50:
000001a0: 307c 3532 3a30 7c35 373a 317c 3538 3a31  0|52:0|57:1|58:1
000001b0: 7c35 393a 307c 3630 3a31 7c36 343a 317c  |59:0|60:1|64:1|
000001c0: 3635 3a31 7c36 363a 307c 3637 3a31 7c36  65:1|66:0|67:1|6
000001d0: 383a 317c 3639 3a30 7c37 303a 317c 3733  8:1|69:0|70:1|73
000001e0: 3a30 7c37 343a 307c 3737 3a31 7c37 383a  :0|74:0|77:1|78:
000001f0: 317c 3832 3a31 7c38 333a 317c 3834 3a30  1|82:1|83:1|84:0
00000200: 7c38 353a 307c 3836 3a30 7c38 383a 307c  |85:0|86:0|88:0|
00000210: 3839 3a30 7c39 303a 317c 3931 3a31 7c39  89:0|90:1|91:1|9
00000220: 323a 317c 3935 3a31 7c39 363a 307c 3938  2:1|95:1|96:0|98
00000230: 3a30 7c31 3031 3a31 7c31 3032 3a30 7c31  :0|101:1|102:0|1
00000240: 3039 3a30 7c31 3134 3a30 7c31 3137 3a30  09:0|114:0|117:0
00000250: 7c31 3139 3a31 7c31 3230 3a31 7c31 3232  |119:1|120:1|122
00000260: 3a31 7c31 3236 3a30 7c31 3238 3a30 7c31  :1|126:0|128:0|1
00000270: 3330 3a30 7c31 3332 3a31 7c31 3333 3a31  30:0|132:1|133:1
00000280: 7c31 3339 3a31 7c31 3430 3a30 7c31 3431  |139:1|140:0|141
00000290: 3a31 7c31 3433 3a30 7c31 3536 3a30 7c31  :1|143:0|156:0|1
000002a0: 3537 3a30 7c31 3630 3a31 7c31 3633 3a30  57:0|160:1|163:0
000002b0: 7c31 3635 3a31 7c31 3637 3a31 7c31 3638  |165:1|167:1|168
000002c0: 3a30 7c31 3737 3a31 7c31 3832 3a30 7c31  :0|177:1|182:0|1
000002d0: 3833 3a30 7c31 3834 3a30 7c31 3835 3a31  83:0|184:0|185:1
000002e0: 7c31 3836 3a30 7c31 3837 3a30 7c31 3839  |186:0|187:0|189
000002f0: 3a31 7c31 3930 3a31 7c31 3933 3a31 7c31  :1|190:1|193:1|1
00000300: 3936 3a30 7c31 3937 3a30 7c31 3938 3a31  96:0|197:0|198:1
00000310: 7c31 3939 3a31 7c32 3030 3a30 7c32 3031  |199:1|200:0|201
00000320: 3a31 7c32 3032 3a31 7c32 3033 3a31 7c32  :1|202:1|203:1|2
00000330: 3035 3a30 7c32 3036 3a30 7c32 3038 3a30  05:0|206:0|208:0
00000340: 7c32 3137 3a31 7c32 3138 3a31 7c32 3139  |217:1|218:1|219
00000350: 3a30 7c32 3230 3a30 7c32 3231 3a30 7c00  :0|220:0|221:0|.
00000360: 2d73 7472 696e 6750 7265 6673 0033 3a37  -stringPrefs.3:7
00000370: 3b72 656c 6561 7365 7c39 373a 303b 7c31  ;release|97:0;|1
00000380: 3432 3a33 3b31 2e30 7c31 3534 3a33 3332  42:3;1.0|154:332
00000390: 3b20 c2a0 c2bc c2bd c2be c783 cb90 ccb7  ; ..............
000003a0: ccb8 d689 d68a d783 d7b4 d889 d88a d9aa  ................
000003b0: db94 dc81 dc82 dc83 dc84 e185 9fe1 85a0  ................
TRUNCATED (in case senstiive)
000004c0: bbbf efbc 8eef bc8f efbd a1ef bea0 efbf  ................
000004d0: b9ef bfba efbf bbef bfbc efbf bd7c 3135  .............|15
000004e0: 353a 343b 6869 6768 7c00 2d73 6368 6564  5:4;high|.-sched
000004f0: 756c 6572 5072 6566 7300 3030 3031 2c32  ulerPrefs.0001,2
00000500: 002d 6772 656f 6d6e 6900 2f75 7372 2f6c  .-greomni./usr/l
00000510: 6962 2f66 6972 6566 6f78 2f6f 6d6e 692e  ib/firefox/omni.
00000520: 6a61 002d 6170 706f 6d6e 6900 2f75 7372  ja.-appomni./usr
00000530: 2f6c 6962 2f66 6972 6566 6f78 2f62 726f  /lib/firefox/bro
00000540: 7773 6572 2f6f 6d6e 692e 6a61 002d 6170  wser/omni.ja.-ap
00000550: 7064 6972 002f 7573 722f 6c69 622f 6669  pdir./usr/lib/fi
00000560: 7265 666f 782f 6272 6f77 7365 7200 3237  refox/browser.27
00000570: 3030 0074 7275 6500 7461 6200            00.true.tab.


Actual results:

A lot of garbage in the result, affecting output of "ps", "top" etc.


Expected results:

The garbage should not be there.
Example from ps output:

0|157:0|160:1|163:0|165:1|167:1|168:0|177:1|182:0|183:0|184:0|185:1|186:0|187:0|189:1|190:1|193:1|196:0|197:0|198:1|199:1|200:0|201:1|202:1|203:1|205:0|206:0|208:0|217:1|218:1|219:0|220:0|221:0| -stringPrefs 3:7;release|97:0;|142:3;1.0|154:332;  ¼½¾ǃː??։֊׃״؉؊٪۔܁܂܃܄ᅟ᜵           ???‐’․‧??????? ‹›⁁⁄⁒ ⅓⅔...?⅜⅝⅞⅟∕∶⎮╱⧶⧸⫻⫽⿰⿱...⿵⿶...㎯㏆㏟꞉︔︕︿﹝﹞?./。ᅠ???�|155:4;high| -schedulerPrefs 0001,2 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser
Moving from Untriaged to General.
Component: Untriaged → General
I think Nick was the one who implemented these long command line parameters. What do you think?
Flags: needinfo?(n.nethercote)
Nope... I'm the one who fixed it :)

Details here: https://blog.mozilla.org/nnethercote/2018/02/22/nicer-commands-for-content-processes/
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Flags: needinfo?(n.nethercote)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.