PromyLOPh / pianobar

Console-based pandora.com player
http://6xq.net/pianobar/
Other
1.73k stars 323 forks source link

Pianobar freezing after several songs #720

Closed zoof closed 2 years ago

zoof commented 2 years ago

Subject of the issue

Pianobar freezing after several song

Your environment

Steps to reproduce

Start pianobar.

Expected behaviour

Play songs until quit.

Actual behaviour

Freezes after several songs. Cannot quit out of pianobar. ^Z and kill %1 before I can restart.

I am a longtime user of pianobar and this is something that started happening this morning. Maybe Pandora made some changes?

zoof commented 2 years ago

When it freezes, it maxes out CPU for two pianobar processes.

PromyLOPh commented 2 years ago

I’ve seen this too, but I’m not quite sure why it happens. Can you compile pianobar from source without the -DNDEBUG flag and then run PIANOBAR_DEBUG=7 ./pianobar 2> /tmp/log and have a look at /tmp/log?

zoof commented 2 years ago

Will do. It seems to be working fine now but I will plan to run it this way from now on in the hopes of seeing this again.

zoof commented 2 years ago

Currently, it is freezing as soon as I start it. The requested log is at: https://controlc.com/e652fd5f6

zoof commented 2 years ago

It's happening frequently again so I can provide more examples of logs if that would be helpful.

PromyLOPh commented 2 years ago

Sorry for the delay. The log is inconclusive unfortunately. Could you obtain a backtrace in gdb please? Here’s a guide: https://wiki.ubuntu.com/Backtrace Please remove your auth tokens from it before you post it.

zoof commented 2 years ago

It does not seem to be having these problems at the moment. Just to be sure I get the right information once it happens again, should I be first setting the environment variable PIANOBAR_DEBUG=7?

PromyLOPh commented 2 years ago

No, that should not be necessary. The log does not have enough information to track down what is going wrong unfortunately.

zoof commented 2 years ago

It finally seems to have happened again. Maybe you can make something of the gdb output here. If there are any auth tokens, I'm not sure what they are.

I used the script form at the bottom of the wiki page but I also have a manually started one if it would provide better information.

PromyLOPh commented 2 years ago

That log unfortunately does not have any backtraces for running threads. Could you try to apply the section “Already running programs” without step four and five when pianobar is stuck?

zoof commented 2 years ago

Here you go. Hopefully this one will have what you need.

PromyLOPh commented 2 years ago

Thread 2 looks like it’s waiting for some condition, but I can’t see where, because your pianobar executable does not have debug symbols. Usually I use make CFLAGS="-ggdb -O0". Could you try that please?

zoof commented 2 years ago

I've recompiled it but I will have to wait for another bad day -- working fine today.

One thing which may or may not be apparent from the logs that I've supplied so far is that the freezing always happens at song transitions, I believe when a new song has been queued up but will confirm when the opportunity arises.

zoof commented 2 years ago

Finally! I had to skip "(gdb) continue" because it was simply frozen and ctrl-c would not break out of it. The output is here. Hopefully, this time there will be enough information for you.

PromyLOPh commented 2 years ago

Can you try using libao’s pulse backend directly instead of through alsa?

zoof commented 2 years ago

That seems to have done the trick. Haven't had any freezes for several months now.