ArturSierzant / OMPD

O!MPD is free, opensource MPD client based on PHP and mySQL.
http://ompd.pl
GNU General Public License v3.0
40 stars 13 forks source link

mpd crashes when adding album #58

Closed xkonni closed 6 years ago

xkonni commented 6 years ago

For some reason this happens on my system. Playing perfectly fine, adding albums via ompd sometimes results in a mpd crash. Only output I get from mpd is this:

Feb 01 12:49:22 innocence systemd[1]: mpd.service: Main process exited, code=killed, status=11/SEGV
Feb 01 12:49:22 innocence systemd[1]: mpd.service: Failed with result 'signal'.

System: Archlinux, running 4.14.15-1-ARCH Music Player Daemon 0.20.15 currently listening via httpd plugin

It does not happen when using other clients, like ncmpcpp so i assume it's something about ompd. is there some way to show logs? the debug parameter only seems to affect logging database updates.

ArturSierzant commented 6 years ago

Hi, you're right, debug works only for database update. But you can try with mpd option log_level set to verbose - maybe mpd will log something that helps to find the problem.

xkonni commented 6 years ago

Hey,

that's where those 2 lines came from, unfortunately it's not really verbose in this matter.

Thanks for your help!

On 2. Feb 2018, at 21:55, Artur Sierżant notifications@github.com wrote:

Hi, you're right, debug works only for database update. But you can try with mpd option log_level set to verbose - maybe mpd will log something that helps to find the problem.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

ArturSierzant commented 6 years ago

I have no idea, what could be the reason. Does it happen for different albums? Maybe for albums with any special characters in album/track title? I'll try to compile version 0.20.15 and check if problem appears in my system (RasPi3 with Raspbian).

xkonni commented 6 years ago

Hey Artur,

this might also be related to the mpd-httpd output. It does not happen without that one active, yet with e.g. ncmpcpp it does not crash either. I'll keep an eye open for any useable debugging output, but for now I don't think its purely ompd related, maybe the combination of both: ompd & mpd-httpd.

On Mon, Feb 5, 2018 at 10:36 PM, Artur Sierżant notifications@github.com wrote:

I have no idea, what could be the reason. Does it happen for different albums? Maybe for albums with any special characters in album/track title? I'll try to compile version 0.20.15 and check if problem appears in my system (RasPi3 with Raspbian).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ArturSierzant/OMPD/issues/58#issuecomment-363229339, or mute the thread https://github.com/notifications/unsubscribe-auth/AANU275A8qb_IRyLSclnbZWFBQiHojBfks5tR3RQgaJpZM4R1frE .

ArturSierzant commented 6 years ago

One more thing: does O!MPD play files or streams? When O!MPD plays streams you can see it in Now Playing: there should be text (stream) next to file type, under the time bar. In this case mpd receives stream prepared by O!MPD - maybe this causes the problem?

xkonni commented 6 years ago

It plays files from the local disk to multiple outputs (toslink to the amp, httpd or snapcast for multiroom clients, null to make sure it keeps playing). It's probably related to httpd, but as mpd hardly outputs any verbose logs, hard to tell.

On Tue, Feb 6, 2018 at 4:12 PM, Artur Sierżant notifications@github.com wrote:

One more thing: does O!MPD play files or streams? When O!MPD plays streams you can see it in Now Playing: there should be text (stream) next to file type, under the time bar. In this case mpd receives stream prepared by O!MPD - maybe this causes the problem?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ArturSierzant/OMPD/issues/58#issuecomment-363452207, or mute the thread https://github.com/notifications/unsubscribe-auth/AANU2zz_4Nb1-Y1wZLEp40qZ1vMAuQ-Uks5tSGvYgaJpZM4R1frE .

xkonni commented 6 years ago

okay, just double-checked

without httpd

with httpd

httpd output config

audio_output {
    type            "httpd"
    name           "httpd"
    port             "6800"
    encoder       "flac"          # flac
    compression "0"           # flac
    format        "44100:16:1"
    always_on   "yes"
    tags             "yes"
}

So it's some combination of httpd-output and ompd. Maybe the frequency of sending commands? Can't think of anything else.

ArturSierzant commented 6 years ago

I'll try your audio_output and do some tests.

ArturSierzant commented 6 years ago

I've found the bug and corrected it in 6aa0a45 - it helped in my case, please check, if it also helps in yours.

xkonni commented 6 years ago

yes that seems to have fixed it.

awesome, thank you!

ArturSierzant commented 6 years ago

Good to hear that. Thank you for reporting this issue.