WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: mpd: problem starting  (Read 11255 times)

Offline gavs

  • Jr. Member
  • **
  • Posts: 74
mpd: problem starting
« on: September 24, 2010, 02:31:53 PM »
I am using TC3.1. I installed alsa.tcz and it started OK. I installed mpd.tcz and mpd-doc.tcz, copied the mpd.conf file, modified to specify user=tc, port=6600 and directories for music, playlists, database and log, I created directories and put 3 flac files in the music directory. When I try to start mpd I get the following error:

error while loading shared libraries: libvpx.so.0: cannot map zero-fill pages: cannot allocate memory

Please advise how I can overcome this error and start mpd.

Thank you.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: mpd: problem starting
« Reply #1 on: September 24, 2010, 02:42:26 PM »
The vp8 lib seems to want 514mb of ram. Also seems to be fixed in upstream, so you could PM the libvpx maintainer.
The only barriers that can stop you are the ones you create yourself.

Offline gavs

  • Jr. Member
  • **
  • Posts: 74
Re: mpd: problem starting
« Reply #2 on: September 24, 2010, 03:02:34 PM »
Thank you for the prompt response. I am using an older computer with 256mb ram. Sorry for being naive, what do you mean by "you could PM the libvpx maintainer"?

Offline Lee

  • Hero Member
  • *****
  • Posts: 645
    • My Core wiki user page
Re: mpd: problem starting
« Reply #3 on: September 24, 2010, 03:49:09 PM »
PM = private message, a function of the forum software running this message base.  A private message doesn't appear here in the message boards, but the recipient will get an email notification that he has a message waiting (in case he does not frequently visit the forums).

"the libvpx maintainer" = the person who packaged/submitted the libvpx.tcz extension.  You can find this in the .info file for the extension. ("Robert Schumann", in this case).  If you get no response after a few days, mention as much here in this thread.

Of course, there currently is no forum user named "Robert Schumann", so I suppose he used his full name in the info file and uses a nickname here in the forums.

Robert? ...
32 bit core4.7.7, Xprogs, Xorg-7.6, wbar, jwm  |  - Testing -
PPR, data persistence through filetool.sh          |  32 bit core 8.0 alpha 1
USB Flash drive, one partition, ext2, grub4dos  | Otherwise similar

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
Re: mpd: problem starting
« Reply #4 on: September 24, 2010, 04:12:06 PM »

Of course, there currently is no forum user named "Robert Schumann", so I suppose he used his full name in the info file and uses a nickname here in the forums.

Robert? ...


I think Robert Schumann's forum nick is gutmensch

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: mpd: problem starting
« Reply #5 on: September 25, 2010, 02:27:50 AM »
Of course I wonder why a _music_ daemon is linked to a video lib at all..
The only barriers that can stop you are the ones you create yourself.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: mpd: problem starting
« Reply #6 on: September 25, 2010, 04:25:00 AM »
Perhaps by design to provide sound track of a video file only?

I can very vaguely remember certain apps being able to output sound only, but accepting video formats as input. Of course that would come at a price of a certain overhead.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline TaoTePuh

  • Full Member
  • ***
  • Posts: 172
Re: mpd: problem starting
« Reply #7 on: September 25, 2010, 03:51:35 PM »
libvpx comes as a dependency of ffmpeg-ffserver. Why it is needed by ffmpeg, I do not know.

Offline gutmensch

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: mpd: problem starting
« Reply #8 on: September 25, 2010, 07:33:56 PM »
New libvpx version 0.9.2-45 from git is on the way ;-)
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline TaoTePuh

  • Full Member
  • ***
  • Posts: 172
Re: mpd: problem starting
« Reply #9 on: September 25, 2010, 08:00:20 PM »
I can not reproduce this behavior in TC 3.0 :

                    RAM [KB]
start TC            125692
load mpd            160320
load ncmpcpp        164888
start mpd           190356
start ncmpc         193472
play 24-bit FLAC    197542

=> mpd + ncmpc + flac file uses about 70MB.

