xiehuc / pidgin-lwqq

a pidgin plugin based on lwqq, a excellent safe useful library for webqq protocol
GNU General Public License v3.0
660 stars 185 forks source link

登陆时 pidgin 崩溃 #32

Closed felixonmars closed 12 years ago

felixonmars commented 12 years ago

和 #31 似乎不一样, 所以另开了. 以下是参照pidgin主页gdb的结果:

$ gdb pidgin 2>&1 | tee ~/pidgin-backtrace.log
GNU gdb (GDB) 7.4.1
Copyright (C) 2012 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-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/pidgin...(no debugging symbols found)...done.
(gdb) handle SIGPIPE nostop noprint
Signal        Stop      Print   Pass to program Description
SIGPIPE       No        No      Yes             Broken pipe
(gdb) run
Starting program: /usr/bin/pidgin
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib/libgobject-2.0.so.0.3200.4-gdb.py", lin
e 9, in <module>
    from gobject import register
  File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
    import gdb.backtrace
ImportError: No module named backtrace
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
[New Thread 0x7fffdeecf700 (LWP 25143)]
[New Thread 0x7fffddb55700 (LWP 25144)]
[New Thread 0x7fffdce12700 (LWP 25147)]
[New Thread 0x7fffcffff700 (LWP 25148)]
[Thread 0x7fffcffff700 (LWP 25148) exited]
[New Thread 0x7fffcffff700 (LWP 25152)]
[Thread 0x7fffcffff700 (LWP 25152) exited]
[Aug 16 21:55:55] DEBUG[25137]: /tmp/pidgin-lwqq-git/src/pidgin-lwqq/src/liblwqq
/login.c:540 get_version: Get webqq version from http://ui.ptlogin2.qq.com/cgi-b
in/ver
[Aug 16 21:55:55] NOTICE[25137]: /tmp/pidgin-lwqq-git/src/pidgin-lwqq/src/liblwq
q/login.c:738 lwqq_login: Get webqq version: 201208130930
[New Thread 0x7fffcffff700 (LWP 25154)]
[Thread 0x7fffcffff700 (LWP 25154) exited]
[New Thread 0x7fffcffff700 (LWP 25155)]
[Thread 0x7fffcffff700 (LWP 25155) exited]
[Thread 0x7fffdce12700 (LWP 25147) exited]
[New Thread 0x7fffcffff700 (LWP 25158)]
[New Thread 0x7fffb0a9f700 (LWP 25159)]
[Thread 0x7fffb0a9f700 (LWP 25159) exited]
[Thread 0x7fffcffff700 (LWP 25158) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff48d311a in __strcmp_ssse3 () from /lib/libc.so.6
(gdb) bt full
#0  0x00007ffff48d311a in __strcmp_ssse3 () from /lib/libc.so.6
No symbol table info available.
#1  0x00007fffe75bbadc in get_friend_qqnumber_back (req=0x7fffd4184490, data=0x1
671b40) at /tmp/pidgin-lwqq-git/src/pidgin-lwqq/src/liblwqq/info.c:1112
        lc = <optimized out>
        uin = 0x0
        account = 0x0
        ret = <optimized out>
        json = 0x2b4bee0
        succ = 0
        __PRETTY_FUNCTION__ = "get_friend_qqnumber_back"
        buddy = <optimized out>
        group = <optimized out>
        gp = 0x2e88320
#2  0x00007fffe75afb7c in async_complete (conn=0x7fffd418d790) at /tmp/pidgin-lw
qq-git/src/pidgin-lwqq/src/http_curl.c:434
        request = 0x7fffd4184490
        have_read_bytes = <optimized out>
        resp = 0x7fffd41844c8
        res = <optimized out>
        enc_type = <optimized out>
#3  check_multi_info (g=<error reading variable: Unhandled dwarf expression opco
de 0xfa>) at /tmp/pidgin-lwqq-git/src/pidgin-lwqq/src/http_curl.c:456
        msg = <optimized out>
        msgs_left = 0
        conn = 0x7fffd418d790
        easy = <optimized out>
