~90% Segfault on startup (Gentoo, any of xbmc-9.04.1, SVN linuxport, SVN pvr-testing)
#1
Hi there,

I'm new to XBMC, but got some experience with Gentoo linux, which I'm running for years on my HTPC, and now, after upgrading my hardware platform and hearing about the possibility to have the best of both VDR and XBMC, I'm giving XBMC a try. XbmcLive-9.04.1 runs just fine booted from CD or from the USB hdd where I manually unsquashed it, but my goal is to have it running on Gentoo, first just as it is, then in combination with VDR. I'm trying to follow as close as possible the HOW-TO post about a problem in a useful manner, and provide the details of my problem:

Since there is no official ebuild for 9.04.1 or the pvr-testing branch yet, I adapted the latest ebuild, and compiled, but any of the versions (so 9.04.1 too) has the very same problem, they segfault at startup, and after many, many retries, XBMC eventually starts, then I could even make them play MP3 (but hear no menu sounds), only to make them crash again when trying to play video...

My hardware setup is as follows:
  • HTPC consists of MB: Asus M3N78-EM (with GeForce8300 IGP using 512MB of the 2GB system RAM), CPU: Athlon X2 5050E;
  • HDMI hooked to Full HD LCD-TV;
  • coaxial SPDIF hooked to external decoder/amp, since I could not convince the TV to passthrough the sound it gets via HDMI to the external amp.

Software setup:
I'm running just a i686 Gentoo-2008.0 architecture for now (not AMD64 yet), yet accepting "~x86" keywords globally (Gentoo folks know that means bleeding edge versions of everything, whith all the risks involved):
  • 2.6.30 kernel, SMP;
  • alsa-lib-1.0.20, compiled with DEBUG symbols;
  • XBMC is compiled by ebuild script, I'm starting it as the user 'vdr' with the homedir at /var/vdr if that path seems strange to somebody in the info I'm providing, getting the same produce a segmentation fault on startup with either official xbmc-9.04.1 sources, or SVN:21302 of the pvr-testing branch like you can see in the log on the pastebin;
Here is some ALSA-related stuff, since I want to use the separate SPDIF out, and the supported sampling rate seems to be 48kHz:
  • aplay -l
    Code:
    **** List of PLAYBACK Hardware Devices ****
    card 0: NVidia [HDA NVidia], device 0: ALC1200 Analog [ALC1200 Analog]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: NVidia [HDA NVidia], device 1: ALC1200 Digital [ALC1200 Digital]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
  • aplay -L
    Code:
    front:CARD=NVidia,DEV=0
        HDA NVidia, ALC1200 Analog
        Front speakers
    surround40:CARD=NVidia,DEV=0
        HDA NVidia, ALC1200 Analog
        4.0 Surround output to Front and Rear speakers
    surround41:CARD=NVidia,DEV=0
        HDA NVidia, ALC1200 Analog
        4.1 Surround output to Front, Rear and Subwoofer speakers
    surround50:CARD=NVidia,DEV=0
        HDA NVidia, ALC1200 Analog
        5.0 Surround output to Front, Center and Rear speakers
    surround51:CARD=NVidia,DEV=0
        HDA NVidia, ALC1200 Analog
        5.1 Surround output to Front, Center, Rear and Subwoofer speakers
    surround71:CARD=NVidia,DEV=0
        HDA NVidia, ALC1200 Analog
        7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
    iec958:CARD=NVidia,DEV=0
        HDA NVidia, ALC1200 Digital
        IEC958 (S/PDIF) Digital Audio Output
    hdmi:CARD=NVidia,DEV=0
        HDA NVidia, NVIDIA HDMI
        HDMI Audio Output
    null
        Discard all samples (playback) or generate zero samples (capture)
  • /etc/asound.conf
    Code:
    pcm.!default {
       type hw
       card 0
       device 1
    }
  • /var/vdr/.asoundrc
    Code:
    pcm.dmixer {
       type dmix
       ipc_key 1024
       ipc_key_add_uid false
       ipc_perm 0666
       slave {
          pcm "hw:0,1"
          rate 48000
          channels 6
          format S32_LE
          period_time 0
          period_size 1024
          buffer_time 0
          buffer_size 4096
       }
    }

    pcm.!default {
       type plug
       slave.pcm "dmixer"
    }
  • I read somewhere that XBMC will resample to 48kHz if one creates the file /var/vdr/.xbmc/userdata/advancedsettings.xml
    Code:
    <advancedsettings>
            <audio>
                    <resample>48000</resample>
            </audio>
    </advancedsettings>
  • This is just the <audiooutput> section of /var/vdr/.xbmc/userdata/guisettings.xml:
    Code:
    <audiooutput>
            <ac3passthrough>true</ac3passthrough>
            <audiodevice>iec958</audiodevice>
            <downmixmultichannel>false</downmixmultichannel>
            <dtspassthrough>true</dtspassthrough>
            <mode>1</mode>
            <passthroughdevice>iec958</passthroughdevice>
        </audiooutput>