But I have observed the following:
Little by little, more and more memory is allocated. Regardless of file type (mp3, flac ...). After ~ 30 min, free gives 324244 (used), so about +124 MB. When I stop the player, it stops. When I start the player again, it goes on. Killing mpd, does not bring back the allocated memory.

Memory leak ?
Or is there a file which is growing up in ramfs ?

How can I debug this?
« Last Edit: September 25, 2010, 08:23:59 PM by TaoTePuh »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: mpd: problem starting
« Reply #10 on: September 25, 2010, 11:28:13 PM »
Before measuring of each value do a:
Code: [Select]
sudo cache-clear
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: mpd: problem starting
« Reply #11 on: September 26, 2010, 10:37:22 AM »
Perhaps by design to provide sound track of a video file only?

I can very vaguely remember certain apps being able to output sound only, but accepting video formats as input. Of course that would come at a price of a certain overhead.

libvpx is useless for that purpose, as to open the container (webm) only libmatroska would be needed.
The only barriers that can stop you are the ones you create yourself.

Offline gavs

  • Jr. Member
  • **
  • Posts: 74
Re: mpd: problem starting
« Reply #12 on: September 27, 2010, 02:47:12 PM »
Thanks to all for your advice, and thanks particularly to gutmensch for updating libvpx and to TaoTePuh for clarifying the source of the dependency.

Unfortunately the updated libvpx did not resolve the problem. I continue to get the same error on the computer with 256mb ram. I tried TC3.0, prompted by comment from TaoTePuh, but got the same error message. I moved my testing (ultimately intend to use a new mini-itx as a music player feeding a USB DAC) to a computer with 512mb ram. I do not get this error any longer, but I still have not succedded in starting mpd.

I did an iso boot of TC3.1, downloaded & loaded alsa followed by mpd, created directories and modified /etc/mpd.conf to point to directories and to specify port and user tc (that is all I edited). I receive the error message:

log: problem opening log file "/home/tc/.mpd/log" (config line 37) for writing
Aborted

I figured perhaps permissions were a problem so I chaned to rwx for all (0777), but that did not fix the problem. I then commented the log line in /etc/mpd.conf (accepting default logging in syslog), but I got the following error message:

Failed to load database: Unexpected end of file
database: db file "/home/tc/.mpd/database" is not a regular file

I then tried creating the files in /tmp and modified /etc/mpd.conf accordingly. The same error messages persisted.

Any advice? (I believe the first time I used the 512mb computer I did not get these errors, but when I returned to this the next day, these errors came up. I checked for updated extensions in that interval. I believe the only relevant one is ncurses, but I do not know if that is related to these errors??)

Thank you

Offline TaoTePuh

  • Full Member
  • ***
  • Posts: 172
Re: mpd: problem starting
« Reply #13 on: September 27, 2010, 03:50:04 PM »
Have you started mpd with sudo (sudo mpd /etc/mpd.conf)?
Have you stop mpd between attempts (sudo killall mpd)?

The database error is normal for running the first time cause there is no database file - mpd starts anyway (ps | grep mpd).

Another guess: Have you created the path "/home/tc/.mpd" with the dot before mpd?


« Last Edit: September 27, 2010, 04:11:30 PM by TaoTePuh »

Offline gutmensch

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: mpd: problem starting
« Reply #14 on: September 27, 2010, 04:09:38 PM »
mpd doesn't need sudo since it's opening port 6600, which is available as a normal user...

daemonizing as user tc works fine here and it plays well (didn't try it yet with less than 512 MB though ;) ) with either
~/.mpd/mpd.conf or
~/.mpdconf

(no need for system wide /etc/mpd.conf)

content:
port    6600
music_directory   "/mnt/sda1"
playlist_directory  "~/.mpd/playlists"
db_file    "~/.mpd/mpd.db"
log_file   "~/.mpd/mpd.log"
pid_file   "~/.mpd/mpd.pid"

Code: [Select]
$ mkdir -p ~/.mpd/playlists
Code: [Select]
$ mpd --create-db -v --stdout
« Last Edit: September 27, 2010, 04:11:22 PM by gutmensch »
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)