#4  0x00007fffe75afc70 in event_cb (data=0x7fffe77c8a40, fd=<optimized out>, rev
ents=<optimized out>)
    at /tmp/pidgin-lwqq-git/src/pidgin-lwqq/src/http_curl.c:490
        g = 0x7fffe77c8a40
        action = <optimized out>
#5  0x000000000046afbd in ?? ()
No symbol table info available.
#6  0x00007ffff53e2475 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
No symbol table info available.
#7  0x00007ffff53e27a8 in ?? () from /lib/libglib-2.0.so.0
No symbol table info available.
#8  0x00007ffff53e2ba2 in g_main_loop_run () from /lib/libglib-2.0.so.0
No symbol table info available.
#9  0x00007ffff6649477 in gtk_main () from /lib/libgtk-x11-2.0.so.0
No symbol table info available.
#10 0x00000000004319e1 in main ()
No symbol table info available.
xiehuc commented 12 years ago

明晚开始调bug

2012/8/16 Felix Yan notifications@github.com

以下是参照pidgin主页gdb的结果:

$ gdb pidgin 2>&1 | tee ~/pidgin-backtrace.log GNU gdb (GDB) 7.4.1 Copyright (C) 2012 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-unknown-linux-gnu". For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /usr/bin/pidgin...(no debugging symbols found)...done. (gdb) handle SIGPIPE nostop noprint Signal Stop Print Pass to program Description SIGPIPE No No Yes Broken pipe (gdb) run Starting program: /usr/bin/pidgin warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"? Traceback (most recent call last): File "/usr/share/gdb/auto-load/usr/lib/libgobject-2.0.so.0.3200.4-gdb.py", lin e 9, in from gobject import register File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in import gdb.backtrace ImportError: No module named backtrace [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/libthread_db.so.1". [New Thread 0x7fffdeecf700 (LWP 25143)] [New Thread 0x7fffddb55700 (LWP 25144)] [New Thread 0x7fffdce12700 (LWP 25147)] [New Thread 0x7fffcffff700 (LWP 25148)] [Thread 0x7fffcffff700 (LWP 25148) exited] [New Thread 0x7fffcffff700 (LWP 25152)] [Thread 0x7fffcffff700 (LWP 25152) exited]

/login.c:540 get_version: Get webqq version from http://ui.ptlogin2.qq.com/cgi-b in/ver http://ui.ptlogin2.qq.com/cgi-bin/ver

q/login.c:738 lwqq_login: Get webqq version: 201208130930 [New Thread 0x7fffcffff700 (LWP 25154)] [Thread 0x7fffcffff700 (LWP 25154) exited] [New Thread 0x7fffcffff700 (LWP 25155)] [Thread 0x7fffcffff700 (LWP 25155) exited] [Thread 0x7fffdce12700 (LWP 25147) exited] [New Thread 0x7fffcffff700 (LWP 25158)] [New Thread 0x7fffb0a9f700 (LWP 25159)] [Thread 0x7fffb0a9f700 (LWP 25159) exited] [Thread 0x7fffcffff700 (LWP 25158) exited]

Program received signal SIGSEGV, Segmentation fault. 0x00007ffff48d311a in **strcmp_ssse3 () from /lib/libc.so.6 (gdb) bt full

0 0x00007ffff48d311a in __strcmp_ssse3 () from /lib/libc.so.6

No symbol table info available.

1 0x00007fffe75bbadc in get_friend_qqnumber_back (req=0x7fffd4184490, data=0x1

671b40) at /tmp/pidgin-lwqq-git/src/pidgin-lwqq/src/liblwqq/info.c:1112 lc = uin = 0x0 account = 0x0 ret = json = 0x2b4bee0 succ = 0 __PRETTY_FUNCTION** = "get_friend_qqnumber_back" buddy = group = gp = 0x2e88320

2 0x00007fffe75afb7c in async_complete (conn=0x7fffd418d790) at /tmp/pidgin-lw

qq-git/src/pidgin-lwqq/src/http_curl.c:434 request = 0x7fffd4184490 have_read_bytes = resp = 0x7fffd41844c8 res = enc_type =

3 check_multi_info (g=<error reading variable: Unhandled dwarf expression opco

de 0xfa>) at /tmp/pidgin-lwqq-git/src/pidgin-lwqq/src/http_curl.c:456 msg = msgs_left = 0 conn = 0x7fffd418d790 easy =

4 0x00007fffe75afc70 in event_cb (data=0x7fffe77c8a40, fd=, rev

ents=) at /tmp/pidgin-lwqq-git/src/pidgin-lwqq/src/http_curl.c:490 g = 0x7fffe77c8a40 action =

5 0x000000000046afbd in ?? ()

No symbol table info available.

6 0x00007ffff53e2475 in g_main_context_dispatch () from /lib/libglib-2.0.so.0

No symbol table info available.

7 0x00007ffff53e27a8 in ?? () from /lib/libglib-2.0.so.0

No symbol table info available.

8 0x00007ffff53e2ba2 in g_main_loop_run () from /lib/libglib-2.0.so.0

No symbol table info available.

9 0x00007ffff6649477 in gtk_main () from /lib/libgtk-x11-2.0.so.0

No symbol table info available.

10 0x00000000004319e1 in main ()

No symbol table info available.

— Reply to this email directly or view it on GitHubhttps://github.com/xiehuc/pidgin-lwqq/issues/32.

felixonmars commented 12 years ago

OK, 多谢. 如果需要测试我今晚会一直在 :)

