[head tinderbox] failure on powerpc64/powerpc

2013-06-23 Thread FreeBSD Tinderbox
TB --- 2013-06-23 03:22:48 - tinderbox 2.10 running on freebsd-current.sentex.ca
TB --- 2013-06-23 03:22:48 - FreeBSD freebsd-current.sentex.ca 8.3-PRERELEASE 
FreeBSD 8.3-PRERELEASE #0: Mon Mar 26 13:54:12 EDT 2012 
d...@freebsd-current.sentex.ca:/usr/obj/usr/src/sys/GENERIC  amd64
TB --- 2013-06-23 03:22:48 - starting HEAD tinderbox run for powerpc64/powerpc
TB --- 2013-06-23 03:22:48 - cleaning the object tree
TB --- 2013-06-23 03:24:30 - /usr/local/bin/svn stat /src
TB --- 2013-06-23 03:24:34 - At svn revision 252098
TB --- 2013-06-23 03:24:35 - building world
TB --- 2013-06-23 03:24:35 - CROSS_BUILD_TESTING=YES
TB --- 2013-06-23 03:24:35 - MAKEOBJDIRPREFIX=/obj
TB --- 2013-06-23 03:24:35 - PATH=/usr/bin:/usr/sbin:/bin:/sbin
TB --- 2013-06-23 03:24:35 - SRCCONF=/dev/null
TB --- 2013-06-23 03:24:35 - TARGET=powerpc
TB --- 2013-06-23 03:24:35 - TARGET_ARCH=powerpc64
TB --- 2013-06-23 03:24:35 - TZ=UTC
TB --- 2013-06-23 03:24:35 - __MAKE_CONF=/dev/null
TB --- 2013-06-23 03:24:35 - cd /src
TB --- 2013-06-23 03:24:35 - /usr/bin/make -B buildworld
 Building an up-to-date make(1)
 World build started on Sun Jun 23 03:24:41 UTC 2013
 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 Sun Jun 23 06:22:46 UTC 2013
TB --- 2013-06-23 06:22:46 - generating LINT kernel config
TB --- 2013-06-23 06:22:46 - cd /src/sys/powerpc/conf
TB --- 2013-06-23 06:22:46 - /usr/bin/make -B LINT
TB --- 2013-06-23 06:22:46 - cd /src/sys/powerpc/conf
TB --- 2013-06-23 06:22:46 - /usr/sbin/config -m LINT
TB --- 2013-06-23 06:22:46 - skipping LINT kernel
TB --- 2013-06-23 06:22:46 - cd /src/sys/powerpc/conf
TB --- 2013-06-23 06:22:46 - /usr/sbin/config -m GENERIC
TB --- 2013-06-23 06:22:46 - skipping GENERIC kernel
TB --- 2013-06-23 06:22:46 - cd /src/sys/powerpc/conf
TB --- 2013-06-23 06:22:46 - /usr/sbin/config -m GENERIC64
TB --- 2013-06-23 06:22:46 - building GENERIC64 kernel
TB --- 2013-06-23 06:22:46 - CROSS_BUILD_TESTING=YES
TB --- 2013-06-23 06:22:46 - MAKEOBJDIRPREFIX=/obj
TB --- 2013-06-23 06:22:46 - PATH=/usr/bin:/usr/sbin:/bin:/sbin
TB --- 2013-06-23 06:22:46 - SRCCONF=/dev/null
TB --- 2013-06-23 06:22:46 - TARGET=powerpc
TB --- 2013-06-23 06:22:46 - TARGET_ARCH=powerpc64
TB --- 2013-06-23 06:22:46 - TZ=UTC
TB --- 2013-06-23 06:22:46 - __MAKE_CONF=/dev/null
TB --- 2013-06-23 06:22:46 - cd /src
TB --- 2013-06-23 06:22:46 - /usr/bin/make -B buildkernel KERNCONF=GENERIC64
 Kernel build for GENERIC64 started on Sun Jun 23 06:22:46 UTC 2013
 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
[...]
cc  -c -O -pipe  -std=c99 -g -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  -msoft-float -Wa,-many 
-fno-omit-frame-pointer -msoft-float -mno-altivec -mcall-aixdesc -ffreestanding 
-fstack-protector -Werror  /src/sys/fs/nfsclient/nfs_clcomsubs.c
cc  -c -O -pipe  -std=c99 -g -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  -msoft-float -Wa,-many 
-fno-omit-frame-pointer -msoft-float -mno-altivec -mcall-aixdesc -ffreestanding 
-fstack-protector -Werror  /src/sys/fs/nfsclient/nfs_clsubs.c
cc  -c -O -pipe  -std=c99 -g -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  -msoft-float -Wa,-many 
-fno-omit-frame-pointer -msoft-float -mno-altivec -mcall-aixdesc -ffreestanding 
-fstack-protector -Werror  

Re: revision 252095: kerenl fails to compile: nfs_clstate.c:5160:33: error: format specifies type 'long long' but the argument has type 'uint64_t'

2013-06-23 Thread O. Hartmann
On Sun, 23 Jun 2013 01:53:18 +0900 (JST)
Hiroki Sato h...@freebsd.org wrote:

 hiren panchasara hiren.panchas...@gmail.com wrote
   in
 calcpeug98bmk5hh58xwpr4d39vgptpotfsjnej-1phk5vm2...@mail.gmail.com:
 
 hi On Jun 22, 2013 6:09 AM, O. Hartmann
 hi ohart...@zedat.fu-berlin.de wrote:
 hi 
 hi 
 hi  Just for notice.
 hi 
 hi  The most recent sources fail to compile a kernel successfully:
 hi
 hi http://svnweb.freebsd.org/changeset/base/252074
 hi
 hi This change is the culprit.
 
  The attached patch should fix it.
 
 -- Hiroki


Thanks,
works now.

oh


signature.asc
Description: PGP signature


Re: Kernel build fails on ARM: Cannot fork: Cannot allocate memory

2013-06-23 Thread Konstantin Belousov
On Sat, Jun 22, 2013 at 04:37:24PM -1000, Jeff Roberson wrote:
 On Fri, 21 Jun 2013, Zbyszek Bodek wrote:
 
  On 21.06.2013 01:56, Jeff Roberson wrote:
  On Thu, 20 Jun 2013, Jeff Roberson wrote:
 
  On Wed, 19 Jun 2013, Zbyszek Bodek wrote:
 
  Hello,
 
  I've been trying to compile the kernel on my ARMv7 platform using the
  sources from the current FreeBSD HEAD.
 
  make buildkernel . -j5
 
  1/2 builds fails in the way described below:
  --
 
  ing-include-dirs -fdiagnostics-show-option   -nostdinc  -I.
  -I/root/src/freebsd-arm-superpages/sys
  -I/root/src/freebsd-arm-superpages/sys/contrib/altq
  -I/root/src/freebsd-arm-superpages/sys/contrib/libfdt -D_KERNEL
  -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common
  -finline-limit=8000 --param inline-unit-growth=100 --param
  large-function-growth=1000  -mno-thumb-interwork -ffreestanding -Werror
  /root/src/freebsd-arm-superpages/sys/ufs/ffs/ffs_snapshot.c
  Cannot fork: Cannot allocate memory
  *** [ffs_snapshot.o] Error code 2
  1 error
  *** [buildkernel] Error code 2
  1 error
  *** [buildkernel] Error code 2
  1 error
  5487.888u 481.569s 7:35.65 1310.0%  1443+167k 1741+5388io 221pf+0w
  --
 
 
  The warning from std err is:
  --
 
  vm_thread_new: kstack allocation failed
  vm_thread_new: kstack allocation failed
  --
 
 
  I was trying to find out which commit is causing this (because I was
  previously working on some older revision) and using bisect I got to:
 
  --
 
  Author: jeff j...@freebsd.org
  Date:   Tue Jun 18 04:50:20 2013 +
 
 Refine UMA bucket allocation to reduce space consumption and improve
 performance.
 
  - Always free to the alloc bucket if there is space.  This gives
  LIFO
