Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 381873 - www-plugins/nspluginwrapper-1.4.4-r1 makes glibc/portage unhappy during ebuild install
Summary: www-plugins/nspluginwrapper-1.4.4-r1 makes glibc/portage unhappy during ebuil...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-05 06:58 UTC by Matthew Marlowe (RETIRED)
Modified: 2012-04-16 04:10 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info output (emerge,4.97 KB, text/plain)
2011-09-08 21:40 UTC, Gokdeniz Karadag
Details
valgrind output for 'valgrind nspluginwrapper --list' (valgrind,6.43 KB, text/plain)
2011-09-08 21:43 UTC, Gokdeniz Karadag
Details
patch file from git (dlclose.patch,451 bytes, text/plain)
2011-09-08 23:43 UTC, Gokdeniz Karadag
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Marlowe (RETIRED) gentoo-dev 2011-09-05 06:58:34 UTC
I haven't spent any time tracking this down yet, but on my dev box, todays nightly emerge run hung/stuck forever with the last output being the install phase of nspluginwrapper with glibc being unhappy about it -- not sure if this is specific to my box or something unique about the latest ebuild bump:

>>> Completed installing nspluginwrapper-1.4.4-r1 into /var/tmp/portage/www-plugins/nspluginwrapper-1.4.4-r1/image/

strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment
   usr/lib64/nspluginwrapper/x86_64/linux/npconfig
   usr/lib64/nspluginwrapper/x86_64/linux/npwrapper.so
   usr/lib64/nspluginwrapper/x86_64/linux/npplayer
   usr/lib64/nspluginwrapper/i386/linux/npviewer.bin
   usr/lib64/nspluginwrapper/i386/linux/libnoxshm.so

>>> Installing (4 of 10) www-plugins/nspluginwrapper-1.4.4-r1
 * Removing wrapper plugins...
*** glibc detected *** nspluginwrapper: double free or corruption (out): 0x0000000000631b50 ***
Comment 1 Gokdeniz Karadag 2011-09-06 22:59:18 UTC
I get the same error. It seems plugin listing and auto discovery options cause the error. The process hangs there (according to gdb, at function  __lll_lock_wait_private function of libc) and needs to be killed.

$ nspluginwrapper -l -v" 
/usr/lib/firefox/plugins/npwrapper.libflashplayer.so
  Original plugin: //opt/Adobe/flash-player32/plugin/libflashplayer.so
  Plugin viewer: /usr/lib64/nspluginwrapper/i386/linux/npviewer
  Wrapper version string: 1.4.4-1
*** glibc detected *** nspluginwrapper: double free or corruption (out): 0x0000000001eee920 ***



$ nspluginwrapper -v -a -u 
Auto-update plugins from /usr/lib/mozilla/plugins
Looking for plugins in /usr/lib/mozilla/plugins
Auto-update plugins from /usr/lib64/mozilla/plugins
Looking for plugins in /usr/lib64/mozilla/plugins
Auto-update plugins from /usr/lib/firefox/plugins
Looking for plugins in /usr/lib/firefox/plugins
Update plugin /usr/lib/firefox/plugins/npwrapper.libflashplayer.so
  NPAPI plugin //opt/Adobe/flash-player32/plugin/libflashplayer.so is already installed system-wide, removing wrapper
Remove plugin /usr/lib/firefox/plugins/npwrapper.libflashplayer.so
*** glibc detected *** nspluginwrapper: double free or corruption (out): 0x0000000000b00950 ***


Wheras the follwing command succesds
$ nspluginwrapper -v -u /usr/lib/firefox/plugins/npwrapper.libflashplayer.so
Update plugin /usr/lib/firefox/plugins/npwrapper.libflashplayer.so
  NPAPI plugin //opt/Adobe/flash-player32/plugin/libflashplayer.so is already installed system-wide, removing wrapper
Remove plugin /usr/lib/firefox/plugins/npwrapper.libflashplayer.so
Comment 2 Patrick McLean gentoo-dev 2011-09-06 23:30:40 UTC
Interesting, could you please post emerge --info I am going to add upstream to the CC on this to see if they have any insight.
Comment 3 David Benjamin 2011-09-06 23:45:19 UTC
Can you run the command under valgrind? There's a memory problem, so it may give something useful. I've rarely had much luck with gdb in such cases, as the offending clobber tends to happen earlier than it's detected.

If it comes from listing and auto-discovery, my guess would be that this comes from calling dlclose in is_wrapper_plugin. Many libraries are buggy and cannot be safely unloaded; if you look at just about any browser, they intentionally leak plugin handles on Linux. You may have a plugin installed which loads a buggy library. (For instance, if you have kopete installed, you get a skypebuttons.so plugin which pulls in Qt. On dlclose, you get a spurious pthread_key_delete(0). I don't think the fix for that is landing until 4.8, but I could be wrong.)

I removed a similar call in nspluginplayer before. I'll do the same here for the next release. (That code also shouldn't dlopen everything, or at least do so less frequently, but that's a much more involved fix to a very nasty file.)
Comment 4 Gokdeniz Karadag 2011-09-08 21:40:26 UTC
Created attachment 285893 [details]
emerge --info output
Comment 5 Gokdeniz Karadag 2011-09-08 21:43:32 UTC
Created attachment 285895 [details]
valgrind output for 'valgrind nspluginwrapper --list'
Comment 6 David Benjamin 2011-09-08 21:45:19 UTC
Yeah, I bet it's the dlclose thing. Does it still happen if you apply this patch?

https://github.com/davidben/nspluginwrapper/commit/f3c2b2d1f5ee558ad2f3c7830821d591c8a0f440
Comment 7 Gokdeniz Karadag 2011-09-08 23:42:57 UTC
(In reply to comment #6)
> https://github.com/davidben/nspluginwrapper/commit/f3c2b2d1f5ee558ad2f3c7830821d591c8a0f440

Yes the patch fixes the issue.
Comment 8 Gokdeniz Karadag 2011-09-08 23:43:35 UTC
Created attachment 285903 [details]
patch file from git
Comment 9 Patrick McLean gentoo-dev 2012-04-16 04:10:45 UTC
Fixed in www-plugins/nspluginwrapper-1.4.4-r2 with the attached patch.