General discussion

Here you can discuss everything related to MOC which doesn't fit other subforum.

Regressions in mocp layout

It seems to me, that since the last update on arch linux(we're currently at:

$ mocp -V

This is : Music On Console
Version : 2.5.0-alpha4
Built : Oct 1 2012 18:41:48
Compiled with : OSS ALSA JACK internet streams resample
Author : Damian Pietras
Homepage : http://moc.daper.net/
E-Mail : mocmaint@daper.net
Copyright : (C) 2003-2011 Damian Pietras and others
License : GNU General Public License, version 2 or later

there has been a regression in the way mocp handles small screen sizes. Now it seems to require a larger terminal than before, and when the screen size decreases it often crashes with:

FATAL_ERROR: Layout1 is malformed!

Not sure what has changed.

Timothy

Client Freeze / Corrupt Tags Cache / 'rm -rf ~/.moc/cache'

User tomaszg and I have put some time into investigating the supposed tags cache corruption problem for which the accepted wisdom has been to delete the MOC tags cache. It has actually turned out to be a problem with stale database locks left over after a previous server crash, and I have today committed a patch (r2492) which I believe fixes it.

The Symptoms

  • The client freezes.
  • The server continues playing but does not respond to commands.
  • Neither the server nor the client can be shut down gracefully.

Verification

  • The client's status message indicates a server communication is in progress, usually relating to tags or playlist.
  • The command db_stat -h ~/.moc/cache shows the same WRITE lock being HELD and WAITed for on the same audio file.
  • This does not change significantly after the server is terminated.
  • When the server is terminated the client also terminates with a fatal error about being unable to receive a value from the server.
  • Setting the 'TagsCacheSize' option very low significantly increases the frequency of the problem appearing.

The Cause

  • At some point the server has died while holding a database lock.
  • Eventually the server attempts to acquire the lock and waits forever.
  • Because it's blocked on the lock it cannot service new requests.
  • The client sends a request and waits forever for the response.

Recovery Action

  • kill -9 $(cat ~/.moc/pid)
  • db_recover -h ~/.moc/cache
  • rm -f ~/.moc/cache/log.*
  • mocp

(Note that step 2 will create a 10MB log file. Step 3 deletes it, but you will still need to have sufficient space in your filesystem.)

The Solution

MOC no longer uses files (~/.moc/cache/__db.*) to back the memory in which locks are held. So when the MOC server crashes, any locks it is holding disappear along with the process's memory. This works because MOC uses single-process (though multi-threaded) access to the database holding the tags cache and it appears that losing the file-backed memory does not endanger the database's structural integrity.

Also See

node/825 (this is a textbook example of this problem)
node/599 (here the segfault is the triggering event)

Playlist errors

Well, this thing http://s17.postimage.org/uw6osl37h/2012_09_07_14_31_53.jpg is really pissing me off.

Some files, when I add to the playlist, is normal, others come with your directory+name
The only difference I found between them was :

directory+name = Stereo
name = JntStereo

Has anyone had this problem, or has, or knows how to solve? thank you :p

mocp segfault with cwd=null when parsing files

I have a folder containing a bunch of mp3's, and a .m3u file with the playlist in it, then there seems to be a random (empty) .txt file in the folder.

If I invoke moc with 'mocp *' (I know this is probably bad to do, but I was lazy), it segfaults, with the following backtrace. You can see that cwd is 0x0, and that is what is being passed to strcpy. If I remove the .txt file and invoke 'mocp *' again it does not segfault, interestingly enough. Let me know if I can get more context via the debugger for you. I realize I am being a 'dumb user' by doing 'mocp *', but the app probably shouldn't crash.

I am using Gentoo's version of mocp, compiled from 2.5.0_alpha4_p20120501-r1, which I assume is a checkout of the alpha4 from the date specified (I'm not the maintainer). There are other 2.5.0_alpha4 packages available but I figured I'd use the latest one available to me in case the bug had been fixed.

Program received signal SIGSEGV, Segmentation fault.
(gdb) bt
#0 0x00007ffff697eeb6 in __strcpy_ssse3 () from /lib64/libc.so.6
#1 0x00000000004367ef in make_path (buf=0x7fffffff8710 "", buf_size=8192, cwd=0
x0, path=0x75d020 "01_born_under_punches_(the_heat_goes_on).mp3") at playlis
t_file.c:54
#2 0x0000000000436b71 in plist_load_m3u (plist=0x6ff600, fname=0x7fffffffa7f0 "
/home/dave/Talking Heads - Remain In Light/album.m3u", cwd=0x0, load_serial=0) at pl
aylist_file.c:154
#3 0x0000000000437502 in plist_load (plist=0x6ff600, fname=0x7fffffffa7f0 "/hom
e/dave/Talking Heads - Remain In Light/album.m3u", cwd=0x0, load_serial=0) at playli
st_file.c:408
#4 0x000000000041f23c in process_args (args=0x6fe140) at interface.c:1546
#5 0x00000000004229dc in init_interface (sock=12, logging=0, args=0x6fe140) at
interface.c:3444
#6 0x0000000000413864 in start_moc (params=0x7fffffffd900, args=0x6fe140) at ma
in.c:205
#7 0x0000000000414bbf in main (argc=3, argv=0x7fffffffda98) at main.c:842

Compiling MOC mp3 decoder plugins on CentOS 6

Hi,

i couldn't find any solution yet.
I'm compiling MOC under CentOS 6. I did install the gstreamer-plugin-ugly package and I do have mp3 running with other applications (mpd/sonata and vlc).
So I am pretty sure that the libs are there. My guess is, that moc looks for the mp3 libs in places that they actually aren't.
Would anyone know just which libs exactly moc will search for and how i can find out whether they're installed on my system and how i might point moc's "configure"script to the right places?

