Re: Something wrong with curs_threads(3X) ?

2012-05-22 Thread Dimitry Andric
On 2012-05-21 18:41, Yanhui Shen wrote:
 In curs_threads(3X), at the beginning of the manual:
 
 typedef   int  (*NCURSES_WINDOW_CB)(WINDOW  *,  void  *);  typedef  int
(*NCURSES_SCREEN_CB)(SCREEN *, void *);
int set_escdelay(int size);
int set_tabsize(int size);
int use_screen(SCREEN *scr, NCURSES_WINDOW_CB func, void *data);
int use_window(WINDOW *win, NCURSES_SCREEN_CB func, void *data);

That's indeed a documentation error.  Fixed in r235773, thanks!
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


(no subject)

2012-05-22 Thread S . N . Grigoriev
Hi list,

I tried to build world and kernel with CLang on my 9-stable amd64 system.
The following errors occured:

mv -f term.h.new term.h
cat /usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/include/curses.tail 
 curses.h.new
mv -f curses.h.new curses.h
cc -o make_keys -O2 -pipe  -I. 
-I/usr/obj/lib32/usr/src/lib/ncurses/ncurses/../ncurses 
-I/usr/src/lib/ncurses/ncurses/../ncurses 
-I/usr/src/lib/ncurses/ncurses/../ncurses 
-I/usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/include 
-I/usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/ncurses -Wall -DNDEBUG 
-DHAVE_CONFIG_H -DFREEBSD_NATIVE -DTERMIOS -std=gnu99 -Qunused-arguments  
-Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter 
-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized 
-Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int 
-Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality 
-Wno-unused-function -Wno-conversion 
/usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/ncurses/tinfo/make_keys.c
cc -o make_hash -O2 -pipe  -I. 
-I/usr/obj/lib32/usr/src/lib/ncurses/ncurses/../ncurses 
-I/usr/src/lib/ncurses/ncurses/../ncurses 
-I/usr/src/lib/ncurses/ncurses/../ncurses 
-I/usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/include 
-I/usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/ncurses -Wall -DNDEBUG 
-DHAVE_CONFIG_H -DFREEBSD_NATIVE -DTERMIOS -std=gnu99 -Qunused-arguments  
-Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter 
-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized 
-Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int 
-Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality 
-Wno-unused-function -Wno-conversion -DMAIN_PROGRAM  
/usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/ncurses/tinfo/comp_hash.c
cc: unrecognized option '-Qunused-arguments'
cc: unrecognized option '-Qunused-arguments'
cc1: error: unrecognized command line option -Wno-empty-body
cc1: error: unrecognized command line option -Wno-empty-body
cc1: error: unrecognized command line option -Wno-string-plus-int
cc1: error: unrecognized command line option -Wno-tautological-compare
cc1: error: unrecognized command line option -Wno-parentheses-equality
cc1: error: unrecognized command line option -Wno-string-plus-int
cc1: error: unrecognized command line option -Wno-tautological-compare
cc1: error: unrecognized command line option -Wno-parentheses-equality
*** Error code 1
*** Error code 1
2 errors
*** Error code 2
1 error
*** Error code 2
1 error

The only statement in my /etc/src.conf is `WITH_CLANG_IS_CC=yes'.
Should I use additional configuration options to successfully 
build the system with CLang?

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


Re: BuildingFreeBSDWithClang (was: Re: (no subject))

2012-05-22 Thread Ronald Klop
On Tue, 22 May 2012 13:04:59 +0200, S.N.Grigoriev  
serguey-grigor...@yandex.ru wrote:



Hi list,

I tried to build world and kernel with CLang on my 9-stable amd64 system.
The following errors occured:

mv -f term.h.new term.h
cat  
/usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/include/curses.tail  
 curses.h.new

mv -f curses.h.new curses.h
cc -o make_keys -O2 -pipe  -I.  
-I/usr/obj/lib32/usr/src/lib/ncurses/ncurses/../ncurses  
-I/usr/src/lib/ncurses/ncurses/../ncurses  
-I/usr/src/lib/ncurses/ncurses/../ncurses  
-I/usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/include  
-I/usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/ncurses -Wall  
-DNDEBUG -DHAVE_CONFIG_H -DFREEBSD_NATIVE -DTERMIOS -std=gnu99  
-Qunused-arguments  -Wsystem-headers -Werror -Wall -Wno-format-y2k -W  
-Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes  
-Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body  
-Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value  
-Wno-parentheses-equality -Wno-unused-function -Wno-conversion  
/usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/ncurses/tinfo/make_keys.c
cc -o make_hash -O2 -pipe  -I.  
-I/usr/obj/lib32/usr/src/lib/ncurses/ncurses/../ncurses  
-I/usr/src/lib/ncurses/ncurses/../ncurses  
-I/usr/src/lib/ncurses/ncurses/../ncurses  
-I/usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/include  
-I/usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/ncurses -Wall  
-DNDEBUG -DHAVE_CONFIG_H -DFREEBSD_NATIVE -DTERMIOS -std=gnu99  
-Qunused-arguments  -Wsystem-headers -Werror -Wall -Wno-format-y2k -W  
-Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes  
-Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body  
-Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value  
-Wno-parentheses-equality -Wno-unused-function -Wno-conversion  
-DMAIN_PROGRAM   
/usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/ncurses/tinfo/comp_hash.c

cc: unrecognized option '-Qunused-arguments'
cc: unrecognized option '-Qunused-arguments'
cc1: error: unrecognized command line option -Wno-empty-body
cc1: error: unrecognized command line option -Wno-empty-body
cc1: error: unrecognized command line option -Wno-string-plus-int
cc1: error: unrecognized command line option -Wno-tautological-compare
cc1: error: unrecognized command line option -Wno-parentheses-equality
cc1: error: unrecognized command line option -Wno-string-plus-int
cc1: error: unrecognized command line option -Wno-tautological-compare
cc1: error: unrecognized command line option -Wno-parentheses-equality
*** Error code 1
*** Error code 1
2 errors
*** Error code 2
1 error
*** Error code 2
1 error

The only statement in my /etc/src.conf is `WITH_CLANG_IS_CC=yes'.
Should I use additional configuration options to successfully
build the system with CLang?