allocation order to improve hot-cache performance.  This also
  allows
for zones with a single bucket per-cpu rather than a pair if the
  entire
working set fits in one bucket.
  - Enable per-cpu caches of buckets.  To prevent recursive bucket
allocation one bucket zone still has per-cpu caches disabled.
  - Pick the initial bucket size based on a table driven maximum size
per-bucket rather than the number of items per-page.  This gives
more sane initial sizes.
  - Only grow the bucket size when we face contention on the zone
  lock, this
causes bucket sizes to grow more slowly.
  - Adjust the number of items per-bucket to account for the header
  space.
This packs the buckets more efficiently per-page while making them
not quite powers of two.
  - Eliminate the per-zone free bucket list.  Always return buckets
  back
to the bucket zone.  This ensures that as zones grow into larger
bucket sizes they eventually discard the smaller sizes.  It
  persists
fewer buckets in the system.  The locking is slightly trickier.
  - Only switch buckets in zalloc, not zfree, this eliminates
  pathological
cases where we ping-pong between two buckets.
  - Ensure that the thread that fills a new bucket gets to allocate
  from
it to give a better upper bound on allocation time.
 
 Sponsored by:EMC / Isilon Storage Division
  --
 
 
  I checked this several times and this commits seems to be causing this.
 
  Can you tell me how many cores and how much memory you have?  And
  paste the output of vmstat -z when you see this error.
 
  You can try changing bucket_select() at line 339 in uma_core.c to read:
 
  static int
  bucket_select(int size)
  {
  return (MAX(PAGE_SIZE / size, 1));
  }
 
  This will approximate the old bucket sizing behavior.
 
  Just to add some more information;  On my machine with 16GB of ram the
  handful of recent UMA commits save about 20MB of kmem on boot.  There
  are 30% fewer buckets allocated.  And all of the malloc zones have
  similar amounts of cached space.  Actually the page size malloc bucket
  is taking up much less space.
 
  I don't know if the problem is unique to arm but I have tested x86
  limited to 512MB of ram without trouble.  I will need the stats I
  mentioned before to understand what has happened.
 
 
  Hello Jeff,
 
  Thank you for your interest in my problem.
 
  My system is a quad-core ARMv7 with 2048 MB of RAM on board.
  Please see attachment for the output from vmstat -z when the error occurs.
 
  Changing bucket_select() to
 
  static int
  bucket_select(int size)
  {
 return (MAX(PAGE_SIZE / size, 1));
  }
 
  as you suggested helps for the problem. I've performed numerous attempts
  to build the 

Re: usb ACM device doesn't work

2013-06-23 Thread Ian FREISLICH
Hans Petter Selasky wrote:
 On 06/22/13 20:54, Ian FREISLICH wrote:
  Daniel O'Connor wrote:
 
  On 22/06/2013, at 4:10, Ian FREISLICH i...@clue.co.za wrote:
  I bought a relay control board that has a USB interface.  It presents
  a serial port to Linux on /dev/ttyACMx.  However when I plug it
  into my FreeBSD host, it detects as follows:
 
  ugen0.2: KMT at usbus0
  umodem0: KMT USB CDC COM, class 2/0, rev 1.10/1.00, addr 1 on usbus0
  umodem0: data interface 1, has no CM over data, has no break
 
  and I cannot communicate with it.  Any ideas how to communicate with it?
 
  Have you tried anything?
  It should create /dev/cuaUx and /dev/ttyUx (where x is 0 in your case)
 
  I'w sorry, I should have been more specific.
 
  I have a device that controls a bunch of relays with commands issued
  to it over a serial port.  This serial port is CDC-ACM on a USB
  interface.  The device uses a PIC microcontroller and PICKIT2 from
  Microchip Technology Inc (vendorID 0x04d8).  Linux correctly detects
  the device with CM over data and I'm able to communicate with it
  on /dev/ttyACM0 and the TX/RX LEDs on the device blink when
  transferring data.
 
  FreeBSD on the other hand detects it as having no CM over data
  and while I can open /dev/cuaU0 and write data to it, the RX/TX
  lights on the device don't blink and reads time out.  As previously
  stated I cannot communicate with it.  I tried adding the quirk
  UQ_ASSUME_CM_OVER_DATA, but then the terminal program locks up and
  won't exit until I pull the USB cable.  The same happens when I
  force the CM over Data capability in the umodem driverwhen attaching
  the device, so there's some issue with our CDC/ACM support or Linux
  is working harder to make non-compliant usb hardware work.
 
  Also, our usbdevs is incorrect in listing vedor 0x04d8 as I-Tuner
  Networks.  It is in fact licensed to Microchip Tochnology Inc. which
  then sub-licenses productIDs royalty free to third parties providing
  certain conditions are met. See:
 
  http://ww1.microchip.com/downloads/en/DeviceDoc/APPLICATION%20FOR%20SUBLICE
NSE%20TO%20USB%20VID%20revised%2012110.pdf
 
  I don't have the knowledge to fix the FreeBSD USD driver and for
  the $45 it cost me it's not worth the effort to reinstall the host
  I'm using with linux.  If there's no fix forthcoming I'll just get
  the EIA-485 version of the device with no hard feelings.
 
  Ian
 
 
 Hi Ian,
 
 Have you tried using usbdump to capture the USB traffic? It might be 
 something like clear-stall which fails, and make the device broken:
 
 usbdump -i usbusX -f Y -vvv -s 65536

I can't see anything obvious.

As I plug the device in:

10:23:59.519700 usbus0.2 SUBM-CTRL-EP=0080,SPD=FULL,NFR=2,SLEN=8,IVAL=0
 frame[0] WRITE 8 bytes
   80 06 00 01 00 00 08 00  -- -- -- -- -- -- -- --  ||
 frame[1] READ 8 bytes
 flags 0x10 PROXY_BUFFER|0
 status 0xca1a3 
OPEN|TRANSFERRING|STARTED|CONTROL_XFR|CONTROL_HDR|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0
10:23:59.521660 usbus0.2 
DONE-CTRL-EP=0080,SPD=FULL,NFR=2,SLEN=8,IVAL=0,ERR=0
 frame[0] WRITE 8 bytes
 frame[1] READ 8 bytes
   12 01 10 01 02 00 00 08  -- -- -- -- -- -- -- --  ||
 flags 0x10 PROXY_BUFFER|0
 status 0xca1a1 
OPEN|STARTED|CONTROL_XFR|CONTROL_HDR|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0
10:23:59.521694 usbus0.2 SUBM-CTRL-EP=0080,SPD=FULL,NFR=2,SLEN=8,IVAL=0
 frame[0] WRITE 8 bytes
   80 06 00 01 00 00 12 00  -- -- -- -- -- -- -- --  ||
 frame[1] READ 18 bytes
 flags 0x10 PROXY_BUFFER|0
 status 0xea1a3 
