- 主题:[KBS2.0]批注册单时掉线
系统:Solaris 9 X86, gcc 3.3.2, KBS 2.0 CVS
在批用户注册单时,"是否接受此资料 (Y/N/Q/Del/Skip)? [S]: " 这步时,选
Y,Q,D或S都立刻掉线,若选 N ,则到选择退回申请表时,选0-7中任何一项后
回车,也立刻掉新。
在“系统管理功能表”中,进入某一项管理功能,若输入系统密码错误也立刻掉线。gdb
信息与上面一样的。
如何解决?
gdb信息:
# gdb /export/home0/bbs/bin/bbsd
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-pc-solaris2.9"...
(gdb) attach 627
Attaching to program `/export/home0/bbs/bin/bbsd', process 627
Reading symbols from /usr/lib/libnsl.so.1...done.
Loaded symbols for /usr/lib/libnsl.so.1
Reading symbols from /usr/lib/libsocket.so.1...done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/local/lib/libz.so.1...done.
Loaded symbols for /usr/local/lib/libz.so.1
Reading symbols from /usr/lib/libpthread.so.1...done.
Loaded symbols for /usr/lib/libpthread.so.1
Reading symbols from /usr/local/lib/libltdl.so.3...done.
Loaded symbols for /usr/local/lib/libltdl.so.3
Reading symbols from /usr/lib/libdl.so.1...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /usr/lib/libmp.so.2...done.
Loaded symbols for /usr/lib/libmp.so.2
Reading symbols from /usr/local/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/local/lib/libgcc_s.so.1
Reading symbols from /usr/lib/libthread.so.1...done.
Loaded symbols for /usr/lib/libthread.so.1
sol-thread active.
Retry #1:
Retry #2:
Retry #3:
Retry #4:
[New LWP 1 ]
[New Thread 1 (LWP 1)]
Symbols already loaded for /usr/lib/libnsl.so.1
Symbols already loaded for /usr/lib/libsocket.so.1
Symbols already loaded for /usr/local/lib/libz.so.1
Symbols already loaded for /usr/lib/libpthread.so.1
Symbols already loaded for /usr/local/lib/libltdl.so.3
Symbols already loaded for /usr/lib/libdl.so.1
Symbols already loaded for /usr/lib/libc.so.1
Symbols already loaded for /usr/lib/libmp.so.2
Symbols already loaded for /usr/local/lib/libgcc_s.so.1
Symbols already loaded for /usr/lib/libthread.so.1
[Switching to Thread 1 (LWP 1)]
0xd118d26d in _poll () from /usr/lib/libc.so.1
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0xd117f6f4 in strlen () from /usr/lib/libc.so.1
(gdb) bt
#0 0xd117f6f4 in strlen () from /usr/lib/libc.so.1
#1 0xd11b8640 in _doprnt () from /usr/lib/libc.so.1
#2 0xd11bb278 in sprintf () from /usr/lib/libc.so.1
#3 0x080cc393 in showtitle (title=0xd10a38f8 "系统维护选单",
mid=0x8047860 "KBS测试站") at newmain_single.c:1275
#4 0x080cc75e in docmdtitle (title=0xd10a38f8 "系统维护选单",
prompt=0x81014fd "目前选择:") at newmain_single.c:1392
#5 0x08087a30 in domenu_screen (dopm=0xd10a0f28,
cmdprompt=0x81014fd "目前选择:") at comm_lists.c:469
#6 0x080883de in domenu (menu_name=0xd10a20df "M_ADMIN") at comm_lists.c:655
#7 0x080883bf in domenu (menu_name=0x810ef08 "TOPMENU") at comm_lists.c:651
#8 0x080cbe41 in main_bbs (convit=0, argv=0x8047e9c "bbsd:linton")
at newmain_single.c:1141
#9 0x080c4be9 in bbs_main (argv=0x8047e9c "bbsd:linton") at bbsd_single.c:771
#10 0x080c4db0 in bbs_standalone_main (argv=0x8047e9c "bbsd:linton")
at bbsd_single.c:914
#11 0x080c4eec in main (argc=3, argv=0x8047dbc) at bbsd_single.c:1009
--------------------------------------------------------------------------
# gdb /export/home0/bbs/bin/bbsd
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-pc-solaris2.9"...
(gdb) attach 647
Attaching to program `/export/home0/bbs/bin/bbsd', process 647
Reading symbols from /usr/lib/libnsl.so.1...done.
Loaded symbols for /usr/lib/libnsl.so.1
Reading symbols from /usr/lib/libsocket.so.1...done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/local/lib/libz.so.1...done.
Loaded symbols for /usr/local/lib/libz.so.1
Reading symbols from /usr/lib/libpthread.so.1...done.
Loaded symbols for /usr/lib/libpthread.so.1
Reading symbols from /usr/local/lib/libltdl.so.3...done.
Loaded symbols for /usr/local/lib/libltdl.so.3
Reading symbols from /usr/lib/libdl.so.1...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /usr/lib/libmp.so.2...done.
Loaded symbols for /usr/lib/libmp.so.2
Reading symbols from /usr/local/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/local/lib/libgcc_s.so.1
Reading symbols from /usr/lib/libthread.so.1...done.
Loaded symbols for /usr/lib/libthread.so.1
sol-thread active.
Retry #1:
Retry #2:
Retry #3:
Retry #4:
[New LWP 1 ]
[New Thread 1 (LWP 1)]
Symbols already loaded for /usr/lib/libnsl.so.1
Symbols already loaded for /usr/lib/libsocket.so.1
Symbols already loaded for /usr/local/lib/libz.so.1
Symbols already loaded for /usr/lib/libpthread.so.1
Symbols already loaded for /usr/local/lib/libltdl.so.3
Symbols already loaded for /usr/lib/libdl.so.1
Symbols already loaded for /usr/lib/libc.so.1
Symbols already loaded for /usr/lib/libmp.so.2
Symbols already loaded for /usr/local/lib/libgcc_s.so.1
Symbols already loaded for /usr/lib/libthread.so.1
[Switching to Thread 1 (LWP 1)]
0xd118d26d in _poll () from /usr/lib/libc.so.1
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0xd117f6f4 in strlen () from /usr/lib/libc.so.1
(gdb) bt
#0 0xd117f6f4 in strlen () from /usr/lib/libc.so.1
#1 0xd11b8640 in _doprnt () from /usr/lib/libc.so.1
#2 0xd11bb278 in sprintf () from /usr/lib/libc.so.1
#3 0x080cc393 in showtitle (title=0xd10a38f8 "系统维护选单",
mid=0x8047860 "KBS测试站") at newmain_single.c:1275
#4 0x080cc75e in docmdtitle (title=0xd10a38f8 "系统维护选单",
prompt=0x81014fd "目前选择:") at newmain_single.c:1392
#5 0x08087a30 in domenu_screen (dopm=0xd10a0f28,
cmdprompt=0x81014fd "目前选择:") at comm_lists.c:469
#6 0x080883de in domenu (menu_name=0xd10a20df "M_ADMIN") at comm_lists.c:655
#7 0x080883bf in domenu (menu_name=0x810ef08 "TOPMENU") at comm_lists.c:651
#8 0x080cbe41 in main_bbs (convit=0, argv=0x8047e9c "bbsd:linton")
at newmain_single.c:1141
#9 0x080c4be9 in bbs_main (argv=0x8047e9c "bbsd:linton") at bbsd_single.c:771
#10 0x080c4db0 in bbs_standalone_main (argv=0x8047e9c "bbsd:linton")
at bbsd_single.c:914
#11 0x080c4eec in main (argc=3, argv=0x8047dbc) at bbsd_single.c:1009
--
FROM 220.173.136.*
有10几个版面
像输入系统密码错误掉线后,在syssecurity版,还有记录:
系统安全记录系统
原因:系统密码输入错误...
以下是个人资料
有10几个版面
像输入系统密码错误掉线后,在syssecurity版,还有记录:
系统安全记录系统
原因:系统密码输入错误...
以下是个人资料
......
----------------------------------------------------------------------
bbsd_single.c:
1004 /* --------------------------------------------------- */
1005 /* attach shared memory & semaphore */
1006 /* --------------------------------------------------- */
1007
1008 server_pid = getpid();
1009 return (*handlers[mode])(argv[0]);
【 在 atppp (Big Mouse) 的大作中提到: 】
: 系统里面有版面吗?
:#10 0x080c4db0 in bbs_standalone_main (argv=0x8047e9c "bbsd:linton")
at bbsd_single.c:914
:#11 0x080c4eec in main (argc=3, argv=0x8047dbc) at bbsd_single.c:1009
--
修改:linton FROM 202.193.15.*
FROM 202.193.15.*
虽然批用户时掉线,但是当选"Y"让用户通过注册,该用户还是完成了身份验证,获得了基本权限和收到"恭喜完成注册的信",在Registry版也有记录.
【 在 linton (难得糊涂) 的大作中提到: 】
: 系统:Solaris 9 X86, gcc 3.3.2, KBS 2.0 CVS
: 在批用户注册单时,"是否接受此资料 (Y/N/Q/Del/Skip)? [S]: " 这步时,选
: Y,Q,D或S都立刻掉线,若选 N ,则到选择退回申请表时,选0-7中任何一项后
: ...................
--
FROM 202.193.161.*
【 在 atppp (Big Mouse) 的大作中提到: 】
: 你前面说断线的地方gdb信息一样?能不能进一步调试看看?
: 是不是frame 3里面currboard指针有问题?
下面是各种情况的GDB信息:
系统密码输入错误时,掉线GDB信息:
# gdb /export/home0/bbs/bin/bbsd
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-pc-solaris2.9"...
(gdb) attach 955
Attaching to program `/export/home0/bbs/bin/bbsd', process 955
Reading symbols from /usr/lib/libnsl.so.1...done.
Loaded symbols for /usr/lib/libnsl.so.1
Reading symbols from /usr/lib/libsocket.so.1...done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/local/lib/libz.so.1...done.
Loaded symbols for /usr/local/lib/libz.so.1
Reading symbols from /usr/lib/libpthread.so.1...done.
Loaded symbols for /usr/lib/libpthread.so.1
Reading symbols from /usr/local/lib/libltdl.so.3...done.
Loaded symbols for /usr/local/lib/libltdl.so.3
Reading symbols from /usr/lib/libdl.so.1...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /usr/lib/libmp.so.2...done.
Loaded symbols for /usr/lib/libmp.so.2
Reading symbols from /usr/local/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/local/lib/libgcc_s.so.1
Reading symbols from /usr/lib/libthread.so.1...done.
Loaded symbols for /usr/lib/libthread.so.1
sol-thread active.
Retry #1:
Retry #2:
Retry #3:
Retry #4:
[New LWP 1 ]
[New Thread 1 (LWP 1)]
Symbols already loaded for /usr/lib/libnsl.so.1
Symbols already loaded for /usr/lib/libsocket.so.1
Symbols already loaded for /usr/local/lib/libz.so.1
Symbols already loaded for /usr/lib/libpthread.so.1
Symbols already loaded for /usr/local/lib/libltdl.so.3
Symbols already loaded for /usr/lib/libdl.so.1
Symbols already loaded for /usr/lib/libc.so.1
Symbols already loaded for /usr/lib/libmp.so.2
Symbols already loaded for /usr/local/lib/libgcc_s.so.1
Symbols already loaded for /usr/lib/libthread.so.1
[Switching to Thread 1 (LWP 1)]
0xd118d26d in _poll () from /usr/lib/libc.so.1
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0xd117f6f4 in strlen () from /usr/lib/libc.so.1
(gdb) bt
#0 0xd117f6f4 in strlen () from /usr/lib/libc.so.1
#1 0xd11b8640 in _doprnt () from /usr/lib/libc.so.1
#2 0xd11bb278 in sprintf () from /usr/lib/libc.so.1
#3 0x080cc393 in showtitle (title=0xd10a38f8 "系统维护选单",
mid=0x8047880 "KBS测试站") at newmain_single.c:1275
#4 0x080cc75e in docmdtitle (title=0xd10a38f8 "系统维护选单",
prompt=0x81014fd "目前选择") at newmain_single.c:1392
#5 0x08087a30 in domenu_screen (dopm=0xd10a0f28,
cmdprompt=0x81014fd "目前选择") at comm_lists.c:469
#6 0x080883de in domenu (menu_name=0xd10a20df "M_ADMIN") at comm_lists.c:655
#7 0x080883bf in domenu (menu_name=0x810ef08 "TOPMENU") at comm_lists.c:651
#8 0x080cbe41 in main_bbs (convit=0, argv=0x8047eac "bbsd:linton")
at newmain_single.c:1141
#9 0x080c4be9 in bbs_main (argv=0x8047eac "bbsd:linton") at bbsd_single.c:771
#10 0x080c4db0 in bbs_standalone_main (argv=0x8047eac "bbsd:linton")
at bbsd_single.c:914
#11 0x080c4eec in main (argc=3, argv=0x8047dd4) at bbsd_single.c:1009
-------------------------------------------------------------------------------------
列出具有特定权限用户时掉线GDB信息,不过查询结果的那封信是是可以收到的
.......
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0xd117f6f4 in strlen () from /usr/lib/libc.so.1
(gdb) bt
#0 0xd117f6f4 in strlen () from /usr/lib/libc.so.1
#1 0xd11b8640 in _doprnt () from /usr/lib/libc.so.1
#2 0xd11bb278 in sprintf () from /usr/lib/libc.so.1
#3 0x080cc393 in showtitle (title=0xd10a38f8 "系统维护选单", mid=0x8047880 "[您有信件]")
at newmain_single.c:1275
#4 0x080cc75e in docmdtitle (title=0xd10a38f8 "系统维护选单",
prompt=0x81014fd "目前选择:") at newmain_single.c:1392
#5 0x08087a30 in domenu_screen (dopm=0xd10a0f28, cmdprompt=0x81014fd "目前选择:")
at comm_lists.c:469
#6 0x080883de in domenu (menu_name=0xd10a20df "M_ADMIN") at comm_lists.c:655
#7 0x080883bf in domenu (menu_name=0x810ef08 "TOPMENU") at comm_lists.c:651
#8 0x080cbe41 in main_bbs (convit=0, argv=0x8047eac "bbsd:linton")
at newmain_single.c:1141
#9 0x080c4be9 in bbs_main (argv=0x8047eac "bbsd:linton") at bbsd_single.c:771
#10 0x080c4db0 in bbs_standalone_main (argv=0x8047eac "bbsd:linton") at bbsd_single.c:914
#11 0x080c4eec in main (argc=3, argv=0x8047dd4) at bbsd_single.c:1009
----------------------------------------------------------------------------------------
更改用户的权限(注意:如果是封禁解封,请使用封禁选单!
用户 'lint0' 的权限已更改,注意:如果是封禁解封,
请按 ◆Enter◆ 继续时掉线GDB信息
.......
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0xd117f6f4 in strlen () from /usr/lib/libc.so.1
(gdb) bt
#0 0xd117f6f4 in strlen () from /usr/lib/libc.so.1
#1 0xd11b8640 in _doprnt () from /usr/lib/libc.so.1
#2 0xd11bb278 in sprintf () from /usr/lib/libc.so.1
#3 0x080cc393 in showtitle (title=0xd10a38f8 "系统维护选单",
mid=0x8047880 "KBS测试站") at newmain_single.c:1275
#4 0x080cc75e in docmdtitle (title=0xd10a38f8 "系统维护选单",
prompt=0x81014fd "目前选择:") at newmain_single.c:1392
#5 0x08087a30 in domenu_screen (dopm=0xd10a0f28, cmdprompt=0x81014fd "目前选择:")
at comm_lists.c:469
#6 0x080883de in domenu (menu_name=0xd10a20df "M_ADMIN") at comm_lists.c:655
#7 0x080883bf in domenu (menu_name=0x810ef08 "TOPMENU") at comm_lists.c:651
#8 0x080cbe41 in main_bbs (convit=0, argv=0x8047eac "bbsd:linton")
at newmain_single.c:1141
#9 0x080c4be9 in bbs_main (argv=0x8047eac "bbsd:linton") at bbsd_single.c:771
#10 0x080c4db0 in bbs_standalone_main (argv=0x8047eac "bbsd:linton") at bbsd_single.c:914
#11 0x080c4eec in main (argc=3, argv=0x8047dd4) at bbsd_single.c:1009
----------------------------------------------------------------------------------------
批用户帐号时掉线GDB信息
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0xd117f6f4 in strlen () from /usr/lib/libc.so.1
(gdb) bt
#0 0xd117f6f4 in strlen () from /usr/lib/libc.so.1
#1 0xd11b8640 in _doprnt () from /usr/lib/libc.so.1
#2 0xd11bb278 in sprintf () from /usr/lib/libc.so.1
#3 0x080cc393 in showtitle (title=0xd10a38f8 "系统维护选单",
mid=0x8047880 "KBS测试站") at newmain_single.c:1275
#4 0x080cc75e in docmdtitle (title=0xd10a38f8 "系统维护选单",
prompt=0x81014fd "目前选择:") at newmain_single.c:1392
#5 0x08087a30 in domenu_screen (dopm=0xd10a0f28, cmdprompt=0x81014fd "目前选择:")
at comm_lists.c:469
#6 0x080883de in domenu (menu_name=0xd10a20df "M_ADMIN") at comm_lists.c:655
#7 0x080883bf in domenu (menu_name=0x810ef08 "TOPMENU") at comm_lists.c:651
#8 0x080cbe41 in main_bbs (convit=0, argv=0x8047eac "bbsd:linton")
at newmain_single.c:1141
#9 0x080c4be9 in bbs_main (argv=0x8047eac "bbsd:linton") at bbsd_single.c:771
#10 0x080c4db0 in bbs_standalone_main (argv=0x8047eac "bbsd:linton") at bbsd_single.c:914
#11 0x080c4eec in main (argc=3, argv=0x8047dd4) at bbsd_single.c:1009
--
修改:linton FROM 202.193.15.*
FROM 202.193.161.*
【 在 atppp (Big Mouse) 的大作中提到: 】
: 你前面说断线的地方gdb信息一样?能不能进一步调试看看?
: 是不是frame 3里面currboard指针有问题?
------------------------------------这个能否再明示一下
下一步我如何调试呢?
--
修改:linton FROM 202.193.15.*
FROM 202.193.15.*
【 在 atppp (Big Mouse) 的大作中提到: 】
: 你前面说断线的地方gdb信息一样?能不能进一步调试看看?
: 是不是frame 3里面currboard指针有问题?
掉线前后输入bt的显示的信息是一样的
# gdb /export/home0/bbs/bin/bbsd
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-pc-solaris2.9"...
(gdb) attach 19671
Attaching to program `/export/home0/bbs/bin/bbsd', process 19671
Reading symbols from /usr/lib/libnsl.so.1...done.
Loaded symbols for /usr/lib/libnsl.so.1
Reading symbols from /usr/lib/libsocket.so.1...done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/local/lib/libz.so.1...done.
Loaded symbols for /usr/local/lib/libz.so.1
Reading symbols from /usr/lib/libpthread.so.1...done.
Loaded symbols for /usr/lib/libpthread.so.1
Reading symbols from /usr/local/lib/libltdl.so.3...done.
Loaded symbols for /usr/local/lib/libltdl.so.3
Reading symbols from /usr/lib/libdl.so.1...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /usr/lib/libmp.so.2...done.
Loaded symbols for /usr/lib/libmp.so.2
Reading symbols from /usr/local/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/local/lib/libgcc_s.so.1
Reading symbols from /usr/lib/libthread.so.1...done.
Loaded symbols for /usr/lib/libthread.so.1
sol-thread active.
Retry #1:
Retry #2:
Retry #3:
Retry #4:
[New LWP 1 ]
[New Thread 1 (LWP 1)]
Symbols already loaded for /usr/lib/libnsl.so.1
Symbols already loaded for /usr/lib/libsocket.so.1
Symbols already loaded for /usr/local/lib/libz.so.1
Symbols already loaded for /usr/lib/libpthread.so.1
Symbols already loaded for /usr/local/lib/libltdl.so.3
Symbols already loaded for /usr/lib/libdl.so.1
Symbols already loaded for /usr/lib/libc.so.1
Symbols already loaded for /usr/lib/libmp.so.2
Symbols already loaded for /usr/local/lib/libgcc_s.so.1
Symbols already loaded for /usr/lib/libthread.so.1
[Switching to Thread 1 (LWP 1)]
0xd118d26d in _poll () from /usr/lib/libc.so.1
掉线前输入bt时的信息:
(gdb) bt
#0 0xd118d26d in _poll () from /usr/lib/libc.so.1
#1 0xd11a9674 in _select () from /usr/lib/libc.so.1
#2 0xd10dda92 in select () from /usr/lib/libthread.so.1
#3 0x080cd381 in igetch () at newio.c:454
#4 0x080cda30 in igetkey () at newio.c:638
#5 0x080880a2 in domenu (menu_name=0xd10a20df "M_ADMIN") at comm_lists.c:605
#6 0x080883bf in domenu (menu_name=0x810ef08 "TOPMENU") at comm_lists.c:651
#7 0x080cbe41 in main_bbs (convit=0, argv=0x8047eac "bbsd:linton")
at newmain_single.c:1141
#8 0x080c4be9 in bbs_main (argv=0x8047eac "bbsd:linton") at bbsd_single.c:771
#9 0x080c4db0 in bbs_standalone_main (argv=0x8047eac "bbsd:linton")
at bbsd_single.c:914
#10 0x080c4eec in main (argc=3, argv=0x8047dd4) at bbsd_single.c:1009
(gdb) l
1009 return (*handlers[mode])(argv[0]);
1010
1011
1012 /*
1013 whee = gethostbyaddr((char*)&sin.sin_addr.s_addr,sizeof(struct in_addr),AF_INET);
1014 if ((whee)&&(whee->h_name[0]))
1015 strncpy(hid, whee->h_name, 17) ;
1016 else
1017 KCN temp change it for trace IP!! don't remove. 2000.8.19 */
1018 }
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0xd117f6f4 in strlen () from /usr/lib/libc.so.1
掉线后输入bt时的信息:
(gdb) bt
#0 0xd117f6f4 in strlen () from /usr/lib/libc.so.1
#1 0xd11b8640 in _doprnt () from /usr/lib/libc.so.1
#2 0xd11bb278 in sprintf () from /usr/lib/libc.so.1
#3 0x080cc393 in showtitle (title=0xd10a38f8 "系统维护选单",
mid=0x8047880 "KBS测试站") at newmain_single.c:1275
#4 0x080cc75e in docmdtitle (title=0xd10a38f8 "系统维护选单",
prompt=0x81014fd "目前选择:") at newmain_single.c:1392
#5 0x08087a30 in domenu_screen (dopm=0xd10a0f28,
cmdprompt=0x81014fd "目前选择:") at comm_lists.c:469
#6 0x080883de in domenu (menu_name=0xd10a20df "M_ADMIN") at comm_lists.c:655
#7 0x080883bf in domenu (menu_name=0x810ef08 "TOPMENU") at comm_lists.c:651
#8 0x080cbe41 in main_bbs (convit=0, argv=0x8047eac "bbsd:linton")
at newmain_single.c:1141
#9 0x080c4be9 in bbs_main (argv=0x8047eac "bbsd:linton") at bbsd_single.c:771
#10 0x080c4db0 in bbs_standalone_main (argv=0x8047eac "bbsd:linton")
at bbsd_single.c:914
#11 0x080c4eec in main (argc=3, argv=0x8047dd4) at bbsd_single.c:1009
(gdb) list
1009 return (*handlers[mode])(argv[0]);
1010
1011
1012 /*
1013 whee = gethostbyaddr((char*)&sin.sin_addr.s_addr,sizeof(struct in_addr),AF_INET);
1014 if ((whee)&&(whee->h_name[0]))
1015 strncpy(hid, whee->h_name, 17) ;
1016 else
1017 KCN temp change it for trace IP!! don't remove. 2000.8.19 */
1018 }
(gdb) n
Single stepping until exit from function strlen,
which has no line number information.
warning: rw_common (): unable to read at addr 0xd10f6500
warning: rw_common (): unable to read at addr 0xd10f6500
thread_to_lwp: td_ta_map_id2thr Debugger service failed
--
FROM 202.193.15.*
【 在 atppp (Big Mouse) 的大作中提到: 】
: gdb> frame 3
: gdb> p currboard
# gdb /export/home0/bbs/bin/bbsd
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-pc-solaris2.9"...
(gdb) attach 20707
Attaching to program `/export/home0/bbs/bin/bbsd', process 20707
Reading symbols from /usr/lib/libnsl.so.1...done.
Loaded symbols for /usr/lib/libnsl.so.1
Reading symbols from /usr/lib/libsocket.so.1...done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/local/lib/libz.so.1...done.
Loaded symbols for /usr/local/lib/libz.so.1
Reading symbols from /usr/lib/libpthread.so.1...done.
Loaded symbols for /usr/lib/libpthread.so.1
Reading symbols from /usr/local/lib/libltdl.so.3...done.
Loaded symbols for /usr/local/lib/libltdl.so.3
Reading symbols from /usr/lib/libdl.so.1...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /usr/lib/libmp.so.2...done.
Loaded symbols for /usr/lib/libmp.so.2
Reading symbols from /usr/local/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/local/lib/libgcc_s.so.1
Reading symbols from /usr/lib/libthread.so.1...done.
Loaded symbols for /usr/lib/libthread.so.1
sol-thread active.
Retry #1:
Retry #2:
Retry #3:
Retry #4:
[New LWP 1 ]
[New Thread 1 (LWP 1)]
Symbols already loaded for /usr/lib/libnsl.so.1
Symbols already loaded for /usr/lib/libsocket.so.1
Symbols already loaded for /usr/local/lib/libz.so.1
Symbols already loaded for /usr/lib/libpthread.so.1
Symbols already loaded for /usr/local/lib/libltdl.so.3
Symbols already loaded for /usr/lib/libdl.so.1
Symbols already loaded for /usr/lib/libc.so.1
Symbols already loaded for /usr/lib/libmp.so.2
Symbols already loaded for /usr/local/lib/libgcc_s.so.1
Symbols already loaded for /usr/lib/libthread.so.1
[Switching to Thread 1 (LWP 1)]
0xd118d26d in _poll () from /usr/lib/libc.so.1
(gdb) c
Continuing.
Program exited normally.
(gdb) bt
No stack.
(gdb) frame 3
No stack.
(gdb) p currboard
$1 = (struct boardheader *) 0x0
(gdb) quit
# ps -ef|grep bbs
bbs 20728 1 0 08:31:05 ? 0:00 bin/chatd
bbs 19630 1 0 23:26:08 ? 0:00 ./bbslogd
bbs 19633 1 0 23:26:13 ? 0:00 ./bbsd -p 23
root 20731 20704 0 08:32:48 pts/2 0:00 grep bbs
bbs 19618 19617 0 23:26:02 ? 0:00 ./miscd daemon
bbs 19616 1 0 23:26:02 ? 0:00 ./miscd daemon
bbs 19617 19616 0 23:26:02 ? 0:00 ./miscd daemon
bbs 20729 19633 0 08:32:35 ? 0:00 ./bbsd -p 23
bbs 19619 19618 0 23:26:02 ? 0:00 ./miscd daemon
-----------------掉线的GDB信息--------------------------------------------
# gdb /export/home0/bbs/bin/bbsd
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-pc-solaris2.9"...
(gdb) attach 20729
Attaching to program `/export/home0/bbs/bin/bbsd', process 20729
Reading symbols from /usr/lib/libnsl.so.1...done.
Loaded symbols for /usr/lib/libnsl.so.1
Reading symbols from /usr/lib/libsocket.so.1...done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/local/lib/libz.so.1...done.
Loaded symbols for /usr/local/lib/libz.so.1
Reading symbols from /usr/lib/libpthread.so.1...done.
Loaded symbols for /usr/lib/libpthread.so.1
Reading symbols from /usr/local/lib/libltdl.so.3...done.
Loaded symbols for /usr/local/lib/libltdl.so.3
Reading symbols from /usr/lib/libdl.so.1...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /usr/lib/libmp.so.2...done.
Loaded symbols for /usr/lib/libmp.so.2
Reading symbols from /usr/local/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/local/lib/libgcc_s.so.1
Reading symbols from /usr/lib/libthread.so.1...done.
Loaded symbols for /usr/lib/libthread.so.1
sol-thread active.
Retry #1:
Retry #2:
Retry #3:
Retry #4:
[New LWP 1 ]
[New Thread 1 (LWP 1)]
Symbols already loaded for /usr/lib/libnsl.so.1
Symbols already loaded for /usr/lib/libsocket.so.1
Symbols already loaded for /usr/local/lib/libz.so.1
Symbols already loaded for /usr/lib/libpthread.so.1
Symbols already loaded for /usr/local/lib/libltdl.so.3
Symbols already loaded for /usr/lib/libdl.so.1
Symbols already loaded for /usr/lib/libc.so.1
Symbols already loaded for /usr/lib/libmp.so.2
Symbols already loaded for /usr/local/lib/libgcc_s.so.1
Symbols already loaded for /usr/lib/libthread.so.1
[Switching to Thread 1 (LWP 1)]
0xd118d26d in _poll () from /usr/lib/libc.so.1
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0xd117f6f4 in strlen () from /usr/lib/libc.so.1
(gdb) bt
#0 0xd117f6f4 in strlen () from /usr/lib/libc.so.1
#1 0xd11b8640 in _doprnt () from /usr/lib/libc.so.1
#2 0xd11bb278 in sprintf () from /usr/lib/libc.so.1
#3 0x080cc393 in showtitle (title=0xd10a38f8 "系统维护选单",
mid=0x8047880 "KBS测试站") at newmain_single.c:1275
#4 0x080cc75e in docmdtitle (title=0xd10a38f8 "系统维护选单",
prompt=0x81014fd "目前选择:") at newmain_single.c:1392
#5 0x08087a30 in domenu_screen (dopm=0xd10a0f28,
cmdprompt=0x81014fd "目前选择:") at comm_lists.c:469
#6 0x080883de in domenu (menu_name=0xd10a20df "M_ADMIN") at comm_lists.c:655
#7 0x080883bf in domenu (menu_name=0x810ef08 "TOPMENU") at comm_lists.c:651
#8 0x080cbe41 in main_bbs (convit=0, argv=0x8047eac "bbsd:linton")
at newmain_single.c:1141
#9 0x080c4be9 in bbs_main (argv=0x8047eac "bbsd:linton") at bbsd_single.c:771
#10 0x080c4db0 in bbs_standalone_main (argv=0x8047eac "bbsd:linton")
at bbsd_single.c:914
#11 0x080c4eec in main (argc=3, argv=0x8047dd4) at bbsd_single.c:1009
(gdb) frame 3
#3 0x080cc393 in showtitle (title=0xd10a38f8 "系统维护选单",
mid=0x8047880 "KBS测试站") at newmain_single.c:1275
1275 sprintf(note, "讨论区 [%s]", currboard->filename);
(gdb) p currboard
$1 = (struct boardheader *) 0xd1040000
(gdb) l
1270 if (colour == YELLOW)
1271 colour = RED;
1272 }
1273
1274 if (selboard)
1275 sprintf(note, "讨论区 [%s]", currboard->filename);
1276 else {
1277 int bid;
1278 bid = getbnum(DEFAULTBOARD);
1279 if (bid==0) {
(gdb)
--
FROM 202.193.15.*
【 在 atppp (Big Mouse) 的大作中提到: 】
: 那接着 p currboard->filename 出来看看好了
(gdb) p currboard->filename
Cannot access memory at address 0xd1040000
(gdb) l
1270 if (colour == YELLOW)
1271 colour = RED;
1272 }
1273
1274 if (selboard)
1275 sprintf(note, "讨论区 [%s]", currboard->filename);
1276 else {
1277 int bid;
1278 bid = getbnum(DEFAULTBOARD);
1279 if (bid==0) {
--
修改:linton FROM 202.193.15.*
FROM 202.193.15.*
【 在 atppp (Big Mouse) 的大作中提到: 】
: 那接着 p currboard->filename 出来看看好了
今早第一次登录时,在系统管理菜单里面操作,居然没有掉线.
后面的每一次像前面一样的操作都掉线.
# gdb /export/home0/bbs/bin/bbsd
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-pc-solaris2.9"...
(gdb) attach 20707
Attaching to program `/export/home0/bbs/bin/bbsd', process 20707
Reading symbols from /usr/lib/libnsl.so.1...done.
Loaded symbols for /usr/lib/libnsl.so.1
Reading symbols from /usr/lib/libsocket.so.1...done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/local/lib/libz.so.1...done.
Loaded symbols for /usr/local/lib/libz.so.1
Reading symbols from /usr/lib/libpthread.so.1...done.
Loaded symbols for /usr/lib/libpthread.so.1
Reading symbols from /usr/local/lib/libltdl.so.3...done.
Loaded symbols for /usr/local/lib/libltdl.so.3
Reading symbols from /usr/lib/libdl.so.1...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /usr/lib/libmp.so.2...done.
Loaded symbols for /usr/lib/libmp.so.2
Reading symbols from /usr/local/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/local/lib/libgcc_s.so.1
Reading symbols from /usr/lib/libthread.so.1...done.
Loaded symbols for /usr/lib/libthread.so.1
sol-thread active.
Retry #1:
Retry #2:
Retry #3:
Retry #4:
[New LWP 1 ]
[New Thread 1 (LWP 1)]
Symbols already loaded for /usr/lib/libnsl.so.1
Symbols already loaded for /usr/lib/libsocket.so.1
Symbols already loaded for /usr/local/lib/libz.so.1
Symbols already loaded for /usr/lib/libpthread.so.1
Symbols already loaded for /usr/local/lib/libltdl.so.3
Symbols already loaded for /usr/lib/libdl.so.1
Symbols already loaded for /usr/lib/libc.so.1
Symbols already loaded for /usr/lib/libmp.so.2
Symbols already loaded for /usr/local/lib/libgcc_s.so.1
Symbols already loaded for /usr/lib/libthread.so.1
[Switching to Thread 1 (LWP 1)]
0xd118d26d in _poll () from /usr/lib/libc.so.1
(gdb) c
Continuing.
Program exited normally.
(gdb) bt
No stack.
(gdb) frame 3
No stack.
(gdb) p currboard
$1 = (struct boardheader *) 0x0
--
FROM 202.193.15.*
【 在 atppp (Big Mouse) 的大作中提到: 】
: gdb> frame 3
: gdb> p currboard
Program received signal SIGSEGV, Segmentation fault.
0xd117f6f4 in strlen () from /usr/lib/libc.so.1
(gdb) up 3
#3 0x080cc276 in showtitle (title=0xd10a38f8 "系统维护选单", mid=0x8047860 "KBS测试站")
at newmain_single.c:1275
1275 sprintf(note, "讨论区 [%s]", currboard->filename);
(gdb) i lo
spc1 = 0
colour = 4
note = "讨论区 [靄213\237狧装\037", '\0' <repeats 49 times>, "dd", '\0' <repeats 12 times>
(gdb) frame 3
#3 0x080cc276 in showtitle (title=0xd10a38f8 "系统维护选单", mid=0x8047860 "KBS测试站")
at newmain_single.c:1275
1275 sprintf(note, "讨论区 [%s]", currboard->filename);
(gdb) i lo
spc1 = 0
colour = 4
note = "讨论区 [靄213\237狧装\037", '\0' <repeats 49 times>, "dd", '\0' <repeats 12 times>
(gdb) p currboard
$1 = (struct boardheader *) 0xd1040000
(gdb) p currboard->filename
Cannot access memory at address 0xd1040000
--
FROM 220.173.136.*