Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(question): use with other browsers still limited to the NPAPI? #373

Open
RJVB opened this issue Feb 1, 2018 · 9 comments
Open

(question): use with other browsers still limited to the NPAPI? #373

RJVB opened this issue Feb 1, 2018 · 9 comments

Comments

@RJVB
Copy link

RJVB commented Feb 1, 2018

I was under the impression that a PPAPI/NPAPI bridge should work in all browsers that are still using the NPAPI protocol; Mozilla-based or WebKit based.

If so, any idea why my QtWebKit-based browsers do not see the plugin?

@RJVB
Copy link
Author

RJVB commented Feb 1, 2018

To answer my own question:

not loaded: /usr/lib/mozilla/plugins/libfreshwrapper-flashplayer.so because "Cannot load library /usr/lib/mozilla/plugins/libfreshwrapper-flashplayer.so: (dlopen: cannot load any more object with static TLS)"
not loaded: /usr/lib/mozilla/plugins/libfreshwrapper-flashplayer.so because "Cannot load library /usr/lib/mozilla/plugins/libfreshwrapper-flashplayer.so: (dlopen: cannot load any more object with static TLS)"

One way around that: LD_PRELOAD'ing the plugin. Then it works.

I tried converting ANGLE's TLS mechanism to C++11 thread_local but that didn't help, either because it uses the same mechanism behind the scenes, or because one of the numerous dependencies already saturated the TLS pool.

patch-cxx11-tls.txt

@i-rinat
Copy link
Owner

i-rinat commented Feb 3, 2018

Is there any easy way to get QtWebKit browser working for testing purposes?

I found nothing appropriate in Debian repositories. The one I hoped for was qutebrowser, which now uses qtwebengine, even if I install qtwebkit renderer package. Example app using PyQt5 doesn't load Flash plugin at all. Perhaps, I use it in a wrong way.

@RJVB
Copy link
Author

RJVB commented Feb 3, 2018 via email

@i-rinat
Copy link
Owner

i-rinat commented Feb 10, 2018

I tried to prototype patch here: https://github.com/i-rinat/freshplayerplugin/tree/dev-thread-local-to-gprivate. Is that enough to make error message go away? If that helps, I'll make another version, with single GPrivate instance. Documentation says they are very limited resources too.

By the way, I find that there is no "cannot load any more object with static TLS" string in glibc code anymore. There are some commented out lines in translation files, but original string from the code itself was deleted. I think, glibc 2.22 was the first release without that error message. Changelog mentions fixes related to TLS, so it may help to update glibc.

@RJVB
Copy link
Author

RJVB commented Feb 11, 2018 via email

@i-rinat
Copy link
Owner

i-rinat commented Feb 11, 2018

Did you see if they also removed the static table for TLS which is apparently the source of the whole problem?

I have no idea about how this all is working and what glibc does there. But here is that commit I was talking about: https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=f8aeae347377f3dfa8cbadde057adf1827fb1d44;hp=b97eb2bdb1ed72982a7821c3078be591051cef59.

@RJVB
Copy link
Author

RJVB commented Feb 11, 2018 via email

@i-rinat
Copy link
Owner

i-rinat commented Feb 11, 2018

Pushed modified patch to the master branch as ce233f6. Also, there no dev-thread-local-to-gprivate branch anymore, since it had essentially the same.

There are no .tdata nor .tbss sections in compiled binary, which were used for thread-local storage. So plugin should load without triggering the bug, unless some other library exhaust TLS storage. But in that case there is nothing can be done in freshplayerplugin.

@RJVB
Copy link
Author

RJVB commented Feb 19, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants