Re: r248583 Kernel panic: negative refcount 0xfffffe0031b59168

2013-06-30 Thread Kubilay Kocak
I'm seeing what I believe is related panic, reliably being generated by
the Python regression test suite on a newly created FreeBSD 10-CURRENT
buildbot.

Symptoms first seen in an freebsd.org FTP snapshot dated "Thu May 30
20:01:46 UTC 2013" and also reproducible on a freshly updated r252400

It is additionally reproducible after checking out pure upstream python
sources, using the following steps:

hg clone http://hg.python.org/cpython
cd cpython && configure && make buildbottest

An interesting possible correlation is that it seems to drop out
during/around "test_socket"

Backtrace below:

> koobs@10-CURRENT-amd64:~ % sudo kgdb /boot/kernel/kernel /var/crash/vmcore.1
> GNU gdb 6.1.1 [FreeBSD]
> Copyright 2004 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 "amd64-marcel-freebsd"...
> 
> Unread portion of the kernel message buffer:
> panic: negative refcount 0xfe0009316de8
> cpuid = 0
> KDB: enter: panic
> 
> Reading symbols from /boot/kernel/zfs.ko.symbols...done.
> Loaded symbols for /boot/kernel/zfs.ko.symbols
> Reading symbols from /boot/kernel/opensolaris.ko.symbols...done.
> Loaded symbols for /boot/kernel/opensolaris.ko.symbols
> #0  doadump (textdump=114425856) at pcpu.h:236
> 236 pcpu.h: No such file or directory.
> in pcpu.h
> (kgdb) bt
> #0  doadump (textdump=114425856) at pcpu.h:236
> #1  0x80338a75 in db_fncall (dummy1=, 
> dummy2=, dummy3=, dummy4= optimized out>)
> at /usr/src/sys/ddb/db_command.c:578
> #2  0x8033875d in db_command (cmd_table=) at 
> /usr/src/sys/ddb/db_command.c:449
> #3  0x803384d4 in db_command_loop () at 
> /usr/src/sys/ddb/db_command.c:502
> #4  0x8033ae80 in db_trap (type=, code=0) at 
> /usr/src/sys/ddb/db_main.c:231
> #5  0x808ec1b3 in kdb_trap (type=3, code=0, tf=) 
> at /usr/src/sys/kern/subr_kdb.c:654
> #6  0x80c4cadb in trap (frame=0xff80978a7880) at 
> /usr/src/sys/amd64/amd64/trap.c:579
> #7  0x80c35ca2 in calltrap () at 
> /usr/src/sys/amd64/amd64/exception.S:232
> #8  0x808eb98e in kdb_enter (why=0x80f10487 "panic", 
> msg=) at cpufunc.h:63
> #9  0x808b5a76 in vpanic (fmt=, ap= optimized out>) at /usr/src/sys/kern/kern_shutdown.c:747
> #10 0x808b5926 in kassert_panic (fmt=) at 
> /usr/src/sys/kern/kern_shutdown.c:642
> #11 0x80875b4f in closef (fp=, td= optimized out>) at refcount.h:66
> #12 0x80873890 in closefp (fdp=0xfe0009652000, fd= optimized out>, fp=0xfe0009316dc0, td=0xfe0009337490, 
> holdleaders=)
> at /usr/src/sys/kern/kern_descrip.c:1140
> #13 0x80c4d725 in amd64_syscall (td=0xfe0009337490, traced=0) at 
> subr_syscall.c:134
> #14 0x80c35f8b in Xfast_syscall () at 
> /usr/src/sys/amd64/amd64/exception.S:391
> #15 0x00080119b00a in ?? ()
> Previous frame inner to this frame (corrupt stack?)
> Current language:  auto; currently minimal
> (kgdb)

--
koobs

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


panic: Lock filedesc structure not share locked

2013-06-30 Thread Alexander Leidinger
Hi,

with head as of r252381 on amd64, I got the following panic after
starting tmux and creating a 2nd terminal window inside tmux
(ctrl- + c):
---snip---
panic: Lock filedesc structure not share locked @ 
/space/system/usr_src/sys/kern/kern_descrip.c:3448

