Re: Kernel builds failing with lots of failed to retrieve array bounds errors

2012-05-30 Thread Sevan / Venture37

On 28/05/2012 20:45, Dimitry Andric wrote:

Note, in r236149 I have pulled in a change from upstream clang, which
should fix the root cause of the failed to retrieve array bounds
messages.


Indeed, I updated  rebuilt yesterday  message no-longer appeared.
Thanks


Sevan
___
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: Use of C99 extra long double math functions after r236148

2012-05-30 Thread Hans Ottevanger

On 05/29/12 19:54, Stephen Montgomery-Smith wrote:

[...]



Anyway, given that floating point is a big issue, and we are about a
decade behind schedule, really suggests that a
floating-po...@freebsd.org mailing list is needed. Or maybe there is an
existing freebsd mailing list you guys already occupy.



I would certainly take part in discussions on such a list.

And since I have developed similar software in the past, I could even 
contribute a bit more, if desired. I have quite a tight schedule, but 
this type of development does not require an extensive infrastructure 
and can be done in lost hours on the road.



Kind regards,

Hans Ottevanger
___
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


Is it Dtrace broken on HEAD?

2012-05-30 Thread Marcelo Araujo
Hello fellows,

Is it Dtrace broken on HEAD?

root@controllerB:/sys/amd64/conf # dtrace -n 'syscall::open*:entry {
printf(%s %s,execname,copyinstr(arg0)); }'
*dtrace: invalid probe specifier syscall::open*:entry { printf(%s
%s,execname,copyinstr(arg0)); }: /usr/lib/dtrace/psinfo.d, line 37:
syntax error near uid_t*

root@controllerB:/sys/amd64/conf # uname -a
FreeBSD controllerB.la.com 10.0-CURRENT FreeBSD 10.0-CURRENT #0: Tue May 29
13:54:25 CST 2012 r...@controllerb.la.com:/usr/obj/usr/src/sys/LA  amd64


Best Regards,
-- 
Marcelo Araujo
ara...@freebsd.org



-- 
Marcelo Araujo
ara...@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


jemalloc: out of swap space

2012-05-30 Thread HIROSHI OOTA

Hi all,
my PCEngine's wrap(NanoBSD, i386, 128Mbytes mem, no swap) won't start,  
after updating to r234569.

some of daemons was killed with the message 'out of swap space'.

vmstat in single user mode as:
---  r234568(works fine)
# uname -a
FreeBSD  10.0-CURRENT FreeBSD 10.0-CURRENT #0 r234568:   root@  i386
# vmstat
 procs  memory  pagedisks faults  
cpu
 r b w avmfre   flt  re  pi  pofr  sr ad0 ad1   in   sy   cs  
us sy id
 0 0 0  26572k   109M12   0   0   0 7   0   0   0  4027   78   
0  1 99


---  r234569(does not work)
# uname -a
FreeBSD  10.0-CURRENT FreeBSD 10.0-CURRENT #0 r234569:   root@  i386
# vmstat
 procs  memory  pagedisks faults  
cpu
 r b w avmfre   flt  re  pi  pofr  sr ad0 ad1   in   sy   cs  
us sy id
 0 0 0  21320k86M   185   0   1   076   0   0   0  4069   97   
0  2 98


Any ideas?
--
HIROSHI OOTA
___
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: jemalloc: out of swap space

2012-05-30 Thread Bernhard Schmidt
On Wed, May 30, 2012 at 2:11 PM, HIROSHI OOTA n...@mad.dog.cx wrote:
 Hi all,
 my PCEngine's wrap(NanoBSD, i386, 128Mbytes mem, no swap) won't start, after
 updating to r234569.
 some of daemons was killed with the message 'out of swap space'.

 vmstat in single user mode as:
 ---  r234568(works fine)
 # uname -a
 FreeBSD  10.0-CURRENT FreeBSD 10.0-CURRENT #0 r234568:   root@  i386
 # vmstat
  procs      memory      page                    disks     faults         cpu
  r b w     avm    fre   flt  re  pi  po    fr  sr ad0 ad1   in   sy   cs us
 sy id
  0 0 0  26572k   109M    12   0   0   0     7   0   0   0  402    7   78  0
  1 99

 ---  r234569(does not work)
 # uname -a
 FreeBSD  10.0-CURRENT FreeBSD 10.0-CURRENT #0 r234569:   root@  i386
 # vmstat
  procs      memory      page                    disks     faults         cpu
  r b w     avm    fre   flt  re  pi  po    fr  sr ad0 ad1   in   sy   cs us
 sy id
  0 0 0  21320k    86M   185   0   1   0    76   0   0   0  406    9   97  0
  2 98

 Any ideas?