OPEN|TRANSFERRING|STARTED|CONTROL_XFR|CONTROL_HDR|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0
10:23:59.522736 usbus0.2 
DONE-CTRL-EP=0080,SPD=FULL,NFR=2,SLEN=20,IVAL=0,ERR=0
 frame[0] WRITE 8 bytes
 frame[1] READ 18 bytes
   12 01 10 01 02 00 00 08  D8 04 F9 FE 00 01 01 02  ||
 0010  00 01 -- -- -- -- -- --  -- -- -- -- -- -- -- --  |..  |
 flags 0x10 PROXY_BUFFER|0
 status 0xea1a1 
OPEN|STARTED|CONTROL_XFR|CONTROL_HDR|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0
10:23:59.522769 usbus0.2 SUBM-CTRL-EP=0080,SPD=FULL,NFR=2,SLEN=8,IVAL=0
 frame[0] WRITE 8 bytes
   80 06 00 03 00 00 02 00  -- -- -- -- -- -- -- --  ||
 frame[1] READ 2 bytes
 flags 0x10 PROXY_BUFFER|0
 status 0xca1a3 
OPEN|TRANSFERRING|STARTED|CONTROL_XFR|CONTROL_HDR|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0
10:23:59.523344 usbus0.2 
DONE-CTRL-EP=0080,SPD=FULL,NFR=2,SLEN=4,IVAL=0,ERR=0
 frame[0] WRITE 8 bytes
 frame[1] READ 2 bytes
   04 03 -- -- -- -- -- --  -- -- -- -- -- -- -- --  |..  |
 flags 0x10 PROXY_BUFFER|0
 status 0xca1a1 
OPEN|STARTED|CONTROL_XFR|CONTROL_HDR|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0
10:23:59.523371 usbus0.2 SUBM-CTRL-EP=0080,SPD=FULL,NFR=2,SLEN=8,IVAL=0
 frame[0] WRITE 8 bytes
   80 06 00 03 00 00 04 00  -- -- -- -- -- 

Re: Kernel build fails on ARM: Cannot fork: Cannot allocate memory

2013-06-23 Thread Ruslan Bukin
On Sun, Jun 23, 2013 at 09:57:06AM +0300, Konstantin Belousov wrote:
  I don't really see a lot of wasted memory in the zones.  There is 
  certainly some.  Can you give me sysctl vm from both a working and 
  non-working kernel after the build is done or fails?
 
 Try this:
 http://people.freebsd.org/~kib/misc/arm_bcache.1.patch
 
 Please _do_ notify me whether it compiled and helped with your problem.

Btw, there is a problem while allocating 2GB RAM on armv7 boards
while unmapped_buf_allowed == 1 (default):

-
## Starting application at 0x40F0 ...
KDB: debugger backends: ddb  
KDB: current backend: ddb
Copyright (c) 1992-2013 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
  The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 10.0-CURRENT #5 r252090M: Sun Jun 23 12:18:31 MSK 2013
r...@intel.bsdpad.com:/usr/obj/arm.armv6/usr/home/br/dev/head/sys/ARNDALE 
arm
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
WARNING: DIAGNOSTIC option enabled, expect reduced performance.
CPU: Cortex A15 rev 4 (Cortex-A core)
 Supported features: ARM_ISA THUMB2 THUMBEE ARMv4 Security_Ext
 WB disabled EABT branch prediction enabled
LoUU:2 LoC:2 LoUIS:2 
Cache level 1: 
 32KB/64B 2-way data cache WB Read-Alloc Write-Alloc
 32KB/64B 2-way instruction cache Read-Alloc
Cache level 2: 
 1024KB/64B 16-way unified cache WB Read-Alloc Write-Alloc
real memory  = 2147483648 (2048 MB)
panic: kmem_suballoc: bad status return of 3
-

arm_bcache.1.patch resolves the issue above, but forced another one:

-
Trying to mount root from ufs:/dev/da0 []...
WARNING: / was not properly dismounted
warning: no time-of-day clock registered, system time will not be set accurately
panic: __rw_wlock_hard: recursing but non-recursive rw pmap pv global @ 
/usr/home/br/dev/head/sys/arm/arm/pmap-v6.c:1289
-

and there are no problems at all if unmapped_buf_allowed == 0

-Ruslan

___
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: usb ACM device doesn't work

2013-06-23 Thread Hans Petter Selasky

On 06/23/13 10:33, Ian FREISLICH wrote:

  status 0xea1a1 
OPEN|STARTED|CONTROL_XFR|CONTROL_HDR|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0
10:29:19.904434 usbus0.2 SUBM-BULK-EP=0002,SPD=FULL,NFR=1,SLEN=4,IVAL=0
  frame[0] WRITE 1 bytes
    6F -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |o   |
  flags 0x9 FORCE_SHORT_XFER|PIPE_BOF|0
  status 0x4a023 
OPEN|TRANSFERRING|STARTED|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|0


If you don't get a DONE-BULK-EP=0002, then the device does not 
receive the data. It is blocking the write. Did you set the correct baud 
rate?


Also, what does usbconfig -d X.Y dump_device_desc dump_curr_config_desc 
say ?


--HPS
___
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: usb ACM device doesn't work

2013-06-23 Thread Ian FREISLICH
Hans Petter Selasky wrote:
 On 06/23/13 10:33, Ian FREISLICH wrote:
status 0xea1a1 OPEN|STARTED|CONTROL_XFR|CONTROL_HDR|BDMA_ENABLE|BDMA_SET
UP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0
  10:29:19.904434 usbus0.2 SUBM-BULK-EP=0002,SPD=FULL,NFR=1,SLEN=4,IVAL=0
frame[0] WRITE 1 bytes
  6F -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |o   
|
flags 0x9 FORCE_SHORT_XFER|PIPE_BOF|0
status 0x4a023 OPEN|TRANSFERRING|STARTED|BDMA_ENABLE|BDMA_SETUP|CAN_CANC
EL_IMMED|0
 
 If you don't get a DONE-BULK-EP=0002, then the device does not 
 receive the data. It is blocking the write. Did you set the correct baud 
 rate?

I did.  It's 9600.

 Also, what does usbconfig -d X.Y dump_device_desc dump_curr_config_desc 
 say ?

[zen] ~ # usbconfig -d ugen0.2 dump_device_desc 
ugen0.2: USB CDC COM KMT at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON 
(0mA)

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0110 
  bDeviceClass = 0x0002 
  bDeviceSubClass = 0x 
  bDeviceProtocol = 0x 
  bMaxPacketSize0 = 0x0008 
  idVendor = 0x04d8 
  idProduct = 0xfef9 
  bcdDevice = 0x0100 
  iManufacturer = 0x0001  KMT
  iProduct = 0x0002  USB CDC COM
  iSerialNumber = 0x  no string
  bNumConfigurations = 0x0001 


[zen] ~ # usbconfig -d ugen0.2 dump_curr_config_desc
ugen0.2: USB CDC COM KMT at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON 
(0mA)


 Configuration index 0

bLength = 0x0009 
bDescriptorType = 0x0002 
wTotalLength = 0x0043 
bNumInterfaces = 0x0002 
bConfigurationValue = 0x0001 
iConfiguration = 0x  no string
bmAttributes = 0x00c0 
bMaxPower = 0x 