cpuid = 2
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xff839ee566d0
kdb_backtrace() at kdb_backtrace+0x39/frame 0xff839ee56780
vpanic() at vpanic+0x126/frame 0xff839ee567c0
panic() at panic+0x43/frame 0xff839ee56820
_sx_assert() at _sx_assert+0x134/frame 0xff839ee56830
_sx_sunlock() at _sx_sunlock+0x46/frame 0xff839ee56860
kern_proc_filedesc_out() at kern_proc_filedesc_out+0x420/frame 
0xff839ee568e0
sysctl_kern_proc_filedesc() at sysctl_kern_proc_filedesc+0x66/frame 
0xff839ee56950
sysctl_root() at sysctl_root+0x1bd/frame 0xff839ee569a0
userland_sysctl() at userland_sysctl+0x192/frame 0xff839ee56a40
sys___sysctl() at sys___sysctl+0x74/frame 0xff839ee56af0
amd64_syscall() at amd64_syscall+0x23c/frame 0xff839ee56bf0
Xfast_syscall() at Xfast_syscall+0xfb/frame 0xff839ee56bf0
---snip---

Full textdump output available at
  http://www.leidinger.net/test/textdump.tar.2

Bye,
Alexander.

-- 
http://www.Leidinger.netAlexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org   netchild @ FreeBSD.org  : PGP ID = 72077137
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


network.subr (r252360) changes break ifconfig_aliasX

2013-06-30 Thread Ian FREISLICH
Hi

I can't figure out how to use rc.conf to configure my interfaces
after these recent charges.  My use case is that I have interfaces
to configure but I don't need to put an IP address on them.  I do
need to change the MAC address though.

What I have been doing is probably wrong, but it worked up until
r252360:

lagg0: link state changed to DOWN
/etc/rc: WARNING: $ifconfig_lagg0_alias0 needs  "inet" keyword for an IPv4 
address.
ifconfig: ether: bad value

But, there is no ip address for this interface.

The config looks like:

cloned_interfaces="lagg0 \
vlan2 vlan3 vlan4 vlan5 vlan6 vlan7 vlan8 vlan9 vlan14 vlan15 vlan19 \
vlan20 vlan21 vlan22 vlan23 vlan24 vlan25 vlan26 vlan27 vlan30 \
vlan33 vlan37 vlan39 vlan40 vlan41 vlan44 vlan45 vlan999 \
"
ifconfig_igb0="up"
ifconfig_igb1="up"
ifconfig_igb2="up"
ifconfig_igb3="up"

ifconfig_lagg0="up laggproto lacp laggport igb0 laggport igb1 laggport igb2 
laggport igb3"
ifconfig_lagg0_alias0="ether 00:1e:c9:53:3e:15"

# Neotel
ifconfig_vlan2="vlandev lagg0 vlan 2" #should probably be create_args
ifconfig_vlan2_alias0="inet 41.161.56.4/29"
ifconfig_vlan2_alias1="inet 41.154.2.106/29"
ifconfig_vlan2_alias2="inet 196.46.25.156/25"
ifconfig_vlan2_alias3="inet 41.161.56.2/29 vhid 2 pass XXX advskew 20"
ifconfig_vlan2_alias4="inet 41.154.2.105/29 vhid 2 pass XXX advskew 20"
ifconfig_vlan2_alias5="inet 196.46.25.155/25 vhid 2 pass XXX advskew 20"

etc.

I've tried create_args but I still get the following error:

ifconfig: ether: bad value

and, I cannot use ifconfig_lagg0 to set the MAC address because the
rc system just seems to ignore the configured string.

I can however 'ifconfig lagg0 ether 00:1e:c9:53:3e:15' from the
cammand line, so there's something in the rc scripts that's mangling
the argument.

Ian

-- 
Ian Freislich
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: r248583 Kernel panic: negative refcount 0xfffffe0031b59168

2013-06-30 Thread Konstantin Belousov
On Sun, Jun 30, 2013 at 05:21:42PM +1000, Kubilay Kocak wrote:
> I'm seeing what I believe is related panic, reliably being generated by
> the Python regression test suite on a newly created FreeBSD 10-CURRENT
> buildbot.
> 
> Symptoms first seen in an freebsd.org FTP snapshot dated "Thu May 30
> 20:01:46 UTC 2013" and also reproducible on a freshly updated r252400
> 
> It is additionally reproducible after checking out pure upstream python
> sources, using the following steps:
> 
> hg clone http://hg.python.org/cpython
> cd cpython && configure && make buildbottest
> 
> An interesting possible correlation is that it seems to drop out
> during/around "test_socket"

Can you extract the autonomous test case, in C ?


pgpCR_7rbQtav.pgp
Description: PGP signature


Re: network.subr (r252360) changes break ifconfig_aliasX

2013-06-30 Thread Ian FREISLICH
"Ian FREISLICH" wrote:
> What I have been doing is probably wrong, but it worked up until
> r252360:

I see from the commit log that it was actually 252015 that broke my router.