Thanks,
Serguey.


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


Re: BuildingFreeBSDWithClang

2012-05-22 Thread Bruce Cran

On 22/05/2012 12:27, Ronald Klop wrote:
On Tue, 22 May 2012 13:04:59 +0200, S.N.Grigoriev 
serguey-grigor...@yandex.ru wrote:



The only statement in my /etc/src.conf is `WITH_CLANG_IS_CC=yes'.
Should I use additional configuration options to successfully
build the system with CLang?


The first time around clang isn't cc, so you have to also set CC=clang, 
CXX=clang++ and CPP=clang-cpp in src.conf .


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


Re: panic with overcommit and RACCT

2012-05-22 Thread Edward Tomasz Napierała
Wiadomość napisana przez Andrey Zonov w dniu 20 maj 2012, o godz. 15:23:
 On 5/15/12 1:23 AM, Andrey Zonov wrote:
 On 5/14/12 12:29 AM, Mateusz Guzik wrote:
 On Sun, May 13, 2012 at 09:27:11PM +0400, Andrey Zonov wrote:
 Hi,
 
 I've got a repeatable panic on latest 9.0-STABLE and HEAD with
 turned on overcommit (vm.overcommit=1) and RACCT.
 
 kgdb trace on today's HEAD:
 
 #10 0x80bc3513 in calltrap ()
 at /usr/src/sys/amd64/amd64/exception.S:228
 #11 0x808aab71 in racct_set_locked (p=0xfe0005d684a0,
 resource=0,
 amount=2680) at /usr/src/sys/kern/kern_racct.c:372
 #12 0x808ab645 in racct_proc_exit (p=0xfe0005d684a0)
 at /usr/src/sys/kern/kern_racct.c:615
 #13 0x80880d69 in fork1 (td=0xfe0005b2c460, flags=20,
 pages=4,
 procp=0xff811a36bb00, procdescp=Variable procdescp is not
 available.
 ) at /usr/src/sys/kern/kern_fork.c:943
 #14 0x80882362 in sys_fork (td=0xfe0005b2c460,
 uap=Variable uap is not available.
 )
 at /usr/src/sys/kern/kern_fork.c:110
 #15 0x80bd7a89 in amd64_syscall (td=0xfe0005b2c460,
 traced=0)
 at subr_syscall.c:135
 #16 0x80bc37f7 in Xfast_syscall ()
 at /usr/src/sys/amd64/amd64/exception.S:387
 #17 0x0008024729fc in ?? ()
 Previous frame inner to this frame (corrupt stack?)
 (kgdb)
 
 Unread portion of the kernel message buffer:
 Kernel page fault with the following non-sleepable locks held:
 exclusive sleep mutex racct lock (racct lock) r = 0
 (0x8128a7c0) locked @ /usr/src/sys/kern/kern_racct.c:614
 exclusive sleep mutex process lock (process lock) r = 0
 (0xfe0005d68598) locked @ /usr/src/sys/kern/kern_racct.c:603
 
 
 It looks like racct_proc_exit can be called for processes without
 properly initialized racct structure, which in turn results in this
 panic.
 
 Can you please test this patch:
 http://student.agh.edu.pl/~mjguzik/patches/racct-fork.patch
 
 ?
 
 I was unable to reproduce panic you describe, so it was tested only by
 manually injecting error. Nevertheless I think you should try it. :)
 
 
 Thanks, your patch fixes the panic.
 
 Can anyone commit this fix?

I've committed a slightly different fix (previous one would leak RCTL
structures) in 235787; it's also attached below.  Could you please test it?
I plan to MFC it in two weeks from now.

Index: kern_racct.c
===
--- kern_racct.c(revision 235699)
+++ kern_racct.c(working copy)
@@ -594,6 +594,9 @@ out:
PROC_UNLOCK(child);
PROC_UNLOCK(parent);
 
+   if (error != 0)
+   racct_proc_exit(child);
+
return (error);
 }
 
Index: kern_fork.c
===
--- kern_fork.c (revision 235699)
+++ kern_fork.c (working copy)
@@ -939,8 +939,8 @@ fail:
 #ifdef MAC
mac_proc_destroy(newproc);
 #endif
+   racct_proc_exit(newproc);
 fail1:
-   racct_proc_exit(newproc);
if (vm2 != NULL)
vmspace_free(vm2);
uma_zfree(proc_zone, newproc);

-- 
If you cut off my head, what would I say?  Me and my head, or me and my body?

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


Re: BuildingFreeBSDWithClang

2012-05-22 Thread S . N . Grigoriev


22.05.2012, 18:24, Bruce Cran br...@cran.org.uk:
 On 22/05/2012 12:27, Ronald Klop wrote:

  On Tue, 22 May 2012 13:04:59 +0200, S.N.Grigoriev
  serguey-grigor...@yandex.ru wrote:
  The only statement in my /etc/src.conf is `WITH_CLANG_IS_CC=yes'.
  Should I use additional configuration options to successfully
  build the system with CLang?

 The first time around clang isn't cc, so you have to also set CC=clang,
 CXX=clang++ and CPP=clang-cpp in src.conf .

 --
 Bruce Cran