Interface 0
  bLength = 0x0009 
  bDescriptorType = 0x0004 
  bInterfaceNumber = 0x 
  bAlternateSetting = 0x 
  bNumEndpoints = 0x0001 
  bInterfaceClass = 0x0002 
  bInterfaceSubClass = 0x0002 
  bInterfaceProtocol = 0x0001 
  iInterface = 0x  no string

  Additional Descriptor

  bLength = 0x05
  bDescriptorType = 0x24
  bDescriptorSubType = 0x00
   RAW dump: 
   0x00 | 0x05, 0x24, 0x00, 0x10, 0x01


  Additional Descriptor

  bLength = 0x04
  bDescriptorType = 0x24
  bDescriptorSubType = 0x02
   RAW dump: 
   0x00 | 0x04, 0x24, 0x02, 0x02


  Additional Descriptor

  bLength = 0x05
  bDescriptorType = 0x24
  bDescriptorSubType = 0x06
   RAW dump: 
   0x00 | 0x05, 0x24, 0x06, 0x00, 0x01


  Additional Descriptor

  bLength = 0x05
  bDescriptorType = 0x24
  bDescriptorSubType = 0x01
   RAW dump: 
   0x00 | 0x05, 0x24, 0x01, 0x00, 0x01


 Endpoint 0
bLength = 0x0007 
bDescriptorType = 0x0005 
bEndpointAddress = 0x0081  IN
bmAttributes = 0x0003  INTERRUPT
wMaxPacketSize = 0x0008 
bInterval = 0x00fa 
bRefresh = 0x 
bSynchAddress = 0x 


Interface 1
  bLength = 0x0009 
  bDescriptorType = 0x0004 
  bInterfaceNumber = 0x0001 
  bAlternateSetting = 0x 
  bNumEndpoints = 0x0002 
  bInterfaceClass = 0x000a 
  bInterfaceSubClass = 0x 
  bInterfaceProtocol = 0x 
  iInterface = 0x  no string

 Endpoint 0
bLength = 0x0007 
bDescriptorType = 0x0005 
bEndpointAddress = 0x0002  OUT
bmAttributes = 0x0002  BULK
wMaxPacketSize = 0x0040 
bInterval = 0x0001 
bRefresh = 0x 
bSynchAddress = 0x 

 Endpoint 1
bLength = 0x0007 
bDescriptorType = 0x0005 
bEndpointAddress = 0x0082  IN
bmAttributes = 0x0002  BULK
wMaxPacketSize = 0x0040 
bInterval = 0x0001 
bRefresh = 0x 
bSynchAddress = 0x 



-- 
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: Kernel build fails on ARM: Cannot fork: Cannot allocate memory

2013-06-23 Thread Konstantin Belousov
On Sun, Jun 23, 2013 at 12:32:20PM +0400, Ruslan Bukin wrote:
 On Sun, Jun 23, 2013 at 09:57:06AM +0300, Konstantin Belousov wrote:
   I don't really see a lot of wasted memory in the zones.  There is 
   certainly some.  Can you give me sysctl vm from both a working and 
   non-working kernel after the build is done or fails?
  
  Try this:
  http://people.freebsd.org/~kib/misc/arm_bcache.1.patch
  
  Please _do_ notify me whether it compiled and helped with your problem.
 
 Btw, there is a problem while allocating 2GB RAM on armv7 boards
 while unmapped_buf_allowed == 1 (default):
 
 -
 ## Starting application at 0x40F0 ...
 KDB: debugger backends: ddb  
 KDB: current backend: ddb
 Copyright (c) 1992-2013 The FreeBSD Project.
 Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
 The Regents of the University of California. All rights reserved.
 FreeBSD is a registered trademark of The FreeBSD Foundation.
 FreeBSD 10.0-CURRENT #5 r252090M: Sun Jun 23 12:18:31 MSK 2013
 r...@intel.bsdpad.com:/usr/obj/arm.armv6/usr/home/br/dev/head/sys/ARNDALE 
 arm
 FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
 WARNING: DIAGNOSTIC option enabled, expect reduced performance.
 CPU: Cortex A15 rev 4 (Cortex-A core)
  Supported features: ARM_ISA THUMB2 THUMBEE ARMv4 Security_Ext
  WB disabled EABT branch prediction enabled
 LoUU:2 LoC:2 LoUIS:2 
 Cache level 1: 
  32KB/64B 2-way data cache WB Read-Alloc Write-Alloc
  32KB/64B 2-way instruction cache Read-Alloc
 Cache level 2: 
  1024KB/64B 16-way unified cache WB Read-Alloc Write-Alloc
 real memory  = 2147483648 (2048 MB)
 panic: kmem_suballoc: bad status return of 3
 -
 
 arm_bcache.1.patch resolves the issue above, but forced another one:
I have no idea why do you think that the patch 'forced' this issue.

 
 -
 Trying to mount root from ufs:/dev/da0 []...
 WARNING: / was not properly dismounted
 warning: no time-of-day clock registered, system time will not be set 
 accurately
 panic: __rw_wlock_hard: recursing but non-recursive rw pmap pv global @ 
 /usr/home/br/dev/head/sys/arm/arm/pmap-v6.c:1289
 -
This is useless without a backtrace.

 
 and there are no problems at all if unmapped_buf_allowed == 0
 
 -Ruslan


pgp3TZXZ2IVMl.pgp
Description: PGP signature


Re: Kernel build fails on ARM: Cannot fork: Cannot allocate memory

2013-06-23 Thread Konstantin Belousov
On Sun, Jun 23, 2013 at 06:43:46PM +0400, Ruslan Bukin wrote:
 On Sun, Jun 23, 2013 at 05:32:48PM +0300, Konstantin Belousov wrote:
  On Sun, Jun 23, 2013 at 12:32:20PM +0400, Ruslan Bukin wrote:
   On Sun, Jun 23, 2013 at 09:57:06AM +0300, Konstantin Belousov wrote:
 I don't really see a lot of wasted memory in the zones.  There is 
 certainly some.  Can you give me sysctl vm from both a working and 
 non-working kernel after the build is done or fails?

Try this:
http://people.freebsd.org/~kib/misc/arm_bcache.1.patch

Please _do_ notify me whether it compiled and helped with your problem.
   
   Btw, there is a problem while allocating 2GB RAM on armv7 boards
   while unmapped_buf_allowed == 1 (default):
   
   -
   ## Starting application at 0x40F0 ...
   KDB: debugger backends: ddb  
   KDB: current backend: ddb
   Copyright (c) 1992-2013 The FreeBSD Project.
   Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
   The Regents of the University of California. All rights reserved.
   FreeBSD is a registered trademark of The FreeBSD Foundation.
   FreeBSD 10.0-CURRENT #5 r252090M: Sun Jun 23 12:18:31 MSK 2013
   
   r...@intel.bsdpad.com:/usr/obj/arm.armv6/usr/home/br/dev/head/sys/ARNDALE 
   arm
   FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
   WARNING: DIAGNOSTIC option enabled, expect reduced performance.
   CPU: Cortex A15 rev 4 (Cortex-A core)
Supported features: ARM_ISA THUMB2 THUMBEE ARMv4 Security_Ext
WB disabled EABT branch prediction enabled
   LoUU:2 LoC:2 LoUIS:2 
   Cache level 1: 