I've been running into the same issue on my Alix boards, defining
MALLOC_PRODUCTION in src.conf fixed it.
Alternatively you can bump kmem size (cant remember the exact knob,
basically what most ZFS tuning guides recommend), but this is less
effective as mem usage is still way to high.

HTH

-- 
Bernhard
___
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: Is it Dtrace broken on HEAD?

2012-05-30 Thread Ryan Stone
On Wed, May 30, 2012 at 6:37 AM, Marcelo Araujo araujobsdp...@gmail.com wrote:
 Hello fellows,

 Is it Dtrace broken on HEAD?

 root@controllerB:/sys/amd64/conf # dtrace -n 'syscall::open*:entry {
 printf(%s %s,execname,copyinstr(arg0)); }'
 *dtrace: invalid probe specifier syscall::open*:entry { printf(%s
 %s,execname,copyinstr(arg0)); }: /usr/lib/dtrace/psinfo.d, line 37:
 syntax error near uid_t*

 root@controllerB:/sys/amd64/conf # uname -a
 FreeBSD controllerB.la.com 10.0-CURRENT FreeBSD 10.0-CURRENT #0: Tue May 29
 13:54:25 CST 2012     r...@controllerb.la.com:/usr/obj/usr/src/sys/LA  amd64


 Best Regards,
 --
 Marcelo Araujo
 ara...@freebsd.org

I know that I've seen this before when I've built improperly, but I
can't exactly remember what the root cause was.  Do you have CTF data
in your kernel(i.e. does ctfdump /boot/kernel/kernel give output?).
If not then you forgot to build with WITH_CTF=1
___
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


about netmap libpcap pcap_inject

2012-05-30 Thread r...@9du.org
@pcap.c

int
pcap_inject(pcap_t *p, const void *buf, size_t size)
{
struct my_ring *me = p;
u_int si;
 
ND(cnt %d, cnt);
/* scan all rings */
for (si = me-begin; si  me-end; si++) {
struct netmap_ring *ring = NETMAP_TXRING(me-nifp, si);
 
ND(ring has %d pkts, ring-avail);
if (ring-avail == 0)
continue;
u_int i = ring-cur;
u_int idx = ring-slot[i].buf_idx;
if (idx  2) {
D(%s bogus TX index %d at offset %d,
me-nifp-ni_name, idx, i);
sleep(2);
}
u_char *dst = (u_char *)NETMAP_BUF(ring, idx);
ring-slot[i].len = size;
pkt_copy(buf, dst, size);
ring-cur = NETMAP_RING_NEXT(ring, i);
ring-avail--;
return size;
}
errno = ENOBUFS;
return -1;
}

i call this fun, packet can 't send out my host.

@pkt-gen.c
static int
send_packets(struct netmap_ring *ring, struct pkt *pkt, 
int size, u_int count, int options)
{
u_int sent, cur = ring-cur;

if (ring-avail  count)
count = ring-avail;

for (sent = 0; sent  count; sent++) {
struct netmap_slot *slot = ring-slot[cur];
char *p = NETMAP_BUF(ring, slot-buf_idx);

if (options  OPT_COPY)
pkt_copy(pkt, p, size);
else if (options  OPT_MEMCPY)
memcpy(p, pkt, size);
else if (options  OPT_PREFETCH)
prefetch(p);

slot-len = size;
if (sent == count - 1)
slot-flags |= NS_REPORT;
cur = NETMAP_RING_NEXT(ring, cur);
}
ring-avail -= sent;
ring-cur = cur;

return (sent);
}

code like this
if (sent == count - 1)
slot-flags |= NS_REPORT;

add  code to pcap_inject

if (ring-avail == 0) ioctl(me-fd, NIOCTXSYNC, NULL);

packet can send ,but send too slowly!

have any good idea to be change this?___
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: about netmap libpcap pcap_inject

