pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Firefox leaks ksems, eventually hitting open file limits



Hi,

On some websites (open any stream on twitch.tv, wait 10 minutes), I
eventually get:

###!!! [Parent][DispatchAsyncMessage] Error: SHMEM_CREATED_MESSAGE Payload error: message could not be deserialized

Crash Annotation GraphicsCriticalError: |[C0][GFX1-]: Failed to lock new back buffer. (t=353.405) |[C6106][GFX1-]: Failed to lock new back buffer. (t=510.238) |[C6107][GFX1-]: Failed to lock new back buffer. (t=510.238) |[C6108][GFX1-]: Failed to lock new back buffer. (t=510.238) |[C6109][GFX1-]: Failed to lock new back buffer. (t=510.239) |[C6110][GFX1-]: Failed to lock new back buffer. (t=510.239) |[C6111][GFX1-]: Failed to lock new back buffer. (t=510.258) |[C6112][GFX1-]: Failed to lock new back buffer. (t=510.258) |[C6113][GFX1-]: Failed to lock new back buffer. (t=510.259) |[C6114][GFX1-]: Failed to lock new back buffer. (t=510.259) |[C6115][GFX1-]: Failed to lock new back buffer. (t=510.259) |[C6116][GFX1-]: Failed to lock new back buffer. (t=510.261) |[C6117][GFX1-]: Failed to lock new back buffer. (t=510.261) |[C6103][GFX1-]: Failed to lock new back buffer. (t=510.21) |[C6104][GFX1-]: Failed to lock new back buffer. (t=510.238) |[C6105][GFX1-]: Failed to lock new back buffer. (t=510.238) [GFX1-]: FaiCrash Annotation GraphicsCriticalError: |[0][GFX1-]: Failed to create a valid ShmemTextureHost (t=355.545) |[12406][GFX1-]: Failed to create a valid ShmemTextureHost (t=512.379) |[12407]CP+[GFX1-]: Failed to lock new back buffer. (t=512.379) |[12408][GFX1-]: Failed to create a valid ShmemTextureHost (t=512.398) |[12409]CP+[GFX1-]: Failed to lock new back buffer. (t=512.398) |[12410][GFX1-]: Failed to create a valid ShmemTextureHost (t=512.398) |[12411]CP+[GFX1-]: Failed to lock new back buffer. (t=512.398) |[12412][GFX1-]: Failed to create a valid ShmemTextureHost (t=512.399) |[12413]CP+[GFX1-]: Failed to lock new back buffer. (t=512.399) |[12414][GFX1-]: Failed to create a valid ShmemTextureHost (t=512.399) |[12415]CP+[GFX1-]: Failed to lock new back buffer. (t=512.399) |[12416][GFX1-]: Failed to create a valid ShmemTextureHost (t=512.399) |[12417]CP+[GFX1-]: Failed to lock new back buffer. (t=512.399) |[12418][GFX1-]: Failed to create a valid ShmemTextureHost (t=512.401) |[12419][GFX1-]: Failed to create a valid ShmemTextureHost (t=512.401) |[12405]CP+[GFX1-]: Failed to lock new back buffer. (t=512.379) [GFX1-]: Failed to create a valid ShmemTextureHost
led to lock new back buffer.

Some ktracing later...

 29520  29520 firefox  open("/var/shm/.shmobj_org.mozilla.ipc.29520.31397", 0x400b02, 0x180) = 146
 29520  29520 firefox  unlink("/var/shm/.shmobj_org.mozilla.ipc.29520.31397") = 0
 29520  29520 firefox  ftruncate(0x92, 0, 0xcf000) Err#28 ENOSPC
 29520  29520 firefox  issetugid()                 = 0
 29520  29520 firefox  open(0x7f7fff660360, 0x400000, 0xff66037b) Err#24 EMFILE
 29520  29520 firefox  open(0x7f7fff660c20, 0x400000, 0x3a) Err#24 EMFILE
 29520  29520 firefox  open(0x7f7fff660c20, 0x400000, 0) Err#24 EMFILE
 29520  29520 firefox  getpid()                    = 29520, 24343
 29520  29520 firefox  write(0x2, 0x7f7fff660700, 0xbd) = 189
       "[Child 29520, Main Thread] WARNING: failed to set shm size: No space left on device: file /cvs/pkgsrc/www/firefox/work/firefox-77.0.1/ipc/chromium/src/base/shared_memory_posix.cc, line 252\n"
 29520  29520 firefox  close(0x92)                 = 0
 29520  29520 firefox  __clock_gettime50(0x3, 0x7f7fff661328) = 0
 29520  29520 firefox  write(0x1, 0x7f7fff660c30, 0x400) = 1024
       "Crash Annotation GraphicsCriticalError: |[C0][GFX1-]: Failed to lock new back buffer. (t=345.532) |[C12196][GFX1-]: Failed buffer for 18, 4498, 294, 718 (t=492.224) |[C12182][GFX1-]: Failed buffer for "
 29520  29520 firefox  write(0x1, 0x7f7fff660c30, 0x3a) = 58
       "95][GFX1-]: Failed buffer for 1, 50, 339, 847 (t=492.194) "

Doing this,

for i in `pgrep firefox`; do ls /proc/$i/fd/ |wc -l; echo $i; done

I can see that this starts happening when the magical number of '3404'
is hit. Almost all the open files are ksems.

Even though I bumped kern.maxfiles, it's still hitting the RLIMIT_NOFILE
hard limit on open descriptors.

Should I treat this as a resource leak rather than "limits are set too
low"? it seems to just add more and more, but it's just one website that
is quite intensive.


Home | Main Index | Thread Index | Old Index