32KB/64B 2-way data cache WB Read-Alloc Write-Alloc
32KB/64B 2-way instruction cache Read-Alloc
   Cache level 2: 
1024KB/64B 16-way unified cache WB Read-Alloc Write-Alloc
   real memory  = 2147483648 (2048 MB)
   panic: kmem_suballoc: bad status return of 3
   -
   
   arm_bcache.1.patch resolves the issue above, but forced another one:
  I have no idea why do you think that the patch 'forced' this issue.
  
   
   -
   Trying to mount root from ufs:/dev/da0 []...
   WARNING: / was not properly dismounted
   warning: no time-of-day clock registered, system time will not be set 
   accurately
   panic: __rw_wlock_hard: recursing but non-recursive rw pmap pv global @ 
   /usr/home/br/dev/head/sys/arm/arm/pmap-v6.c:1289
   -
  This is useless without a backtrace.
 
 Trying to mount root from ufs:/dev/da0 []...
 WARNING: / was not properly dismounted
 warning: no time-of-day clock registered, system time will not be set 
 accurately
 panic: __rw_wlock_hard: recursing but non-recursive rw pmap pv global @ 
 /usr/home/br/dev/head/sys/arm/arm/pmap-v6.c:1289
 
 KDB: enter: panic
 [ thread pid 1 tid 11 ]
 Stopped at  kdb_enter+0x48: ldrbr15, [r15, r15, ror r15]!
 db bt
 Tracing pid 1 tid 11 td 0xc547f620
 _end() at 0xde9d0530
 scp=0xde9d0530 rlv=0xc1211458 (db_trace_thread+0x34)
 rsp=0xde9d0514 rfp=0xc12d1b60
 Bad frame pointer: 0xc12d1b60
 db 
This is completely broken.  It seems that witness triggered the panic,
and ddb is unable to obtain a backtrace from the normal panic(9) call.

Show the output of the 'show alllocks'.
 
  
   
   and there are no problems at all if unmapped_buf_allowed == 0
   
   -Ruslan
 
 


pgphG7dmySOg8.pgp
Description: PGP signature


Re: Kernel build fails on ARM: Cannot fork: Cannot allocate memory

2013-06-23 Thread Ruslan Bukin
On Sun, Jun 23, 2013 at 05:32:48PM +0300, Konstantin Belousov wrote:
 On Sun, Jun 23, 2013 at 12:32:20PM +0400, Ruslan Bukin wrote:
  On Sun, Jun 23, 2013 at 09:57:06AM +0300, Konstantin Belousov wrote:
I don't really see a lot of wasted memory in the zones.  There is 
certainly some.  Can you give me sysctl vm from both a working and 
non-working kernel after the build is done or fails?
   
   Try this:
   http://people.freebsd.org/~kib/misc/arm_bcache.1.patch
   
   Please _do_ notify me whether it compiled and helped with your problem.
  
  Btw, there is a problem while allocating 2GB RAM on armv7 boards
  while unmapped_buf_allowed == 1 (default):
  
  -
  ## Starting application at 0x40F0 ...
  KDB: debugger backends: ddb  
  KDB: current backend: ddb
  Copyright (c) 1992-2013 The FreeBSD Project.
  Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
  FreeBSD is a registered trademark of The FreeBSD Foundation.
  FreeBSD 10.0-CURRENT #5 r252090M: Sun Jun 23 12:18:31 MSK 2013
  
  r...@intel.bsdpad.com:/usr/obj/arm.armv6/usr/home/br/dev/head/sys/ARNDALE 
  arm
  FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
  WARNING: DIAGNOSTIC option enabled, expect reduced performance.
  CPU: Cortex A15 rev 4 (Cortex-A core)
   Supported features: ARM_ISA THUMB2 THUMBEE ARMv4 Security_Ext
   WB disabled EABT branch prediction enabled
  LoUU:2 LoC:2 LoUIS:2 
  Cache level 1: 
   32KB/64B 2-way data cache WB Read-Alloc Write-Alloc
   32KB/64B 2-way instruction cache Read-Alloc
  Cache level 2: 
   1024KB/64B 16-way unified cache WB Read-Alloc Write-Alloc
  real memory  = 2147483648 (2048 MB)
  panic: kmem_suballoc: bad status return of 3
  -
  
  arm_bcache.1.patch resolves the issue above, but forced another one:
 I have no idea why do you think that the patch 'forced' this issue.
 
  
  -
  Trying to mount root from ufs:/dev/da0 []...
  WARNING: / was not properly dismounted
  warning: no time-of-day clock registered, system time will not be set 
  accurately
  panic: __rw_wlock_hard: recursing but non-recursive rw pmap pv global @ 
  /usr/home/br/dev/head/sys/arm/arm/pmap-v6.c:1289
  -
 This is useless without a backtrace.

Trying to mount root from ufs:/dev/da0 []...
WARNING: / was not properly dismounted
warning: no time-of-day clock registered, system time will not be set accurately
panic: __rw_wlock_hard: recursing but non-recursive rw pmap pv global @ 
/usr/home/br/dev/head/sys/arm/arm/pmap-v6.c:1289

KDB: enter: panic
[ thread pid 1 tid 11 ]
Stopped at  kdb_enter+0x48: ldrbr15, [r15, r15, ror r15]!
db bt
Tracing pid 1 tid 11 td 0xc547f620
_end() at 0xde9d0530
scp=0xde9d0530 rlv=0xc1211458 (db_trace_thread+0x34)
rsp=0xde9d0514 rfp=0xc12d1b60
Bad frame pointer: 0xc12d1b60
db 

 
  
  and there are no problems at all if unmapped_buf_allowed == 0
  
  -Ruslan



___
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: Kernel build fails on ARM: Cannot fork: Cannot allocate memory

2013-06-23 Thread Konstantin Belousov
On Sun, Jun 23, 2013 at 08:44:25PM +0400, Ruslan Bukin wrote:
 On Sun, Jun 23, 2013 at 07:16:17PM +0300, Konstantin Belousov wrote:
  On Sun, Jun 23, 2013 at 06:43:46PM +0400, Ruslan Bukin wrote:
   
   Trying to mount root from ufs:/dev/da0 []...
   WARNING: / was not properly dismounted
   warning: no time-of-day clock registered, system time will not be set 
   accurately
   panic: __rw_wlock_hard: recursing but non-recursive rw pmap pv global @ 
   /usr/home/br/dev/head/sys/arm/arm/pmap-v6.c:1289
   
   KDB: enter: panic
   [ thread pid 1 tid 11 ]
   Stopped at  kdb_enter+0x48: ldrbr15, [r15, r15, ror r15]!
   db bt
   Tracing pid 1 tid 11 td 0xc547f620
   _end() at 0xde9d0530
   scp=0xde9d0530 rlv=0xc1211458 (db_trace_thread+0x34)
   rsp=0xde9d0514 rfp=0xc12d1b60
   Bad frame pointer: 0xc12d1b60
   db 
  This is completely broken.  It seems that witness triggered the panic,
  and ddb is unable to obtain a backtrace from the normal panic(9) call.
  
  Show the output of the 'show alllocks'.
 
 No such command
Do you have witness in the kernel config ? If not, add it to the config
and retry.

 
 db show all  
 chains  ifnets  lltablespcpuprocs   rman
 trace   ttys
 db 


pgpyJ_FbBxlIn.pgp
Description: PGP signature


