[Opera-Linux] What's with all the "pipe" FDs in Opera?

Eirik Byrkjeflot Anonsen eirik at opera.com
Mon Jun 29 07:34:48 UTC 2009


Kenneth Crudup <kenny at panix.com> writes:

> On Fri, 26 Jun 2009, Eirik Byrkjeflot Anonsen wrote:
>
>> Even with plug-ins active (which your next post may indicate they are
>> after all...) it's hard to see any reason to create so many of them.
>
> Well, last night, I could browse. Went to bed, can't go anywhere (stuck
> in "Completed request to <site>". Check on the open files, and get:
>
> ----
> $ sudo lsof -p 25529 | egrep 'pipe$' | wc -l
> 108

Urgh.

> $ sudo lsof -p 25529 | fgrep /home/kenny/.opera/cache | wc -l
> 773

Mind-boggling.

It certainly seems we aren't closing files correctly (at least
sometimes).

[...]
>> Maybe if we are spawning new pluginwrappers and fail to kill off the old
>> pipes.  That would create two new pipes every time, I guess.
>
> What's funny is I see an operapluginwrapper running, which as I'd pointed
> out in that other E-mail, shouldn't be happnening if plugins aren't turned
> on, right?

Agreed.  That does sound strange.  Have you tried running with a clean
--personaldir and see if the same thing happens?

>
>> Open files is even harder to understand.  Even if we fail to set
>> CLOEXEC, the file descriptor in the origin process should be closed and
>> gone when we close the file.  So that sounds like we're not closing the
>> files properly.  Which is really strange.
>
> Yabbut the open cache files are in the opera process themselves, not the
> plugin wrappers, right? The operapluginwrappers never have many files open
> nor misbehave, for that matter (in fact, I haven't seen any runaway
> pluginwrappers (spinning in a tight loop with 98% CPU) in a long while).

Well, if a process opens a file, then forks and execs, the file will be
open in both processes, unless close-on-exec is set on the file
descriptor.  But if you don't see many files in any operapluginwrapper,
we've probably got that one worked out right.  And anyway even if we got
that wrong, it would only mean lots of open files in the pluginwrapper,
not in the opera process (assuming we close the files correctly in the
opera process).

>> I don't suppose you have any way to reliably reproduce?  And even less a
>> way to have us reproduce it?
>
> Well, I guess I could send one of you guys privately one of my saved opera
> session files and my opera6.ini; that should help with this (even if you
> get a look into the way my mind works :)

I'll leave that to the people actually working on the desktop browser :)

eirik


More information about the Opera-Linux mailing list