PromyLOPh / pianobar

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

Pianobar and Openwrt #293

Closed jliu83 closed 12 years ago

jliu83 commented 12 years ago

I downloaded the source and compiled for Openwrt Backfire 10.03. While the compilation and installation was successful, when I run the program, it does not work.

When I start the program, it says Segmentation Fault and exits tot he prompt. Any idea what is going on? What would I have to do to get some debug output and how can I contribute to porting this over to the Openwrt distro?

Thanks, -J

PromyLOPh commented 12 years ago

Compile pianobar with debug symbols (either gmake debug or CFLAGS=-g) and create a backtrace[1].

[1] https://wiki.ubuntu.com/Backtrace

jliu83 commented 12 years ago

I will try it out tonight and let you know.

jliu83 commented 12 years ago

gdb is too large as of right now to put on the router. Need to get gdb server to work first. Will keep you updated.

jliu83 commented 12 years ago

I was able to get gdbserver working and I created a back trace. I didn't include the full one, but this seems to be the culprit:

Program received signal SIGSEGV, Segmentation fault. 0x2ad12f40 in cipher_setkey () from /home/jianyi/git/backfire_10.03/scripts/../staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/usr/lib/libgcrypt.so.11

Do you think this is caused by differing version of libgcrypt? I can include the full trace if that helps.

PromyLOPh commented 12 years ago

Do you think this is caused by differing version of libgcrypt? Which version are you using right now?

I can include the full trace if that helps. Yes, please post the full trace.

jliu83 commented 12 years ago

I am still learning the ins and outs of Linux so please bear with me if my responses are not complete. Let me know if these outputs are what you are looking for. Thanks a lot for such a great program. I use it all the time on my work machine, but I'd like to put it on an embedded distro.

Inside the libgcrypt make file: PKG_NAME:=libgcrypt PKG_VERSION:=1.5.0 PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=ftp://ftp.gnupg.org/gcrypt/libgcrypt PKG_MD5SUM:=693f9c64d50c908bc4d6e01da3ff76d8

Backtrace:

0 0x2ad12f40 in cipher_setkey ()

from /home/jianyi/git/backfire_10.03/scripts/../staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/usr/lib/libgcrypt.so.11

1 0x2ab26b88 in PianoInit (ph=0x41dd30, partnerUser=0x4263c0 "android",

partnerPassword=0x431ec0 "AC7IBG09A3DTSYM4R41UJWL07VLN8JI7", 
device=0x431ee8 "android-generic", inkey=0x426400 "R=U!LH$O2B#", 
outkey=0x426458 "6#26FRL$ZWD") at src/libpiano/piano.c:53

2 0x00401edc in main (argc=0, argv=0x426400) at src/main.c:351

(gdb) quit The program is running. Exit anyway? (y or n) (gdb) monitor exit (gdb) quit The program is running. Exit anyway? (y or n) jianyi@EE-AlienJL:~/git/backfire_10.03$

Complete GDB Server output:

GNU gdb 6.8 Copyright (C) 2008 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 "--host=i686-linux-gnu --target=mipsel-openwrt-linux-uclibc"... [New Thread 621] 0x2aaa8a90 in _start () from /home/jianyi/git/backfire_10.03/scripts/../staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/lib/ld-uClibc.so.0 (gdb) bt

0 0x2aaa8a90 in _start ()

from /home/jianyi/git/backfire_10.03/scripts/../staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/lib/ld-uClibc.so.0

1 0x00000000 in ?? ()

(gdb) c Continuing.

Program received signal SIGSEGV, Segmentation fault. 0x2ad12f40 in cipher_setkey () from /home/jianyi/git/backfire_10.03/scripts/../staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/usr/lib/libgcrypt.so.11 (gdb) backtrace full

0 0x2ad12f40 in cipher_setkey ()

from /home/jianyi/git/backfire_10.03/scripts/../staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/usr/lib/libgcrypt.so.11 No symbol table info available.

1 0x2ab26b88 in PianoInit (ph=0x41dd30, partnerUser=0x4263c0 "android",

partnerPassword=0x431ec0 "AC7IBG09A3DTSYM4R41UJWL07VLN8JI7", 
device=0x431ee8 "android-generic", inkey=0x426400 "R=U!LH$O2B#", 
outkey=0x426458 "6#26FRL$ZWD") at src/libpiano/piano.c:53

No locals.