Is there much more I forgot? Any clues on what's going wrong?

Cheers,
Zoolook
Reply
#2
I don't have much to suggest to you, but kudos for such a fantastic report regarding a segfault.

The backtrace is something that will likely be requested by the devs, though I don't know anything about it.

I think it's very odd that the segfault doesn't happen all the time, 100%. Just most of the time it crashes. Are you able to confirm that alsa is working 100% and that xbmc is configured to use a valid alsa device? Do you have the "speaker-test" application in your distribution?
Reply
#3
Hi Zoolook,

which graphiccard-driver do you use?

With menusounds try "default" in XBMCs menu in sound device.


Regards,
Patrick
XBMC 9.11 (SVN 28275) on minimal Ubuntu 9.04
on ZOTAC ION-A (Atom330 / 4GB / 250GB HDD / Atric Switch / Silverstone LC19 Case)
Reply
#4
like was said.. the backtrace would give a much better idea on where to look.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
He posted a backtrace here unless i'm misreading it. The problem it shows has historically been fixed by updating ALSA, but it'd appear that you're pretty bleeding edge in everything you have there (*cringes*).

Do you have any luck getting sound out of mplayer using the current ALSA you have?

It may be an idea to try an *older* version of ALSA?
Reply
#6
Hi there,

in the meantime, before reading any of your answers, I compiled another similar Gentoo (similar in installed packages and their versions) on another partition, but this time for the x86_64 architecture. Unfortunately the results are the same. Well, I did not copy over any .asoundrc or asound.conf file or XBMC config yet, and built xbmc-9.04.1 instead of a SVN branch this time, and now I did not even succed to successfully start it yet, the backtrace looks the same...

pat1975 Wrote:which graphiccard-driver do you use?
It's the official nvidia-185.18.14.

motd2k Wrote:Do you have any luck getting sound out of mplayer using the current ALSA you have?
Yes, no problem with that, and also no problem with the xine-lib based VDR frontend (vdr-sxfe from the xineliboutput VDR plugin) even using vdpau.

motd2k Wrote:It may be an idea to try an *older* version of ALSA?
Hmm, maybe, but which one should I take? It has to be an alsa-lib still compatible with the alsa drivers which are included in the 2.6.30 kernel I'm running, I guess...

Anyway, even if the problem comes from some strange misbehaviour of the ALSA library, other popular apps like mplayer and xine-lib seem to get along with it, I can get SPDIF passthrough with them without noticeable problems. What puzzles me is the fact that XBMClive works on this machine, so it's not really xbmc's fault either, but something in the underlying system, maybe you guys have more ideas what that can be...

Regards,
Zoolook
Reply
#7
Zoolook Wrote:
motd2k Wrote:It may be an idea to try an *older* version of ALSA?
Hmm, maybe, but which one should I take? It has to be an alsa-lib still compatible with the alsa drivers which are included in the 2.6.30 kernel I'm running, I guess...
Well, look what happended, I built a new 2.6.30 gentoo kernel (with the -r2 version suffix, the previous one had -r1 so I kept them both around) in which I disabled the alsa drivers, in an attempt to start poking with older alsa.

Well, I forgot to downgrade alsa-headers which I kept at 1.0.20 (which, btw, is the version of the modules shipped with the 2.6.30 kernel), so the separate alsa-driver package I could install with my needed hda-intel module was also at version 1.0.20. But at least I could go down with alsa-lib and alsa-utils at 1.0.18 (alsa-tools refused to compile, so there must be some incompatibility with the headers), and guess what, xbmc SVN r21224 no longer crashes at startup.

I'll do further testing the next days, and try to see what actually is the problem, 'couse I don't really like my current "alsa" situation...

Regards,
Zoolook
Reply
#8
Hi there,

in the mean time I also tried alsa-lib-1.0.19 and also no longer get the segfault. Could it be that XBMC/linuxport devs haven't tried xbmc with alsa-lib-1.0.20 yet?

Cheers, Zoo
Reply

Logout Mark Read Team Forum Stats Members Help
~90% Segfault on startup (Gentoo, any of xbmc-9.04.1, SVN linuxport, SVN pvr-testing)0