Hi Bruce,

thank you for your response. Settings above have solved my problem.
-- 
Regards,
Serguey.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: [stable 9] broken hwpstate calls

2012-05-22 Thread Sean Bruno
On Fri, 2012-05-18 at 09:18 -0700, Jung-uk Kim wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On 2012-05-18 01:32:09 -0400, Sean Bruno wrote:
  Looks like my AMD box isn't quite working correctly with regards
  to P-states.I noted this repeating periodically: hwpstate0: set
  freq failed, err 6
  
  
  I noted these errors when setting the hwpstate verbose systctl on:
  
  May 17 22:28:32 Alice kernel: hwpstate0: set freq failed, err 6 May
  17 22:28:32 Alice kernel: hwpstate0: setting P1-state on cpu0 May
  17 22:28:32 Alice kernel: hwpstate0: result  P1-state on cpu0 May
  17 22:28:32 Alice kernel: hwpstate0: setting P1-state on cpu1 May
  17 22:28:32 Alice kernel: hwpstate0: result  P1-state on cpu1 May
  17 22:28:32 Alice kernel: hwpstate0: setting P1-state on cpu2 May
  17 22:28:32 Alice kernel: hwpstate0: result  P1-state on cpu2 May
  17 22:28:32 Alice kernel: hwpstate0: setting P1-state on cpu3 May
  17 22:28:32 Alice kernel: hwpstate0: result  P1-state on cpu3 May
  17 22:28:32 Alice kernel: hwpstate0: setting P1-state on cpu4 May
  17 22:28:32 Alice kernel: hwpstate0: result  P1-state on cpu4 May
  17 22:28:32 Alice kernel: hwpstate0: setting P1-state on cpu5 May
  17 22:28:32 Alice kernel: hwpstate0: result  P1-state on cpu5 May
  17 22:28:32 Alice kernel: hwpstate0: setting P1-state on cpu6 May
  17 22:28:32 Alice kernel: hwpstate0: result  P1-state on cpu6 May
  17 22:28:32 Alice kernel: hwpstate0: setting P1-state on cpu7 May
  17 22:28:32 Alice kernel: hwpstate0: result  P1-state on cpu7
  
  
  Sean
  
  ref this machine:  http://forums.pcbsd.org/showthread.php?t=16733
 
 I briefly looked at the dmesg.  You have a Family 15h processor
 (Bulldozer with Turbo Core) and I believe it isn't supported (yet).
 It won't be too hard to implement, though.
 
 Jung-uk Kim


I'm assuming, something like this to start?

http://people.freebsd.org/~sbruno/bulldozer.txt

I'm reading the AMD spec, and that *seems* to be right?  But, chances
are I have no idea what I'm doing.  :-)

Sean

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


[releng_9 tinderbox] failure on ia64/ia64