2 0x00401edc in main (argc=0, argv=0x426400) at src/main.c:351

app = {ph = {user = {listenerId = 0x0, authToken = 0x0}, 
stations = 0x0, genreStations = 0x0, partner = {in = 0x0, out = 0x0, 
  authToken = 0x0, device = 0x432f30 "android-generic", 
  user = 0x426658 "android", 
  password = 0x432f08 "AC7IBG09A3DTSYM4R41UJWL07VLN8JI7", id = 0}, 
timeOffset = 0}, waith = {timeout = 0, method = WAITRESS_METHOD_GET, 
extraHeaders = 0x0, postData = 0x0, data = 0x0, callback = 0, 
tlsFingerprint = 0x0, url = {url = 0x0, tls = false, user = 0x0, 
  password = 0x0, host = 0x0, port = 0x0, path = 0x0}, proxy = {url = 0x0, 
  tls = false, user = 0x0, password = 0x0, host = 0x0, port = 0x0, 
  path = 0x0}, tlsCred = 0x0, request = {sockfd = 0, 
  readWriteRet = WAITRESS_RET_ERR, contentLength = 0, contentReceived = 0, 
  chunkSize = 0, buf = 0x0, dataHandler = 0, read = 0, write = 0, 
  tlsSession = 0x0}}, player = {doQuit = 0 '\0', channels = 0 '\0', 
aoError = 0 '\0', mode = PLAYER_FREED, audioFormat = PIANO_AF_UNKNOWN, 
scale = 0, gain = 0, songDuration = 0, songPlayed = 0, samplerate = 0, 
bufferFilled = 0, bufferRead = 0, bytesReceived = 0, sampleSizeN = 0, 
sampleSizeCurr = 0, sampleSize = 0x0, aacHandle = 0x0, mp3Stream = {
  buffer = 0x0, bufend = 0x0, skiplen = 0, sync = 0, freerate = 0, 
  this_frame = 0x0, next_frame = 0x0, ptr = {byte = 0x0, cache = 0, 
    left = 0}, anc_ptr = {byte = 0x0, cache = 0, left = 0}, 
  anc_bitlen = 0, main_data = 0x0, md_len = 0, options = 0, 
  error = MAD_ERROR_NONE}, mp3Frame = {header = {layer = 0, 
    mode = MAD_MODE_SINGLE_CHANNEL, mode_extension = 0, 
    emphasis = MAD_EMPHASIS_NONE, bitrate = 0, samplerate = 0, 
    crc_check = 0, crc_target = 0, flags = 0, private_bits = 0, 
    duration = {seconds = 0, fraction = 0}}, options = 0, sbsample = {{{
        0 <repeats 32 times>} <repeats 36 times>}, {{
        0 <repeats 32 times>} <repeats 36 times>}}, overlap = 0x0}, 
mp3Synth = {filter = {{{{{0, 0, 0, 0, 0, 0, 0, 0} <repeats 16 times>}, {{
            0, 0, 0, 0, 0, 0, 0, 0} <repeats 16 times>}}, {{{0, 0, 0, 0, 
            0, 0, 0, 0} <repeats 16 times>}, {{0, 0, 0, 0, 0, 0, 0, 
            0} <repeats 16 times>}}}, {{{{0, 0, 0, 0, 0, 0, 0, 
            0} <repeats 16 times>}, {{0, 0, 0, 0, 0, 0, 0, 
            0} <repeats 16 times>}}, {{{0, 0, 0, 0, 0, 0, 0, 
            0} <repeats 16 times>}, {{0, 0, 0, 0, 0, 0, 0, 
            0} <repeats 16 times>}}}}, phase = 0, pcm = {samplerate = 0, 
    channels = 0, length = 0, samples = {{0 <repeats 1152 times>}, {
        0 <repeats 1152 times>}}}}, audioOutDevice = 0x0, settings = 0x0, 
buffer = 0x0, pauseMutex = {**m_reserved = 0, __m_count = 0, 
  __m_owner = 0x0, __m_kind = 0, __m_lock = {__status = 0, 
    __spinlock = 0}}, waith = {timeout = 0, method = WAITRESS_METHOD_GET, 
  extraHeaders = 0x0, postData = 0x0, data = 0x0, callback = 0, 
  tlsFingerprint = 0x0, url = {url = 0x0, tls = false, user = 0x0, 
    password = 0x0, host = 0x0, port = 0x0, path = 0x0}, proxy = {
    url = 0x0, tls = false, user = 0x0, password = 0x0, host = 0x0, 
    port = 0x0, path = 0x0}, tlsCred = 0x0, request = {sockfd = 0, 
    readWriteRet = WAITRESS_RET_ERR, contentLength = 0, 
    contentReceived = 0, chunkSize = 0, buf = 0x0, dataHandler = 0, 
    read = 0, write = 0, tlsSession = 0x0}}}, settings = {
autoselect = true, history = 5, volume = 0, sortOrder = BAR_SORT_NAME_AZ, 
audioQuality = PIANO_AQ_HIGH, username = 0x0, password = 0x0, 
controlProxy = 0x0, proxy = 0x0, autostartStation = 0x0, eventCmd = 0x0, 
loveIcon = 0x4262d8 " <3", banIcon = 0x426330 " </3", 
atIcon = 0x426370 " @ ", 
npSongFormat = 0x431e58 "\"%t\" by \"%a\" on \"%l\"%r%@%s", 
npStationFormat = 0x431e78 "Station \"%n\" (%i)", 
listSongFormat = 0x431e90 "%i) %a - %t%r", 
fifo = 0x431f00 "/root/.config/pianobar/ctl", 
rpcHost = 0x431ea8 "tuner.pandora.com", partnerUser = 0x4263c0 "android", 
partnerPassword = 0x431ec0 "AC7IBG09A3DTSYM4R41UJWL07VLN8JI7", 
device = 0x431ee8 "android-generic", inkey = 0x426400 "R=U!LH$O2B#", 
outkey = 0x426458 "6#26FRL$ZWD", 
tlsFingerprint = "���\2127\2229�+.qLV�\213�*\233Kw", 
keys = "?+-acdeghijmnpqrstux$b()=", msgFormat = {{prefix = 0x0, 
    postfix = 0x0}, {prefix = 0x426498 "(i) ", postfix = 0x0}, {
    prefix = 0x4264f0 "|>  ", postfix = 0x0}, {prefix = 0x426530 "#   ", 
    postfix = 0x0}, {prefix = 0x426588 "/!\ ", postfix = 0x0}, {
    prefix = 0x4265c8 "[?] ", postfix = 0x0}, {prefix = 0x426618 "\t", 
    postfix = 0x0}}}, playlist = 0x0, songHistory = 0x0, curStation = 0x0, 

doQuit = 0 '\0', input = {set = {__fds_bits = {0 <repeats 32 times>}}, maxfd = 0, fds = {0, 0}}} termOrig = {c_iflag = 5376, c_oflag = 5, c_cflag = 7346, c_lflag = 2875, c_line = 0 '\0', c_cc = "\003\034\177\025\001\000\000\000\021\023\032\000\022\017\027\026\004", '\0' <repeats 14 times>} __PRETTY_FUNCTION** = "main" (gdb) info registers zero at v0 v1 a0 a1 a2 a3 R0 00000000 1000fc00 00000001 0000006c 00000000 00426400 0000000b 80808080 t0 t1 t2 t3 t4 t5 t6 t7 R8 2ad63000 000000c3 00000000 00000000 00000000 000000e9 4e4c5637 2ab26b88 s0 s1 s2 s3 s4 s5 s6 s7 R16 0041dd30 004263c0 00431ec0 00431ee8 00426400 00426458 00401dd0 00420000 t8 t9 k0 k1 gp sp s8 ra R24 0000002e 2ad12f20 00000000 00000000 2ad72330 7fff7c60 7fff7cc0 2ab26b88 sr lo hi bad cause pc 00000000 00061646 000000ff 8005bd8c 00000008 2ad12f40 fsr fir 00000000 00000000 (gdb) x/16i $pc 0x2ad12f40 <cipher_setkey+32>: lw v0,12(a0) 0x2ad12f44 <cipher_setkey+36>: addiu s0,a0,128 0x2ad12f48 <cipher_setkey+40>: move s1,a0 0x2ad12f4c <cipher_setkey+44>: lw t9,24(v0) 0x2ad12f50 <cipher_setkey+48>: jalr t9 0x2ad12f54 <cipher_setkey+52>: move a0,s0 0x2ad12f58 <cipher_setkey+56>: lw gp,16(sp) 0x2ad12f5c <cipher_setkey+60>: andi a0,v0,0xffff 0x2ad12f60 <cipher_setkey+64>: lui v1,0x2000 0x2ad12f64 <cipher_setkey+68>: lw t9,-30900(gp) 0x2ad12f68 <cipher_setkey+72>: move a1,s0 0x2ad12f6c <cipher_setkey+76>: beqz v0,0x2ad12f84 <cipher_setkey+100> 0x2ad12f70 <cipher_setkey+80>: or a0,a0,v1 0x2ad12f74 <cipher_setkey+84>: lw v0,56(s1) 0x2ad12f78 <cipher_setkey+88>: li v1,-2 0x2ad12f7c <cipher_setkey+92>: b 0x2ad12fa8 <cipher_setkey+136> 0x2ad12f80 <cipher_setkey+96>: and v0,v0,v1 (gdb) thread apply all backtrace