xiehuc commented 12 years ago

commit 了几个patch 在dev分支.你更新下看能解决问题不

felixonmars commented 12 years ago

测试了一会, 尚未触发昨天的错误.

xiehuc commented 12 years ago

你有出现qqnumber 的错误消息吗?控制台里面. 2012/8/17 Felix Yan notifications@github.com

测试了一会, 尚未触发昨天的错误.

— Reply to this email directly or view it on GitHubhttps://github.com/xiehuc/pidgin-lwqq/issues/32#issuecomment-7817431.

felixonmars commented 12 years ago

没有, 不过现在又crash了, 上log:

(gdb) bt full
#0  0x00007fffdd3ac2b0 in ?? () from /lib/libgcc_s.so.1
No symbol table info available.
#1  0x00007fffdd3acf3c in _Unwind_Backtrace () from /lib/libgcc_s.so.1
No symbol table info available.
#2  0x00007ffff48a3c66 in backtrace () from /lib/libc.so.6
No symbol table info available.
#3  0x00007ffff4820925 in __libc_message () from /lib/libc.so.6
No symbol table info available.
#4  0x00007ffff48a76d7 in __fortify_fail () from /lib/libc.so.6
No symbol table info available.
#5  0x00007ffff48a76a0 in __stack_chk_fail () from /lib/libc.so.6
No symbol table info available.
#6  0x00007fffe75abfac in group_message (lc=0x1106950, msg=0x7fffd84ac820)
at /t
mp/pidgin-lwqq-git/src/pidgin-lwqq/src/webqq.c:335
        ac = 0x4e21f20
        pc = <optimized out>
        group = 0x28d9710
        __PRETTY_FUNCTION__ = "group_message"
        buf =