Re: RFC: swapon(8) vnode-backed md and gbde/geli encryption support

2013-06-23 Thread Scot Hetzel
On Sat, Jun 22, 2013 at 1:53 PM, Hiroki Sato h...@freebsd.org wrote:
 Hi,

  I created a patchset to add support of automatic generation of
  vnode-backed md(4) devices and gbde/geli geom providers to swapon(8)
  via /etc/fstab.  We already have equivalent functionality by using
  rc.d scripts.  This simplifies rc.d scripts and fixes a race between
  mdconfig/gbde/geli and swapon/swapoff by using /etc/fstab.

  More specifically, the following specification will be supported:

  /dev/ada1p1.bdenoneswapsw  0 0
  /dev/ada1p2.elinoneswapsw  0 0
  md noneswapsw,file=/swap.bin   0 0
  md10   noneswapsw,file=/swap10.bin 0 0
  md12   noneswapsw,file=/usr/swap12.bin,late0 0

  Currently, rc.d/swap1, rc.d/encswap handles entries with FSTAB_SW and
  then rc.d/addswap for additional swap space specified in rc.conf.
  The rc.d/addswap script runs before NETWORKING, so it is difficult to
  add a swap space by using a file via NFS on a diskless client.  The
  late keyword in /etc/fstab will give more flexibility in such a
  case.

  So, the changes to rc.d scripts are the following:

   rc.d/encswap - (removed)
   rc.d/swap1 - rc.d/swap
   rc.d/swaplate - (added)

  rc.d/addswap is not removed in the patchset, but is it still
  necessary?  I do not think using combination of rc.d scripts to
  support md(4) device generation for swap spaces is robust, and I
  believe /etc/fstab is sufficient for the same functionality.

  Any comments are welcome.  Thank you.


The only thing I see is that you are hard coding the geli_swap_flags
(i.e. -e aes -l 256 -s 4096 -d) into swapon.  It would be better to
have swapon read the /etc/fstab file to get these values:

/dev/ada1p2.elinoneswap
sw,ealgo=aes,keylen=256,sectorsize=4096  0 0
/dev/ada2p2.elinoneswapsw  0 0

What you could do is that if no options are specified in the swap
file, swapon would then use default values for ealgo=aes, keylen=256
and sectorsize=4096.

geli onetime [-d] [-a aalgo] [-e ealgo] [-l keylen] [-s sectorsize] prov

The options for the geli encrypted swap file in /etc/fstab would then become:

aalgo
ealgo
keylen
sectorsize

Note: the '-d' option would still be hard coded.

-- 
DISCLAIMER:

No electrons were maimed while sending this message. Only slightly bruised.
___
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: Kernel build fails on ARM: Cannot fork: Cannot allocate memory

2013-06-23 Thread Ruslan Bukin
On Sun, Jun 23, 2013 at 07:16:17PM +0300, Konstantin Belousov wrote:
 On Sun, Jun 23, 2013 at 06:43:46PM +0400, Ruslan Bukin wrote:
  
  Trying to mount root from ufs:/dev/da0 []...
  WARNING: / was not properly dismounted
  warning: no time-of-day clock registered, system time will not be set 
  accurately
  panic: __rw_wlock_hard: recursing but non-recursive rw pmap pv global @ 
  /usr/home/br/dev/head/sys/arm/arm/pmap-v6.c:1289
  
  KDB: enter: panic
  [ thread pid 1 tid 11 ]
  Stopped at  kdb_enter+0x48: ldrbr15, [r15, r15, ror r15]!
  db bt
  Tracing pid 1 tid 11 td 0xc547f620
  _end() at 0xde9d0530
  scp=0xde9d0530 rlv=0xc1211458 (db_trace_thread+0x34)
  rsp=0xde9d0514 rfp=0xc12d1b60
  Bad frame pointer: 0xc12d1b60
  db 
 This is completely broken.  It seems that witness triggered the panic,
 and ddb is unable to obtain a backtrace from the normal panic(9) call.
 
 Show the output of the 'show alllocks'.

No such command

db show all  
chains  ifnets  lltablespcpuprocs   rman
trace   ttys
db 

___
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: Kernel build fails on ARM: Cannot fork: Cannot allocate memory

2013-06-23 Thread Ruslan Bukin
On Sun, Jun 23, 2013 at 07:50:40PM +0300, Konstantin Belousov wrote:
 On Sun, Jun 23, 2013 at 08:44:25PM +0400, Ruslan Bukin wrote:
  On Sun, Jun 23, 2013 at 07:16:17PM +0300, Konstantin Belousov wrote:
   On Sun, Jun 23, 2013 at 06:43:46PM +0400, Ruslan Bukin wrote:

Trying to mount root from ufs:/dev/da0 []...
WARNING: / was not properly dismounted
warning: no time-of-day clock registered, system time will not be set 
accurately
panic: __rw_wlock_hard: recursing but non-recursive rw pmap pv global @ 
/usr/home/br/dev/head/sys/arm/arm/pmap-v6.c:1289

KDB: enter: panic
[ thread pid 1 tid 11 ]
Stopped at  kdb_enter+0x48: ldrbr15, [r15, r15, ror r15]!
db bt
Tracing pid 1 tid 11 td 0xc547f620
_end() at 0xde9d0530
scp=0xde9d0530 rlv=0xc1211458 (db_trace_thread+0x34)
rsp=0xde9d0514 rfp=0xc12d1b60
Bad frame pointer: 0xc12d1b60
db 
   This is completely broken.  It seems that witness triggered the panic,
   and ddb is unable to obtain a backtrace from the normal panic(9) call.
   
   Show the output of the 'show alllocks'.
  
  No such command
 Do you have witness in the kernel config ? If not, add it to the config
 and retry.

Trying to mount root from ufs:/dev/da0 []...
WARNING: / was not properly dismounted
warning: no time-of-day clock registered, system time will not be set accurately
panic: __rw_wlock_hard: recursing but non-recursive rw pmap pv global @ 
/usr/home/br/dev/head/sys/arm/arm/pmap-v6.c:1289

KDB: enter: panic
[ thread pid 1 tid 11 ]
Stopped at  kdb_enter+0x48: ldrbr15, [r15, r15, ror r15]!
db show alllocks
Process 1 (kernel) thread 0xc55fc620 (11)
exclusive sleep mutex pmap (pmap) r = 0 (0xc5600590) locked @ 
/usr/home/br/dev/head/sys/arm/arm/pmap-v6.c:729
exclusive rw pmap pv global (pmap pv global) r = 0 (0xc1479dd0) locked @ 
/usr/home/br/dev/head/sys/arm/arm/pmap-v6.c:728
shared rw vm object (vm object) r = 0 (0xc1551d4c) locked @ 
/usr/home/br/dev/head/sys/vm/vm_map.c:1809
exclusive sx vm map (user) (vm map (user)) r = 0 (0xc5600528) locked @ 
/usr/home/br/dev/head/sys/kern/imgact_elf.c:445
exclusive lockmgr ufs (ufs) r = 0 (0xc56f7914) locked @ 
/usr/home/br/dev/head/sys/kern/imgact_elf.c:821
exclusive sleep mutex Giant (Giant) r = 0 (0xc147c778) locked @ 
/usr/home/br/dev/head/sys/kern/vfs_mount.c:1093
db 

___
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: Kernel build fails on ARM: Cannot fork: Cannot allocate memory