Thread 1 (Thread 621):

0 0x2ad12f40 in cipher_setkey ()

from /home/jianyi/git/backfire_10.03/scripts/../staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/usr/lib/libgcrypt.so.11

1 0x2ab26b88 in PianoInit (ph=0x41dd30, partnerUser=0x4263c0 "android",

partnerPassword=0x431ec0 "AC7IBG09A3DTSYM4R41UJWL07VLN8JI7", 
device=0x431ee8 "android-generic", inkey=0x426400 "R=U!LH$O2B#", 
outkey=0x426458 "6#26FRL$ZWD") at src/libpiano/piano.c:53

2 0x00401edc in main (argc=0, argv=0x426400) at src/main.c:351

(gdb) quit The program is running. Exit anyway? (y or n) (gdb) monitor exit (gdb) quit The program is running. Exit anyway? (y or n) jianyi@EE-AlienJL:~/git/backfire_10.03$

PromyLOPh commented 12 years ago

Hm, are you using the latest pianobar release (2012.06.24) or git HEAD? I fixed an issue related to gcrypt in 96db841a16670b52fa462337c657c6dc6bd2844a.

jliu83 commented 12 years ago

Definitely the latest. Compiles and works fine on a Beagleboard (ARMH arch). However doesn't quite work on the MIPS. Any other ideas?

