After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 142850 - GST-Register didn't find any plugins
GST-Register didn't find any plugins
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.8.1
Other Linux
: Normal major
: 0.8.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-05-20 16:16 UTC by Sebastian Werner
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.5/2.6


Attachments
gst-register run with debug level 5 (3.77 KB, text/plain)
2004-05-20 16:20 UTC, Sebastian Werner
  Details
trace output of gst-register (78.35 KB, text/plain)
2004-05-20 16:21 UTC, Sebastian Werner
  Details
gstreamer-0.8.1-reiser4.patch (463 bytes, patch)
2004-05-26 16:55 UTC, Ed Catmur
none Details | Review
gstreamer-0.8.1-reiser4.patch (684 bytes, patch)
2004-05-27 01:12 UTC, Ed Catmur
none Details | Review

Description Sebastian Werner 2004-05-20 16:16:37 UTC
> gst-register-0.8 
rebuilding global_registry (/var/lib/cache/gstreamer-0.8/registry.xml) 
rebuilding user_registry (/root/.gstreamer-0.8/registry.xml) 
loaded 0 plugins with 0 features 
 
I am using gentoo. All packages seems to compiled fine. The plugins are stored 
in /usr/lib/gstreamer-0.8. There are many of them installed. 
 
I could send you also an trace of gst-register or the output of gst-register 
in debug mode.
Comment 1 Sebastian Werner 2004-05-20 16:20:04 UTC
Created attachment 27879 [details]
gst-register run with debug level 5
Comment 2 Sebastian Werner 2004-05-20 16:21:06 UTC
Created attachment 27880 [details]
trace output of gst-register

Here you can see that it find the plugins but after this something seems to
goes wrong.
Comment 3 Ronald Bultje 2004-05-20 16:31:53 UTC
Please file such bugs on Gentoo's forum.

You've probably compiled GStreamer for a different prefix than where it is
installed.
Comment 4 Johan (not receiving bugmail) Dahlin 2004-05-21 14:45:05 UTC
Closing as INVALID.
Comment 5 Sebastian Werner 2004-05-21 17:26:03 UTC
Some additional note:

It seems to be not! gentoo specific. It works if I copy the plugins to an
ext2-partition and give gst-register the new path. It seems to be a problem with
the combination of gstreamer and reiser4.
Comment 6 Ronald Bultje 2004-05-21 18:21:29 UTC
Again, please discuss this on the Gentoo fora. There's expert people on those
that will be able to help you and explain you what's going on here. This is
*not* reiser-related and it's *not* a GStreamer bug. It's related to your
prefix, as I already noted earlier.

The main problem with this bug is that it takes up expensive developer time that
could better be spent on fixing actual and real bugs. ;). I'm sure you, as a
Gentoo user, can understand that. If it were an actual bug, the Gentoo experts
(on the Gentoo fora) would be able to help you get all the relevant information
related to this bug reports, and then to provide us with a very accurate,
confirmed and detailed bug report and report it upstream (here) for you; with
those detailed bug reports, we are also able to fix the bugs very efficiently.

This system assures that Gentoo bugs stay in the Gentoo camp and that GStreamer
bugs discovered by Gentoo people still get reported upstream in a very efficient
way. We all win by doing this.
Comment 7 Ed Catmur 2004-05-21 23:40:59 UTC
I can assure you that this is an actual bug.

# gst-register-0.8
rebuilding global_registry (/var/lib/cache/gstreamer-0.8/registry.xml)
rebuilding user_registry (/root/.gstreamer-0.8/registry.xml)
loaded 0 plugins with 0 features
# cd /usr/lib/
# cp -a gstreamer-0.8/ /dev/shm/
# mount --bind /dev/shm/gstreamer-0.8/ gstreamer-0.8
# gst-register-0.8
rebuilding global_registry (/var/lib/cache/gstreamer-0.8/registry.xml)
added plugin ac3parse with 1 feature(s)
added plugin alaw with 2 feature(s)
added plugin alsa with 3 feature(s)
added plugin gstaudio with 0 feature(s)
...

This quite clearly demonstrates that the problem is caused by the filesystem the
plugins are located on: the two invocations of gst-register-0.8 are executed in
otherwise identical situations.

