Hi, gc_mark: Marking object of class 'affile_dest_reaper' (1) io.c: sockaddr2info(): Unsupported address family 63828. Program received signal SIGABRT, Aborted. 0x40054781 in kill () from /lib/libc.so.6 (gdb) bt #0 0x40054781 in kill () from /lib/libc.so.6 #1 0x40054464 in raise () from /lib/libc.so.6 #2 0x40055be1 in abort () from /lib/libc.so.6 #3 0x080599ee in fatal ( format=0x8061000 "io.c: sockaddr2info(): Unsupported address family %i.\n") at werror.c:190 #4 0x08058e96 in sockaddr2address_info (addr_len=256, addr=0xbffff7a8) at io.c:1032 #5 0x0804aaf0 in do_handle_line (self=0x8070600, length=62, data=0x8070644 "<86>Nov 5 18:26:38 sshd[346]: connection from \"192.168.1.1\"", addr=0xbffff7a8, addrlen=256) at sources.c:70 #6 0x0804ad7a in do_read_line (h=0x80639a0, read=0xbffff90c) at sources.c:121 #7 0x08057c1f in read_callback (fd=0x8063958) at io.c:419 #8 0x0805780b in io_iter (b=0x80637f8) at io.c:263 #9 0x0804a07f in main_loop (backend=0x80637f8) at main.c:197 #10 0x0804a9d6 in main (argc=2, argv=0xbffffb74) at main.c:527 Seems to be happening when something gets logged from pam to authlog. 1.5.15 works with same configuration. In configuration I have: source src { unix-dgram("/dev/log"); internal(); file("/proc/kmsg"); }; Any more info I can give? --j
On Tue, Nov 05, 2002 at 06:44:36PM +0200, Jaakko Niemi wrote:
Hi,
gc_mark: Marking object of class 'affile_dest_reaper' (1) io.c: sockaddr2info(): Unsupported address family 63828.
this is caused by a kernel bug. the latest libol has workaround (0.3.5), or install 2.4.20 (it was fixed in one of the preXX releases) -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
Balazs Scheidler <bazsi@balabit.hu> writes:
On Tue, Nov 05, 2002 at 06:44:36PM +0200, Jaakko Niemi wrote:
Hi,
gc_mark: Marking object of class 'affile_dest_reaper' (1) io.c: sockaddr2info(): Unsupported address family 63828.
this is caused by a kernel bug. the latest libol has workaround (0.3.5), or install 2.4.20 (it was fixed in one of the preXX releases)
Well, the machine is running 2.4.20-rc1, and I compiled with libol 0.3.5. um, any ideas? --j
On Tue, Nov 05, 2002 at 07:02:20PM +0200, Jaakko Niemi wrote:
Balazs Scheidler <bazsi@balabit.hu> writes:
On Tue, Nov 05, 2002 at 06:44:36PM +0200, Jaakko Niemi wrote:
Hi,
gc_mark: Marking object of class 'affile_dest_reaper' (1) io.c: sockaddr2info(): Unsupported address family 63828.
this is caused by a kernel bug. the latest libol has workaround (0.3.5), or install 2.4.20 (it was fixed in one of the preXX releases)
Well, the machine is running 2.4.20-rc1, and I compiled with libol 0.3.5.
hm.. please check what you get back upon return from recvfrom() the bug was that for SOCK_DGRAM unix domain sockets, recvfrom() returned a sockaddr struct 2 bytes long, and the sa_family member was not filled. try strace-ing the process, and see what the kernel returns. -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
Balazs Scheidler <bazsi@balabit.hu> writes:
On Tue, Nov 05, 2002 at 07:02:20PM +0200, Jaakko Niemi wrote:
Balazs Scheidler <bazsi@balabit.hu> writes:
On Tue, Nov 05, 2002 at 06:44:36PM +0200, Jaakko Niemi wrote:
Hi,
gc_mark: Marking object of class 'affile_dest_reaper' (1) io.c: sockaddr2info(): Unsupported address family 63828.
this is caused by a kernel bug. the latest libol has workaround (0.3.5), or install 2.4.20 (it was fixed in one of the preXX releases)
Well, the machine is running 2.4.20-rc1, and I compiled with libol 0.3.5.
hm.. please check what you get back upon return from recvfrom()
the bug was that for SOCK_DGRAM unix domain sockets, recvfrom() returned a sockaddr struct 2 bytes long, and the sa_family member was not filled.
Hmm, I missed that from the changelog..
try strace-ing the process, and see what the kernel returns.
poll([{fd=9, events=POLLOUT, revents=POLLOUT}, {fd=4, events=POLLIN}, {fd=3, events=POLLIN}], 3, 100) = 1 write(9, "Nov 5 17:53:01 jumper INPUT"..., 244) = 244 time(NULL) = 1036511581 poll([{fd=9, events=0}, {fd=4, events=POLLIN, revents=POLLIN}, {fd=3, events=POLLIN}], 3, 100) = 1 read(4, "<7>INPUT drop: IN=eth0 OUT= MAC="..., 2048) = 221 time(NULL) = 1036511581 time(NULL) = 1036511581 time(NULL) = 1036511581 time(NULL) = 1036511581 poll([{fd=9, events=POLLOUT, revents=POLLOUT}, {fd=4, events=POLLIN}, {fd=3, events=POLLIN}], 3, 100) = 1 write(9, "Nov 5 17:53:01 jumper INPUT"..., 245) = 245 time(NULL) = 1036511581 poll([{fd=9, events=0}, {fd=4, events=POLLIN}, {fd=3, events=POLLIN, revents=POLLIN}], 3, 100) = 1 recvfrom(3, "<38>Nov 5 17:53:01 PAM_unix[952"..., 2048, 0, {sin_family=0xf80c /* AF_??? */, {sa_family=63500, sa_data="\377\27 7\6\351\4\10\10\270\5\10\360@\5\10"}, [256]) = 82 time(NULL) = 1036511581 time(NULL) = 1036511581 write(2, "io.c: sockaddr2info(): Unsupport"..., 57io.c: sockaddr2info(): Unsupported address family 63500. ) = 57 rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0 getpid() = 9523 kill(9523, SIGABRT) = 0 --- SIGABRT (Aborted) --- +++ killed by SIGABRT +++ Only modification to the kernel is that HZ is defined as 1024, but I don't see how this can affect. --j
On Tue, Nov 05, 2002 at 07:25:54PM +0200, Jaakko Niemi wrote:
Balazs Scheidler <bazsi@balabit.hu> writes:
On Tue, Nov 05, 2002 at 07:02:20PM +0200, Jaakko Niemi wrote:
Balazs Scheidler <bazsi@balabit.hu> writes:
On Tue, Nov 05, 2002 at 06:44:36PM +0200, Jaakko Niemi wrote:
Hi,
gc_mark: Marking object of class 'affile_dest_reaper' (1) io.c: sockaddr2info(): Unsupported address family 63828.
this is caused by a kernel bug. the latest libol has workaround (0.3.5), or install 2.4.20 (it was fixed in one of the preXX releases)
Well, the machine is running 2.4.20-rc1, and I compiled with libol 0.3.5.
hm.. please check what you get back upon return from recvfrom()
the bug was that for SOCK_DGRAM unix domain sockets, recvfrom() returned a sockaddr struct 2 bytes long, and the sa_family member was not filled.
Hmm, I missed that from the changelog..
try strace-ing the process, and see what the kernel returns.
poll([{fd=9, events=0}, {fd=4, events=POLLIN}, {fd=3, events=POLLIN, revents=POLLIN}], 3, 100) = 1 recvfrom(3, "<38>Nov 5 17:53:01 PAM_unix[952"..., 2048, 0, {sin_family=0xf80c /* AF_??? */, {sa_family=63500, sa_data="\377\27 7\6\351\4\10\10\270\5\10\360@\5\10"}, [256]) = 82
Only modification to the kernel is that HZ is defined as 1024, but I don't see how this can affect.
I sent this patch to lkml, and they told me it was fixed in 2.4.20presomething. As it seems they didn't, they told me it should be returning 0 as the sockaddr len, but your strace shows that it is 256. --- af_unix.c~ Mon Feb 25 20:38:16 2002 +++ af_unix.c Fri Oct 4 09:46:26 2002 @@ -1392,6 +1392,9 @@ sk->protinfo.af_unix.addr->name, sk->protinfo.af_unix.addr->len); } + else { + ((struct sockaddr *) msg->msg_name)->sa_family = AF_UNIX; + } } static int unix_dgram_recvmsg(struct socket *sock, struct msghdr *msg, int size, -------- ... checking out 2.4.20-rc1, it seems to be indeed fixed, at least they return 0 bytes as this patch shows: @@ -1385,7 +1391,7 @@ static void unix_copy_addr(struct msghdr *msg, struct sock *sk) { - msg->msg_namelen = sizeof(short); + msg->msg_namelen = 0; if (sk->protinfo.af_unix.addr) { msg->msg_namelen=sk->protinfo.af_unix.addr->len; memcpy(msg->msg_name, -------- hmm... this fix is insufficient, as sys_recvfrom() in socket.c only copies the resulting sockaddr back to userspace, _iff_ the new length is non-zero, and in these cases the addrlen is not copied either, this part: if(err >= 0 && addr != NULL && msg.msg_namelen) { err2=move_addr_to_user(address, msg.msg_namelen, addr, addr_len); if(err2<0) err=err2; } msg.msg_namelen is what is set to 0, move_addr_to_user is not called, try this patch (in addition to rc1): --- socket.c.old Tue Nov 5 18:48:22 2002 +++ socket.c Tue Nov 5 18:49:34 2002 @@ -1262,7 +1262,7 @@ flags |= MSG_DONTWAIT; err=sock_recvmsg(sock, &msg, size, flags); - if(err >= 0 && addr != NULL && msg.msg_namelen) + if(err >= 0 && addr != NULL) { err2=move_addr_to_user(address, msg.msg_namelen, addr, addr_len); if(err2<0) -------------- I send this patch to davem. -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
Balazs Scheidler <bazsi@balabit.hu> writes:
I sent this patch to lkml, and they told me it was fixed in 2.4.20presomething. As it seems they didn't, they told me it should be returning 0 as the sockaddr len, but your strace shows that it is 256.
msg.msg_namelen is what is set to 0, move_addr_to_user is not called, try this patch (in addition to rc1):
--- socket.c.old Tue Nov 5 18:48:22 2002 +++ socket.c Tue Nov 5 18:49:34 2002 @@ -1262,7 +1262,7 @@ flags |= MSG_DONTWAIT; err=sock_recvmsg(sock, &msg, size, flags);
- if(err >= 0 && addr != NULL && msg.msg_namelen) + if(err >= 0 && addr != NULL) { err2=move_addr_to_user(address, msg.msg_namelen, addr, addr_len); if(err2<0) --------------
I send this patch to davem.
Ok, everything seems to be working with this. Thanks!
participants (2)
-
Balazs Scheidler
-
Jaakko Niemi