PromyLOPh commented 12 years ago

Any other ideas? Yes. Currently the return value of gcry_cipher_open is not checked (in piano.c:PianoInit), so it could return an error if the cipher is not supported. Here’s a patch that prints an error message: https://gist.github.com/3207162

jliu83 commented 12 years ago

I'll try the patch tonight.

jliu83 commented 12 years ago

Here's the backtrace output after the patch

Using target mipsel (uClibc-0.9.30.1) GNU gdb 6.8 Copyright (C) 2008 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 "--host=i686-linux-gnu --target=mipsel-openwrt-linux-uclibc"... warning: Can not parse XML target description; XML support was disabled at compile time [New Thread 621] 0x2aaa8a90 in _start () from /home/jianyi/git/backfire_10.03/scripts/../staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/lib/ld-uClibc.so.0 (gdb) bt

0 0x2aaa8a90 in _start ()

from /home/jianyi/git/backfire_10.03/scripts/../staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/lib/ld-uClibc.so.0

1 0x00000000 in ?? ()

(gdb) c Continuing. warning: Lowest section in /home/jianyi/git/backfire_10.03/staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/lib/librt.so.0 is .reginfo at 00000114

Program received signal SIGSEGV, Segmentation fault. 0x2acad160 in strncpy () from /home/jianyi/git/backfire_10.03/scripts/../staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/lib/libc.so.0 (gdb) batcktrace full

0 0x2acad160 in strncpy ()

from /home/jianyi/git/backfire_10.03/scripts/../staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/lib/libc.so.0 No symbol table info available.

1 0x2acc71fc in gethostbyname2_r ()

from /home/jianyi/git/backfire_10.03/scripts/../staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/lib/libc.so.0 No symbol table info available.

2 0x2acc0e14 in gaih_inet ()

from /home/jianyi/git/backfire_10.03/scripts/../staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/lib/libc.so.0 No symbol table info available.

3 0x2acc17cc in getaddrinfo ()

from /home/jianyi/git/backfire_10.03/scripts/../staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/lib/libc.so.0 No symbol table info available.

4 0x2ab2b9c8 in WaitressFetchCall (waith=0x41dd60)

at src/libwaitress/waitress.c:777
wRet = 2147448504

5 0x2ab2c3ac in WaitressFetchBuf (waith=0x41dd60, retBuffer=0x7fff7c78)