It is unrelated to my prefix, as the very same plugin files (i.e. binary
identical) work when located on any filesystem other than reiser 4.
Comment 8 Sebastian Werner 2004-05-22 11:02:36 UTC
I have tried to setup a loop device formatted with ext2 and bind it to
/usr/lib/gstreamer-0.8. Then I reinstalled gstreamer and all plugins. This also
doesn't seem to work. It doesn't not seems to depend only on the used filesystem.
Comment 9 Joseph Yasi 2004-05-25 21:28:18 UTC
I also have the same problem.  I am running Slackware-current with reiser4. 
gst-register finds the directory of the plugins, but does not register any of
them.  I ran gst-register on another system and copied the registry over and
gstreamer worked.  It just couldn't register the plugins by itself.
Comment 10 Ronald Bultje 2004-05-26 15:40:47 UTC
I'll try to explain again.

I understand that you guys are having difficulties. I do not know what the
problem is (obviously - else I'd have fixed it already). However, it is not
absolutely sure that the problem is related to GStreamer. I *know* and *see*
that gst-register fails for you guys, but that's merely a *symptom*. I don't
know the *cause* yet.

Now, in order to find the cause, there will have to be some debugging,
trying-out-things, etc. It seems that this is reiser4-related, but it's also
reproduceable on loopback-ext2 devices (looped back to what base file system,
btw?). I see reports here from various distributions that have a variety of
packages/kernel versions installed, none of which is in any way reproduceable by
me, and *that* is why I am not directly able to provide any direct help here. In
order to fix it, I need to be able to reproduce it first.

Now, how can you guys help in fixing this. It requires some programming
knowledge. I want to ask you to add various g_print()s in places in
gstreamer/tools/gst-register.c to see what code is exactly being executed. A
"gst-register --gst-debug-level=5 &> log" would also help. Add g_print()s to the
dir_list for()-loop in main() and to the spawn_in_dir() function. If you don't
know what any of this means, then ask it on the Gentoo fora or on the Slackware
fora.

It would also help if you can reproduce this on a variety of kernel versions
(2.6.x, 2.4.x) or even base systems (preferrably something standard, like Suse
or Fedora). That helps in pinning down the problem and we might be able to help
in solving the problem then.

Hope this helps.
Comment 11 Ed Catmur 2004-05-26 16:42:03 UTC
OK, I've worked it out.

Remember that Reiser4 lets one open files as directories (this is in order to be
able to implement arbitrary extended attributes, ACLs, and alternate data streams).

gst/registries/gstxmlregistry.c @@ 1313:
static GList *
gst_xml_registry_rebuild_recurse (GstXMLRegistry * registry,
    const gchar * directory)
{
  GDir *dir;
  GList *ret = NULL;
  gint dr_len, sf_len;

  dir = g_dir_open (directory, 0, NULL);

  if (dir) {

The g_dir_open call always succeeds, so gst_xml_registry_rebuild_recurse tries
to recurse into the file-as-directory contents of the plugins.so instead of
loading them as plugins.
Comment 12 Ed Catmur 2004-05-26 16:55:40 UTC
Created attachment 28035 [details] [review]
gstreamer-0.8.1-reiser4.patch

Adds a call to g_file_test (directory, G_FILE_TEST_IS_DIR) - this will return
the expected result on all file systems. Moves call to g_dir_open (directory,
0, NULL) to inside if (g_file_test(directory, G_FILE_TEST_IS_DIR)) {.

This has been tested on a reiser4 filesystem, on reiser3 and on Linux 2.6
ramfs. In all cases plugins are loaded correctly.

At first glance there is not any nearby code that needs similar treatment.
Comment 13 Ed Catmur 2004-05-27 01:12:32 UTC
Created attachment 28060 [details] [review]
gstreamer-0.8.1-reiser4.patch

Previous patch would pass NULL to g_dir_read_name if the g_dir_open call
failed. This patch adds in an if (dir) to avoid that.
If applied, the indenting will need to be cleaned up to add another level of
indenting.
Comment 14 Benjamin Otte (Company) 2004-06-06 20:40:32 UTC
applied