2012-05-22 Thread FreeBSD Tinderbox
TB --- 2012-05-22 17:55:15 - tinderbox 2.9 running on freebsd-stable.sentex.ca
TB --- 2012-05-22 17:55:15 - FreeBSD freebsd-stable.sentex.ca 8.2-STABLE 
FreeBSD 8.2-STABLE #4: Wed Sep 28 13:48:49 UTC 2011 
mdtan...@freebsd-stable.sentex.ca:/usr/obj/usr/src/sys/server  amd64
TB --- 2012-05-22 17:55:15 - starting RELENG_9 tinderbox run for ia64/ia64
TB --- 2012-05-22 17:55:15 - cleaning the object tree
TB --- 2012-05-22 17:55:15 - cvsupping the source tree
TB --- 2012-05-22 17:55:15 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca 
/tinderbox/RELENG_9/ia64/ia64/supfile
TB --- 2012-05-22 17:56:17 - building world
TB --- 2012-05-22 17:56:17 - CROSS_BUILD_TESTING=YES
TB --- 2012-05-22 17:56:17 - MAKEOBJDIRPREFIX=/obj
TB --- 2012-05-22 17:56:17 - PATH=/usr/bin:/usr/sbin:/bin:/sbin
TB --- 2012-05-22 17:56:17 - SRCCONF=/dev/null
TB --- 2012-05-22 17:56:17 - TARGET=ia64
TB --- 2012-05-22 17:56:17 - TARGET_ARCH=ia64
TB --- 2012-05-22 17:56:17 - TZ=UTC
TB --- 2012-05-22 17:56:17 - __MAKE_CONF=/dev/null
TB --- 2012-05-22 17:56:17 - cd /src
TB --- 2012-05-22 17:56:17 - /usr/bin/make -B buildworld
 World build started on Tue May 22 17:56:19 UTC 2012
 Rebuilding the temporary build tree
 stage 1.1: legacy release compatibility shims
 stage 1.2: bootstrap tools
 stage 2.1: cleaning up the object tree
 stage 2.2: rebuilding the object tree
 stage 2.3: build tools
 stage 3: cross tools
 stage 4.1: building includes
 stage 4.2: building libraries
 stage 4.3: make dependencies
 stage 4.4: building everything
 World build completed on Tue May 22 19:42:47 UTC 2012
TB --- 2012-05-22 19:42:47 - generating LINT kernel config
TB --- 2012-05-22 19:42:47 - cd /src/sys/ia64/conf
TB --- 2012-05-22 19:42:47 - /usr/bin/make -B LINT
TB --- 2012-05-22 19:42:47 - cd /src/sys/ia64/conf
TB --- 2012-05-22 19:42:47 - /usr/sbin/config -m LINT
TB --- 2012-05-22 19:42:47 - building LINT kernel
TB --- 2012-05-22 19:42:47 - CROSS_BUILD_TESTING=YES
TB --- 2012-05-22 19:42:47 - MAKEOBJDIRPREFIX=/obj
TB --- 2012-05-22 19:42:47 - PATH=/usr/bin:/usr/sbin:/bin:/sbin
TB --- 2012-05-22 19:42:47 - SRCCONF=/dev/null
TB --- 2012-05-22 19:42:47 - TARGET=ia64
TB --- 2012-05-22 19:42:47 - TARGET_ARCH=ia64
TB --- 2012-05-22 19:42:47 - TZ=UTC
TB --- 2012-05-22 19:42:47 - __MAKE_CONF=/dev/null
TB --- 2012-05-22 19:42:47 - cd /src
TB --- 2012-05-22 19:42:47 - /usr/bin/make -B buildkernel KERNCONF=LINT
 Kernel build for LINT started on Tue May 22 19:42:47 UTC 2012
 stage 1: configuring the kernel
 stage 2.1: cleaning up the object tree
 stage 2.2: rebuilding the object tree
 stage 2.3: build tools
 stage 3.1: making dependencies
 stage 3.2: building everything
--
cd /obj/ia64.ia64/src/sys/LINT; MAKEOBJDIRPREFIX=/obj/ia64.ia64  
MACHINE_ARCH=ia64  MACHINE=ia64  CPUTYPE= 
GROFF_BIN_PATH=/obj/ia64.ia64/src/tmp/legacy/usr/bin  
GROFF_FONT_PATH=/obj/ia64.ia64/src/tmp/legacy/usr/share/groff_font  
GROFF_TMAC_PATH=/obj/ia64.ia64/src/tmp/legacy/usr/share/tmac  
_SHLIBDIRPREFIX=/obj/ia64.ia64/src/tmp  _LDSCRIPTROOT=  VERSION=FreeBSD 
8.2-STABLE amd64 802512  INSTALL=sh /src/tools/install.sh  
PATH=/obj/ia64.ia64/src/tmp/legacy/usr/sbin:/obj/ia64.ia64/src/tmp/legacy/usr/bin:/obj/ia64.ia64/src/tmp/legacy/usr/games:/obj/ia64.ia64/src/tmp/usr/sbin:/obj/ia64.ia64/src/tmp/usr/bin:/obj/ia64.ia64/src/tmp/usr/games:/sbin:/bin:/usr/sbin:/usr/bin
 /usr/bin/make KERNEL=kernel all -DNO_MODULES_OBJ