at src/libwaitress/waitress.c:419
buffer = {data = 0x0, pos = 0}
**PRETTY_FUNCTION** = "WaitressFetchBuf"

6 0x00406f3c in BarUiPianoCall (app=0x41dd30, type=PIANO_REQUEST_LOGIN,

data=0x7fff7d20, pRet=0x7fff7dbc, wRet=0x7fff7db8) at src/ui.c:144
req = {type = PIANO_REQUEST_LOGIN, secure = true, data = 0x7fff7d20, 

urlPath = "/services/json/?method=auth.partnerLogin", '\0' <repeats 983 times>, postData = 0x4332e0 "{ \"username\": \"android\", \"password\": \"AC7IBG09A3DTSYM4R41UJWL07VLN8JI7\", \"deviceModel\": \"android-generic\", \"version\": \"5\", \"includeUrls\": true }", responseData = 0x0}

7 0x004021d0 in main (argc=2147447048, argv=0x0) at src/main.c:87

app = {ph = {user = {listenerId = 0x0, authToken = 0x0}, 
stations = 0x0, genreStations = 0x0, partner = {in = 0x0, out = 0x0, 
  authToken = 0x0, device = 0x432f30 "android-generic", 
  user = 0x426658 "android", 
  password = 0x432f08 "AC7IBG09A3DTSYM4R41UJWL07VLN8JI7", id = 0}, 
timeOffset = 0}, waith = {timeout = 30000, method = WAITRESS_METHOD_POST, 
extraHeaders = 0x40cddc "Content-Type: text/plain\r\n", 
postData = 0x4332e0 "{ \"username\": \"android\", \"password\": \"AC7IBG09A3DTSYM4R41UJWL07VLN8JI7\", \"deviceModel\": \"android-generic\", \"version\": \"5\", \"includeUrls\": true }", data = 0x7fff7830, 
callback = 0x2ab2a4e4 <WaitressFetchBufCb>, 
tlsFingerprint = 0x4237a0 "¢ Ÿ\2127\2229®+.qLV³\213Á_\233Kw?+-acdeghijmnpqrstux$b()=", url = {url = 0x0, tls = true, user = 0x0, password = 0x0, 
  host = 0x431ea8 "tuner.pandora.com", port = 0x0, 
  path = 0x7fff7874 "/services/json/?method=auth.partnerLogin"}, proxy = {
  url = 0x0, tls = false, user = 0x0, password = 0x0, host = 0x0, 
  port = 0x0, path = 0x0}, tlsCred = 0x4331c0, request = {sockfd = -1, 
  readWriteRet = WAITRESS_RET_ERR, contentLength = 0, contentReceived = 0, 
  chunkSize = 0, buf = 0x433ec8 "\004", 
  dataHandler = 0x2ab2b1a8 <WaitressHandleIdentity>, 
  read = 0x2ab2a974 <WaitressOrdinaryRead>, 
  write = 0x2ab2a7c0 <WaitressOrdinaryWrite>, tlsSession = 0x433378}}, 

player = {doQuit = 0 '\0', channels = 0 '\0', aoError = 0 '\0', mode = PLAYER_FREED, audioFormat = PIANO_AF_UNKNOWN, scale = 0, gain = 0, songDuration = 0, songPlayed = 0, samplerate = 0, bufferFilled = 0, bufferRead = 0, bytesReceived = 0, sampleSizeN = 0, sampleSizeCurr = 0, sampleSize = 0x0, aacHandle = 0x0, mp3Stream = {buffer = 0x0, bufend = 0x0, skiplen = 0, sync = 0, freerate = 0, this_frame = 0x0, next_frame = 0x0, ptr = {byte = 0x0, cache = 0, left = 0}, anc_ptr = { byte = 0x0, cache = 0, left = 0}, anc_bitlen = 0, main_data = 0x0, md_len = 0, options = 0, error = MAD_ERROR_NONE}, mp3Frame = {header = { layer = 0, mode = MAD_MODE_SINGLE_CHANNEL, mode_extension = 0, emphasis = MAD_EMPHASIS_NONE, bitrate = 0, samplerate = 0, crc_check = 0, crc_target = 0, flags = 0, private_bits = 0, duration = {seconds = 0, fraction = 0}}, options = 0, sbsample = {{{ 0 <repeats 32 times>} <repeats 36 times>}, {{ 0 <repeats 32 times>} <repeats 36 times>}}, overlap = 0x0}, mp3Synth = {filter = {{{{{0, 0, 0, 0, 0, 0, 0, 0} <repeats 16 times>}, {{ 0, 0, 0, 0, 0, 0, 0, 0} <repeats 16 times>}}, {{{0, 0, 0, 0, 0, 0, 0, 0} <repeats 16 times>}, {{0, 0, 0, 0, 0, 0, 0, 0} <repeats 16 times>}}}, {{{{0, 0, 0, 0, 0, 0, 0, 0} <repeats 16 times>}, {{0, 0, 0, 0, 0, 0, 0, 0} <repeats 16 times>}}, {{{0, 0, 0, 0, 0, 0, 0, 0} <repeats 16 times>}, {{0, 0, 0, 0, 0, 0, 0, 0} <repeats 16 times>}}}}, phase = 0, pcm = {samplerate = 0, channels = 0, length = 0, samples = {{0 <repeats 1152 times>}, { 0 <repeats 1152 times>}}}}, audioOutDevice = 0x0, settings = 0x0, buffer = 0x0, pauseMutex = {m_reserved = 0, __m_count = 0, m_owner = 0x0, m_kind = 0, __m_lock = {status = 0, __spinlock = 0}}, waith = {timeout = 0, method = WAITRESS_METHOD_GET, extraHeaders = 0x0, postData = 0x0, data = 0x0, callback = 0, tlsFingerprint = 0x0, url = {url = 0x0, tls = false, user = 0x0, password = 0x0, host = 0x0, port = 0x0, path = 0x0}, proxy = { url = 0x0, tls = false, user = 0x0, password = 0x0, host = 0x0, port = 0x0, path = 0x0}, tlsCred = 0x0, request = {sockfd = 0, readWriteRet = WAITRESS_RET_ERR, contentLength = 0, contentReceived = 0, chunkSize = 0, buf = 0x0, dataHandler = 0, read = 0, write = 0, tlsSession = 0x0}}}, settings = { autoselect = true, history = 5, volume = 0, sortOrder = BAR_SORT_NAME_AZ, audioQuality = PIANO_AQHIGH, username = 0x432f48 "jliu83@gmail.com", password = 0x4266a8 "genius", controlProxy = 0x0, proxy = 0x0, autostartStation = 0x0, eventCmd = 0x0, loveIcon = 0x4262d8 " <3", banIcon = 0x426330 " </3", atIcon = 0x426370 " @ ", npSongFormat = 0x431e58 "\"%t\" by \"%a\" on \"%l\"%r%@%s", npStationFormat = 0x431e78 "Station \"%n\" (%i)", listSongFormat = 0x431e90 "%i) %a - %t%r", fifo = 0x431f00 "/root/.config/pianobar/ctl", rpcHost = 0x431ea8 "tuner.pandora.com", partnerUser = 0x4263c0 "android", partnerPassword = 0x431ec0 "AC7IBG09A3DTSYM4R41UJWL07VLN8JI7", device = 0x431ee8 "android-generic", inkey = 0x426400 "R=U!LH$O2B#", outkey = 0x426458 "6#26FRL$ZWD", tlsFingerprint = "¢ Ÿ\2127\2229®+.qLV³\213Á\233Kw", keys = "?+-acdeghijmnpqrstux$b()=", msgFormat = {{prefix = 0x0, postfix = 0x0}, {prefix = 0x426498 "(i) ", postfix = 0x0}, { prefix = 0x4264f0 "|> ", postfix = 0x0}, {prefix = 0x426530 "# ", postfix = 0x0}, {prefix = 0x426588 "/!\ ", postfix = 0x0}, { prefix = 0x4265c8 "[?] ", postfix = 0x0}, {prefix = 0x426618 "\t", postfix = 0x0}}}, playlist = 0x0, songHistory = 0x0, curStation = 0x0, doQuit = 0 '\0', input = {set = {fds_bits = {1, 0 <repeats 31 times>}}, maxfd = 1, fds = {0, -1}}} termOrig = {c_iflag = 5376, c_oflag = 5, c_cflag = 7346, c_lflag = 2875, c_line = 0 '\0', c_cc = "\003\034\177\025\001\000\000\000\021\023\032\000\022\017\027\026\004", '\0' <repeats 14 times>} __PRETTY_FUNCTION = "main" (gdb) info registers zero at v0 v1 a0 a1 a2 a3 R0 00000000 1000fc00 00000000 7fff7107 7fff7108 00000000 000003e8 000000fa t0 t1 t2 t3 t4 t5 t6 t7 R8 00436cd8 1000fc01 00000000 00000001 70077265 80bbde48 00000000 6f646e61 s0 s1 s2 s3 s4 s5 s6 s7 R16 00000001 7fff7100 000003e8 7fff7108 7fff7570 7fff75c8 7fff70f0 00431ea8 t8 t9 k0 k1 gp sp s8 ra R24 00000003 2acad150 0000000c 00000000 2acf2560 7fff7038 7fff75c4 2acc71fc sr lo hi bad cause pc 00000000 00000018 00000000 8005bd8c 00000008 2acad160 fsr fir 00000000 00000000 (gdb) x /16i $pc 0x2acad160 <strncpy+16>: lb v0,0(a1) 0x2acad164 <strncpy+20>: addiu v1,v1,1 0x2acad168 <strncpy+24>: addiu a3,a3,-1 0x2acad16c <strncpy+28>: sb v0,0(v1) 0x2acad170 <strncpy+32>: beqz v0,0x2acad1c4 <strncpy+116> 0x2acad174 <strncpy+36>: addiu a1,a1,1 0x2acad178 <strncpy+40>: lb v0,0(a1) 0x2acad17c <strncpy+44>: addiu v1,v1,1 0x2acad180 <strncpy+48>: addiu a1,a1,1 0x2acad184 <strncpy+52>: beqz v0,0x2acad1c4 <strncpy+116> 0x2acad188 <strncpy+56>: sb v0,0(v1) 0x2acad18c <strncpy+60>: lb v0,0(a1) 0x2acad190 <strncpy+64>: addiu v1,v1,1 0x2acad194 <strncpy+68>: addiu a1,a1,1 0x2acad198 <strncpy+72>: beqz v0,0x2acad1c4 <strncpy+116> 0x2acad19c <strncpy+76>: sb v0,0(v1) (gdb) thread apply all backtrace

