Debian Bug report logs - #580949
libnetgraph4: netgraph completely broken

version graph

Package: libnetgraph4; Maintainer for libnetgraph4 is GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>; Source for libnetgraph4 is src:freebsd-libs.

Reported by: Antoine Beaupré <anarcat@debian.org>

Date: Mon, 10 May 2010 04:15:01 UTC

Severity: normal

Found in version freebsd-libs/8.0-4

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>:
Bug#580949; Package libnetgraph4. (Mon, 10 May 2010 04:15:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to antoine beaupre <anarcat@anarcat.ath.cx>:
New Bug report received and forwarded. Copy sent to GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>. (Mon, 10 May 2010 04:15:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: antoine beaupre <anarcat@anarcat.ath.cx>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libnetgraph4: netgraph completely broken
Date: Sun, 09 May 2010 20:11:33 -0400
Package: libnetgraph4
Version: 8.0-4
Severity: grave
Justification: renders package unusable

I can't get netgraph to work under Debian/kFreeBSD. I was able to get 
ngctl to compile using a simple hack to work around #522773 and #522774
(#define __unused) but it's completely refusing to start:

loony:/home/anarcat/src/ngctl-7.3# ./ngctl  -d
ngctl: bind(ngctl3745): Invalid argument
ngctl: can't create node: Invalid argument

The kernel then spawns the following:

WARNING: attempt to net_add_domain(netgraph) after domainfinalize()

... regardless of whether I'm using the 7.2, 7.3 or 8.0 kernels. This
error happens only once, when the netgraph modules get autoloaded.

I'm also having problems making the PPPoE support of the ppp userland
program work, a related problem described here:

http://lists.debian.org/debian-bsd/2010/05/msg00017.html

(Note that I have also tried the ppp binary provided by the
freebsd-hackedutils package, which leads to a similar problem:

http://lists.debian.org/debian-bsd/2010/05/msg00019.html )

So my current guess the problem lies within the netgraph library (as
opposed to ngctl, ppp or the kernel), which would do some things in the
wrong order for the kernel. I'm really just guessing here but that's
what the error message error above says. :) (Then again, the above error
message signals an error *within* the kernel's internal API, so the
problem may also lie within the kernel.)

This blocks kfreebsd users from doing anything significant with the
library, so I'm marking this bug as grave. Furthermore, it's affecting
the ppp functionality (keeps PPPoE from working) so it could even be
upgraded to critical (if we want PPPoE in kfreebsd!!), but I'll let the
package maintainer decide this.

I hope this is clear enough and that my tests were complete enough. :)
Let me know if you can reproduce.

A.

(More debugging/tracing guesswork below, skip if you already know how to
fix this. :P)

(net_add_domain() is how new protocols register "hooks" (like protocol
families and hooks for connect() and bind() syscalls) within the kernel.
This is defined in sys/domain.h and kern/uipc_domain.c which make me
suspect the problem may also lie within...)

(I have also traced the problem within ngctl, libgraph and the netgraph
kernel module source code. The problem starts on the NgMkSockNode(3)
call in ngctl's main.c:174. That function, part of libnetgraph, goes
around creating the netgraph socket(2) and bind(2) (in sock.c:76) The
above debugging output shows that it's during the bind(2) (sock.c:104)
that the failure happens. The function registered to handle bind(2)
syscalls in netgraph is ngc_bind() (according to ng_socket.c:1049). From
there on there are multiple places that throw the EINVAL error we can
see in the following trace of ngctl:

6034 ngctl    CALL  socket(PF_NETGRAPH,SOCK_DGRAM,0x2)
6034 ngctl    RET   socket 3
6034 ngctl    CALL  bind(0x3,0xbfbfe2a0,0)
6034 ngctl    RET   bind -1 errno 22 Invalid argument

That's about as far I can trace this at this point.)

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: kfreebsd-i386 (i686)

Kernel: kFreeBSD 7.3-1-686
Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to fr_CA.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libnetgraph4 depends on:
ii  libbsd0                       0.2.0-1    utility functions from BSD systems
ii  libc0.1                       2.10.2-7   Embedded GNU C Library: Shared lib

libnetgraph4 recommends no packages.

libnetgraph4 suggests no packages.

-- no debconf information




Severity set to 'normal' from 'grave' Request was from Petr Salinger <Petr.Salinger@seznam.cz> to control@bugs.debian.org. (Thu, 29 Jul 2010 12:24:06 GMT) Full text and rfc822 format available.

Information stored :
Bug#580949; Package libnetgraph4. (Thu, 29 Jul 2010 12:57:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Petr Salinger <Petr.Salinger@seznam.cz>:
Extra info received and filed, but not forwarded. (Thu, 29 Jul 2010 12:57:03 GMT) Full text and rfc822 format available.

Message #12 received at 580949-quiet@bugs.debian.org (full text, mbox):

From: Petr Salinger <Petr.Salinger@seznam.cz>
To: 580949-quiet@bugs.debian.org
Cc: control@bugs.debian.org
Subject: libnetgraph4: netgraph completely broken
Date: Thu, 29 Jul 2010 16:30:08 +0200 (CEST)
severity 580949 normal
--

Hi,

while it might be really completely broken, on the other
hand it does not looks like regression. AFAIK the only binary
linked into libnetgraph4 is netstat.

The kernel message 
WARNING: attempt to net_add_domain(netgraph) after domainfinalize()
appears also after simple modprobe of ng modules.

I am lowering severity, as this should not prevent us from 
releasing GNU/kFreeBSD architectures with squeeze.

Petr




Changed Bug submitter to 'Antoine Beaupré <anarcat@debian.org>' from 'antoine beaupre <anarcat@anarcat.ath.cx>' Request was from Antoine Beaupré <anarcat@debian.org> to control@bugs.debian.org. (Tue, 08 Nov 2011 01:48:12 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 18 13:22:22 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.