cc -c -x assembler-with-cpp -Wa,-x -DLOCORE -O2 -pipe -fno-strict-aliasing  
-std=c99  -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef 
-Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs 
-fdiagnostics-show-option   -nostdinc  -I. -I/src/sys -I/src/sys/contrib/altq 
-I/src/sys/contrib/ia64/libuwx/src -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS 
-include opt_global.h -fno-common -finline-limit=15000 --param 
inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin 
-mconstant-gp -ffixed-r13 -mfixed-range=f32-f127 -fpic -ffreestanding -Werror 
/src/sys/ia64/ia64/locore.S
cc -c -O2 -pipe -fno-strict-aliasing  -std=c99  -Wall -Wredundant-decls 
-Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith 
-Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  
-Wmissing-include-dirs -fdiagnostics-show-option   -nostdinc  -I. -I/src/sys 
-I/src/sys/contrib/altq -I/src/sys/contrib/ia64/libuwx/src -D_KERNEL 
-DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common 
-finline-limit=15000 --param inline-unit-growth=100 --param 
large-function-growth=1000 -fno-builtin -mconstant-gp -ffixed-r13 
-mfixed-range=f32-f127 -fpic -ffreestanding -Werror  aic7xxx_reg_print.c
In file included from /src/sys/sys/types.h:41,
 from /src/sys/sys/param.h:86,
 from /src/sys/dev/aic7xxx/aic7xxx_osm.h:42,
 from aic7xxx_reg_print.c:9:
/src/sys/sys/cdefs.h:312:5: error: __cplusplus 

Re: panic with overcommit and RACCT

2012-05-22 Thread Andrey Zonov

On 5/22/12 8:04 PM, Edward Tomasz Napierała wrote:

Wiadomość napisana przez Andrey Zonov w dniu 20 maj 2012, o godz. 15:23:

On 5/15/12 1:23 AM, Andrey Zonov wrote:

On 5/14/12 12:29 AM, Mateusz Guzik wrote:

On Sun, May 13, 2012 at 09:27:11PM +0400, Andrey Zonov wrote:

Hi,

I've got a repeatable panic on latest 9.0-STABLE and HEAD with
turned on overcommit (vm.overcommit=1) and RACCT.

kgdb trace on today's HEAD:

#10 0x80bc3513 in calltrap ()
at /usr/src/sys/amd64/amd64/exception.S:228
#11 0x808aab71 in racct_set_locked (p=0xfe0005d684a0,
resource=0,
amount=2680) at /usr/src/sys/kern/kern_racct.c:372
#12 0x808ab645 in racct_proc_exit (p=0xfe0005d684a0)
at /usr/src/sys/kern/kern_racct.c:615
#13 0x80880d69 in fork1 (td=0xfe0005b2c460, flags=20,
pages=4,
procp=0xff811a36bb00, procdescp=Variable procdescp is not
available.
) at /usr/src/sys/kern/kern_fork.c:943
#14 0x80882362 in sys_fork (td=0xfe0005b2c460,
uap=Variable uap is not available.
)
at /usr/src/sys/kern/kern_fork.c:110
#15 0x80bd7a89 in amd64_syscall (td=0xfe0005b2c460,
traced=0)
at subr_syscall.c:135
#16 0x80bc37f7 in Xfast_syscall ()
at /usr/src/sys/amd64/amd64/exception.S:387
#17 0x0008024729fc in ?? ()
Previous frame inner to this frame (corrupt stack?)
(kgdb)

Unread portion of the kernel message buffer:
Kernel page fault with the following non-sleepable locks held:
exclusive sleep mutex racct lock (racct lock) r = 0
(0x8128a7c0) locked @ /usr/src/sys/kern/kern_racct.c:614
exclusive sleep mutex process lock (process lock) r = 0
(0xfe0005d68598) locked @ /usr/src/sys/kern/kern_racct.c:603



It looks like racct_proc_exit can be called for processes without
properly initialized racct structure, which in turn results in this
panic.

Can you please test this patch:
http://student.agh.edu.pl/~mjguzik/patches/racct-fork.patch

?

I was unable to reproduce panic you describe, so it was tested only by
manually injecting error. Nevertheless I think you should try it. :)



Thanks, your patch fixes the panic.


Can anyone commit this fix?


I've committed a slightly different fix (previous one would leak RCTL
structures) in 235787; it's also attached below.  Could you please test it?


Thanks, it works!


I plan to MFC it in two weeks from now.


Much appreciate.



Index: kern_racct.c
===
--- kern_racct.c(revision 235699)
+++ kern_racct.c(working copy)
@@ -594,6 +594,9 @@ out:
 PROC_UNLOCK(child);
 PROC_UNLOCK(parent);

+   if (error != 0)
+   racct_proc_exit(child);
+
 return (error);
  }