2013-06-23 Thread Tim Kientzle

On Jun 23, 2013, at 9:16 AM, Konstantin Belousov wrote:

 On Sun, Jun 23, 2013 at 06:43:46PM +0400, Ruslan Bukin wrote:
 On Sun, Jun 23, 2013 at 05:32:48PM +0300, Konstantin Belousov wrote:
 
 This is useless without a backtrace.
 
 Trying to mount root from ufs:/dev/da0 []...
 WARNING: / was not properly dismounted
 warning: no time-of-day clock registered, system time will not be set 
 accurately
 panic: __rw_wlock_hard: recursing but non-recursive rw pmap pv global @ 
 /usr/home/br/dev/head/sys/arm/arm/pmap-v6.c:1289
 
 KDB: enter: panic
 [ thread pid 1 tid 11 ]
 Stopped at  kdb_enter+0x48: ldrbr15, [r15, r15, ror r15]!
 db bt
 Tracing pid 1 tid 11 td 0xc547f620
 _end() at 0xde9d0530
 scp=0xde9d0530 rlv=0xc1211458 (db_trace_thread+0x34)
rsp=0xde9d0514 rfp=0xc12d1b60
 Bad frame pointer: 0xc12d1b60
 db 
 This is completely broken.  It seems that witness triggered the panic,
 and ddb is unable to obtain a backtrace from the normal panic(9) call.

Kernel backtraces are currently broken on ARM EABI kernels.

Tim



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: RFC: swapon(8) vnode-backed md and gbde/geli encryption support

2013-06-23 Thread Hiroki Sato
Scot Hetzel swhet...@gmail.com wrote
  in cacdu+f-oupnckg+mjgfdopbt43xmrly19lmezlqgz_xu9yy...@mail.gmail.com:

sw The only thing I see is that you are hard coding the geli_swap_flags
sw (i.e. -e aes -l 256 -s 4096 -d) into swapon.  It would be better to
sw have swapon read the /etc/fstab file to get these values:
sw
sw /dev/ada1p2.elinoneswap
sw sw,ealgo=aes,keylen=256,sectorsize=4096  0 0
sw /dev/ada2p2.elinoneswapsw  0 0
sw
sw What you could do is that if no options are specified in the swap
sw file, swapon would then use default values for ealgo=aes, keylen=256
sw and sectorsize=4096.

 Thank you for your feedback.  These options are implemented in the
 attached patch.

-- Hiroki
- Add vnode-backed swap space specification support.  This is enabled when
  device names md or md[0-9]* and a file option are specified in
  /etc/fstab like this:

  mdnoneswapsw,file=/swap.bin   0   0

- Add GBDE/GELI encrypted swap space specification support, which
  rc.d/encswap supported.  The /etc/fstab lines are like the following:

  /dev/ada1p1.bde   noneswapsw  0   0
  /dev/ada1p2.eli   noneswapsw  0   0

  .eli devices supports aalgo, ealgo, keylen, and sectorsize as options.

  swapctl(8) can understand an encrypted device in the command line
  like this:

  # swapctl -a /dev/ada2p1.bde

- -L flag is added to support late option to defer swapon until
  rc.d/mountlate runs.

- rc.d script change:

rc.d/encswap - removed
rc.d/swap1 - renamed to rc.d/swap
rc.d/swaplate - newly added to support late option

These changes alleviate a race condition between device creation/removal
and swapon/swapoff.

MFC after:  2 weeks