2012-05-30 Thread rizzo
On Wed, May 30, 2012 at 11:31:36PM +0800, r...@9du.org wrote:
 @pcap.c
 
 int
 pcap_inject(pcap_t *p, const void *buf, size_t size)
 {
 struct my_ring *me = p;
 u_int si;
  
 ND(cnt %d, cnt);
 /* scan all rings */
 for (si = me-begin; si  me-end; si++) {
 struct netmap_ring *ring = NETMAP_TXRING(me-nifp, si);
  
 ND(ring has %d pkts, ring-avail);
 if (ring-avail == 0)
 continue;
   u_int i = ring-cur;
   u_int idx = ring-slot[i].buf_idx;
   if (idx  2) {
   D(%s bogus TX index %d at offset %d,
   me-nifp-ni_name, idx, i);
   sleep(2);
   }
   u_char *dst = (u_char *)NETMAP_BUF(ring, idx);
   ring-slot[i].len = size;
   pkt_copy(buf, dst, size);
   ring-cur = NETMAP_RING_NEXT(ring, i);
   ring-avail--;
   return size;
 }
   errno = ENOBUFS;
   return -1;
 }
 
 i call this fun, packet can 't send out my host.

the packet go out when you issue an ioctl or poll/select on the
netmap file descriptor. Many libpcap apps do that implicitly
because they run around an event loop, but if yours does not
then you need to insert the call yourself, either as you did in
the example below (the NS_REPORT is not necessary), or
as part of your normal processing loop when you perhaps
are blocking to check for other file descriptors.

cheers
luigi

 @pkt-gen.c
 static int
 send_packets(struct netmap_ring *ring, struct pkt *pkt, 
   int size, u_int count, int options)
 {
   u_int sent, cur = ring-cur;
 
   if (ring-avail  count)
   count = ring-avail;
 
   for (sent = 0; sent  count; sent++) {
   struct netmap_slot *slot = ring-slot[cur];
   char *p = NETMAP_BUF(ring, slot-buf_idx);
 
   if (options  OPT_COPY)
   pkt_copy(pkt, p, size);
   else if (options  OPT_MEMCPY)
   memcpy(p, pkt, size);
   else if (options  OPT_PREFETCH)
   prefetch(p);
 
   slot-len = size;
   if (sent == count - 1)
   slot-flags |= NS_REPORT;
   cur = NETMAP_RING_NEXT(ring, cur);
   }
   ring-avail -= sent;
   ring-cur = cur;
 
   return (sent);
 }
 
 code like this
 if (sent == count - 1)
   slot-flags |= NS_REPORT;
 
 add  code to pcap_inject
 
 if (ring-avail == 0) ioctl(me-fd, NIOCTXSYNC, NULL);
 
 packet can send ,but send too slowly!
 
 have any good idea to be change this?
___
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: Use of C99 extra long double math functions after r236148

2012-05-30 Thread Mark Linimon
Perhaps a more general name might be appropriate so as to include
fixed-point problems?  math-libs@?  numerics@?

I'm sure someone will come up with a better name.

mcl
___
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: Use of C99 extra long double math functions after r236148

2012-05-30 Thread Mehmet Erol Sanliturk
On Wed, May 30, 2012 at 8:51 AM, Mark Linimon lini...@lonesome.com wrote:

 Perhaps a more general name might be appropriate so as to include
 fixed-point problems?  math-libs@?  numerics@?

 I'm sure someone will come up with a better name.

 mcl



Numerics@ is good .

Other names may be

numerical-analysis@
computing@  ( includes high performance computing )
mathematics@  ( includes statistics , numerical analysis ,
computation , probability , ... )


Thank you very much .

Mehmet Erol Sanliturk
___
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


No reboot on shutdown -r

2012-05-30 Thread Larry Rosenman

For the last month or so, when I reboot via shtudown -r the machine
sits at All Buffers Flushed, and I have to hit it with a IPMI reset.

What can I do to help debug this?

Current rev:

FreeBSD borg.lerctr.org 10.0-CURRENT FreeBSD 10.0-CURRENT #38 r236314: Wed May 
30 11:10:24 CDT 2012 r...@borg.lerctr.org:/usr/obj/usr/src/sys/BORG-DTRACE  
amd64


I can provide anything else needed.

Thanks!

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 512-248-2683 E-Mail: l...@lerctr.org
US Mail: 430 Valona Loop, Round Rock, TX 78681-3893
___
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: No reboot on shutdown -r