"\345\217\215\350\264\252\342\200\234\351\233\266\345\256\271\345\277\215\34
2\200\235\357\274\232
\351\246\231\346\270\257\345\273\211\347\275\262\347\232\2
04\351\223\201\345\276\213 \342\200\224\342\200\224
\346\267\261\345\234\263\347
\211\271\345\214\272\346\212\2452012\345\271\26408\346\234\21017\346\227\245
\\r
\342\200\234\345\234\250\344\270\212\344\270\226\347\272\252\345\205\255\344\270
\203\345\215\201\345\271\264\344\273\243\347\232\204\346\270\257\350\213\261\346
\224\277\345\272\234\346\227\266\346\234\237\357\274\214\351\246\231\346\270\257
\346\233\276\347\273\217\346\234\211\350\277\207\351\235\236\345\270\270\351\273
\221\346\232\227\347\232\204\346\227\266\344\273\243\343\200\202\343\200\202\343
\200\202\345\273\211\346\224\277\345\205\254\347\275\262\346\210\220\347\253\213
\345\220\216\347\237\255\347\237\255\346\225\260\345\271\264\357\274\214\351\246
\231\346\270\257\344\276\277\350\267\273\350\272\253\345\205\250\347\220\203\346
\234\200\346\270\205\345\273\211\345\234\260\345\214\272\344\271\213\345\210\227
\357\274\214\347\233\256\345\211\215\345\234\250\342\200\234\351\200\217\346\230
\216\345\233\275\351\231\205\342\200\235180\344\270\252\345\233\275\345\256\266\
345\222\214\345\234\260\345\214\272\346\216\222\345\220\215\344\270\255\344\275\
215\345\261\205\347\254\25412\344\275\215\343\200\202\343\200\202\343\200\202\34
5\217\215\350\264\252\347\232\204\345\205\263\351\224\256\344\270\215\346\230\25
7\342\200\234\344\270\245\346\203\251\351\207\215\345\210\244\342\200\235\357\27
4\214\350\200\214\346\230\257\350\246\201\345\201\232\345\210\260\342\200\234\35
1\200\242\350\264\252\345\277\205\350\242\253\346\212\223\342\200\235\343\200\20
2\345\234\250\344\273\226\347\234\213\346\235\245\357\274\214\342\200\234\346\25
5\273\345\210\221\345\271\266\344\270\215\350\203\275\351\230\273\345\220\223\35
0\264\252\346\261\241\347\212\257\347\275\252\347\232\204\345\217\221\347\224\23
7\357\274\214\345\233\240\344\270\272\345\217\252\350\246\201\346\234\211\351\25
3\230\345\210\251\346\266\246\345\234\250\357\274\214\346\235\200\345\244\264\34
7\232\204\347\224\237\346\204\217\346\200\273\344\274\232\346\234\211\344\272\27
2\345\201\232\357\274\233\350\200\214\342\200\230"...
        err = 3655243282
        data = <optimized out>
#7  0xe493bde58cbcef83 in ?? ()
No symbol table info available.
#8  0x9b8ae5839de68ebb in ?? ()
No symbol table info available.
#9  0xbae6a59de6849ae7 in ?? ()
No symbol table info available.
#10 0xe68b89e6a585e590 in ?? ()
No symbol table info available.
#11 0xb688e59099e9a59d in ?? ()
No symbol table info available.
#12 0xa2e89b8ae5839de6 in ?? ()
No symbol table info available.
#13 0xe3a894e7a5bbe6ab in ?? ()
No symbol table info available.
#14 0xe90d0d9d80e28280 in ?? ()
No symbol table info available.
#15 0x8c92e5a58ee6be93 in ?? ()
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#16 0x96e69aa4e5b49be6 in ?? ()
No symbol table info available.
#17 0xe88cbcefa0abe787 in ?? ()
No symbol table info available.
#18 0x9abcef8b9ce7b7af in ?? ()
No symbol table info available.
#19 0x209398e620a28de5 in ?? ()
No symbol table info available.
#20 0x20a6b9e4208f97e8 in ?? ()
No symbol table info available.
#21 0x707474680d86a6e9 in ?? ()
No symbol table info available.
#22 0x2e676f6c622f2f3a in ?? ()
No symbol table info available.
#23 0x6d6f632e616e6973 in ?? ()
No symbol table info available.
#24 0x6c622f732f6e632e in ?? ()
No symbol table info available.
#25 0x31326265355f676f in ?? ()
No symbol table info available.
#26 0x3631303130656164 in ?? ()
No symbol table info available.
#27 0x6c6d74682e72656d in ?? ()
No symbol table info available.
#28 0x000000000000200d in ?? ()
No symbol table info available.
#29 0x0000000000001000 in ?? ()
No symbol table info available.
#30 0x0000000000717ff4 in ?? ()
No symbol table info available.
#31 0xffffffffffffffff in ?? ()
No symbol table info available.
#32 0x0000000000717f80 in ?? ()
No symbol table info available.
#33 0x00007ffff39d1d48 in ?? () from /lib/libxcb.so.1
No symbol table info available.
#34 0x00007ffff7bba796 in ?? () from /lib/libdbus-1.so.3
No symbol table info available.
#35 0x00007ffff568d9a0 in ?? () from /lib/libglib-2.0.so.0
No symbol table info available.
#36 0x00000000006f4c10 in ?? ()
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#37 0x00007fffad1745a0 in ?? ()
No symbol table info available.
#38 0x00007fffac001630 in ?? ()
No symbol table info available.
#39 0x00007fffe75a8919 in msg_check (data=<optimized out>) at
/tmp/pidgin-lwqq-g
it/src/pidgin-lwqq/src/background.c:93
No locals.
#40 0x00007ffff53e300b in ?? () from /lib/libglib-2.0.so.0
No symbol table info available.
#41 0x00007ffff53e2475 in g_main_context_dispatch () from
/lib/libglib-2.0.so.0
No symbol table info available.
#42 0x00007ffff53e27a8 in ?? () from /lib/libglib-2.0.so.0
No symbol table info available.
#43 0x00007ffff53e2ba2 in g_main_loop_run () from /lib/libglib-2.0.so.0
No symbol table info available.
#44 0x00007ffff6649477 in gtk_main () from /lib/libgtk-x11-2.0.so.0
No symbol table info available.
#45 0x00000000004319e1 in main ()
No symbol table info available.
felixonmars commented 12 years ago