Index: sbin/swapon/swapon.c
===
--- sbin/swapon/swapon.c	(revision 252094)
+++ sbin/swapon/swapon.c	(working copy)
@@ -41,35 +41,51 @@ static char sccsid[] = @(#)swapon.c	8.1 (Berkeley
 #include sys/cdefs.h
 __FBSDID($FreeBSD$);

+#include sys/param.h
+#include sys/types.h
+#include sys/mdioctl.h
 #include sys/stat.h
-#include sys/param.h
 #include sys/sysctl.h
+#include sys/wait.h
 #include vm/vm_param.h

 #include err.h
 #include errno.h
+#include fcntl.h
+#include fnmatch.h
 #include fstab.h
+#include libgen.h
+#include libutil.h
+#include limits.h
+#include paths.h
+#include stdarg.h
 #include stdio.h
 #include stdlib.h
 #include string.h
 #include unistd.h
-#include fcntl.h
-#include libutil.h

 static void usage(void);
-static int swap_on_off(char *name, int ignoreebusy);
+static const char *swap_on_off(char *, int, char *);
+static const char *swap_on_off_gbde(char *, int);
+static const char *swap_on_off_geli(char *, char *, int);
+static const char *swap_on_off_md(char *, char *, int);
+static const char *swap_on_off_sfile(char *, int);
 static void swaplist(int, int, int);
+static int run_cmd(int *, const char *, ...) __printflike(2, 3);

 static enum { SWAPON, SWAPOFF, SWAPCTL } orig_prog, which_prog = SWAPCTL;

+static int qflag;
+
 int
 main(int argc, char **argv)
 {
 	struct fstab *fsp;
+	const char *swfile;
 	char *ptr;
 	int ret;
 	int ch, doall;
-	int sflag = 0, lflag = 0, hflag = 0, qflag = 0;
+	int sflag = 0, lflag = 0, late = 0, hflag = 0;
 	const char *etc_fstab;

 	if ((ptr = strrchr(argv[0], '/')) == NULL)
@@ -82,7 +98,7 @@ main(int argc, char **argv)

 	doall = 0;
 	etc_fstab = NULL;
-	while ((ch = getopt(argc, argv, AadghklmqsUF:)) != -1) {
+	while ((ch = getopt(argc, argv, AadghklLmqsUF:)) != -1) {
 		switch(ch) {
 		case 'A':
 			if (which_prog == SWAPCTL) {
@@ -116,6 +132,9 @@ main(int argc, char **argv)
 		case 'l':
 			lflag = 1;
 			break;
+		case 'L':
+			late = 1;
+			break;
 		case 'm':
 			hflag = 'M';
 			break;
@@ -145,6 +164,7 @@ main(int argc, char **argv)
 	argv += optind;

 	ret = 0;
+	swfile = NULL;
 	if (etc_fstab != NULL)
 		setfstab(etc_fstab);
 	if (which_prog == SWAPON || which_prog == SWAPOFF) {
@@ -154,27 +174,37 @@ main(int argc, char **argv)
 	continue;
 if (strstr(fsp-fs_mntops, noauto))
 	continue;
-if (swap_on_off(fsp-fs_spec, 1)) {
+if (which_prog != SWAPOFF 
+strstr(fsp-fs_mntops, late) 
+!late)
+	continue;
+swfile = swap_on_off(fsp-fs_spec, 1,
+fsp-fs_mntops);
+if (swfile == NULL) {
 	ret = 1;
-} else {
-	if (!qflag) {
-		printf(%s: %sing %s as swap device\n,
-		getprogname(),
-		which_prog == SWAPOFF ? remov : add,
-		fsp-fs_spec);
-	}
+	continue;
 }
+if (!qflag) {
+	printf(%s: %sing %s as swap device\n,
+	getprogname(),
+	(which_prog == SWAPOFF) ?
+	remov : add, swfile);
+}
 			}
 		}
 		else if (!*argv)
 			usage();
 		for (; *argv; ++argv) {
-			if (swap_on_off(*argv, 0)) {
+			swfile = swap_on_off(*argv, 0, NULL);
+			if (swfile == NULL) {
 ret = 1;
-			} else if (orig_prog == SWAPCTL) {
+continue;

dialog4ports crashing in head recently

2013-06-23 Thread Dan Mack
dialog4ports has been crashing on all of my systems for about the last
week.  I rebuilt it with debug symbols and this is what I got (doesn't
matter which port is using it).

Anyone else seeing this?

Dan


root@winbsd:/usr/ports/net-mgmt # cd zabbix2-agent/
root@winbsd:/usr/ports/net-mgmt/zabbix2-agent # ls
Makefile dialog4ports.core
root@winbsd:/usr/ports/net-mgmt/zabbix2-agent # gdb `which dialog4ports`
dialog4ports.core
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...
Core was generated by `dialog4ports'.
Program terminated with signal 6, Aborted.
Reading symbols from /lib/libncursesw.so.8...done.
Loaded symbols for /lib/libncursesw.so.8
Reading symbols from /lib/libm.so.5...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /usr/lib/libdialog.so.7...done.
Loaded symbols for /usr/lib/libdialog.so.7
Reading symbols from /lib/libc.so.7...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x000800fedffa in kill () from /lib/libc.so.7
(gdb) where
#0  0x000800fedffa in kill () from /lib/libc.so.7
#1  0x000800f8c4c0 in __stack_chk_fail () from /lib/libc.so.7
#2  0x000800f8c430 in __stack_chk_fail () from /lib/libc.so.7
#3  0x004029aa in main (argc=value optimized out, argv=value
optimized out) at dialog4ports.c:212

-- 

 /*
  * Dan Mack
  * danmack at gmail.com
  */
___
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: dialog4ports crashing in head recently

2013-06-23 Thread Nathan Whitehorn

On 06/23/13 14:52, Dan Mack wrote:

dialog4ports has been crashing on all of my systems for about the last
week.  I rebuilt it with debug symbols and this is what I got (doesn't
matter which port is using it).

Anyone else seeing this?



libdialog was updated recently. I had to rebuild dialog4ports after that 
to keep it from crashing. Maybe you have the same issue?

-Nathan
___
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: dialog4ports crashing in head recently

2013-06-23 Thread Peter Wemm
On Sun, Jun 23, 2013 at 1:36 PM, Nathan Whitehorn
nwhiteh...@freebsd.org wrote:
 On 06/23/13 14:52, Dan Mack wrote:

 dialog4ports has been crashing on all of my systems for about the last
 week.  I rebuilt it with debug symbols and this is what I got (doesn't
 matter which port is using it).

 Anyone else seeing this?


 libdialog was updated recently. I had to rebuild dialog4ports after that to
 keep it from crashing. Maybe you have the same issue?
 -Nathan

I've had the same problem on the freebsd.org cluster over the last
week or so.  A forced rebuild of dialog4ports solved it for me.

-- 
Peter Wemm - pe...@wemm.org; pe...@freebsd.org; pe...@yahoo-inc.com; KI6FJV
___
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: dialog4ports crashing in head recently

2013-06-23 Thread Dan Mack
Yep, I'm running the latest ...

root@winbsd:/usr/ports/net-mgmt/zabbix2-agent # pkg info | grep dialog
dialog4ports-0.1.5 Console Interface to configure ports

I originally thought it was just one system that was messed up having been
through so many generations of buildworld/installworld so this box (winbsd)
is a freshly installed like this:

 1.  installed a fresh VM guest with my release.iso from r251520
 2.  to get /usr/src, I built subversion from /usr/ports
 3.  step 2 probably built dialog4ports via portmaster automagically using
libdiag from r251420
 4.  after getting /usr/src and rebuilding current from head, dialog4ports
has the new crash behaviour.

I just tried Nathan and Peter's suggestion and it fixes the problem.  If
you have dialog4ports installed from an older release... about a week ago,
it needs to be rebuilt it appears.

Dan


On Sun, Jun 23, 2013 at 3:16 PM, Ilya A. Arkhipov rum1...@yandex.ru wrote:

 24.06.2013, 00:10, Dan Mack danm...@gmail.com:
  dialog4ports has been crashing on all of my systems for about the last
  week.  I rebuilt it with debug symbols and this is what I got (doesn't
  matter which port is using it).
 
  Anyone else seeing this?
 
  Dan
 
  root@winbsd:/usr/ports/net-mgmt # cd zabbix2-agent/
  root@winbsd:/usr/ports/net-mgmt/zabbix2-agent # ls
  Makefile dialog4ports.core
  root@winbsd:/usr/ports/net-mgmt/zabbix2-agent # gdb `which dialog4ports`
  dialog4ports.core
  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...
  Core was generated by `dialog4ports'.
  Program terminated with signal 6, Aborted.
  Reading symbols from /lib/libncursesw.so.8...done.
  Loaded symbols for /lib/libncursesw.so.8
  Reading symbols from /lib/libm.so.5...done.
  Loaded symbols for /lib/libm.so.5
  Reading symbols from /usr/lib/libdialog.so.7...done.
  Loaded symbols for /usr/lib/libdialog.so.7
  Reading symbols from /lib/libc.so.7...done.
  Loaded symbols for /lib/libc.so.7
  Reading symbols from /libexec/ld-elf.so.1...done.
  Loaded symbols for /libexec/ld-elf.so.1
  #0  0x000800fedffa in kill () from /lib/libc.so.7
  (gdb) where
  #0  0x000800fedffa in kill () from /lib/libc.so.7
  #1  0x000800f8c4c0 in __stack_chk_fail () from /lib/libc.so.7
  #2  0x000800f8c430 in __stack_chk_fail () from /lib/libc.so.7
  #3  0x004029aa in main (argc=value optimized out, argv=value
  optimized out) at dialog4ports.c:212
 
  --
 
   /*
* Dan Mack
* danmack at gmail.com
*/
  ___
  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

 Hi Dan,

 It is interesting because 212 line is:
 err(EXIT_FAILURE, List of items should not be empty);

 Have you last dialog4ports?(dialog4ports == 0.1.5)
 I doesn't have any problem with last ports/d4p.

 Can you also provide bt full output for me.

 --
 With Best Regards,
 Ilya A. Arkhipov




-- 

 /*
  * Dan Mack
  * danmack at gmail.com
  */
___
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: dialog4ports crashing in head recently

2013-06-23 Thread Konstantin Belousov
On Sun, Jun 23, 2013 at 01:53:24PM -0700, Peter Wemm wrote:
 On Sun, Jun 23, 2013 at 1:36 PM, Nathan Whitehorn
 nwhiteh...@freebsd.org wrote:
  On 06/23/13 14:52, Dan Mack wrote:
 
  dialog4ports has been crashing on all of my systems for about the last
  week.  I rebuilt it with debug symbols and this is what I got (doesn't
  matter which port is using it).
 
  Anyone else seeing this?
 
 
  libdialog was updated recently. I had to rebuild dialog4ports after that to
  keep it from crashing. Maybe you have the same issue?
  -Nathan
 
 I've had the same problem on the freebsd.org cluster over the last
 week or so.  A forced rebuild of dialog4ports solved it for me.

This means that the libdialog ABI was broken, right ?
If yes, the so version must be bumped.  This is the duty of the
committer, not re.


pgp_5wF7rtN23.pgp
Description: PGP signature