Re: Linux Version 2.2.5 kills syslogd

Richard B. Johnson (root@chaos.analogic.com)
Mon, 5 Apr 1999 11:33:36 -0400 (EDT)


On Sun, 4 Apr 1999, Sid Boyce wrote:

> The latest is sysklogd-1.3-31 which works fine with up to 2.2.5-ac3.
> It's at
> ftp://ftp.infodrom.north.de/pub/people/joey/sysklogd/
> Regards
> --

Well I just got it and installed it. It has the same problem. klogd
runs fine. Syslogd segfaults as soon as it forks. Attempts to debug
it fail, even with `-d` because where ever it segfaults is not in
either its space of the C runtime library space. If I compile it
with TESTING enabled, it runs fine, getting its input from stdin.
However, it can't be used in this manner.

Script started on Mon Apr 5 10:48:34 1999

# ./syslogd -d
Allocated parts table for 1024 file descriptors.
Starting.
Called init.
Called allocate_log, nlogs = -1.
cfline(*.info /var/log/info)
symbolic name: info ==> 6
leading char in action: /
filename: /var/log/info
Called allocate_log, nlogs = 0.
cfline(*.notice;*.alert /var/log/messages)
symbolic name: notice ==> 5
symbolic name: alert ==> 1
leading char in action: /
filename: /var/log/messages
Called allocate_log, nlogs = 1.
cfline(*.debug /var/log/debug)
symbolic name: debug ==> 7
leading char in action: /
filename: /var/log/debug
Called allocate_log, nlogs = 2.
cfline(*.err;*.emerg;*.crit /var/log/syslog)
symbolic name: err ==> 3
symbolic name: emerg ==> 0
symbolic name: crit ==> 2
leading char in action: /
filename: /var/log/syslog
Called allocate_log, nlogs = 3.
cfline(*.warn /var/log/warning)
symbolic name: warn ==> 4
leading char in action: /
filename: /var/log/warning
Opened UNIX socket `/dev/log'.
0: 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F FILE: /var/log/info
1: 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F FILE: /var/log/messages
2: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FILE: /var/log/debug
3: F F F F F F F F F F F F F F F F F F F F F F F F F FILE: /var/log/syslog
4: 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F FILE: /var/log/warning
logmsg: syslog.info<46>, flags 4, from chaos, msg syslogd 1.3-3: restart.
Called fprintlog, logging to FILE /var/log/info
Called fprintlog, logging to FILE /var/log/debug
syslogd: restarted.
Debugging disabled, SIGUSR1 to turn on debugging.
Segmentation fault (core dumped)
# exit
exit

Script done on Mon Apr 5 10:48:49 1999

Script started on Mon Apr 5 10:49:54 1999
# gdb ./syslogd
GDB is free software and you are welcome to 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.
GDB 4.15 (i586-unknown-linux), Copyright 1995 Free Software Foundation, Inc...
(gdb) r -d
Starting program: /usr/src/sysklogd-1.3-31/./syslogd -d
Allocated parts table for 1024 file descriptors.
Starting.
Called init.
Called allocate_log, nlogs = -1.
cfline(*.info /var/log/info)
symbolic name: info ==> 6
leading char in action: /
filename: /var/log/info
Called allocate_log, nlogs = 0.
cfline(*.notice;*.alert /var/log/messages)
symbolic name: notice ==> 5
symbolic name: alert ==> 1
leading char in action: /
filename: /var/log/messages
Called allocate_log, nlogs = 1.
cfline(*.debug /var/log/debug)
symbolic name: debug ==> 7
leading char in action: /
filename: /var/log/debug
Called allocate_log, nlogs = 2.
cfline(*.err;*.emerg;*.crit /var/log/syslog)
symbolic name: err ==> 3
symbolic name: emerg ==> 0
symbolic name: crit ==> 2
leading char in action: /
filename: /var/log/syslog
Called allocate_log, nlogs = 3.
cfline(*.warn /var/log/warning)
symbolic name: warn ==> 4
leading char in action: /
filename: /var/log/warning
Opened UNIX socket `/dev/log'.
0: 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F FILE: /var/log/info
1: 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F FILE: /var/log/messages
2: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FILE: /var/log/debug
3: F F F F F F F F F F F F F F F F F F F F F F F F F FILE: /var/log/syslog
4: 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F FILE: /var/log/warning
logmsg: syslog.info<46>, flags 4, from chaos, msg syslogd 1.3-3: restart.
Called fprintlog, logging to FILE /var/log/info
Called fprintlog, logging to FILE /var/log/debug
syslogd: restarted.
Debugging disabled, SIGUSR1 to turn on debugging.

Program received signal SIGSEGV, Segmentation fault.
0x8049b00 in main ()
(gdb) list *0x8049b00
No source file for address 0x8049b00.
(gdb) list 0x8049b00
Dump of assembler code for function main:
[SNIPPED]
0x8049ae1 <main+1641>: cmpl %ecx,0x804f770
0x8049ae7 <main+1647>: jg 0x8049aa4 <main+1580>
0x8049ae9 <main+1649>: xorl %ebx,%ebx
0x8049aeb <main+1651>: nop
0x8049aec <main+1652>: movl %ebx,%ebp
0x8049aee <main+1654>: andl $0x1f,%ebp
0x8049af1 <main+1657>: movl %ebx,%eax
0x8049af3 <main+1659>: shrl $0x5,%eax
0x8049af6 <main+1662>: shll $0x7,%eax
0x8049af9 <main+1665>: leal 0x5a8(%esp,%eax,1),%edx
0x8049b00 <main+1672>: btl %ebp,0xffffff80(%edx)
^^^^^^^^^^^^^^^
CRASHES HERE

0x8049b04 <main+1676>: setb %al
0x8049b07 <main+1679>: andl $0x1,%eax
0x8049b0a <main+1682>: testl %eax,%eax
0x8049b0c <main+1684>: je 0x8049b1b <main+1699>
0x8049b0e <main+1686>: btsl %ebp,0xffffff00(%edx)
0x8049b15 <main+1693>: cmpl %esi,%ebx
0x8049b17 <main+1695>: jle 0x8049b1b <main+1699>
0x8049b19 <main+1697>: movl %ebx,%esi
0x8049b1b <main+1699>: incl %ebx
0x8049b1c <main+1700>: cmpl $0x3ff,%ebx
0x8049b22 <main+1706>: jle 0x8049aec <main+1652>
0x8049b24 <main+1708>: cmpl $0x0,0x804f988
[SNIPPED]

End of assembler dump.
(gdb)
(gdb) q
The program is running. Quit anyway (and kill it)? (y or n) y
# exit
Script done on Mon Apr 5 10:52:29 1999

It crashes near one of these 'btl` there are only two in the program.
I'll be damned if I can find out what this macro is or where it is
defined.

.L107:
movl 20(%esp),%eax
andl $31,%eax
movl 20(%esp),%edx
shrl $5,%edx
sall $7,%edx
#APP
btl %eax,1052(%esp,%edx) ; setcb %al; andl $1,%eax
#NO_APP
testl %eax,%eax
je .L106
movl 20(%esp),%eax
pushl %eax
pushl $.LC74
call mydprintf
addl $8,%esp

#APP
btl %eax,1052(%esp,%edx) ; setcb %al; andl $1,%eax
#NO_APP
testl %eax,%eax

je .L117
movl 20(%esp),%edi
pushl %edi
pushl $.LC74
call mydprintf
addl $8,%esp
.L117:

Cheers,
Dick Johnson
***** FILE SYSTEM WAS MODIFIED *****
Penguin : Linux version 2.2.5 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/