Bug 502113 - Package libv4l add /usr path to /etc/ld.so.preload
Summary: Package libv4l add /usr path to /etc/ld.so.preload
Status: VERIFIED FIXED
Alias: None
Product: openSUSE 11.1
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Final
Hardware: All openSUSE 11.1
: P5 - None : Critical (vote)
Target Milestone: ---
Assignee: andrea florio
QA Contact: E-mail List
URL:
Whiteboard:
Keywords: beta_customer, dogfood
Depends on: 486710
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-08 11:17 UTC by Dr. Werner Fink
Modified: 2010-04-13 10:44 UTC (History)
9 users (show)

See Also:
Found By: Community User
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---
werner: SHIP_STOPPER+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dr. Werner Fink 2009-05-08 11:17:26 UTC
The package adds the line

  /usr/lib/libv4l/v4l2convert.so

to /etc/ld.so.preload which force *all* programs to preload
the v4l2convert.so module from /usr.  Beside the constricted
usage of v4l2convert.so for e.g. normal shells and system
programs like mount and ls this makes on systems having a
own /usr partition that the /usr is busy during shutdown!
Compare with bug #486710

IMHO this is a no-go and should be fixed not only for 11.1
and SLES11 but also for factory.

Beside this:  Michael? is there a way to switch off this preload for
all processes used for shutdown, that is /sbin/init, the programs
started by the boot script, and all other helpers.
Comment 1 Dr. Werner Fink 2009-05-08 11:44:57 UTC
From source code rtld.c:

  /* There usually is no ld.so.preload file, it should only be used
     for emergencies and testing.  So the open call etc should usually
     fail.  Using access() on a non-existing file is faster than using
     open().  So we do this first.  If it succeeds we do almost twice
     the work but this does not matter, since it is not for production
     use.  */

... v4l2convert.so is not for emergencies nor for testing. But
it can not be switched off in rtld.c.
Comment 2 Cristian Rodriguez 2009-05-08 11:47:10 UTC
uh ho. This is a truly no go, nasty bug.
Comment 3 Dr. Werner Fink 2009-05-08 12:09:42 UTC
It's a third party version of the package:

 * Wed Feb 18 2009 - Andrea Florio <andrea@links2linux.de>
 - added post script from drivers:webcam spec file
 - This package version adds v4l2convert.so to the list of automatically
   preloaded libraries.

hopefully andrea@links2linux.de is the same as andrea@opensuse.org
Comment 4 andrea florio 2009-05-08 15:09:41 UTC
Yes i'm the same one.

as you can read from the changelog, i just used the same script provided here:

https://build.opensuse.org/package/show?package=libv4l&project=drivers%3Awebcam

to allow to workaround easly to the gpscav webcam (kernel 2.6.27 only)

if any problem exist, just tell us, we will remove immediatly it.
Comment 5 Cristian Rodriguez 2009-05-08 15:16:40 UTC
Andrea: The problem is stated clearly on this report, _ALL_ applications are preloading /usr/lib/libv4l/v4l2convert.so !! you need to remove the workaround of find a different one..
Comment 6 andrea florio 2009-05-08 16:01:51 UTC
libv4l 0.5.9 - 10.pm.8 will fix it, sorry for any trouble, please be sure the same changes will be made on that package:

https://build.opensuse.org/package/show?package=libv4l&project=drivers%3Awebcam
Comment 7 Dr. Werner Fink 2009-05-08 16:09:59 UTC
The maintainers of

 https://rudin.suse.de:8894/package/show?package=libv4l&project=drivers%3Awebcam

are schaefer.frank@gmx.net, wstephenson@novell.com, dmacvicar@novell.com,
martin.lasarsch@novell.com,  awafaa@opensuse.org, pth@novell.com, and
bphilips@novell.com

please is anyone of those people such kind to remove the creation of
/usr/lib/libv4l/v4l2convert.so ... it breaks systems out there.
Comment 8 Frank Schäfer 2009-05-08 17:28:15 UTC
Ok, this workaround was too dirty...
It's been an enormous usability improvement for many drivers/applications, but of course: stability goes first !

Thanks for your report, updated packages (without permanent preloading) are on the way to repo drivers:webcam.
Comment 9 Frank Schäfer 2009-05-08 17:43:41 UTC
Fixed with packages libv4l-0.5.9-102.1 in repository drivers:webcam.
Comment 10 Cristian Rodriguez 2009-05-10 05:30:44 UTC
(In reply to comment #0)

> Beside this:  Michael? is there a way to switch off this preload for
> all processes used for shutdown, that is /sbin/init, the programs
> started by the boot script, and all other helpers.

IMHO programs in /bin or /sbin shouldnt be able to preload stuff from /usr...
Comment 11 Dr. Werner Fink 2009-05-11 07:12:59 UTC
FullACK ... it would be perfect to have a compiled in flag for the
binary to make the ld.so not to load such preloads.
Comment 12 Frank Schäfer 2009-05-11 09:02:23 UTC
I don't agree, general (compiled-in) deactivation of preloading would be a very bad idea, too.
Preloading is a really terrible but indispensable solution for many problems (e.g. in the v4l2 sector).
Of course, it's the result of wrong driver/application/interface design, but that's another discussion...

However, I agree that packages should not be allowed to enable permanent preolading (with ld.so.preload).
I think a proper solution would be do let the build-service stop packages from doing that. The rest should be up to the user.
Comment 13 Michael Matz 2009-05-11 10:19:08 UTC
Yep, no way am I going to cripple ld.so because of bad packages.
Agreement about a package build time check, though.