Index: kern_fork.c
===
--- kern_fork.c (revision 235699)
+++ kern_fork.c (working copy)
@@ -939,8 +939,8 @@ fail:
  #ifdef MAC
 mac_proc_destroy(newproc);
  #endif
+   racct_proc_exit(newproc);
  fail1:
-   racct_proc_exit(newproc);
 if (vm2 != NULL)
 vmspace_free(vm2);
 uma_zfree(proc_zone, newproc);




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


Re: [releng_9 tinderbox] failure on ia64/ia64

2012-05-22 Thread Dimitry Andric
On 2012-05-22 21:47, FreeBSD Tinderbox wrote:
...
 In file included from /src/sys/sys/types.h:41,
  from /src/sys/sys/param.h:86,
  from /src/sys/dev/aic7xxx/aic7xxx_osm.h:42,
  from aic7xxx_reg_print.c:9:
 /src/sys/sys/cdefs.h:312:5: error: __cplusplus is not defined

Should now be fixed in r235806, by MFCing just one more change... :)
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


[releng_9 tinderbox] failure on powerpc/powerpc

2012-05-22 Thread FreeBSD Tinderbox
TB --- 2012-05-22 19:47:26 - tinderbox 2.9 running on freebsd-stable.sentex.ca
TB --- 2012-05-22 19:47:26 - FreeBSD freebsd-stable.sentex.ca 8.2-STABLE 
FreeBSD 8.2-STABLE #4: Wed Sep 28 13:48:49 UTC 2011 
mdtan...@freebsd-stable.sentex.ca:/usr/obj/usr/src/sys/server  amd64
TB --- 2012-05-22 19:47:26 - starting RELENG_9 tinderbox run for powerpc/powerpc
TB --- 2012-05-22 19:47:26 - cleaning the object tree
TB --- 2012-05-22 19:47:26 - cvsupping the source tree
TB --- 2012-05-22 19:47:26 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca 
/tinderbox/RELENG_9/powerpc/powerpc/supfile
TB --- 2012-05-22 19:48:07 - building world
TB --- 2012-05-22 19:48:07 - CROSS_BUILD_TESTING=YES
TB --- 2012-05-22 19:48:07 - MAKEOBJDIRPREFIX=/obj
TB --- 2012-05-22 19:48:07 - PATH=/usr/bin:/usr/sbin:/bin:/sbin
TB --- 2012-05-22 19:48:07 - SRCCONF=/dev/null
TB --- 2012-05-22 19:48:07 - TARGET=powerpc
TB --- 2012-05-22 19:48:07 - TARGET_ARCH=powerpc
TB --- 2012-05-22 19:48:07 - TZ=UTC
TB --- 2012-05-22 19:48:07 - __MAKE_CONF=/dev/null
TB --- 2012-05-22 19:48:07 - cd /src
TB --- 2012-05-22 19:48:07 - /usr/bin/make -B buildworld
 World build started on Tue May 22 19:48:08 UTC 2012
 Rebuilding the temporary build tree
 stage 1.1: legacy release compatibility shims
 stage 1.2: bootstrap tools
 stage 2.1: cleaning up the object tree
 stage 2.2: rebuilding the object tree
 stage 2.3: build tools
 stage 3: cross tools
 stage 4.1: building includes
 stage 4.2: building libraries
 stage 4.3: make dependencies
 stage 4.4: building everything
 World build completed on Tue May 22 22:30:54 UTC 2012
TB --- 2012-05-22 22:30:54 - generating LINT kernel config
TB --- 2012-05-22 22:30:54 - cd /src/sys/powerpc/conf
TB --- 2012-05-22 22:30:54 - /usr/bin/make -B LINT
TB --- 2012-05-22 22:30:54 - cd /src/sys/powerpc/conf
TB --- 2012-05-22 22:30:54 - /usr/sbin/config -m LINT
TB --- 2012-05-22 22:30:54 - building LINT kernel
TB --- 2012-05-22 22:30:54 - CROSS_BUILD_TESTING=YES
TB --- 2012-05-22 22:30:54 - MAKEOBJDIRPREFIX=/obj
TB --- 2012-05-22 22:30:54 - PATH=/usr/bin:/usr/sbin:/bin:/sbin
TB --- 2012-05-22 22:30:54 - SRCCONF=/dev/null
TB --- 2012-05-22 22:30:54 - TARGET=powerpc
TB --- 2012-05-22 22:30:54 - TARGET_ARCH=powerpc
TB --- 2012-05-22 22:30:54 - TZ=UTC
TB --- 2012-05-22 22:30:54 - __MAKE_CONF=/dev/null
TB --- 2012-05-22 22:30:54 - cd /src
TB --- 2012-05-22 22:30:54 - /usr/bin/make -B buildkernel KERNCONF=LINT
 Kernel build for LINT started on Tue May 22 22:30:54 UTC 2012
 stage 1: configuring the kernel
 stage 2.1: cleaning up the object tree
 stage 2.2: rebuilding the object tree
 stage 2.3: build tools
 stage 3.1: making dependencies
 stage 3.2: building everything