2012-05-30 Thread Garrett Cooper
On Wed, May 30, 2012 at 11:31 AM, Larry Rosenman l...@lerctr.org wrote:
 For the last month or so, when I reboot via shtudown -r the machine
 sits at All Buffers Flushed, and I have to hit it with a IPMI reset.

 What can I do to help debug this?

 Current rev:

 FreeBSD borg.lerctr.org 10.0-CURRENT FreeBSD 10.0-CURRENT #38 r236314: Wed
 May 30 11:10:24 CDT 2012
 r...@borg.lerctr.org:/usr/obj/usr/src/sys/BORG-DTRACE  amd64


 I can provide anything else needed.

I've noticed some funkiness the last 1-2 times I rebooted by
STABLE-9 box as well where it will hang with ada+mfi/ZFS (two separate
pools), but I didn't think much of it at the time. I really don't like
rebooting that box all that often.
I have another system that has just ada+ada/ZFS (two separate
pools) with approximately the same src version and it doesn't exhibit
the same issue (but I don't remember the last time I shut it down
cleanly because I've paniced the box screwing around with it a few
times), so while my gut feeling goes towards mfi being wonky or
another hardware difference between the two machines -- the root issue
could be (and probably is) something completely different.
Thanks,
-Garrett

Box that hanged a couple times:

$ uname -a
FreeBSD bayonetta.local 9.0-STABLE FreeBSD 9.0-STABLE #9 r236135M: Sat
May 26 18:56:40 PDT 2012
gcooper@bayonetta.local:/usr/obj/store/freebsd/stable/9/sys/BAYONETTA
amd64

Box that seems ok ;/..

$ uname -a
FreeBSD forza.west.isilon.com 9.0-STABLE FreeBSD 9.0-STABLE #4
r235133: Mon May  7 10:31:22 PDT 2012
r...@forza.isilon.com:/usr/obj/usr/src/sys/FORZA  amd64
___
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: No reboot on shutdown -r

2012-05-30 Thread Garrett Cooper
On Wed, May 30, 2012 at 11:50 AM, Garrett Cooper yaneg...@gmail.com wrote:
 On Wed, May 30, 2012 at 11:31 AM, Larry Rosenman l...@lerctr.org wrote:
 For the last month or so, when I reboot via shtudown -r the machine
 sits at All Buffers Flushed, and I have to hit it with a IPMI reset.

 What can I do to help debug this?

 Current rev:

 FreeBSD borg.lerctr.org 10.0-CURRENT FreeBSD 10.0-CURRENT #38 r236314: Wed
 May 30 11:10:24 CDT 2012
 r...@borg.lerctr.org:/usr/obj/usr/src/sys/BORG-DTRACE  amd64


 I can provide anything else needed.

    I've noticed some funkiness the last 1-2 times I rebooted by
 STABLE-9 box as well where it will hang with ada+mfi/ZFS (two separate
 pools), but I didn't think much of it at the time. I really don't like
 rebooting that box all that often.
    I have another system that has just ada+ada/ZFS (two separate
 pools) with approximately the same src version and it doesn't exhibit
 the same issue (but I don't remember the last time I shut it down
 cleanly because I've paniced the box screwing around with it a few
 times), so while my gut feeling goes towards mfi being wonky or
 another hardware difference between the two machines -- the root issue
 could be (and probably is) something completely different.