Cheers

svn 2454 search for .a .la files

Hi folx , my builds fail with this error, .a .la files are no longer shiped in rpm packages ( I'm talking about mandriva, rosa ,unity a.s.o)

libtool: link: cannot find the library `/usr/lib/libstdc++.la' or unhandled argument `/usr/lib/libstdc++.la'
make[3]: *** [libmodplug_decoder.la] Error 1
make[3]: Leaving directory `/home/build/rpmbuild/BUILD/trunk/decoder_plugins/modplug'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/build/rpmbuild/BUILD/trunk/decoder_plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/build/rpmbuild/BUILD/trunk'
make: *** [all] Error 2

any help would be very useful
Thx

Trouble with Japanese text

Some Japanese text seems to be fine on mocp, which I think is the UTF-8 encoded
But other Japanese text is not displayed properly.

Is there a way to fix this?

moc ain't playing OGG streams

Hi,

As mentioned here https://bugs.archlinux.org/task/30608 , I've ran into the following problem:
I've tried moc on three other systems, and in two cases the error "Format not supported" is shown.
Before, on the first system, I haven't noticed that, perhaps because of "Hide error/informative message" function within moc.
Two another affected are Arch as as well (Version 2.5.0-alpha4, Both Built: July 2012), third where it's working is an old Ubuntu 10.04 (Version 2.5.0-alpha4, Build: Sep 16 2010).
I've also tried the AUR's moc-svn version, which is affected as well.
When checking the debug's log:
{
Jul 9 18:39:12.747534: main.c:802 main(): This is Music On Console (revision 2447M)
Jul 9 18:39:12.748756: main.c:808 main(): Configured: '--prefix=/usr' '--without-rcc' '--without-aac' '--with-oss' '--with-alsa' '--with-jack' '--with-mp3' '--with-sidplay2' '--with-musepack' '--with-vorbis' '--with-flac' '--with-wavpack' '--with-sndfile' '--with-modplug' '--with-ffmpeg' '--with-speex' '--with-samplerate' '--with-curl' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' 'CPPFLAGS= -I/usr/lib/oss/include' 'CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2'
Jul 9 18:39:12.751191: main.c:457 log_command_line(): mocp -D
Jul 9 18:39:12.754846: options.c:1098 options_parse(): Can't open config file: No such file or directory
Jul 9 18:39:12.919021: decoder.c:660 load_plugins(): Loaded 10 decoders: ffmpeg flac modplug mp3 musepack sidplay2 sndfile speex vorbis wavpack
Jul 9 18:39:13.007650: interface.c:3407 init_interface(): Starting MOC Interface
Jul 9 18:39:13.007906: log.c:119 log_init_stream(): Writing log to: mocp_client_log
Jul 9 18:39:13.008692: utf8.c:318 utf8_init(): Using UTF8 output
Jul 9 18:39:13.075003: interface.c:474 update_mixer_name(): Mixer name: PCM
Jul 9 18:39:13.075308: interface.c:1444 get_server_playlist(): Getting the playlist...
Jul 9 18:39:13.075333: interface.c:941 recv_server_plist(): Asking server for the playlist from other client.
Jul 9 18:39:13.075398: interface.c:943 recv_server_plist(): Waiting for response
Jul 9 18:39:13.075421: interface.c:947 recv_server_plist(): There is no playlist
Jul 9 18:39:13.075800: playlist_file.c:185 plist_load_m3u(): Got MOCSERIAL tag with serial 4864
Jul 9 18:39:13.103223: interface.c:1473 use_server_queue(): Getting the queue...
Jul 9 18:39:13.103332: interface.c:976 recv_server_queue(): Asking server for the queue.
Jul 9 18:39:13.112915: interface.c:978 recv_server_queue(): Waiting for response
Jul 9 18:39:13.164248: interface.c:3386 dequeue_events(): Dequeuing events...
Jul 9 18:39:13.164376: interface.c:1101 server_event(): EVENT: 0x53
Jul 9 18:39:13.168724: interface.c:1101 server_event(): EVENT: 0x50
Jul 9 18:39:13.168963: interface.c:297 send_tags_request(): Not sending tags request for URL (http://listen.technobase.fm/tunein-oggvorbis-pls.ogg)
Jul 9 18:39:13.180726: interface.c:1101 server_event(): EVENT: 0x50
Jul 9 18:39:13.180869: interface.c:297 send_tags_request(): Not sending tags request for URL (http://radio.hbr1.com:19800/ambient.ogg.m3u)
Jul 9 18:39:13.190220: interface.c:1101 server_event(): EVENT: 0x50
Jul 9 18:39:13.190341: interface.c:297 send_tags_request(): Not sending tags request for URL (http://radio.hbr1.com:19800/tronic.ogg.m3u)
Jul 9 18:39:13.210721: interface.c:1101 server_event(): EVENT: 0x50
Jul 9 18:39:13.210855: interface.c:297 send_tags_request(): Not sending tags request for URL (http://radio.hbr1.com:19800/trance.ogg.m3u)
Jul 9 18:39:13.214457: interface.c:1101 server_event(): EVENT: 0x50
Jul 9 18:39:13.214535: interface.c:297 send_tags_request(): Not sending tags request for URL (http://mp3stream7.apasf.apa.at:8000/;stream.nsv)
Jul 9 18:39:13.222322: interface.c:1101 server_event(): EVENT: 0x0e
}
The first four "ogg" fail to play, and the fifth example goes fine.

Please for any advice which might help to solve this issue.
Thanks

8472

Pages

Subscribe to RSS - General discussion