Bug 156889 - www/firefox36: firefox 3.6.17 eats cpu on current/x64
Summary: www/firefox36: firefox 3.6.17 eats cpu on current/x64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-gecko (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-08 19:10 UTC by Poul-Henning Kamp
Modified: 2011-10-24 12:18 UTC (History)
0 users

See Also:


Attachments
nspr-pollhup.patch (562 bytes, patch)
2011-09-04 18:01 UTC, Andriy Gapon
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Poul-Henning Kamp 2011-05-08 19:10:09 UTC
	Firefox 3.6.17 spins and eats CPU on current/x64

	As far as I can tell, the trouble is a poll(2) which either
	is called with bad args, or returns success prematurely, causing
	firefox to spin on it.

	I have not been able to locate the offending poll in the
	firefox souce-code.

	This may be a kernel bug, but I have made this PR "ports" because
	I think it needs to be investigated from the firefox port.

	The machine does not have java installed.

	I have not discovered similar problems in any other program (yet)

How-To-Repeat: 
	Install it, start it, observe system stats:

|    14 users    Load  2.30  2.17  1.79                  May  8 17:38
| 
| Mem:KB    REAL            VIRTUAL                       VN PAGER   SWAP PAGER
|         Tot   Share      Tot    Share    Free           in   out     in   out
| Act  703620   19248  4613700    22928 1677300  count
| All  847408   21984 1078509k    49820          pages
| Proc:                                                            Interrupts
|   r   p   d   s   w   Csw  Trp  Sys  Int  Sof  Flt    434 cow    1219 total
|   2         140      3910 3985   1M 1219  200 2940   2157 zfod        atkbd0 1
|                                                           ozfod       acpi0 9
| 71.5%Sys   0.0%Intr 19.9%User  0.0%Nice  8.6%Idle        %ozfod    80 psm0 12
| |    |    |    |    |    |    |    |    |    |    |       daefr    12 ath0 uhci3
| ====================================>>>>>>>>>>       1165 prcfr     2 ehci1 19
|                                        182 dtbuf     1603 totfr  1123 hpet0 uhci
| Namei     Name-cache   Dir-cache    141202 desvn          react     2 vgapci0
|    Calls    hits   %    hits   %     33259 numvn          pdwak
|     5200    5184 100       1   0     12625 frevn          pdpgs
|                                                           intrn
| Disks   ad4   da0   cd0 pass0 pass1                473588 wire
| KB/t  16.00  0.00  0.00  0.00  0.00                396112 act
| tps       7     0     0     0     0               1375344 inact
| MB/s   0.11  0.00  0.00  0.00  0.00                  3536 cache
| %busy     0     0     0     0     0               1674152 free
|                                                   417536 buf

Note 1M syscalls/sec

|last pid: 35194;  load averages:  1.90,  2.06,  1.80    up 0+01:57:12  17:40:57
|138 processes: 2 running, 134 sleeping, 2 zombie
|CPU: 14.6% user,  0.0% nice, 42.1% system,  0.2% interrupt, 43.1% idle
|Mem: 382M Active, 1341M Inact, 463M Wired, 3552K Cache, 408M Buf, 1641M Free
Swap: 
|
|  PID USERNAME    THR PRI NICE   SIZE    RES STATE   C   TIME   WCPU COMMAND   
| 2840 phk          13  24    0   554M   355M uwait   1 107:28 100.78% firefox-b
| 2688 phk           1  20    0   491M   414M select  0   0:53  0.10% Xorg
| 3504 root          1  20    0 45172K  3716K select  1   0:12  0.00% ppp
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2011-05-10 20:15:16 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gecko

Fix synopsis and assign.
Comment 2 Andriy Gapon freebsd_committer 2011-09-04 18:01:16 UTC
I think that the attached patch should resolve the issue.
Please see the following thread for more details:
http://article.gmane.org/gmane.os.freebsd.devel.gecko/1152
Looks like the upstream may benefit from the patch as well.

-- 
Andriy Gapon
Comment 3 dfilter service freebsd_committer 2011-09-10 11:35:19 UTC
flo         2011-09-10 10:35:10 UTC

  FreeBSD ports repository

  Modified files:
    devel/nspr           Makefile 
  Added files:
    devel/nspr/files     patch-bugzilla-684758 
  Log:
  add a patch which prevents firefox from using 100% cpu.
  
  FreeBSD sets POLLHUP in case a connect failed and the socket has never been
  connected. NSPR should also check for this.
  
  The patch has already been committed upstream. Bugzilla ID 684758
  
  PR:             ports/156889
  Analyzed by:    avg
  Patch by:       avg
  Approved by:    kwm
  
  Revision  Changes    Path
  1.45      +1 -0      ports/devel/nspr/Makefile
  1.1       +11 -0     ports/devel/nspr/files/patch-bugzilla-684758 (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 Florian Smeets freebsd_committer 2011-09-10 11:37:44 UTC
State Changed
From-To: open->feedback

This should be fixed by nspr-4.8.8_1.
Comment 5 Florian Smeets freebsd_committer 2011-10-24 12:18:19 UTC
State Changed
From-To: feedback->closed

This was fixed by nspr-4.8.8_1.