此外, 在crash之前看到了许多这样的错误:

[Aug 17 21:13:42] ERROR[24797]: /tmp/pidgin-lwqq-git/src/pidgin-lwqq/src/liblwqq
/msg.c:241 lwqq_msg_free: No such message type
[Aug 17 21:13:42] ERROR[24797]: /tmp/pidgin-lwqq-git/src/pidgin-lwqq/src/liblwqq
/msg.c:114 lwqq_msg_new: No such message type
felixonmars commented 12 years ago

更新: 重新运行了一次 这次出现了大量 qqnumber 的错误:


[Aug 17 21:19:00] ERROR[25161]: /tmp/pidgin-lwqq-git/src/pidgin-lwqq/src/liblwqq
/info.c:1088 get_qqnumber_back:  qqnumber fetch error: retcode 99999
[Aug 17 21:19:00] ERROR[25161]: /tmp/pidgin-lwqq-git/src/pidgin-lwqq/src/liblwqq
/info.c:1088 get_qqnumber_back:  qqnumber fetch error: retcode 99999
[Aug 17 21:19:00] ERROR[25161]: /tmp/pidgin-lwqq-git/src/pidgin-lwqq/src/liblwqq
/info.c:1088 get_qqnumber_back:  qqnumber fetch error: retcode 99999
[Aug 17 21:19:01] ERROR[25161]: /tmp/pidgin-lwqq-git/src/pidgin-lwqq/src/liblwqq
/info.c:1088 get_qqnumber_back:  qqnumber fetch error: retcode 99999
xiehuc commented 12 years ago

https://github.com/xiehuc/pidgin-lwqq/wiki/%E5%8F%AA%E6%9C%89%E9%83%A8%E5%88%86%E5%A5%BD%E5%8F%8B%E7%9A%84%E5%8F%AF%E8%83%BD%E9%97%AE%E9%A2%98 你看下这个.99999问题的出现规律还不知到.目前暂时先这样.试试. 那个group_message的问题是必然出现么? 目前没看出来什么原因

felixonmars commented 12 years ago

虽然不知是否相关, 我还看到了这样的提示:


{"retcode":102,"errmsg":""}

[Aug 17 21:37:01] ERROR[26466]: /tmp/pidgin-lwqq-git/src/pidgin-lwqq/src/liblwqq
/msg.c:760 parse_recvmsg_from_json: Parse json object error: {"retcode":102,"err
msg":""}
felixonmars commented 12 years ago

我这里好友和群都很多(分别大于300/大于100), 倒是不太能看出来只出现部分好友, 所以这个测试恐怕不太好做了 :(

xiehuc commented 12 years ago

出现qqnumberxxxxx就是部分好友了.这个取不到qq号比较麻烦.

xiehuc commented 12 years ago

这个无关紧要.

2012/8/17 Felix Yan notifications@github.com

虽然不知是否相关, 我还看到了这样的提示:

{"retcode":102,"errmsg":""}

/msg.c:760 parse_recvmsg_from_json: Parse json object error: {"retcode":102,"err msg":""}

— Reply to this email directly or view it on GitHubhttps://github.com/xiehuc/pidgin-lwqq/issues/32#issuecomment-7818007.