--
cd /obj/powerpc.powerpc/src/sys/LINT; MAKEOBJDIRPREFIX=/obj/powerpc.powerpc  
MACHINE_ARCH=powerpc  MACHINE=powerpc  CPUTYPE= 
GROFF_BIN_PATH=/obj/powerpc.powerpc/src/tmp/legacy/usr/bin  
GROFF_FONT_PATH=/obj/powerpc.powerpc/src/tmp/legacy/usr/share/groff_font  
GROFF_TMAC_PATH=/obj/powerpc.powerpc/src/tmp/legacy/usr/share/tmac  
_SHLIBDIRPREFIX=/obj/powerpc.powerpc/src/tmp  _LDSCRIPTROOT=  VERSION=FreeBSD 
8.2-STABLE amd64 802512  INSTALL=sh /src/tools/install.sh  
PATH=/obj/powerpc.powerpc/src/tmp/legacy/usr/sbin:/obj/powerpc.powerpc/src/tmp/legacy/usr/bin:/obj/powerpc.powerpc/src/tmp/legacy/usr/games:/obj/powerpc.powerpc/src/tmp/usr/sbin:/obj/powerpc.powerpc/src/tmp/usr/bin:/obj/powerpc.powerpc/src/tmp/usr/games:/sbin:/bin:/usr/sbin:/usr/bin
 /usr/bin/make KERNEL=kernel all -DNO_MODULES_OBJ
cc -c -x assembler-with-cpp -DLOCORE -O -pipe  -std=c99  -Wall 
-Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes 
-Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign 
-fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option   
-nostdinc  -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt 
-D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common 
-finline-limit=15000 --param inline-unit-growth=100 --param 
large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many 
-fno-omit-frame-pointer -msoft-float -mno-altivec -ffreestanding 
-fstack-protector -Werror /src/sys/powerpc/aim/locore.S
In file included from ./machine/asm.h:38,
 from /src/sys/powerpc/aim/locore32.S:66,
 from /src/sys/powerpc/aim/locore.S:6:
/src/sys/sys/cdefs.h:312:5: error: __cplusplus is not defined
*** Error code 1

Stop in /obj/powerpc.powerpc/src/sys/LINT.
*** Error code 1

Stop in /src.
*** Error code 1

Stop in /src.
TB --- 2012-05-22 22:35:51 - WARNING: /usr/bin/make returned exit code  1 
TB --- 2012-05-22 22:35:51 - ERROR: failed to build LINT kernel
TB --- 2012-05-22 22:35:51 - 6776.07 user 956.64 system 10104.88 real


http://tinderbox.freebsd.org/tinderbox-releng_9-RELENG_9-powerpc-powerpc.full
___
freebsd-stable@freebsd.org mailing list

[releng_9 tinderbox] failure on powerpc64/powerpc

2012-05-22 Thread FreeBSD Tinderbox
TB --- 2012-05-22 20:29:49 - tinderbox 2.9 running on freebsd-stable.sentex.ca
TB --- 2012-05-22 20:29:49 - FreeBSD freebsd-stable.sentex.ca 8.2-STABLE 
FreeBSD 8.2-STABLE #4: Wed Sep 28 13:48:49 UTC 2011 
mdtan...@freebsd-stable.sentex.ca:/usr/obj/usr/src/sys/server  amd64
TB --- 2012-05-22 20:29:49 - starting RELENG_9 tinderbox run for 
powerpc64/powerpc
TB --- 2012-05-22 20:29:49 - cleaning the object tree
TB --- 2012-05-22 20:29:49 - cvsupping the source tree
TB --- 2012-05-22 20:29:49 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca 
/tinderbox/RELENG_9/powerpc64/powerpc/supfile
TB --- 2012-05-22 20:30:53 - building world
TB --- 2012-05-22 20:30:53 - CROSS_BUILD_TESTING=YES
TB --- 2012-05-22 20:30:53 - MAKEOBJDIRPREFIX=/obj
TB --- 2012-05-22 20:30:53 - PATH=/usr/bin:/usr/sbin:/bin:/sbin
TB --- 2012-05-22 20:30:53 - SRCCONF=/dev/null
TB --- 2012-05-22 20:30:53 - TARGET=powerpc
TB --- 2012-05-22 20:30:53 - TARGET_ARCH=powerpc64
TB --- 2012-05-22 20:30:53 - TZ=UTC
TB --- 2012-05-22 20:30:53 - __MAKE_CONF=/dev/null
TB --- 2012-05-22 20:30:53 - cd /src
TB --- 2012-05-22 20:30:53 - /usr/bin/make -B buildworld
 World build started on Tue May 22 20:30:54 UTC 2012
 Rebuilding the temporary build tree
 stage 1.1: legacy release compatibility shims
 stage 1.2: bootstrap tools
 stage 2.1: cleaning up the object tree
 stage 2.2: rebuilding the object tree
 stage 2.3: build tools
 stage 3: cross tools
 stage 4.1: building includes
 stage 4.2: building libraries
 stage 4.3: make dependencies
 stage 4.4: building everything
 stage 5.1: building 32 bit shim libraries
 World build completed on Tue May 22 23:26:25 UTC 2012
