Closed RichiH closed 6 months ago
Sure, you can attach a debugger and grab a backtrace, see https://github.com/PromyLOPh/pianobar/issues/610#issuecomment-286846909 Make sure debugging symbols are installed/available.
@RichiH: Out of curiosity, are you on an IPV6 connection? I'm having similar (though perhaps not related) problems, and that's all that's changed for me.
I am. I can't debug for two more weeks, though :/
Richard
Sent by mobile; excuse my brevity and the wall of text Gmail appends by default.
On May 22, 2017 13:37, "jellisii" notifications@github.com wrote:
@RichiH https://github.com/richih: Out of curiosity, are you on an IPV6 connection? I'm having similar (though perhaps not related) problems, and that's all that's changed for me.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PromyLOPh/pianobar/issues/623#issuecomment-303075594, or mute the thread https://github.com/notifications/unsubscribe-auth/AAuEIy7hWkFq4XkAyq8YO5Rx0GyN2aWXks5r8XOWgaJpZM4Na5Yb .
I'll say that the debugger didn't net anything that appeared interesting when I ran it myself. When fetching a new playlist, it just takes something on the order of 10 minutes.
For me, it sometimes simply stops at the beginning of a new song and does nothing.
This would not be too much of an issue if the ui didn't freeze. Being able to select a station (again) or quit would be enough, already. But as it locks up, I need to kill it from the outside.
This seems to be a race condition.
I can reliably make pianobar hang within 0-15 minutes by simply listening to music, doing nothing else.
Running within gdb, I am unable to reproduce a single hang after countless hours of always-on listening, even leaving the stream run over night.
Since I’m unable to reproduce the issue myself I really need more
information from you. If you’re unable to reproduce the issue while
running gdb you can enable coredumps with ulimit -c unlimited
(depends
on your shell) and force a coredump by sending SIGQUIT to the process as
soon as you experience the problem. Then load the dump with `gdb -c
Will do ASAP, and yes, I am using eventcmd:
#!/bin/bash
# create variables
while read L; do
k="`echo "$L" | cut -d '=' -f 1`"
v="`echo "$L" | cut -d '=' -f 2`"
export "$k=$v"
done < <(grep -e '^\(title\|artist\|album\|stationName\|songStationName\|pRet\|pRetStr\|wRet\|wRetStr\|songDuration\|songPlayed\|rating\|coverArt\|stationCount\|station[0-9]*\)=' /dev/stdin) # don't overwrite $1...
case "$1" in
songstart)
if [ "$rating" -eq 1 ]
then
kdialog --title pianobar --passivepopup "'$title' by '$artist' on '$album' - LOVED" 10
else
kdialog --title pianobar --passivepopup "'$title' by '$artist' on '$album'" 10
fi
;;
songlove)
kdialog --title pianobar --passivepopup "LOVING '$title' by '$artist' on '$album' on station '$stationName'" 10
;;
songshelf)
kdialog --title pianobar --passivepopup "SHELVING '$title' by '$artist' on '$album' on station '$stationName'" 10
;;
songban)
kdialog --title pianobar --passivepopup "BANNING '$title' by '$artist' on '$album' on station '$stationName'" 10
;;
songbookmark)
kdialog --title pianobar --passivepopup "BOOKMARKING '$title' by '$artist' on '$album'" 10
;;
artistbookmark)
kdialog --title pianobar --passivepopup "BOOKMARKING '$artist'" 10
;;
*)
;;
esac
I don't have symbols and there's not dgbsym package, I assume this is useless, correct?
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
[New LWP 28634]
[New LWP 31392]
[New LWP 31394]
[New LWP 31393]
[New LWP 31396]
[New LWP 31395]
[New LWP 31397]
[New LWP 31398]
Core was generated by `pianobar'.
Program terminated with signal SIGQUIT, Quit.
#0 0x00007f98889e0293 in ?? ()
[Current thread is 1 (LWP 28634)]
(gdb) set pagination 0
(gdb) backtrace full
#0 0x00007f98889e0293 in ?? ()
No symbol table info available.
#1 0x0000000000000000 in ?? ()
No symbol table info available.
(gdb) info registers
rax 0xfffffffffffffdfe -514
rbx 0x0 0
rcx 0x7f98889e0293 140293103813267
rdx 0x0 0
rsi 0x7fffe36dfb40 140737009023808
rdi 0x1 1
rbp 0x7fffe36dfcf0 0x7fffe36dfcf0
rsp 0x7fffe36dfad0 0x7fffe36dfad0
r8 0x7fffe36dfb30 140737009023792
r9 0x1 1
r10 0x0 0
r11 0x293 659
r12 0x2 2
r13 0x7fffe36dfb40 140737009023808
r14 0x1 1
r15 0x55e4f4bb1780 94441846806400
rip 0x7f98889e0293 0x7f98889e0293
eflags 0x293 [ CF AF SF IF ]
cs 0x33 51
ss 0x2b 43
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x0 0
(gdb) x/16i $pc
=> 0x7f98889e0293: Cannot access memory at address 0x7f98889e0293
(gdb) thread apply all backtrace
Thread 8 (LWP 31398):
#0 0x00007f98889de54d in ?? ()
#1 0x0000000000000000 in ?? ()
Thread 7 (LWP 31397):
#0 0x00007f988b53314f in ?? ()
#1 0x0000000000000000 in ?? ()
Thread 6 (LWP 31395):
#0 0x00007f988b53314f in ?? ()
#1 0x0000000000000000 in ?? ()
Thread 5 (LWP 31396):
#0 0x00007f988b53314f in ?? ()
#1 0x0000000000000000 in ?? ()
Thread 4 (LWP 31393):
#0 0x00007f988b53314f in ?? ()
#1 0x0000000000000000 in ?? ()
Thread 3 (LWP 31394):
#0 0x00007f988b53314f in ?? ()
#1 0x0000000000000000 in ?? ()
Thread 2 (LWP 31392):
#0 0x00007f98889de54d in ?? ()
#1 0x0000000000000000 in ?? ()
Thread 1 (LWP 28634):
#0 0x00007f98889e0293 in ?? ()
#1 0x0000000000000000 in ?? ()
(gdb) quit
Yeah, you’ll need symbols. Isn’t https://packages.debian.org/stretch/pianobar-dbg the symbols package?
I had that, but was confused (or overheated, given this weather)
% gdb /usr/bin/pianobar core
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/pianobar...Reading symbols from /usr/lib/debug/.build-id/ff/bdcf19ca2edf70d430b34a5c135c80f7dbfaf7.debug...done.
done.
[New LWP 28634]
[New LWP 31392]
[New LWP 31394]
[New LWP 31393]
[New LWP 31396]
[New LWP 31395]
[New LWP 31397]
[New LWP 31398]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `pianobar'.
Program terminated with signal SIGQUIT, Quit.
#0 0x00007f98889e0293 in select () at ../sysdeps/unix/syscall-template.S:84
84 ../sysdeps/unix/syscall-template.S: No such file or directory.
[Current thread is 1 (Thread 0x7f988baff980 (LWP 28634))]
(gdb) set pagination 0
(gdb) backtrace full
#0 0x00007f98889e0293 in select () at ../sysdeps/unix/syscall-template.S:84
No locals.
#1 0x000055e4f49abd35 in BarReadline (buf=0x7fffe36dfcf0 "", bufSize=2, mask=0x0, input=0x55e4f4bb1780 <app+704>, flags=<optimized out>, timeout=1) at src/ui_readline.c:88
curFd = -1
chr = 44 ','
timeoutstruct = {tv_sec = 0, tv_usec = 215221}
bufLen = 0
escapeState = 0 '\000'
set = {__fds_bits = {1, 0 <repeats 15 times>}}
echo = false
done = false
__PRETTY_FUNCTION__ = "BarReadline"
prevInt = 0x55e4f4bb15d0 <app+272>
localInt = 0
#2 0x000055e4f49a5367 in BarMainHandleUserInput (app=0x55e4f4bb14c0 <app>) at src/main.c:198
buf = "\000"
#3 BarMainLoop (app=0x55e4f4bb14c0 <app>) at src/main.c:384
playerThread = 140292669679360
#4 main (argc=<optimized out>, argv=<optimized out>) at src/main.c:486
app = {ph = {user = {listenerId = 0x55e4f6968910 "26813662", authToken = 0x55e4f74ec740 "XXX"}, stations = 0x55e4f7aacf20, genreStations = 0x0, partner = {in = 0x55e4f69837b0, out = 0x55e4f6985ae0, authToken = 0x55e4f7a97e90 "VA+mD1nB2FqOeBQxO53+cVXuWCbVx7XrHV", device = 0x55e4f6967e90 "android-generic", user = 0x55e4f6966ed0 "android", password = 0x55e4f6993fd0 "AC7IBG09A3DTSYM4R41UJWL07VLN8JI7", id = 42}, timeOffset = -2}, http = 0x55e4f6998c90, player = {doQuit = false, doPause = false, pauseMutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' <repeats 39 times>, __align = 0}, pauseCond = {__data = {__lock = 0, __futex = 0, __total_seq = 0, __wakeup_seq = 0, __woken_seq = 0, __mutex = 0x0, __nwaiters = 0, __broadcast_seq = 0}, __size = '\000' <repeats 47 times>, __align = 0}, mode = PLAYER_PLAYING, fvolume = 0x7f9868009aa0, fgraph = 0x7f98680c38c0, fctx = 0x7f98680c3f60, st = 0x7f98680ec000, fbufsink = 0x7f986800bd60, fabuf = 0x7f9868002d60, streamIdx = 0, lastTimestamp = 0, interrupted = 0, aoDev = 0x7f9868034240, gain = -2.1800000667572021, url = 0x55e4f7ae6ba0 "http://audio-dc6-t1-1-v4v6.pandora.com/access/4002100784516264811.mp4?version=5&lid=26813662&token=Ej4J5iZesqWyx9YGaKjY8NlV9Ct0Vf7pxFy6KMdslTAVxnMsVlTPnyPgijZ%2BIO0kWAlHSQ6svuZfj4Ypl8DFGqPaBbfMfWUZRjQ"..., settings = 0x55e4f4bb1600 <app+320>, songDuration = 261, songPlayed = 0}, settings = {autoselect = true, history = 5, maxPlayerErrors = 5, volume = 0, sortOrder = BAR_SORT_NAME_AZ, audioQuality = PIANO_AQ_HIGH, username = 0x55e4f6993bd0 "XXX", password = 0x55e4f6967d10 "XXX", passwordCmd = 0x0, controlProxy = 0x0, proxy = 0x0, autostartStation = 0x55e4f6967dd0 "0", eventCmd = 0x55e4f6994000 "/home/richih/.config/pianobar/eventcmd.sh", loveIcon = 0x55e4f6966f90 " <3", banIcon = 0x55e4f6967050 " </3", atIcon = 0x55e4f6967110 " @ ", npSongFormat = 0x55e4f6993f40 "\"%t\" by \"%a\" on \"%l\"%r%@%s", npStationFormat = 0x55e4f69671d0 "Station \"%n\" (%i)", listSongFormat = 0x55e4f6967290 "%i) %a - %t%r", fifo = 0x55e4f6993fa0 "/home/richih/.config/pianobar/ctl", rpcHost = 0x55e4f6967350 "tuner.pandora.com", rpcTlsPort = 0x55e4f6967410 "443", partnerUser = 0x55e4f6967590 "android", partnerPassword = 0x55e4f6993f70 "AC7IBG09A3DTSYM4R41UJWL07VLN8JI7", device = 0x55e4f6967650 "android-generic", inkey = 0x55e4f6967710 "R=U!LH$O2B#", outkey = 0x55e4f69677d0 "6#26FRL$ZWD", caBundle = 0x0, keys = "?+-acdeghijnpqrstux$b()= vPS^!", msgFormat = {{prefix = 0x0, postfix = 0x0}, {prefix = 0x55e4f6967890 "(i) ", postfix = 0x0}, {prefix = 0x55e4f6967950 "|> ", postfix = 0x0}, {prefix = 0x55e4f6967a10 "# ", postfix = 0x0}, {prefix = 0x55e4f6967ad0 "/!\\ ", postfix = 0x0}, {prefix = 0x55e4f6967b90 "[?] ", postfix = 0x0}, {prefix = 0x55e4f6967c50 "\t", postfix = 0x0}}}, playlist = 0x55e4f7aaf6d0, songHistory = 0x55e4f6def2a0, curStation = 0x55e4f7adf9f0, nextStation = 0x55e4f7adf9f0, doQuit = 0, input = {set = {__fds_bits = {1, 0 <repeats 15 times>}}, maxfd = 1, fds = {0, -1}}, playerErrors = 0}
pret = <optimized out>
__PRETTY_FUNCTION__ = "main"
(gdb) info registers
rax 0xfffffffffffffdfe -514
rbx 0x55e4f4bb1778 94441846806392
rcx 0x7f98889e0293 140293103813267
rdx 0x0 0
rsi 0x7fffe36dfb40 140737009023808
rdi 0x1 1
rbp 0x7fffe36dfc30 0x7fffe36dfc30
rsp 0x7fffe36dfc10 0x7fffe36dfc10
r8 0x7fffe36dfb30 140737009023792
r9 0x1 1
r10 0x0 0
r11 0x293 659
r12 0x7fffe36dfc28 140737009024040
r13 0x7fffe36dfc24 140737009024036
r14 0x7fffe36dfcf0 140737009024240
r15 0x55e4f7aaf6d0 94441896081104
rip 0x55e4f49a5367 0x55e4f49a5367 <main+1415>
eflags 0x293 [ CF AF SF IF ]
cs 0x33 51
ss 0x2b 43
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x0 0
(gdb) x/16i $pc
=> 0x55e4f49a5367 <main+1415>: test %rax,%rax
0x55e4f49a536a <main+1418>: je 0x55e4f49a539a <main+1466>
0x55e4f49a536c <main+1420>: movsbl 0xe0(%rsp),%esi
0x55e4f49a5374 <main+1428>: mov 0x20c3dd(%rip),%rcx # 0x55e4f4bb1758 <app.13409+664>
0x55e4f49a537b <main+1435>: lea 0x20c13e(%rip),%rdi # 0x55e4f4bb14c0 <app.13409>
0x55e4f49a5382 <main+1442>: mov 0x20c3df(%rip),%rdx # 0x55e4f4bb1768 <app.13409+680>
0x55e4f49a5389 <main+1449>: mov $0x1,%r9d
0x55e4f49a538f <main+1455>: mov $0x1,%r8d
0x55e4f49a5395 <main+1461>: callq 0x55e4f49ac230 <BarUiDispatch>
0x55e4f49a539a <main+1466>: cmpl $0x2,0x20c1e7(%rip) # 0x55e4f4bb1588 <app.13409+200>
0x55e4f49a53a1 <main+1473>: je 0x55e4f49a5892 <main+2738>
0x55e4f49a53a7 <main+1479>: cmpl $0x0,0x20c3ca(%rip) # 0x55e4f4bb1778 <app.13409+696>
0x55e4f49a53ae <main+1486>: jne 0x55e4f49a5874 <main+2708>
0x55e4f49a53b4 <main+1492>: cmpl $0x3,0x20c1cd(%rip) # 0x55e4f4bb1588 <app.13409+200>
0x55e4f49a53bb <main+1499>: jne 0x55e4f49a529d <main+1213>
0x55e4f49a53c1 <main+1505>: cmpl $0x0,0x20c208(%rip) # 0x55e4f4bb15d0 <app.13409+272>
(gdb) thread apply all backtrace
Thread 8 (Thread 0x7f9862ffd700 (LWP 31398)):
#0 0x00007f98889de54d in poll () at ../sysdeps/unix/syscall-template.S:84
#1 0x00007f9872367c91 in ?? () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#2 0x00007f98723594a1 in pa_mainloop_poll () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#3 0x00007f9872359b3e in pa_mainloop_iterate () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#4 0x00007f9872359bf0 in pa_mainloop_run () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#5 0x00007f9872367bd9 in ?? () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#6 0x00007f98721072c8 in ?? () from /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-10.0.so
#7 0x00007f988b52d424 in start_thread (arg=0x7f9862ffd700) at pthread_create.c:333
#8 0x00007f98889e79bf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105
Thread 7 (Thread 0x7f98677fe700 (LWP 31397)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007f98895075fb in ?? () from /usr/lib/x86_64-linux-gnu/libavfilter.so.6
#2 0x00007f988b52d424 in start_thread (arg=0x7f98677fe700) at pthread_create.c:333
#3 0x00007f98889e79bf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105
Thread 6 (Thread 0x7f986cdbc700 (LWP 31395)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007f98895075fb in ?? () from /usr/lib/x86_64-linux-gnu/libavfilter.so.6
#2 0x00007f988b52d424 in start_thread (arg=0x7f986cdbc700) at pthread_create.c:333
#3 0x00007f98889e79bf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105
Thread 5 (Thread 0x7f9867fff700 (LWP 31396)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007f98895075fb in ?? () from /usr/lib/x86_64-linux-gnu/libavfilter.so.6
#2 0x00007f988b52d424 in start_thread (arg=0x7f9867fff700) at pthread_create.c:333
#3 0x00007f98889e79bf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105
Thread 4 (Thread 0x7f986d5bd700 (LWP 31393)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007f98895075fb in ?? () from /usr/lib/x86_64-linux-gnu/libavfilter.so.6
#2 0x00007f988b52d424 in start_thread (arg=0x7f986d5bd700) at pthread_create.c:333
#3 0x00007f98889e79bf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105
Thread 3 (Thread 0x7f986ddbe700 (LWP 31394)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007f98895075fb in ?? () from /usr/lib/x86_64-linux-gnu/libavfilter.so.6
#2 0x00007f988b52d424 in start_thread (arg=0x7f986ddbe700) at pthread_create.c:333
#3 0x00007f98889e79bf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105
Thread 2 (Thread 0x7f986ebda700 (LWP 31392)):
#0 0x00007f98889de54d in poll () at ../sysdeps/unix/syscall-template.S:84
#1 0x00007f98779fb07e in ?? () from /usr/lib/x86_64-linux-gnu/libasound.so.2
#2 0x00007f98779fffb8 in ?? () from /usr/lib/x86_64-linux-gnu/libasound.so.2
#3 0x00007f9877a400c8 in ?? () from /usr/lib/x86_64-linux-gnu/libasound.so.2
#4 0x00007f986f1f3c27 in ?? () from /usr/lib/ao/plugins-4/libalsa.so
#5 0x000055e4f49a6689 in play (player=0x55e4f4bb1528 <app+104>) at src/player.c:350
#6 BarPlayerThread (data=0x55e4f4bb1528 <app+104>) at src/player.c:406
#7 0x00007f988b52d424 in start_thread (arg=0x7f986ebda700) at pthread_create.c:333
#8 0x00007f98889e79bf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105
Thread 1 (Thread 0x7f988baff980 (LWP 28634)):
#0 0x00007f98889e0293 in select () at ../sysdeps/unix/syscall-template.S:84
#1 0x000055e4f49abd35 in BarReadline (buf=0x7fffe36dfcf0 "", bufSize=2, mask=0x0, input=0x55e4f4bb1780 <app+704>, flags=<optimized out>, timeout=1) at src/ui_readline.c:88
#2 0x000055e4f49a5367 in BarMainHandleUserInput (app=0x55e4f4bb14c0 <app>) at src/main.c:198
#3 BarMainLoop (app=0x55e4f4bb14c0 <app>) at src/main.c:384
#4 main (argc=<optimized out>, argv=<optimized out>) at src/main.c:486
(gdb) quit
%
Just in case a second one helps
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/pianobar...Reading symbols from /usr/lib/debug/.build-id/ff/bdcf19ca2edf70d430b34a5c135c80f7dbfaf7.debug...done.
done.
[New LWP 4290]
[New LWP 18210]
[New LWP 18213]
[New LWP 18211]
[New LWP 18214]
[New LWP 18212]
[New LWP 18215]
[New LWP 18216]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `pianobar'.
Program terminated with signal SIGQUIT, Quit.
#0 0x00007f1636798293 in select () at ../sysdeps/unix/syscall-template.S:84
84 ../sysdeps/unix/syscall-template.S: No such file or directory.
[Current thread is 1 (Thread 0x7f16398b7980 (LWP 4290))]
(gdb) set pagination 0
(gdb) backtrace full
#0 0x00007f1636798293 in select () at ../sysdeps/unix/syscall-template.S:84
No locals.
#1 0x0000556a5d4acd35 in BarReadline (buf=0x7ffd81dfac40 "", bufSize=2, mask=0x0, input=0x556a5d6b2780 <app+704>, flags=<optimized out>, timeout=1) at src/ui_readline.c:88
curFd = -1
chr = 251 '\373'
timeoutstruct = {tv_sec = 0, tv_usec = 193367}
bufLen = 0
escapeState = 0 '\000'
set = {__fds_bits = {1, 0 <repeats 15 times>}}
echo = false
done = false
__PRETTY_FUNCTION__ = "BarReadline"
prevInt = 0x556a5d6b25d0 <app+272>
localInt = 0
#2 0x0000556a5d4a6367 in BarMainHandleUserInput (app=0x556a5d6b24c0 <app>) at src/main.c:198
buf = "\000"
#3 BarMainLoop (app=0x556a5d6b24c0 <app>) at src/main.c:384
playerThread = 139732945807104
#4 main (argc=<optimized out>, argv=<optimized out>) at src/main.c:486
app = {ph = {user = {listenerId = 0x556a5da26910 "26813662", authToken = 0x556a5e5aa740 "XXX"}, stations = 0x556a5eb98390, genreStations = 0x0, partner = {in = 0x556a5da417b0, out = 0x556a5da43ae0, authToken = 0x556a5eb55e90 "XXX", device = 0x556a5da25e90 "android-generic", user = 0x556a5da24ed0 "android", password = 0x556a5da51fd0 "AC7IBG09A3DTSYM4R41UJWL07VLN8JI7", id = 42}, timeOffset = -2}, http = 0x556a5da56c90, player = {doQuit = false, doPause = false, pauseMutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' <repeats 39 times>, __align = 0}, pauseCond = {__data = {__lock = 0, __futex = 0, __total_seq = 0, __wakeup_seq = 0, __woken_seq = 0, __mutex = 0x0, __nwaiters = 0, __broadcast_seq = 0}, __size = '\000' <repeats 47 times>, __align = 0}, mode = PLAYER_PLAYING, fvolume = 0x7f161800b120, fgraph = 0x7f1618003060, fctx = 0x7f1618002640, st = 0x7f16180c2c20, fbufsink = 0x7f161800da00, fabuf = 0x7f1618024160, streamIdx = 0, lastTimestamp = 0, interrupted = 0, aoDev = 0x7f16181839b0, gain = -3.5299999713897705, url = 0x556a5e458e40 "http://t1-2.p-cdn.com/access/7985585063766053878.mp4?version=5&lid=26813662&token=B2%2F9FIoVzv8VinzBUfB9nAXoxpiK7jNoi711GqoO1Vy6tjSvL4%2BFNB%2FdOmh50j9eI0VANgeMSEeFn%2F9amMrpgceTNkxw6sNzSWUdU15xtLC8Ri"..., settings = 0x556a5d6b2600 <app+320>, songDuration = 272, songPlayed = 0}, settings = {autoselect = true, history = 5, maxPlayerErrors = 5, volume = 0, sortOrder = BAR_SORT_NAME_AZ, audioQuality = PIANO_AQ_HIGH, username = 0x556a5da51bd0 "XXX", password = 0x556a5da25d10 "XXX", passwordCmd = 0x0, controlProxy = 0x0, proxy = 0x0, autostartStation = 0x556a5da25dd0 "0", eventCmd = 0x556a5da52000 "/home/richih/.config/pianobar/eventcmd.sh", loveIcon = 0x556a5da24f90 " <3", banIcon = 0x556a5da25050 " </3", atIcon = 0x556a5da25110 " @ ", npSongFormat = 0x556a5da51f40 "\"%t\" by \"%a\" on \"%l\"%r%@%s", npStationFormat = 0x556a5da251d0 "Station \"%n\" (%i)", listSongFormat = 0x556a5da25290 "%i) %a - %t%r", fifo = 0x556a5da51fa0 "/home/richih/.config/pianobar/ctl", rpcHost = 0x556a5da25350 "tuner.pandora.com", rpcTlsPort = 0x556a5da25410 "443", partnerUser = 0x556a5da25590 "android", partnerPassword = 0x556a5da51f70 "AC7IBG09A3DTSYM4R41UJWL07VLN8JI7", device = 0x556a5da25650 "android-generic", inkey = 0x556a5da25710 "R=U!LH$O2B#", outkey = 0x556a5da257d0 "6#26FRL$ZWD", caBundle = 0x0, keys = "?+-acdeghijnpqrstux$b()= vPS^!", msgFormat = {{prefix = 0x0, postfix = 0x0}, {prefix = 0x556a5da25890 "(i) ", postfix = 0x0}, {prefix = 0x556a5da25950 "|> ", postfix = 0x0}, {prefix = 0x556a5da25a10 "# ", postfix = 0x0}, {prefix = 0x556a5da25ad0 "/!\\ ", postfix = 0x0}, {prefix = 0x556a5da25b90 "[?] ", postfix = 0x0}, {prefix = 0x556a5da25c50 "\t", postfix = 0x0}}}, playlist = 0x556a5de60cc0, songHistory = 0x556a5de5d3d0, curStation = 0x556a5eb9da00, nextStation = 0x556a5eb9da00, doQuit = 0, input = {set = {__fds_bits = {1, 0 <repeats 15 times>}}, maxfd = 1, fds = {0, -1}}, playerErrors = 0}
pret = <optimized out>
__PRETTY_FUNCTION__ = "main"
(gdb) x/16i $pc
=> 0x556a5d4a6367 <main+1415>: test %rax,%rax
0x556a5d4a636a <main+1418>: je 0x556a5d4a639a <main+1466>
0x556a5d4a636c <main+1420>: movsbl 0xe0(%rsp),%esi
0x556a5d4a6374 <main+1428>: mov 0x20c3dd(%rip),%rcx # 0x556a5d6b2758 <app.13409+664>
0x556a5d4a637b <main+1435>: lea 0x20c13e(%rip),%rdi # 0x556a5d6b24c0 <app.13409>
0x556a5d4a6382 <main+1442>: mov 0x20c3df(%rip),%rdx # 0x556a5d6b2768 <app.13409+680>
0x556a5d4a6389 <main+1449>: mov $0x1,%r9d
0x556a5d4a638f <main+1455>: mov $0x1,%r8d
0x556a5d4a6395 <main+1461>: callq 0x556a5d4ad230 <BarUiDispatch>
0x556a5d4a639a <main+1466>: cmpl $0x2,0x20c1e7(%rip) # 0x556a5d6b2588 <app.13409+200>
0x556a5d4a63a1 <main+1473>: je 0x556a5d4a6892 <main+2738>
0x556a5d4a63a7 <main+1479>: cmpl $0x0,0x20c3ca(%rip) # 0x556a5d6b2778 <app.13409+696>
0x556a5d4a63ae <main+1486>: jne 0x556a5d4a6874 <main+2708>
0x556a5d4a63b4 <main+1492>: cmpl $0x3,0x20c1cd(%rip) # 0x556a5d6b2588 <app.13409+200>
0x556a5d4a63bb <main+1499>: jne 0x556a5d4a629d <main+1213>
0x556a5d4a63c1 <main+1505>: cmpl $0x0,0x20c208(%rip) # 0x556a5d6b25d0 <app.13409+272>
(gdb) thread apply all backtrace
Thread 8 (Thread 0x7f1610fd8700 (LWP 18216)):
#0 0x00007f163679654d in poll () at ../sysdeps/unix/syscall-template.S:84
#1 0x00007f162011fc91 in ?? () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#2 0x00007f16201114a1 in pa_mainloop_poll () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#3 0x00007f1620111b3e in pa_mainloop_iterate () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#4 0x00007f1620111bf0 in pa_mainloop_run () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#5 0x00007f162011fbd9 in ?? () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#6 0x00007f161febf2c8 in ?? () from /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-10.0.so
#7 0x00007f16392e5424 in start_thread (arg=0x7f1610fd8700) at pthread_create.c:333
#8 0x00007f163679f9bf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105
Thread 7 (Thread 0x7f16159e0700 (LWP 18215)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007f16372bf5fb in ?? () from /usr/lib/x86_64-linux-gnu/libavfilter.so.6
#2 0x00007f16392e5424 in start_thread (arg=0x7f16159e0700) at pthread_create.c:333
#3 0x00007f163679f9bf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105
Thread 6 (Thread 0x7f16179e4700 (LWP 18212)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007f16372bf5fb in ?? () from /usr/lib/x86_64-linux-gnu/libavfilter.so.6
#2 0x00007f16392e5424 in start_thread (arg=0x7f16179e4700) at pthread_create.c:333
#3 0x00007f163679f9bf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105
Thread 5 (Thread 0x7f16161e1700 (LWP 18214)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007f16372bf5fb in ?? () from /usr/lib/x86_64-linux-gnu/libavfilter.so.6
#2 0x00007f16392e5424 in start_thread (arg=0x7f16161e1700) at pthread_create.c:333
#3 0x00007f163679f9bf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105
Thread 4 (Thread 0x7f16171e3700 (LWP 18211)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007f16372bf5fb in ?? () from /usr/lib/x86_64-linux-gnu/libavfilter.so.6
#2 0x00007f16392e5424 in start_thread (arg=0x7f16171e3700) at pthread_create.c:333
#3 0x00007f163679f9bf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105
Thread 3 (Thread 0x7f16169e2700 (LWP 18213)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007f16372bf5fb in ?? () from /usr/lib/x86_64-linux-gnu/libavfilter.so.6
#2 0x00007f16392e5424 in start_thread (arg=0x7f16169e2700) at pthread_create.c:333
#3 0x00007f163679f9bf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105
Thread 2 (Thread 0x7f161c992700 (LWP 18210)):
#0 0x00007f163679654d in poll () at ../sysdeps/unix/syscall-template.S:84
#1 0x00007f16257b307e in ?? () from /usr/lib/x86_64-linux-gnu/libasound.so.2
#2 0x00007f16257b7fb8 in ?? () from /usr/lib/x86_64-linux-gnu/libasound.so.2
#3 0x00007f16257f80c8 in ?? () from /usr/lib/x86_64-linux-gnu/libasound.so.2
#4 0x00007f161cfabc27 in ?? () from /usr/lib/ao/plugins-4/libalsa.so
#5 0x0000556a5d4a7689 in play (player=0x556a5d6b2528 <app+104>) at src/player.c:350
#6 BarPlayerThread (data=0x556a5d6b2528 <app+104>) at src/player.c:406
#7 0x00007f16392e5424 in start_thread (arg=0x7f161c992700) at pthread_create.c:333
#8 0x00007f163679f9bf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105
Thread 1 (Thread 0x7f16398b7980 (LWP 4290)):
#0 0x00007f1636798293 in select () at ../sysdeps/unix/syscall-template.S:84
#1 0x0000556a5d4acd35 in BarReadline (buf=0x7ffd81dfac40 "", bufSize=2, mask=0x0, input=0x556a5d6b2780 <app+704>, flags=<optimized out>, timeout=1) at src/ui_readline.c:88
#2 0x0000556a5d4a6367 in BarMainHandleUserInput (app=0x556a5d6b24c0 <app>) at src/main.c:198
#3 BarMainLoop (app=0x556a5d6b24c0 <app>) at src/main.c:384
#4 main (argc=<optimized out>, argv=<optimized out>) at src/main.c:486
So at least those two hangs are in the same codepath.
First of all, change your password for pandora.com. I usually warn people that a coredump contains their password, but missed it this time – sorry about that.
I see you’re using pulseaudio. Can you try https://github.com/PromyLOPh/pianobar/issues/433#issuecomment-38393851 please?
No worries, I anticipated this, didn't see it at a glance and decided I don't really care about the account enough to delay pasting.
I can't try that before Monday, but would argue that no matter what the audio does or does not do, the UI should not freeze, in the meantime.
Intermediate data point: No more hangs during the last ~3 hours. This is looking good, but I wouldn't want to confirm yet.
Assuming this is a workaround, this raises two questions
1) Can the UI not lock up, no matter what sound engine is used? 2) Can you warn when alsa is used?
1) Can the UI not lock up, no matter what sound engine is used? I’m not entirely sure why the UI locks up in the first place. The stack trace looks fine, thread 1 is waiting inside BarReadline/select for new input. So either I’m missing something or the call to ao_play (thread 2) locks up everything else too, which would be weird.
2) Can you warn when alsa is used? No, alsa is perfectly fine for those not using pulseaudio.
I too am experiencing random lockups of the UI. Sometimes Ctrl-C will kick it free. I haven't been able to narrow it down, but I think it happens when the internet connection drops. Let me know what you need from me. I am running it on a oPi PC.
@USAFPride Did you try using pulseaudio?
@PromyLOPh The underlying issue still exists, though.
Sometimes Ctrl-C will kick it free. I haven't been able to narrow it down, but I think it happens when the internet connection drops. ^C aborts the current action and thus may indeed fix issues caused by a dropped connection.
@PromyLOPh The underlying issue still exists, though. But there were no UI lockups any more after switching to libao’s pulseaudio driver, right?
@RichiH, I've changed to Pulse, but I will need to wait to see what happens.
But there were no UI lockups any more after switching to libao’s pulseaudio driver, right?
Correct; but the actual issue of UI lockup when the backend is unhappy still exists.
@RichiH switching to pulse seems to have encouraged this error, which is the similar to #628
[http @ 0xb3ffbc60] HTTP error 400 Bad Request
/!\ Unable to open audio file (Input/output error)
@RichiH Can you check whether commit ff4f15214100d209f39e4ed85f47e572c8fe9289 fixes the issue for you or not?
Starting long-term test.
Not so long after all. pianobar is currently hanging after anything between 3 and 7 hours; I wasn't wearing my headphones so I can't tell for sure.
Well, I’m puzzled – no idea why this is still happening.
@PromyLOPh,
I’ve been using the updated version and have had no issues since this patch. I’ve discovered that any repeated internet connection issues caused most of the problems initially and this has fixed it.
Let me reconfirm once more tomorrow.
# cat /etc/libao.conf
default_driver=alsa
quiet
#
% git log -n1 | grep commit
commit 38b16f9957a7bad74e337100b497ffc04ceb9a54
%
Hangs after a few hours.
With pulse, it has been running for three days in a row, now.
I'm getting this occasionally on a Debian Buster system using alsa. Version 2020.04.05 running from $HOME/bin. I can compile the git version if you think that might help.
Does it work with pulse, @zoof?
So far so good.
I regularly experience hangs of both the UI and sound playing with 2016.06.02 on Debian testing. Q, ^C, etc do not work, I have to kill the process from the outside.
I am fully aware of how thin this report is; if there's anything I can do to help debug, please tell me.