-- 
Ian Freislich
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: panic: Lock filedesc structure not share locked

2013-06-30 Thread Mateusz Guzik
On Sun, Jun 30, 2013 at 09:41:50AM +0200, Alexander Leidinger wrote:
> Hi,
> 
> with head as of r252381 on amd64, I got the following panic after
> starting tmux and creating a 2nd terminal window inside tmux
> (ctrl- + c):
> ---snip---
> panic: Lock filedesc structure not share locked @ 
> /space/system/usr_src/sys/kern/kern_descrip.c:3448
> 
> cpuid = 2
> KDB: stack backtrace:
> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xff839ee566d0
> kdb_backtrace() at kdb_backtrace+0x39/frame 0xff839ee56780
> vpanic() at vpanic+0x126/frame 0xff839ee567c0
> panic() at panic+0x43/frame 0xff839ee56820
> _sx_assert() at _sx_assert+0x134/frame 0xff839ee56830
> _sx_sunlock() at _sx_sunlock+0x46/frame 0xff839ee56860
> kern_proc_filedesc_out() at kern_proc_filedesc_out+0x420/frame 
> 0xff839ee568e0
> sysctl_kern_proc_filedesc() at sysctl_kern_proc_filedesc+0x66/frame 
> 0xff839ee56950
> sysctl_root() at sysctl_root+0x1bd/frame 0xff839ee569a0
> userland_sysctl() at userland_sysctl+0x192/frame 0xff839ee56a40
> sys___sysctl() at sys___sysctl+0x74/frame 0xff839ee56af0
> amd64_syscall() at amd64_syscall+0x23c/frame 0xff839ee56bf0
> Xfast_syscall() at Xfast_syscall+0xfb/frame 0xff839ee56bf0
> ---snip---
> 

Can you try this (only compile-tested):
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index e760fe5..7aa17cd 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -3272,6 +3272,8 @@ export_fd_to_sb(void *data, int type, int fd, int fflags, 
int refcnt,
if (efbuf->remainder < kif->kf_structsize) {
/* Terminate export. */
efbuf->remainder = 0;
+   if (!locked && efbuf->fdp != NULL)
+   FILEDESC_SLOCK(efbuf->fdp);
return (0);
}
efbuf->remainder -= kif->kf_structsize;

-- 
Mateusz Guzik 
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: r248583 Kernel panic: negative refcount 0xfffffe0031b59168

2013-06-30 Thread Mateusz Guzik
On Sun, Jun 30, 2013 at 05:21:42PM +1000, Kubilay Kocak wrote:
> I'm seeing what I believe is related panic, reliably being generated by
> the Python regression test suite on a newly created FreeBSD 10-CURRENT
> buildbot.
> 
> Symptoms first seen in an freebsd.org FTP snapshot dated "Thu May 30
> 20:01:46 UTC 2013" and also reproducible on a freshly updated r252400
> 
> It is additionally reproducible after checking out pure upstream python
> sources, using the following steps:
> 
> hg clone http://hg.python.org/cpython
> cd cpython && configure && make buildbottest
> 
> An interesting possible correlation is that it seems to drop out
> during/around "test_socket"
> 

Turns out the bug is quite funny ;)