Thread 1 (Thread 621):

0 0x2acad160 in strncpy ()

from /home/jianyi/git/backfire_10.03/scripts/../staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/lib/libc.so.0

1 0x2acc71fc in gethostbyname2_r ()

from /home/jianyi/git/backfire_10.03/scripts/../staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/lib/libc.so.0

2 0x2acc0e14 in gaih_inet ()

from /home/jianyi/git/backfire_10.03/scripts/../staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/lib/libc.so.0

3 0x2acc17cc in getaddrinfo ()

from /home/jianyi/git/backfire_10.03/scripts/../staging_dir/target-mipsel_uClibc-0.9.30.1/root-brcm-2.4/lib/libc.so.0

4 0x2ab2b9c8 in WaitressFetchCall (waith=0x41dd60)

at src/libwaitress/waitress.c:777

5 0x2ab2c3ac in WaitressFetchBuf (waith=0x41dd60, retBuffer=0x7fff7c78)

at src/libwaitress/waitress.c:419

6 0x00406f3c in BarUiPianoCall (app=0x41dd30, type=PIANO_REQUEST_LOGIN,

data=0x7fff7d20, pRet=0x7fff7dbc, wRet=0x7fff7db8) at src/ui.c:144

7 0x004021d0 in main (argc=2147447048, argv=0x0) at src/main.c:87

(gdb) quit The program is running. Exit anyway? (y or n)

PromyLOPh commented 12 years ago

Interesting, the stack trace looks different. Do you get a different trace for every crash? That would indicate that something else (i.e. not pianobar) is the problem – lack of RAM (segfault), perhaps?

jliu83 commented 12 years ago

Hmm.. How much RAM do you think is needed? If that's the case, then I guess this should be closed.

PromyLOPh commented 12 years ago

top says: virt: 57124, res: 1764, shr: 208. That should be about 2MB RAM usage. Not sure how much RAM embedded devices have these days… Note that I’m just guessing – the problem could be somewhere else too ;)

jliu83 commented 12 years ago

Well the router has 16 MB. I'll dig deeper on my own. Thanks for all the help. I guess at least I learned how to create a backtrace.

chaseadam commented 11 years ago

jliu83, did you find a solution?

I am running into this issue as well even with the latest 2012.12.01. I am on a similar platform mipsel. Not sure where my SIGSEV is coming from because I can't figure out how to include the debugging symbols yet in the openwrt build system.

Running same version of gcrypt (1.5.0).