TB --- 2012-05-22 23:26:25 - generating LINT kernel config
TB --- 2012-05-22 23:26:25 - cd /src/sys/powerpc/conf
TB --- 2012-05-22 23:26:25 - /usr/bin/make -B LINT
TB --- 2012-05-22 23:26:25 - cd /src/sys/powerpc/conf
TB --- 2012-05-22 23:26:25 - /usr/sbin/config -m LINT
TB --- 2012-05-22 23:26:25 - building LINT kernel
TB --- 2012-05-22 23:26:25 - CROSS_BUILD_TESTING=YES
TB --- 2012-05-22 23:26:25 - MAKEOBJDIRPREFIX=/obj
TB --- 2012-05-22 23:26:25 - PATH=/usr/bin:/usr/sbin:/bin:/sbin
TB --- 2012-05-22 23:26:25 - SRCCONF=/dev/null
TB --- 2012-05-22 23:26:25 - TARGET=powerpc
TB --- 2012-05-22 23:26:25 - TARGET_ARCH=powerpc64
TB --- 2012-05-22 23:26:25 - TZ=UTC
TB --- 2012-05-22 23:26:25 - __MAKE_CONF=/dev/null
TB --- 2012-05-22 23:26:25 - cd /src
TB --- 2012-05-22 23:26:25 - /usr/bin/make -B buildkernel KERNCONF=LINT
 Kernel build for LINT started on Tue May 22 23:26:25 UTC 2012
 stage 1: configuring the kernel
 stage 2.1: cleaning up the object tree
 stage 2.2: rebuilding the object tree
 stage 2.3: build tools
 stage 3.1: making dependencies
 stage 3.2: building everything
--
cd /obj/powerpc.powerpc64/src/sys/LINT; MAKEOBJDIRPREFIX=/obj/powerpc.powerpc64 
 MACHINE_ARCH=powerpc64  MACHINE=powerpc  CPUTYPE= 
GROFF_BIN_PATH=/obj/powerpc.powerpc64/src/tmp/legacy/usr/bin  
GROFF_FONT_PATH=/obj/powerpc.powerpc64/src/tmp/legacy/usr/share/groff_font  
GROFF_TMAC_PATH=/obj/powerpc.powerpc64/src/tmp/legacy/usr/share/tmac  
_SHLIBDIRPREFIX=/obj/powerpc.powerpc64/src/tmp  _LDSCRIPTROOT=  
VERSION=FreeBSD 8.2-STABLE amd64 802512  INSTALL=sh /src/tools/install.sh  
PATH=/obj/powerpc.powerpc64/src/tmp/legacy/usr/sbin:/obj/powerpc.powerpc64/src/tmp/legacy/usr/bin:/obj/powerpc.powerpc64/src/tmp/legacy/usr/games:/obj/powerpc.powerpc64/src/tmp/usr/sbin:/obj/powerpc.powerpc64/src/tmp/usr/bin:/obj/powerpc.powerpc64/src/tmp/usr/games:/sbin:/bin:/usr/sbin:/usr/bin
 /usr/bin/make KERNEL=kernel all -DNO_MODULES_OBJ
cc -c -x assembler-with-cpp -DLOCORE -O -pipe  -std=c99  -Wall 
-Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes 
-Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign 
-fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option   
-nostdinc  -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt 
-D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common 
-finline-limit=15000 --param inline-unit-growth=100 --param 
large-function-growth=1000 -fno-builtin -msoft-float -Wa,-many 
-fno-omit-frame-pointer -msoft-float -mno-altivec -mcall-aixdesc -ffreestanding 
-fstack-protector -Werror /src/sys/powerpc/aim/locore.S
In file included from ./machine/asm.h:38,
 from /src/sys/powerpc/aim/locore64.S:66,
 from /src/sys/powerpc/aim/locore.S:4:
/src/sys/sys/cdefs.h:312:5: error: __cplusplus is not defined
*** Error code 1

Stop in /obj/powerpc.powerpc64/src/sys/LINT.
*** Error code 1

Stop in /src.
*** Error code 1

Stop in /src.
TB --- 2012-05-22 23:29:05 - WARNING: /usr/bin/make returned exit code  1 
TB --- 2012-05-22 23:29:05 - ERROR: failed to build LINT kernel
TB --- 2012-05-22 23:29:05 - 7646.73 user 1127.56 system 10756.12 real


http://tinderbox.freebsd.org/tinderbox-releng_9-RELENG_9-powerpc64-powerpc.full