Try this:
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index 5d8e814..7a4db04 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -1764,8 +1764,8 @@ unp_externalize(struct mbuf *control, struct mbuf 
**controlp, int flags)
}
for (i = 0; i < newfds; i++, fdp++) {
fde = &fdesc->fd_ofiles[*fdp];
-   fde->fde_file = fdep[0]->fde_file;
-   filecaps_move(&fdep[0]->fde_caps,
+   fde->fde_file = fdep[i]->fde_file;
+   filecaps_move(&fdep[i]->fde_caps,
&fde->fde_caps);
if ((flags & MSG_CMSG_CLOEXEC) != 0)
fde->fde_flags |= UF_EXCLOSE;
-- 
Mateusz Guzik 
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: another -Wunsequenced topic

2013-06-30 Thread dt71

There are more.

Take the first hunk with caution.

Index: contrib/gdb/gdb/dwarf2-frame.c
===
--- contrib/gdb/gdb/dwarf2-frame.c  (revision 252384)
+++ contrib/gdb/gdb/dwarf2-frame.c  (working copy)
@@ -1361,7 +1361,7 @@
  else if (*augmentation == 'P')
{
  /* Skip.  */
- buf += size_of_encoded_value (*buf++);
+ buf += size_of_encoded_value (*buf) + 1;
  augmentation++;
}
 
Index: usr.sbin/moused/moused.c

===
--- usr.sbin/moused/moused.c(revision 252384)
+++ usr.sbin/moused/moused.c(working copy)
@@ -2455,7 +2455,7 @@
return (FALSE);
lbutton = atoi(s);
 
-	arg = skipspace(++arg);

+   arg = skipspace(arg + 1);
s = arg;
while (isdigit(*arg))
++arg;
Index: lib/libstand/nfs.c
===
--- lib/libstand/nfs.c  (revision 252384)
+++ lib/libstand/nfs.c  (working copy)
@@ -1465,8 +1465,9 @@
d->d_name[d->d_namlen] = '\0';
 
 	pos = roundup(d->d_namlen, sizeof(uint32_t)) / sizeof(uint32_t);

-   fp->off = cookie = ((uint64_t)ntohl(rent->nameplus[pos++]) << 32) |
-   ntohl(rent->nameplus[pos++]);
+   fp->off = cookie = ((uint64_t)ntohl(rent->nameplus[pos]) << 32) |
+   ntohl(rent->nameplus[pos + 1]);
+   pos += 2;
buf = (u_char *)&rent->nameplus[pos];
return (0);
 }
Index: contrib/sendmail/src/recipient.c
===
--- contrib/sendmail/src/recipient.c(revision 252384)
+++ contrib/sendmail/src/recipient.c(working copy)
@@ -1834,7 +1834,7 @@
 
 		/* #@# introduces a comment anywhere */

/* for Japanese character sets */
-   for (p = buf; (p = strchr(++p, '#')) != NULL; )
+   for (p = buf; (p = strchr(p + 1, '#')) != NULL; )
{
if (p[1] == '@' && p[2] == '#' &&
isascii(p[-1]) && isspace(p[-1]) &&
Index: usr.sbin/pkg_install/create/perform.c
===
--- usr.sbin/pkg_install/create/perform.c   (revision 252384)
+++ usr.sbin/pkg_install/create/perform.c   (working copy)
@@ -149,7 +149,7 @@
 
 	/* Count number of dependencies */

for (cp = Pkgdeps; cp != NULL && *cp != '\0';
-  cp = strpbrk(++cp, " \t\n")) {
+  cp = strpbrk(cp + 1, " \t\n")) {
ndeps++;
}
 
___

freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


"make -j4 buildwolrd" success when here are problems (files was not found in depend / all targets)

2013-06-30 Thread Lev Serebryakov
Hello, Freebsd-current.

 I'm trying to build world with patch from Rui Paulo,   which imports
hostapd/wpa_supplicant 2.0

 I've used "worng" patch, which didn't add some files, but "make -j4
 buildworld" succeed! Here are quotes from "buildworld" log:


===> usr.sbin/wpa/wpa_supplicant (depend)
make: make: don't know how to make driver_common.c. Stop

make: stopped in /data/src/usr.sbin/wpa/wpa_supplicant
===> usr.sbin/wpa/wpa_cli (depend)
make: make: don't know how to make edit.c. Stop

make: stopped in /data/src/usr.sbin/wpa/wpa_cli
===> usr.sbin/wpa/wpa_passphrase (depend)
--- .depend ---
rm -f .depend
CC='/usr/bin/cc --sysroot=/data/obj.nano/gateway.v2/data/src/tmp 
-B/data/obj.nano/gateway.v2/data/src/tmp/usr/bin' mkdep -f .depend -a
-I/data/src/usr.sbin/wpa/wpa_passphrase 
-I/data/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//hostapd 
-I/data/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//src 
-I/data/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//src/common 
-I/data/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//src/crypto 
-I/data/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//src/drivers 
-I/data/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//src/l2_packet 
-I/data/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//src/utils 
-I/data/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//src/wps 
-DCONFIG_CTRL_IFACE -DCONFIG_CTRL_IFACE_UNIX -DINTERNAL_SHA1 -DINTERNAL_MD5 
-I/data/src/usr.sbin/wpa/wpa_passphrase 
-I/data/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//hostapd 
-I/data/src/usr.sbin/wpa/wpa_passphrase/../../../con
 trib/wpa//src 
-I/data/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//src/common 
-I/data/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//src/crypto 
-I/data/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//src/drivers 
-I/data/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//src/l2_packet 
-I/data/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//src/utils 
-I/data/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//src/wps 
-DCONFIG_CTRL_IFACE -DCONFIG_CTRL_IFACE_UNIX -std=gnu99   
/data/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//src/utils/common.c 
/data/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//src/crypto/md5-internal.c
 /data/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//src/crypto/md5.c 
/data/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//src/utils/os_unix.c 
/data/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//src/crypto/sha1-internal.c
 /data/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//src/crypto
 /sha1-pbkdf2.c 
/data/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//src/crypto/sha1.c 
/data/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//wpa_supplicant/wpa_passphrase.c
echo wpa_passphrase: /data/obj.nano/gateway.v2/data/src/tmp/usr/lib/libc.a  >> 
.depend
===> usr.sbin/wpa/hostapd (depend)
make: make: don't know how to make driver_common.c. Stop

make: stopped in /data/src/usr.sbin/wpa/hostapd
===> usr.sbin/wpa/hostapd_cli (depend)
make: make: don't know how to make edit.c. Stop

make: stopped in /data/src/usr.sbin/wpa/hostapd_cli


 And, later


===> usr.sbin/wpa/wpa_supplicant (all)
make: make: don't know how to make driver_common.c. Stop

make: stopped in /data/src/usr.sbin/wpa/wpa_supplicant
===> usr.sbin/wpa/wpa_cli (all)
make: make: don't know how to make edit.c. Stop

make: stopped in /data/src/usr.sbin/wpa/wpa_cli


 But

--
>>> World build completed on Sun Jun 30 21:13:10 MSK 2013
--

 Later, "installworld" failed due to absence of "wpa_ssupplicant"
program!

 I'm using r252420 as base.

-- 
// Black Lion AKA Lev Serebryakov 

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: network.subr (r252360) changes break ifconfig_aliasX

2013-06-30 Thread Hiroki Sato
"Ian FREISLICH"  wrote
  in :

ia> Hi
ia>
ia> I can't figure out how to use rc.conf to configure my interfaces
ia> after these recent charges.  My use case is that I have interfaces
ia> to configure but I don't need to put an IP address on them.  I do
ia> need to change the MAC address though.

 Please try r252426.

-- Hiroki


pgpPp9RCG9oqY.pgp
Description: PGP signature


Zoneminder build failure

2013-06-30 Thread Saul A. Peebsen
Running -CURRENT, I'm getting this:

c++  -O2 -pipe -march=core2 -fno-strict-aliasing  -L/usr/local/lib
-L/usr/local/lib/mysql  -lpthread  -o zmc zmc.o zm_box.o zm_buffer.o
zm_camera.o zm_comms.o zm_config.o  zm_coord.o zm.o zm_db.o
zm_logger.o zm_event.o zm_exception.o  zm_file_camera.o
zm_ffmpeg_camera.o  zm_image.o zm_jpeg.o zm_local_camera.o
zm_monitor.o zm_ffmpeg.o zm_mpeg.o  zm_poly.o zm_regexp.o
zm_remote_camera.o zm_remote_camera_http.o  zm_remote_camera_rtsp.o
zm_rtp.o  zm_rtp_ctrl.o zm_rtp_data.o  zm_rtp_source.o zm_rtsp.o
zm_sdp.o  zm_signal.o zm_stream.o zm_thread.o  zm_time.o zm_timer.o
zm_user.o  zm_utils.o zm_zone.o  -lz -lbz2 -lswscale -lavdevice
-lavformat -lavcodec -lavutil -lz -lpcre -lcrypto -lc -lpthread -ljpeg
-lmysqlclient zm_timer.o: In function `Timer::TimerThread::run()':
zm_timer.cpp:(.text+0x428): undefined reference to
`ThreadData::setValue(bool)' c++: error: linker command failed
with exit code 1 (use -v to see invocation) *** Error code 1

Is there a fix for it?

-- 
Cheers, Saul
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: panic: Lock filedesc structure not share locked

2013-06-30 Thread Mikolaj Golub
On Sun, Jun 30, 2013 at 10:27:57AM +0200, Mateusz Guzik wrote:
> On Sun, Jun 30, 2013 at 09:41:50AM +0200, Alexander Leidinger wrote:
> > Hi,
> > 
> > with head as of r252381 on amd64, I got the following panic after
> > starting tmux and creating a 2nd terminal window inside tmux
> > (ctrl- + c):
> > ---snip---
> > panic: Lock filedesc structure not share locked @ 
> > /space/system/usr_src/sys/kern/kern_descrip.c:3448
> > 
> > cpuid = 2
> > KDB: stack backtrace:
> > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 
> > 0xff839ee566d0
> > kdb_backtrace() at kdb_backtrace+0x39/frame 0xff839ee56780
> > vpanic() at vpanic+0x126/frame 0xff839ee567c0
> > panic() at panic+0x43/frame 0xff839ee56820
> > _sx_assert() at _sx_assert+0x134/frame 0xff839ee56830
> > _sx_sunlock() at _sx_sunlock+0x46/frame 0xff839ee56860
> > kern_proc_filedesc_out() at kern_proc_filedesc_out+0x420/frame 
> > 0xff839ee568e0
> > sysctl_kern_proc_filedesc() at sysctl_kern_proc_filedesc+0x66/frame 
> > 0xff839ee56950
> > sysctl_root() at sysctl_root+0x1bd/frame 0xff839ee569a0
> > userland_sysctl() at userland_sysctl+0x192/frame 0xff839ee56a40
> > sys___sysctl() at sys___sysctl+0x74/frame 0xff839ee56af0
> > amd64_syscall() at amd64_syscall+0x23c/frame 0xff839ee56bf0
> > Xfast_syscall() at Xfast_syscall+0xfb/frame 0xff839ee56bf0
> > ---snip---
> > 
> 
> Can you try this (only compile-tested):
> diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
> index e760fe5..7aa17cd 100644
> --- a/sys/kern/kern_descrip.c
> +++ b/sys/kern/kern_descrip.c
> @@ -3272,6 +3272,8 @@ export_fd_to_sb(void *data, int type, int fd, int 
> fflags, int refcnt,
>   if (efbuf->remainder < kif->kf_structsize) {
>   /* Terminate export. */
>   efbuf->remainder = 0;
> + if (!locked && efbuf->fdp != NULL)
> + FILEDESC_SLOCK(efbuf->fdp);
>   return (0);
>   }
>   efbuf->remainder -= kif->kf_structsize;
> 

Mateusz, thank you for spotting this lock leakage. Regardless if this
is the root cause of the reported panic (it looks like it is), this
fix should be definetly committed. Will you do this?

-- 
Mikolaj Golub
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: panic: Lock filedesc structure not share locked

2013-06-30 Thread Mateusz Guzik
On Mon, Jul 01, 2013 at 12:23:35AM +0300, Mikolaj Golub wrote:
> On Sun, Jun 30, 2013 at 10:27:57AM +0200, Mateusz Guzik wrote:
> > On Sun, Jun 30, 2013 at 09:41:50AM +0200, Alexander Leidinger wrote:
> > > Hi,
> > > 
> > > with head as of r252381 on amd64, I got the following panic after
> > > starting tmux and creating a 2nd terminal window inside tmux
> > > (ctrl- + c):
> > > ---snip---
> > > panic: Lock filedesc structure not share locked @ 
> > > /space/system/usr_src/sys/kern/kern_descrip.c:3448
> > > 
> > > cpuid = 2
> > > KDB: stack backtrace:
> > > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 
> > > 0xff839ee566d0
> > > kdb_backtrace() at kdb_backtrace+0x39/frame 0xff839ee56780
> > > vpanic() at vpanic+0x126/frame 0xff839ee567c0
> > > panic() at panic+0x43/frame 0xff839ee56820
> > > _sx_assert() at _sx_assert+0x134/frame 0xff839ee56830
> > > _sx_sunlock() at _sx_sunlock+0x46/frame 0xff839ee56860
> > > kern_proc_filedesc_out() at kern_proc_filedesc_out+0x420/frame 
> > > 0xff839ee568e0
> > > sysctl_kern_proc_filedesc() at sysctl_kern_proc_filedesc+0x66/frame 
> > > 0xff839ee56950
> > > sysctl_root() at sysctl_root+0x1bd/frame 0xff839ee569a0
> > > userland_sysctl() at userland_sysctl+0x192/frame 0xff839ee56a40
> > > sys___sysctl() at sys___sysctl+0x74/frame 0xff839ee56af0
> > > amd64_syscall() at amd64_syscall+0x23c/frame 0xff839ee56bf0
> > > Xfast_syscall() at Xfast_syscall+0xfb/frame 0xff839ee56bf0
> > > ---snip---
> > > 
> > 
> > Can you try this (only compile-tested):
> > diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
> > index e760fe5..7aa17cd 100644
> > --- a/sys/kern/kern_descrip.c
> > +++ b/sys/kern/kern_descrip.c
> > @@ -3272,6 +3272,8 @@ export_fd_to_sb(void *data, int type, int fd, int 
> > fflags, int refcnt,
> > if (efbuf->remainder < kif->kf_structsize) {
> > /* Terminate export. */
> > efbuf->remainder = 0;
> > +   if (!locked && efbuf->fdp != NULL)
> > +   FILEDESC_SLOCK(efbuf->fdp);
> > return (0);
> > }
> > efbuf->remainder -= kif->kf_structsize;
> > 
> 
> Mateusz, thank you for spotting this lock leakage. Regardless if this
> is the root cause of the reported panic (it looks like it is), this
> fix should be definetly committed. Will you do this?
> 

I think it will be better if you do this and then MFC all commits.

-- 
Mateusz Guzik 
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Proposal: multi-instance and self-contained rc.d script

2013-06-30 Thread Hiroki Sato
Hi,

 I am working on rc.d script improvements in terms of the following
 two points.  A prototype is attached.  This still includes some rough
 edges but should be enough to understand the concepts.  I would like
 your comments about them.  (This is posted to -current@ and -rc@, but
 please reply to freebsd-rc@ only)

 1. Multi-instance support

  As you know, an rc.d script invokes ${name}_program with
  configuration variables in /etc/rc.conf.  It works, but it is
  difficult to run multiple instances of a program.  A typical example
  is named---a sysadmin often wants to run two instances of named as a
  caching server and a content DNS server by using different
  named.conf.  In the current framework, two rc.d scripts are needed
  by copying /etc/rc.d/named to /etc/rc.d/named_cache and rewriting
  name= and rcvar=.

  The attached patch allows the following:

  named_enable="YES"
  named_instances="cache1 cache2"
  named_conf="/etc/namedb/named.conf"
  named_cache1_enable="YES"
  named_cache1_conf="/etc/namedb/named_cache1.conf"
  named_cache2_enable="NO"
  named_cache2_conf="/etc/namedb/named_cache2.conf"

  A new variable "{name}_instances" defines instances.  In this
  example, it is named_instances="cache1 cache2".  All of the default
  values of $named_{instname}_foo are automatically set to the same as
  $named_foo.

  In the implementation, load_rc_config() reads variables for all
  instances and run_rc_command() runs each instance in order.  When
  doing "rc.d/foo stop", run_rc_command() stops the instances in
  reverse order.

  In the patch, killing the processes without pid file does not work
  well yet.  This can be improved.

 2. Self-contained rc.d script

  rc.d scripts depend on /etc/default/rc.conf for the default
  configuration and rc.conf(5) manual page describes the knobs.
  However, it is difficult to understand which variable is related to
  which script.  In addition, /etc/defaults/rc.conf is often out of
  sync with the rc.d scripts.  So, my proposal is as follows:

   a) Define rc.conf variables and the default values in the rc.d
  script which uses them.  "rc.d/foo rcvar" shows the variables
  and the default values.

   b) Make rc.d/foo always have rc.d/foo(8) manual page.

  The attached patch includes an example of rc.d/routed.  The primary
  difference is declaration part of rc.conf variables:

  set_rcvar enable   NO
  set_rcvar program  /sbin/routed
  set_rcvar flags-q

  These sets the default value of $routed_{enable,program,flags} at
  load_rc_config().  The reason why a simple ": ${routed_enable="NO"}"
  does not work is that it does not work with multi-instance support.

  This is backward-compatible with the current /etc/defaults/rc.conf.
  load_rc_config() sets these values first, and then reads
  /etc/defaults/rc.conf and /etc/rc.conf.d/$name.

  "rc.d/route rcvar" displays the current configuration and available
  variables briefly like the following:

   # routed: network RIP and router discovery routing daemon
   #
   routed_enable="NO"  # (default: "NO")
   routed_program="/sbin/routed"   # (default: "/sbin/routed")
   routed_flags="-q"   # (default: "-q")

  When multi-instance is enabled in rc.conf like this:

   routed_enable="YES"
   routed_instances="hoge fuga"
   routed_hoge_desc="hogehoge"
   routed_fuga_enable="NO"
   routed_fuga_flags=""

  The results of rcvar will be the following:

   # routed: network RIP and router discovery routing daemon
   #
   routed_enable="YES"  # (default: "NO")
   routed_program="/sbin/routed"   # (default: "/sbin/routed")
   routed_flags="-q"   # (default: "-q")

   # routed_hoge: network RIP and router discovery routing daemon: hogehoge
   #
   routed_hoge_enable="YES" # (default: "NO")
   routed_hoge_program="/sbin/routed"  # (default: "/sbin/routed")
   routed_hoge_flags="-q"  # (default: "-q")

   # routed_fuga: network RIP and router discovery routing daemon
   #
   routed_fuga_enable="NO" # (default: "NO")
   routed_fuga_program="/sbin/routed"  # (default: "/sbin/routed")
   routed_fuga_flags=""# (default: "-q")

 We can remove or comment out all of lines in /etc/defaults/rc.conf,
 and mismatch between /etc/defaults/rc.conf and scripts does not
 occur.  Running "rc.d/foo rcvar" can be used to generate
 /etc/defaults/rc.conf if needed.

 That's all.  Both changes are fully backward compatible and I believe
 they improve flexibility and manageability of rc.d scripts.

 An example of rc.d/routed(8) manual page is also attached.  If these
 changes are acceptable, I would like to split the current (lengthy)
 rc.conf(5) manual page into rc.d/foo(8).

-- Hiroki
RC.D/ROUTED(8)  FreeBSD System Manager's Manual RC.D/ROUTED(8)

NAME
 routed -- rc.d script for routed(8) daemon

SYNOPSIS
 routed [fast|force|one]start|stop|restart|rcvar|status|poll

DESCRIPTION
 routed is an rc.d(8) script to control routed(8) daemon.

COMMAND LINE ARGUMENTS
 

Re: Proposal: multi-instance and self-contained rc.d script

2013-06-30 Thread Lev Serebryakov
Hello, Hiroki.
You wrote 1 июля 2013 г., 1:29:53:

HS>   The attached patch allows the following:
HS>   named_enable="YES"
HS>   named_instances="cache1 cache2"
HS>   named_conf="/etc/namedb/named.conf"
HS>   named_cache1_enable="YES"
HS>   named_cache1_conf="/etc/namedb/named_cache1.conf"
HS>   named_cache2_enable="NO"
HS>   named_cache2_conf="/etc/namedb/named_cache2.conf"
  If it will work with ports rc scripts it will be great! For example,
nsd DNS server doesn't support views and often need to be run in multiple
instances.

-- 
// Black Lion AKA Lev Serebryakov 

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Re: panic: Lock filedesc structure not share locked

2013-06-30 Thread Mikolaj Golub
On Sun, Jun 30, 2013 at 11:29:59PM +0200, Mateusz Guzik wrote:

> I think it will be better if you do this and then MFC all commits.

Committed as r252436. Thanks.

-- 
Mikolaj Golub
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: r248583 Kernel panic: negative refcount 0xfffffe0031b59168

2013-06-30 Thread Gleb Kurtsou
On (30/06/2013 13:18), Mateusz Guzik wrote:
> On Sun, Jun 30, 2013 at 05:21:42PM +1000, Kubilay Kocak wrote:
> > I'm seeing what I believe is related panic, reliably being generated by
> > the Python regression test suite on a newly created FreeBSD 10-CURRENT
> > buildbot.
> > 
> > Symptoms first seen in an freebsd.org FTP snapshot dated "Thu May 30
> > 20:01:46 UTC 2013" and also reproducible on a freshly updated r252400
> > 
> > It is additionally reproducible after checking out pure upstream python
> > sources, using the following steps:
> > 
> > hg clone http://hg.python.org/cpython
> > cd cpython && configure && make buildbottest
> > 
> > An interesting possible correlation is that it seems to drop out
> > during/around "test_socket"
> > 
> 
> Turns out the bug is quite funny ;)

Patch fixes chrome for me.

Thanks!

> 
> Try this:
> diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
> index 5d8e814..7a4db04 100644
> --- a/sys/kern/uipc_usrreq.c
> +++ b/sys/kern/uipc_usrreq.c
> @@ -1764,8 +1764,8 @@ unp_externalize(struct mbuf *control, struct mbuf 
> **controlp, int flags)
>   }
>   for (i = 0; i < newfds; i++, fdp++) {
>   fde = &fdesc->fd_ofiles[*fdp];
> - fde->fde_file = fdep[0]->fde_file;
> - filecaps_move(&fdep[0]->fde_caps,
> + fde->fde_file = fdep[i]->fde_file;
> + filecaps_move(&fdep[i]->fde_caps,
>   &fde->fde_caps);
>   if ((flags & MSG_CMSG_CLOEXEC) != 0)
>   fde->fde_flags |= UF_EXCLOSE;
> -- 
> Mateusz Guzik 
> ___
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: network.subr (r252360) changes break ifconfig_aliasX

2013-06-30 Thread Ian FREISLICH
Hiroki Sato wrote:
> ia> I can't figure out how to use rc.conf to configure my interfaces
> ia> after these recent charges.  My use case is that I have interfaces
> ia> to configure but I don't need to put an IP address on them.  I do
> ia> need to change the MAC address though.
> 
>  Please try r252426.

Thanks.  That fixes it.

BTW, nice new features in network.subr.

Ian

-- 
Ian Freislich
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"