To answer your original question, something like this would suffice
(this isn't tested, look at man 4 ddb, etc):

1. Build the kernel with ddb/kdb.
2. Setup dumpon to point to a swap partition with enough space to
store kernel cores and make sure that /var/crash (or wherever you put
your dumps) has enough space to store the [mini]dump.
3. Hit CTRL-ALT-ESC if it hangs.
4. Either issue 'call doadump; reboot' and let the system dump core
and post the traceback somewhere like a pastebin, or do 'show
alllocks; show allprocs' and have a camera ready to take some pictures
from the ddb output.
5. Post the data somewhere and provide links to the output in a reply.

Cheers,
-Garrett
___
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: updating from r231158 to 234465: mounting from ufs:/dev/ad4s1a failed with error 19

2012-05-30 Thread John Baldwin
On Tuesday, May 29, 2012 7:17:01 pm Anton Shterenlikht wrote:
 On Mon, May 21, 2012 at 01:08:24PM -0400, John Baldwin wrote:
  On Monday, May 21, 2012 5:45:19 am Anton Shterenlikht wrote:
   On Mon, May 21, 2012 at 09:42:17AM +0100, Anton Shterenlikht wrote:
On Sun, May 20, 2012 at 09:54:51AM +0100, Anton Shterenlikht wrote:
 On Fri, May 18, 2012 at 10:48:52AM -0400, John Baldwin wrote:
  On Wednesday, May 16, 2012 11:30:19 am Anton Shterenlikht wrote:
   er.. yes, of course it helped.
   
   My problem was that I couldn't boot.
   So, I presumed the very existence of dmesg.boot
   showed that your patches (both of them) work fine.
   But, sorry, I could've been more explicit.
   All seems to work, including sound and wireless.
  
  Hmm.  Can you try one more thing.  Can you boot an unmodified 
kernel 
  (no 
  patches) but set 'hw.pci.enable_io_modes=0' from the loader?
 
 That works too, see dmesg.boot below.

I might have misled you on this,
   
   Yes, sorry, looking at the dmesg I sent you,
   I obviously booted the patched kernel.
   
   So, no, 'hw.pci.enable_io_modes=0' in /boot/loader.conf
   doesn't help to boot an unmodified kernel.
  
  Ok, I'll work on getting this fix into the tree in some fashion.
 
 Just to let you know.
 I'm on 2³6024 now, with your patch.
 
 I've lost sound.
 
 Commands like:
 
 % ls  /dev/dsp0.0
 % mixer vol 100
 
 give lots of 
 
 hðãc0: ©ømmãnð timeøut øn ãððress 0
 hðãc0: ©ømmãnð timeøut øn ãððress 0
 hðãc0: ©ømmãnð timeøut øn ãððress 0
 
 on the console.
 
 Just wanted to check with you if you
 think this has anything to do with the
 patch, or whether you think it's a completely
 different issue.

It could be related perhaps, though I thought on your system the only BAR that 
was disabled was the VGA framebuffer.

-- 
John Baldwin
___
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: Use of C99 extra long double math functions after r236148

2012-05-30 Thread Adrian Chadd
Holy crap, if there was ever a current example of a bikeshed, this is it. :-)



Adrian


On 30 May 2012 10:19, Mehmet Erol Sanliturk m.e.sanlit...@gmail.com wrote:
 On Wed, May 30, 2012 at 8:51 AM, Mark Linimon lini...@lonesome.com wrote:

 Perhaps a more general name might be appropriate so as to include
 fixed-point problems?  math-libs@?  numerics@?

 I'm sure someone will come up with a better name.

 mcl



 Numerics@ is good .

 Other names may be

 numerical-analysis@
 computing@              ( includes high performance computing )
 mathematics@          ( includes statistics , numerical analysis ,
 computation , probability , ... )


 Thank you very much .

 Mehmet Erol Sanliturk
 ___
 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: Use of C99 extra long double math functions after r236148

2012-05-30 Thread b. f.
This discussion confirms my impression, that it should be possible as an
interim solution, to use a port for missing math functions (cephes alike
or whatever). The port itself could warn the user about inaccuracies and
edge-cases.

Parts of Cephes are already in ports: math/ldouble.  I had planned to
add the remainder.  It can be useful, but it has problems, some of
which have been described.  The same is true of other open-source
alternatives that I am aware of.


I would be happy to take on any steep learning curve, and make
contributions, if only I were part of a group that would steer me in the
right direction.


A Functional Analyst offering to write code for a floating-point math
library!?!! ;)  You should send me a message off-list: maybe I can
find some time to help.


Anyway, given that floating point is a big issue, and we are about a
decade behind schedule, really suggests that a
floating-point at freebsd.org mailing list is needed.  Or maybe there is an
existing freebsd mailing list you guys already occupy.


I do not know that a separate FreeBSD mailing list would be of great
help, considering the likely volume of traffic, and the fact that we
already have the standards mailing list.  There is also:

http://mailman.oakapple.net/pipermail/numeric-interest/

which serves, among other things, as a forum for discussing changes
and improvements to the open-source math library from which parts of
our system math library were derived:

http://mailman.oakapple.net/pipermail/numeric-interest/2010-September/002054.html

A wiki page detailing problems and procedures, with a wish list for
the system libraries and toolchain(s) might help.  At present there
are only scattered messages in the mailing list archives, PRs, and
http://wiki.freebsd.org/MissingMathStuff .

b.
___
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