Re: Segmentation fault in FreeBSD 9.0 flockfile ()

2012-05-01 Thread Robert Bonomi

Unga  wrote;
> From: Darren Baginski 
> > Unga  wrote:
> > 
> >01.05.2012, 22:08, "Unga" :
> >> Hi all
> >>
> >> I'm getting a  Segmentation fault in FreeBSD 9.0 as follows for myprog.c:
> >>
> >> Reading symbols from /libexec/ld-elf.so.1...done.
> >> Loaded symbols for /libexec/ld-elf.so.1
> >> #0  0x28ebb062 in flockfile () from /lib/libc.so.7
> >> [New Thread 29c04900 (LWP 100575/SDLTimer)]
> >> [New Thread 29c04300 (LWP 100416/myprog)]
> >> (gdb)
> >> (gdb) info threads
> >> * 2 Thread 29c04300 (LWP 100416/myprog)  0x28ebb062 in flockfile ()
> >>from /lib/libc.so.7
> >>   1 Thread 29c04900 (LWP 100575/SDLTimer)  0x28e1527b in _umtx_op ()
> >>from /lib/libc.so.7
> >> (gdb)
> >>
> >> I don't use flockfile () directly in my program.
> >>
> >
> >Hi!
> >
> >Mind to share code snippet caused the problem?
> 
> Hi Thanks for the reply. I have mentioned in my original post that neithe
> r I nor SDL use the flockfile () in the source.
> 

There was a _reason_ the prior poster asked about seeing your code.
The information you provided is not adequate/sufficient for anyone to
have any chance of helping you.  Informationn that -is- necessary was
therefore requested.  

What you "don't use" is irrelevant to solving the problem. 

To be any help one must figure out what you _did_ do -- which =indirectly= 
calls flockfile().

Your code calls "something" in 'libc'  that calls flockfile().

You "don't know" what that something in your code is.  Other eyes _might_
recognize it, -if- they saw what you were doing.

Here is how to find out what does that calling, yourself.
 1) recompile all the components of 'myprog' with the '-g' compiler option.
 2) start 'script', so that you have a complete log of the debugger session.
 3) load the debugger with 'myprog' as the program to be debugged.
 4) set a breakpoinnt in the 'flockfile' function
 5) 'run' the program
 6) when it stops at flockfile() entry. use 'where' to see a stack trace.
 7) 'display' each of the arguments to flockfile().
 9) go 'up' to the calling code.
 9) repeat steps 7 and 8 util you reach 'your' code.
10) now 'continue' the program.  If it immediately segfaults, this was the
offending call.  Otherwise, the program will stop aggain at another
flockfile() invocation. repeat from step 7 -until- you get the segfault.

If, from that debugger session, you still don't see anything wrong, post
the log of the debugger session.

There is a *remote* possibility that the program will run properly under
the debugger, while it crashes when run directly.  This has been known 
to happen when a program _uses_ a variable before initializing it.

*IF* that happens, you will have to modify 'myprog' to add diagnostic
output before and after each identified point (above) in your code that
indirectly invokes flockfile() to find which is failing.  

In _that_ event, you =will= have to post the 'relevant' source-code from
'myprog', with the failing statement identified.





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


Re: Segmentation fault in FreeBSD 9.0 flockfile ()

2012-05-01 Thread Unga
From: Darren Baginski 

To: Unga  
>Cc: "freebsd-questions@freebsd.org"  
>Sent: Tuesday, May 1, 2012 7:04 PM
>Subject: Re: Segmentation fault in FreeBSD 9.0 flockfile ()
> 
>Hi!
>
>Mind to share code snippet caused the problem?
>
>01.05.2012, 22:08, "Unga" :
>> Hi all
>>
>> I'm getting a  Segmentation fault in FreeBSD 9.0 as follows for myprog.c:
>>
>> Reading symbols from /libexec/ld-elf.so.1...done.
>> Loaded symbols for /libexec/ld-elf.so.1
>> #0  0x28ebb062 in flockfile () from /lib/libc.so.7
>> [New Thread 29c04900 (LWP 100575/SDLTimer)]
>> [New Thread 29c04300 (LWP 100416/myprog)]
>> (gdb)
>> (gdb) info threads
>> * 2 Thread 29c04300 (LWP 100416/myprog)  0x28ebb062 in flockfile ()
>>    from /lib/libc.so.7
>>   1 Thread 29c04900 (LWP 100575/SDLTimer)  0x28e1527b in _umtx_op ()
>>    from /lib/libc.so.7
>> (gdb)
>>
>> I don't use flockfile () directly in my program.
>>
>
>Hi Thanks for the reply. I have mentioned in my original post that neither I 
>nor SDL use the flockfile () in the source.
>
>Regards
>Unga
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: laptop very hot and noisy

2012-05-01 Thread Erich Dollansky
Hi,

On Tuesday 01 May 2012 20:52:11 Polytropon wrote:
> On Tue, 1 May 2012 13:41:11 +0100, Anton Shterenlikht wrote:
> > On Tue, May 01, 2012 at 08:25:11AM -0400, Alejandro Imass wrote:
> 
> Not a big issue. Make sure you can remember which parts belong where.
> Make photos if it helps you, or draw some notes. If possible, find
> the service manual of the device and use it as orientation. But I
> think such kind of documentation is no longer part of the "end user
> book present". :-)
> 
you cannot say this in general.

> I've been lucky exploring that my "new" Lenovo Thinkpad T61p can be

This is a different class of machines. They are made to be repaired and they 
are very large.

I have had a Fujitsu P2120 which died after a lightning strike. So, I 
disassembled it. The machine is so small that they have had to use all tricks 
get it this small.

The most interesting thing for me was the affect of damage to this machine. It 
got hit by something like a sledge hammer when it was not with me. This bend 
the magnesia cover but did not cause any internal damage. The material is very 
brittle but no metal dust fell into the machine.

> easily disassembled up to the CPU region and the cooling units
> without trouble, and with _standard_ tools, and you don't need
> to eviscerate _all_ the bowels of the device in order to make
> your way to that component.

The P2120 uses even a special glue to connect the graphics chip with the hear 
sink. The heat sink cools also the CPU. There is no way on this machine to take 
the heat sink off and later back, if this glue is not at hand.

Erich
> 
> 
> 
> -- 
> Polytropon
> Magdeburg, Germany
> Happy FreeBSD user since 4.0
> Andra moi ennepe, Mousa, ...
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
> 
> 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: UFS Crash and directories now missing

2012-05-01 Thread Erich Dollansky
Hi,

On Tuesday 01 May 2012 20:43:43 Polytropon wrote:
> On Tue, 01 May 2012 00:37:51 -0700, Edward M wrote:
> > On 04/30/2012 10:58 PM, Robert Bonomi wrote:
> > > Reading_both_  of McKusick's  "Design of .." books, and the 'Unix System
> > > Admininstration Handbook', by Nemeth, et al.  is a good_start_.
> > >
> > > Having a bunch of the books from O'Reilley&  Assoc. 
> > > (),
> > > especially for 'standard' tools that you need to get the most out of, is
> > > also highly recommended.
> > >   
> > 
> > After realising  I lack ton of  knowledge, especially how the 
> > internals work. I'm using this advice:-) .
> 
> Except buying (good) books, you can also search for
> articles on the web. For example, "A Fast File System
> for UNIX" by M. K. McKusick is very interesting (at
> least it was for me when I lost all my important data).
> 
you wanted to say 'real man do not need a backup'?

> Some fs-related articles here:
> http://www.mckusick.com/articles.html
> 
This is one advantage of systems like FreeBSD. If the need arises, you can do 
it yourself.

>   The docs that used to live in this directory now exist on the wiki:
>   http://wiki.sleuthkit.org/
> 
It must be a disease.

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


Re: netif starting late after upgrade to FreeBSD 9.0 from 8

2012-05-01 Thread Khairil Yusof
Thanks I stumbled upon netwait already. The only problem I have now is PF.
The rules of course include network interfaces but lo0 doesn't seem to be
up yet.
On May 2, 2012 8:44 AM, "Warren Block"  wrote:

> On Tue, 1 May 2012, Khairil Yusof wrote:
>
>  I've just upgraded in place from FreeBSD 8 to FreeBSD 9.0.
>>
>> The upgrade following /usr/src/UPDATING was without any problems.
>>
>> The only issue I have is that there seems to be a race condition for
>> bootup scripts in which netif can start later than devices that
>> require it, resulting in the following problems :
>>
>> 1. pf rules not being loaded as it can't find network interfaces
>> defined such as lo0
>> 2. named not starting
>>
>> I suspect that it may be a file was not installed/updated after
>> mergemaster -i but, when I check /etc/rc.d/netif and pf the REQUIRES
>> line is the same as that in /usr/src
>>
>> How do I troubleshoot this? I've tried to manually change REQUIRES for
>> pf for example to LOGIN, but it doesn't have any effect.
>>
>> Any pointers would be much appreciated to possible solutions would be
>> much appreciated.
>>
>
> If using DHCP, use SYNCDHCP instead.  For static IP addresses, see
> rc.conf(5) about netwait.
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: netif starting late after upgrade to FreeBSD 9.0 from 8

2012-05-01 Thread Warren Block

On Tue, 1 May 2012, Khairil Yusof wrote:


I've just upgraded in place from FreeBSD 8 to FreeBSD 9.0.

The upgrade following /usr/src/UPDATING was without any problems.

The only issue I have is that there seems to be a race condition for
bootup scripts in which netif can start later than devices that
require it, resulting in the following problems :

1. pf rules not being loaded as it can't find network interfaces
defined such as lo0
2. named not starting

I suspect that it may be a file was not installed/updated after
mergemaster -i but, when I check /etc/rc.d/netif and pf the REQUIRES
line is the same as that in /usr/src

How do I troubleshoot this? I've tried to manually change REQUIRES for
pf for example to LOGIN, but it doesn't have any effect.

Any pointers would be much appreciated to possible solutions would be
much appreciated.


If using DHCP, use SYNCDHCP instead.  For static IP addresses, see 
rc.conf(5) about netwait.

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


Re: UFS Crash and directories now missing

2012-05-01 Thread Erich Dollansky
Hi,

On Tuesday 01 May 2012 20:43:43 Polytropon wrote:
> On Tue, 01 May 2012 00:37:51 -0700, Edward M wrote:
> > On 04/30/2012 10:58 PM, Robert Bonomi wrote:
> > > Reading_both_  of McKusick's  "Design of .." books, and the 'Unix System
> > > Admininstration Handbook', by Nemeth, et al.  is a good_start_.
> > >
> > > Having a bunch of the books from O'Reilley&  Assoc. 
> > > (),
> > > especially for 'standard' tools that you need to get the most out of, is
> > > also highly recommended.
> > >   
> > 
> > After realising  I lack ton of  knowledge, especially how the 
> > internals work. I'm using this advice:-) .
> 
> Except buying (good) books, you can also search for
> articles on the web. For example, "A Fast File System
> for UNIX" by M. K. McKusick is very interesting (at
> least it was for me when I lost all my important data).
> 
you wanted to say 'real man do not need a backup'?

> Some fs-related articles here:
> http://www.mckusick.com/articles.html
> 
This is one advantage of systems like FreeBSD. If the need arises, you can do 
it yourself.

>   The docs that used to live in this directory now exist on the wiki:
>   http://wiki.sleuthkit.org/
> 
It must be a disease.

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


Re: UFS Crash and directories now missing

2012-05-01 Thread Polytropon
On Wed, 2 May 2012 06:07:23 +0700, Erich Dollansky wrote:
> Hi,
> 
> On Tuesday 01 May 2012 20:43:43 Polytropon wrote:
> > On Tue, 01 May 2012 00:37:51 -0700, Edward M wrote:
> > > On 04/30/2012 10:58 PM, Robert Bonomi wrote:
> > > > Reading_both_  of McKusick's  "Design of .." books, and the 'Unix System
> > > > Admininstration Handbook', by Nemeth, et al.  is a good_start_.
> > > >
> > > > Having a bunch of the books from O'Reilley&  Assoc. 
> > > > (),
> > > > especially for 'standard' tools that you need to get the most out of, is
> > > > also highly recommended.
> > > >   
> > > 
> > > After realising  I lack ton of  knowledge, especially how the 
> > > internals work. I'm using this advice:-) .
> > 
> > Except buying (good) books, you can also search for
> > articles on the web. For example, "A Fast File System
> > for UNIX" by M. K. McKusick is very interesting (at
> > least it was for me when I lost all my important data).
> > 
> you wanted to say 'real man do not need a backup'?

No. Real men don't eat quiche. And real programmers don't
use Pascal. Also, stupidity must be punished (even if it's
me who is stupid), and it _will_ be done. Always and
repeatedly. You only learn the hard way. :-)



> > Some fs-related articles here:
> > http://www.mckusick.com/articles.html
> > 
> This is one advantage of systems like FreeBSD. If the need
> arises, you can do it yourself.

Exactly, and you're not depending on buying expensive software
that might not cover your particular problem case. The documentation
of all the "inner elements" of FreeBSD are present, and you can
learn (in worst case) everything yourself to solve the problem.
As other skilled persons have estimated and experienced the
need for professional tools, they've created them. Many of the
free tools can cope with the expensive ones designed for proprietary
platforms. The "default action" of UNIX ("if in doubt, do nothing
and let the master decide") can save your data, whereas the
habit of "repairing" things can make things worse (which includes
automounting r/w, fiddling with the FS or other nonsense that
destroys data).



> > The docs that used to live in this directory now exist on the wiki:
> > http://wiki.sleuthkit.org/
> > 
> It must be a disease.

TSK had _good_ documentation locally installed. I don't really
understand what's the idea behind moving it to a location that
can only be accessed via Internet connection. Really, it's not
_that_ much (hundreds of MB) that you couldn't leave it in the
install... sad, just sad...

Again, programs like portdowngrade help a lot. :-)




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: laptop very hot and noisy

2012-05-01 Thread Erich Dollansky
Hi,

On Tuesday 01 May 2012 19:41:11 Anton Shterenlikht wrote:
> On Tue, May 01, 2012 at 08:25:11AM -0400, Alejandro Imass wrote:
> > On Tue, May 1, 2012 at 8:06 AM, Anton Shterenlikht  
> > wrote:
> 
> I didn't even know they put fluid heatsinks in laptop.
> I thought this was something from IBM cutting edge power6
> chips.

a client showed be recently the internals of his notebook for some reasons. 
Yes, it also uses a 'heatpipe' to move the heat away from the CPU to a heatsink 
with a fan.
> 
> So I might need to pull the laptop apart..
> I'm just not sure I could put it back
> together...

Start small. The model mentioned above has had a cover on the back giving 
access to the CPU. The next bet is the keyboard. The rest needs some mechanical 
knowledge.

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


Re: Segmentation fault in FreeBSD 9.0 flockfile ()

2012-05-01 Thread Eitan Adler
On 1 May 2012 14:08, Unga  wrote:
> Hi all
>
> I'm getting a  Segmentation fault in FreeBSD 9.0 as follows for myprog.c:
>
>
> Reading symbols from /libexec/ld-elf.so.1...done.
> Loaded symbols for /libexec/ld-elf.so.1
> #0  0x28ebb062 in flockfile () from /lib/libc.so.7
> [New Thread 29c04900 (LWP 100575/SDLTimer)]
> [New Thread 29c04300 (LWP 100416/myprog)]
> (gdb)
> (gdb) info threads
> * 2 Thread 29c04300 (LWP 100416/myprog)  0x28ebb062 in flockfile ()
>    from /lib/libc.so.7
>   1 Thread 29c04900 (LWP 100575/SDLTimer)  0x28e1527b in _umtx_op ()
>    from /lib/libc.so.7
> (gdb)
>
> I use -lpthread.

I doubt this is related, but using -lpthread is wrong. use -pthread
(without the l).

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


Re: Segmentation fault in FreeBSD 9.0 flockfile ()

2012-05-01 Thread Darren Baginski
Hi!

Mind to share code snippet caused the problem?

01.05.2012, 22:08, "Unga" :
> Hi all
>
> I'm getting a  Segmentation fault in FreeBSD 9.0 as follows for myprog.c:
>
> Reading symbols from /libexec/ld-elf.so.1...done.
> Loaded symbols for /libexec/ld-elf.so.1
> #0  0x28ebb062 in flockfile () from /lib/libc.so.7
> [New Thread 29c04900 (LWP 100575/SDLTimer)]
> [New Thread 29c04300 (LWP 100416/myprog)]
> (gdb)
> (gdb) info threads
> * 2 Thread 29c04300 (LWP 100416/myprog)  0x28ebb062 in flockfile ()
>    from /lib/libc.so.7
>   1 Thread 29c04900 (LWP 100575/SDLTimer)  0x28e1527b in _umtx_op ()
>    from /lib/libc.so.7
> (gdb)
>
> I don't use flockfile () directly in my program.
>
> I use -lpthread.
>
> Same program runs without any issue on FreeBSD 8.1.
>
> Any idea what's going on?
>
> Best regards
> Unga
>
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Limiting closed port RST response

2012-05-01 Thread Ian Smith
In freebsd-questions Digest, Vol 413, Issue 4, Message: 7
On Tue, 01 May 2012 12:59:36 +0100 Arthur Chance  wrote:

 > Every once in a while the nightly periodic security checks tell me I've 
 > got a kernel message
 > 
 > Limiting closed port RST response from N to 200 packets/sec
 > 
 > where N > 200. The problem is that it doesn't say which port was 
 > involved. Is there any way to find that out so I can try tracking down 
 > the problem? AFAICT tcpdump doesn't have a way saying "closed ports on 
 > this machine" as a filter.

% sysctl -ad | grep vain
net.inet.tcp.log_in_vain: Log all incoming TCP segments to closed ports
net.inet.udp.log_in_vain: Log all incoming UDP packets

With sysctl net.inet.tcp.log_in_vain=1 you get a message per instance, 
likely aggregated into 'last message repeated N times' at those rates. I 
add ipfw rules for heavy hitters on particular ports &/or from 
particular hosts to cut both the noise and (albeit slight) load.

If you'd rather not have these (hardly uncommon) messages spamming 
/var/log/messages, use something along these lines in /etc/syslog.conf:

*.notice;authpriv.none;kern.!=info;mail.crit;news.err;ntp.err;local0.none;ftp.none
  /var/log/messages
kern.=info  /var/log/kerninfo.log

# touch /var/log/kerninfo.log
# service syslogd restart

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


Re: UFS Crash and directories now missing

2012-05-01 Thread Chad Perrin
On Tue, May 01, 2012 at 12:58:10AM -0500, Robert Bonomi wrote:
> 
> Reading _both_ of McKusick's  "Design of .." books, and the 'Unix System 
> Admininstration Handbook', by Nemeth, et al.  is a good _start_.

"Both"?  I'm aware of at least three (FreeBSD, 4.3BSD, and 4.4BSD) that
are probably within the realm of what you're talking about (learning
about the workings of a BSD Unix system), all of which seem a little
redundant -- just different editions of the same book, from the look of
it.  What do you mean by "both" of McKusick's books?

I think there's an answer book for at least one of those, too.  Do you
perhaps mean the main book and the answer book?  Do you mean to include
the general-purpose "open source" book as one of the books (Open Sources:
Voices from the Open Source Revolution)?


> 
> Having a bunch of the books from O'Reilley & Assoc. (),
> especially for 'standard' tools that you need to get the most out of, is
> also highly recommended.  
> 
> Disclaimer:  I know a lot of the authors of those books, persoally.

If you have a decent ebook reader, I recommend just getting on the
O'Reilly mailing list for its periodic announcements of ebook discount
deals and picking up an occasional good book from those deals.  It's easy
to get far more excellent books than you have time to read that way, for
really good prices.  In fact, O'Reilly has a 50% off deal for a few
ebooks about C programming right now:

http://shop.oreilly.com/category/deals/c-programming.do

O'Reilly's ebook deals are about the only way I've found to get good
technical books from a major publisher in digital formats at a reasonable
price, considering most of the publishing world still thinks it's okay to
charge more for ebooks than for hardcopy books for some asinine reason.

O'Reilly is, in fact, pretty far ahead of competitors on its handling of
ebooks.  For instance, if you have a hardcopy O'Reilly book, you can
register it by ISBN with O'Reilly, then get an ebook copy of it for about
five bucks.  By contrast, The Pragmatic Bookshelf (which produces very
high quality books as well) at *best* gives you the opportunity to get a
hardcopy book plus a PDF book at the same time for about 150% of the
cover price of the hardcopy alone, *only* if you buy them together from
the Pragmatic website itself, and if you only have the ebook or the
hardcopy book you have no way to get a discount on the other; you have to
pay full price.  Pragmatic does offer ebooks at slightly lower price than
hardcopy, which is at least better than the "standard" industry practice
for science fiction, but it's a ridiculous price for a bundle of bits in
a digital file.

O'Reilly offers some kind of discount on hardcopies for people who have
the ebooks, too, I think.  I'm not sure -- I've never taken advantage of
that discount, because I only started collecting ebook copies of O'Reilly
books after getting an e-ink reader, which I find every bit as good for
many (though not all) reading purposes as a physical dead tree format
book.  Your mileage may vary, I suppose.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Segmentation fault in FreeBSD 9.0 flockfile ()

2012-05-01 Thread Unga
Hi all

I'm getting a  Segmentation fault in FreeBSD 9.0 as follows for myprog.c:


Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x28ebb062 in flockfile () from /lib/libc.so.7
[New Thread 29c04900 (LWP 100575/SDLTimer)]
[New Thread 29c04300 (LWP 100416/myprog)]
(gdb) 
(gdb) info threads
* 2 Thread 29c04300 (LWP 100416/myprog)  0x28ebb062 in flockfile ()
   from /lib/libc.so.7
  1 Thread 29c04900 (LWP 100575/SDLTimer)  0x28e1527b in _umtx_op ()
   from /lib/libc.so.7
(gdb) 


I don't use flockfile () directly in my program.


I use -lpthread.

Same program runs without any issue on FreeBSD 8.1.


Any idea what's going on?

Best regards
Unga

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


Building kernel outside of /usr/src (with an unprivileged user)

2012-05-01 Thread Matthias Petermann

Hello,

while trying to build a patched CURRENT src on a STABLE FreeBSD 9 I was 
wondering if it would be possible to have the source directory (src) in 
a different place from /usr (e.g. in /home/myuser/src) where it can be 
built with an unprivileged user and without interference with the STABLE 
sources in /usr/src.


Does anyone have an idea how to achieve this?

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


Re: UFS Crash and directories now missing

2012-05-01 Thread Edward M

On 05/01/2012 06:43 AM, Polytropon wrote:

Except buying (good) books, you can also search for
articles on the web. For example, "A Fast File System
for UNIX" by M. K. McKusick is very interesting (at
least it was for me when I lost all my important data).

Some fs-related articles here:
http://www.mckusick.com/articles.html

They help you to understand how things work or what
maybe makes them stop working.:-)

Also the documentation of tools like TSK (ports/sleuthkit),
ex TCT, is very helpful in understanding all the low-level
details that_really_  matter when you_need_  to get your
hands dirty in order to perform a forensic analysis or to
recover important data. Sadly, that documentation has moved
from local storage in/usr/local/share/doc/sleuthkit/  (where
I've seen it the last time) to some on-line place or Wiki,
something_I_  consider "a bad idea" especially in worst case
considerations (i. e. no internet connection); the only
content in README.txt,

The docs that used to live in this directory now exist on the wiki:
http://wiki.sleuthkit.org/

doesn't make it any better, sorry.

   Thanks for the help...I will definitely check McKusick site and the docs
   I'm self learning UNIX/programming. so I need all the info and help 
I can get.:-)


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


Re: Adding a Static Route to rc.conf?

2012-05-01 Thread Noel

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
 
On 5/1/2012 10:31 AM, Chris Maness wrote:
> How do add a static route to rc.conf?
>
> Thanks,
> Chris Maness
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
"freebsd-questions-unsubscr...@freebsd.org"


http://www.freebsd.org/doc/handbook/network-routing.html

see section 32.2.5.2 Persistent Configuration




  -- Noel Jones
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
iQEcBAEBAgAGBQJPoAWnAAoJEHIluGOd3V4F/U8H/i+OnN2OKmKxEPYjK7TKovie
iXQX2AD8ddvUWsxrsoeJX03clg6sjzS+yF3pIGqC/IvhX+dwkpu8+55ZnzXNCQmW
chVQs2uUixUxBugUSK79bR0pXJfBvnfgEXD42Fgxd8C4Yb+b9nrscFOmOzStt5XX
FssudAAS2G+mHJlAUT+q8SJqI4ebQQsSXID3O2CrTx9081gqQEyvSrhJI5JhlOl8
IB6Q+pQ9rcO3bsXTF0THTWMYPbu9wxLaU0uqyCGLwAn6w3d26dfrbAFMxeIHDOi1
YrgeIVsVHtwiuMqcvvhW0iZN4ijbSkr+zchzzY38TUJ3aGL7I+Nu+C6sgMK1XiM=
=as2f
-END PGP SIGNATURE-

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


Adding a Static Route to rc.conf?

2012-05-01 Thread Chris Maness
How do add a static route to rc.conf?

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


netif starting late after upgrade to FreeBSD 9.0 from 8

2012-05-01 Thread Khairil Yusof
I've just upgraded in place from FreeBSD 8 to FreeBSD 9.0.

The upgrade following /usr/src/UPDATING was without any problems.

The only issue I have is that there seems to be a race condition for
bootup scripts in which netif can start later than devices that
require it, resulting in the following problems :

1. pf rules not being loaded as it can't find network interfaces
defined such as lo0
2. named not starting

I suspect that it may be a file was not installed/updated after
mergemaster -i but, when I check /etc/rc.d/netif and pf the REQUIRES
line is the same as that in /usr/src

How do I troubleshoot this? I've tried to manually change REQUIRES for
pf for example to LOGIN, but it doesn't have any effect.

Any pointers would be much appreciated to possible solutions would be
much appreciated.

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


Re: localhost not recognised in getaddrinfo(3) in FreeBSD 9.0-STABLE

2012-05-01 Thread Unga
> From: Matthew Seaman 
> To: Unga 
> Cc: "freebsd-questions@freebsd.org" 
> Sent: Tuesday, May 1, 2012 11:02 AM
> Subject: Re: localhost not recognised in getaddrinfo(3) in FreeBSD 9.0-STABLE
> 
> On 01/05/2012 11:08, Unga wrote:
>>  Following code fragment works in FreeBSD 8.1-RELEASE, but not in FreeBSD 
> 9.0-STABLE:
>> 
>>  error = getaddrinfo("localhost", port, &hints, &res0);
>>   if (error)
>>      {
>>       fprintf(stderr,"getaddrinfo failed - %s\n", 
> gai_strerror(error));
>>       exit(1);
>>      }
>> 
>>  It complains: getaddrinfo failed - hostname nor servname provided, or not 
> known
>> 
>>  Any idea why?
>> 
> 
> So, what is the variable 'port' initialized to?  It should be a const
> char* with the name of a network service found in /etc/services or else
> the string representation of a port number in decimal.
> 
#define MYPORT         4321

char    port[10];
snprintf(port, sizeof(port), "%d", MYPORT);

error = getaddrinfo("localhost", port, &hints, &res0);

Pls note, using 127.0.0.1 instead of localhost works. But I prefer to use 
localhost. 

> Failing that, this is almost certainly a configuration snafu on your
> 9.0-STABLE box.
> 
> Does this machine have an entry for localhost in /etc/hosts ? Can it
> resolve localhost via the DNS? Or through any other means such as NIS or
> LDAP?
> 
> What does:
> 
>     % getent hosts localhost
> 
> return?
> 

$ getent hosts localhost
127.0.0.1 localhost  localhost.my.domain ftp.sam511.lan

> If that fails, sanity check /etc/nsswitch.conf and /etc/resolv.conf
> 

cat /etc/nsswitch.conf

group: compat
group_compat: nis
hosts: files dns
networks: files
passwd: compat
passwd_compat: nis
shells: files
services: compat
services_compat: nis
protocols: files
rpc: files

cat /etc/resolv.conf

nameserver 192.168.1.1

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


Re: GPT + gmirror

2012-05-01 Thread Darren Baginski
There is a way.
Here are the results 
http://www.opennet.ru/tips/2681_freebsd_gpt_raid_gmirror.shtml (in Russian)
http://translate.yandex.com/ will provide meaningful translation to 
French/German/English or use your favorite translation service.

25.04.2012, 17:01, "Julien Cigar" :
> Hello,
>
> I wondered if there is a way to gmirroring the whole disk (not slices
> separately) when using GPT?
>
> GPT puts its metadata at the end of the disk, and when I start to use
> gmirror it overwrites the GPT metadata (... as gmirror puts also its
> metadata at the end of the disk ...).
>
> I noticed a new option in the newfs manpage:
>
> -r reserved
> The size, in sectors, of reserved space at the end of the parti‐
> tion specified in special. This space will not be occupied by
> the file system; it can be used by other consumers such as
> geom(4). Defaults to 0.
>
> I wondered if it could help .. ? Why does it default to 0?
>
> Thanks,
> Julien
>
> --
> No trees were killed in the creation of this message.
> However, many electrons were terribly inconvenienced.
>
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: laptop very hot and noisy

2012-05-01 Thread Polytropon
On Tue, 1 May 2012 13:41:11 +0100, Anton Shterenlikht wrote:
> On Tue, May 01, 2012 at 08:25:11AM -0400, Alejandro Imass wrote:
> > On Tue, May 1, 2012 at 8:06 AM, Anton Shterenlikht  
> > wrote:
> > > I run 10-current on Compaq 6715s.
> > > It's very hot and noisy. If I boot
> > > in verbose mode, I get lots of:
> > >
> > > acpi_tz0: _AC2: temperature 92.0 >= setpoint 50.0
> > > acpi_tz0: _AC1: temperature 92.0 >= setpoint 60.0
> > > acpi_tz0: _AC3: temperature 92.0 >= setpoint 40.0
> > > acpi_tz0: _AC2: temperature 92.0 >= setpoint 50.0
> > > acpi_tz0: _AC1: temperature 92.0 >= setpoint 60.0
> > >
> > > at the console.
> > >
> > > I guess it's telling me that the CPU is too hot?
> > >
> > > Is that normal, e.g. under "make -j4 buildworld"?
> > >
> > 
> > Probably not. I had a laptop with similar symptom when I was compiling
> > stuff. I took it apart, cleaned it and thought that maybe these log
> > messages were normal under stress. The CPU eventually fried and only
> > then I took a real close look and the heatsink had a very tiny little
> > hole where the fluid escaped, but it was not at all apparent at first
> > sight. These liquid (or gel?) filled heatsinks are basically useless
> > if the liquid escapes or evaporates so it will usually only show when
> > you are using the CPU a lot.
> 
> I didn't even know they put fluid heatsinks in laptop.
> I thought this was something from IBM cutting edge power6
> chips.
> 
> So I might need to pull the laptop apart..
> I'm just not sure I could put it back
> together...

Not a big issue. Make sure you can remember which parts belong where.
Make photos if it helps you, or draw some notes. If possible, find
the service manual of the device and use it as orientation. But I
think such kind of documentation is no longer part of the "end user
book present". :-)

I've been lucky exploring that my "new" Lenovo Thinkpad T61p can be
easily disassembled up to the CPU region and the cooling units
without trouble, and with _standard_ tools, and you don't need
to eviscerate _all_ the bowels of the device in order to make
your way to that component.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: laptop very hot and noisy

2012-05-01 Thread Alejandro Imass
On Tue, May 1, 2012 at 8:41 AM, Anton Shterenlikht  wrote:
> On Tue, May 01, 2012 at 08:25:11AM -0400, Alejandro Imass wrote:
>> On Tue, May 1, 2012 at 8:06 AM, Anton Shterenlikht  
>> wrote:
>> > I run 10-current on Compaq 6715s.
>> > It's very hot and noisy. If I boot
[..]

> I didn't even know they put fluid heatsinks in laptop.
> I thought this was something from IBM cutting edge power6
> chips.
>

Yeah I didn't know either until it fried my CPU. Many laptop heatsinks
use "heat pipes":

http://en.wikipedia.org/wiki/Heat_pipe

The hole will probably be too little to notice but in my case I
noticed some oxidation/stain around the hole which gave it away.

-- 
Alejandro

> So I might need to pull the laptop apart..
> I'm just not sure I could put it back
> together...
>
> Thanks anyway
>
> --
> Anton Shterenlikht
> Room 2.6, Queen's Building
> Mech Eng Dept
> Bristol University
> University Walk, Bristol BS8 1TR, UK
> Tel: +44 (0)117 331 5944
> Fax: +44 (0)117 929 4423
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: UFS Crash and directories now missing

2012-05-01 Thread Polytropon
On Tue, 01 May 2012 00:37:51 -0700, Edward M wrote:
> On 04/30/2012 10:58 PM, Robert Bonomi wrote:
> > Reading_both_  of McKusick's  "Design of .." books, and the 'Unix System
> > Admininstration Handbook', by Nemeth, et al.  is a good_start_.
> >
> > Having a bunch of the books from O'Reilley&  Assoc. (),
> > especially for 'standard' tools that you need to get the most out of, is
> > also highly recommended.
> >   
> 
> After realising  I lack ton of  knowledge, especially how the 
> internals work. I'm using this advice:-) .

Except buying (good) books, you can also search for
articles on the web. For example, "A Fast File System
for UNIX" by M. K. McKusick is very interesting (at
least it was for me when I lost all my important data).

Some fs-related articles here:
http://www.mckusick.com/articles.html

They help you to understand how things work or what
maybe makes them stop working. :-)

Also the documentation of tools like TSK (ports/sleuthkit),
ex TCT, is very helpful in understanding all the low-level
details that _really_ matter when you _need_ to get your
hands dirty in order to perform a forensic analysis or to
recover important data. Sadly, that documentation has moved
from local storage in /usr/local/share/doc/sleuthkit/ (where
I've seen it the last time) to some on-line place or Wiki,
something _I_ consider "a bad idea" especially in worst case
considerations (i. e. no internet connection); the only
content in README.txt,

The docs that used to live in this directory now exist on the wiki:
http://wiki.sleuthkit.org/

doesn't make it any better, sorry.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: localhost not recognised in getaddrinfo(3) in FreeBSD 9.0-STABLE

2012-05-01 Thread Bas Smeelen

On 05/01/2012 01:02 PM, Matthew Seaman wrote:

On 01/05/2012 11:08, Unga wrote:

Following code fragment works in FreeBSD 8.1-RELEASE, but not in FreeBSD 
9.0-STABLE:

error = getaddrinfo("localhost", port,&hints,&res0);
  if (error)
 {
  fprintf(stderr,"getaddrinfo failed - %s\n", gai_strerror(error));
  exit(1);
 }

It complains: getaddrinfo failed - hostname nor servname provided, or not known

Any idea why?


So, what is the variable 'port' initialized to?  It should be a const
char* with the name of a network service found in /etc/services or else
the string representation of a port number in decimal.

Failing that, this is almost certainly a configuration snafu on your
9.0-STABLE box.

Does this machine have an entry for localhost in /etc/hosts ? Can it
resolve localhost via the DNS? Or through any other means such as NIS or
LDAP?

What does:

 % getent hosts localhost

return?

If that fails, sanity check /etc/nsswitch.conf and /etc/resolv.conf

Cheers,

Matthew 


Hi

While updating 9.0-RELEASE to 9-STABLE today mergemaster wanted to put in a 
new hosts file that does not contain the localhost entry.

I don know why this changed, but I left the localhost entry in my hosts file.

Cheers



Disclaimer: http://www.ose.nl/email

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


Re: laptop very hot and noisy

2012-05-01 Thread Anton Shterenlikht
On Tue, May 01, 2012 at 08:25:11AM -0400, Alejandro Imass wrote:
> On Tue, May 1, 2012 at 8:06 AM, Anton Shterenlikht  
> wrote:
> > I run 10-current on Compaq 6715s.
> > It's very hot and noisy. If I boot
> > in verbose mode, I get lots of:
> >
> > acpi_tz0: _AC2: temperature 92.0 >= setpoint 50.0
> > acpi_tz0: _AC1: temperature 92.0 >= setpoint 60.0
> > acpi_tz0: _AC3: temperature 92.0 >= setpoint 40.0
> > acpi_tz0: _AC2: temperature 92.0 >= setpoint 50.0
> > acpi_tz0: _AC1: temperature 92.0 >= setpoint 60.0
> >
> > at the console.
> >
> > I guess it's telling me that the CPU is too hot?
> >
> > Is that normal, e.g. under "make -j4 buildworld"?
> >
> 
> Probably not. I had a laptop with similar symptom when I was compiling
> stuff. I took it apart, cleaned it and thought that maybe these log
> messages were normal under stress. The CPU eventually fried and only
> then I took a real close look and the heatsink had a very tiny little
> hole where the fluid escaped, but it was not at all apparent at first
> sight. These liquid (or gel?) filled heatsinks are basically useless
> if the liquid escapes or evaporates so it will usually only show when
> you are using the CPU a lot.

I didn't even know they put fluid heatsinks in laptop.
I thought this was something from IBM cutting edge power6
chips.

So I might need to pull the laptop apart..
I'm just not sure I could put it back
together...

Thanks anyway

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: laptop very hot and noisy

2012-05-01 Thread Alejandro Imass
On Tue, May 1, 2012 at 8:06 AM, Anton Shterenlikht  wrote:
> I run 10-current on Compaq 6715s.
> It's very hot and noisy. If I boot
> in verbose mode, I get lots of:
>
> acpi_tz0: _AC2: temperature 92.0 >= setpoint 50.0
> acpi_tz0: _AC1: temperature 92.0 >= setpoint 60.0
> acpi_tz0: _AC3: temperature 92.0 >= setpoint 40.0
> acpi_tz0: _AC2: temperature 92.0 >= setpoint 50.0
> acpi_tz0: _AC1: temperature 92.0 >= setpoint 60.0
>
> at the console.
>
> I guess it's telling me that the CPU is too hot?
>
> Is that normal, e.g. under "make -j4 buildworld"?
>

Probably not. I had a laptop with similar symptom when I was compiling
stuff. I took it apart, cleaned it and thought that maybe these log
messages were normal under stress. The CPU eventually fried and only
then I took a real close look and the heatsink had a very tiny little
hole where the fluid escaped, but it was not at all apparent at first
sight. These liquid (or gel?) filled heatsinks are basically useless
if the liquid escapes or evaporates so it will usually only show when
you are using the CPU a lot.

-- 
Alejandro Imass


> Thanks
>
> --
> Anton Shterenlikht
> Room 2.6, Queen's Building
> Mech Eng Dept
> Bristol University
> University Walk, Bristol BS8 1TR, UK
> Tel: +44 (0)117 331 5944
> Fax: +44 (0)117 929 4423
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


laptop very hot and noisy

2012-05-01 Thread Anton Shterenlikht
I run 10-current on Compaq 6715s.
It's very hot and noisy. If I boot
in verbose mode, I get lots of:

acpi_tz0: _AC2: temperature 92.0 >= setpoint 50.0
acpi_tz0: _AC1: temperature 92.0 >= setpoint 60.0
acpi_tz0: _AC3: temperature 92.0 >= setpoint 40.0
acpi_tz0: _AC2: temperature 92.0 >= setpoint 50.0
acpi_tz0: _AC1: temperature 92.0 >= setpoint 60.0

at the console.

I guess it's telling me that the CPU is too hot?

Is that normal, e.g. under "make -j4 buildworld"?

Thanks

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Performance and mouse problems

2012-05-01 Thread Harald Weis
On Tue, May 01, 2012 at 01:32:01PM +0200, Harald Weis wrote:
 
Sorry for the typing error.

Please read
/etc/defaults/rc.conf instead of /etc/default/rc.conf.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Limiting closed port RST response

2012-05-01 Thread Arthur Chance
Every once in a while the nightly periodic security checks tell me I've 
got a kernel message


Limiting closed port RST response from N to 200 packets/sec

where N > 200. The problem is that it doesn't say which port was 
involved. Is there any way to find that out so I can try tracking down 
the problem? AFAICT tcpdump doesn't have a way saying "closed ports on 
this machine" as a filter.

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


Re: Performance and mouse problems

2012-05-01 Thread Harald Weis
On Mon, Apr 30, 2012 at 05:19:35PM +0200, Jerome Herman wrote:

> Short answer : I am a proud member of the "HAL and DBus are evil" group.
> Middle answer : HAL and DBus were made, maintained and tuned with pretty 
> much nothing but Linux in mind. As a result they hardly play well with 
> other OS, and will tend to play worse as the time goes by.  In fact 
> general opinion is that HAL never truly worked under Linux either, it is 
> now officially deprecated.

I fully agree and propose a slightly longer answer « by example » because
I just got rid of hald and dbus, and I am very happy with the following
configurations for both my desktop and laptop machines.

/boot/loader.conf on both:
--
ums_load="YES"
--

rc.conf on desktop: # Note that moused_enable is set to NO
# by /etc/default/rc.conf !
--
keymap="us.iso"
# Next line required after switching locale from iso-8859-15 to utf-8
scrnmap="us-ascii_to_cp437"

# See rc.conf(5) and /etc/default/rc.conf
# for default and non-default moused settings.
#
moused_ums0_flags="-a 0.3"# decelerate Labtec mouse
--

rc.conf on laptop:
--
keymap="fr.iso.acc"
# Next line required after switching locale from iso-8859-15 to utf-8
scrnmap="us-ascii_to_cp437"

# See rc.conf(5) and /etc/default/rc.conf
# for default and non-default moused settings.
#
moused_enable="YES" # touchpad on laptops
moused_flags="-3"
moused_ums0_flags=""# non-default moused
--
 
xorg.conf on both:
--
Section "ServerLayout"
Identifier "X.org Configured"
Screen  0  "Screen0" 0 0
InputDevice"Mouse0" "CorePointer"
InputDevice"Keyboard0" "CoreKeyboard"
Option "AutoAddDevices" "false"
EndSection

Section "InputDevice"
Identifier  "Keyboard0"
Driver  "kbd"
EndSection

Section "InputDevice"
Identifier  "Mouse0"
Driver  "mouse"
Option  "Protocol" "auto"
Option  "Device" "/dev/sysmouse"
Option  "ZAxisMapping" "4 5 6 7"
EndSection
--

The following configures the keyboard map under X with
the option for typing all sorts of non-ascii characters.

.xinitrc on desktop:
--
setxkbmap -model pc104 -layout us -option compose:ralt
--

.xinitrc on laptop:
--
setxkbmap -model pc102 -layout fr -option compose:menu
--

That works on 8.2-RELEASE-p3.
--
Harald Weis
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: localhost not recognised in getaddrinfo(3) in FreeBSD 9.0-STABLE

2012-05-01 Thread Matthew Seaman
On 01/05/2012 11:08, Unga wrote:
> Following code fragment works in FreeBSD 8.1-RELEASE, but not in FreeBSD 
> 9.0-STABLE:
> 
> error = getaddrinfo("localhost", port, &hints, &res0);
>  if (error)
> {
>  fprintf(stderr,"getaddrinfo failed - %s\n", gai_strerror(error));
>  exit(1);
> }
> 
> It complains: getaddrinfo failed - hostname nor servname provided, or not 
> known
> 
> Any idea why?
> 

So, what is the variable 'port' initialized to?  It should be a const
char* with the name of a network service found in /etc/services or else
the string representation of a port number in decimal.

Failing that, this is almost certainly a configuration snafu on your
9.0-STABLE box.

Does this machine have an entry for localhost in /etc/hosts ? Can it
resolve localhost via the DNS? Or through any other means such as NIS or
LDAP?

What does:

% getent hosts localhost

return?

If that fails, sanity check /etc/nsswitch.conf and /etc/resolv.conf

Cheers,

Matthew 

-- 
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey




signature.asc
Description: OpenPGP digital signature


Has anybody out there taken the BSDA certification exams?

2012-05-01 Thread herbert langhans
Hi List,
on Saturday the 5th of May there is the Central-European BSD day in
Vienna. They also give the chance to make the BSDA certification
exams.

I went through the 'BSD Associate Exam Objectives' to get some idea
the questions. But I still wonder, how NetBSD users get away with the
style of questions and solutions asked. Its some years ago that I used
FreeBSD and I have for sure forgotten lots of details or never ran into
certain commands/solutions since changing to NetBSD.

Has any of you taken the exams? Has somebody told you about the exams? 
By the Exam Objectives I think its not that easy to pass ...

Cheers
herb langhans

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


localhost not recognised in getaddrinfo(3) in FreeBSD 9.0-STABLE

2012-05-01 Thread Unga
Hi all

Following code fragment works in FreeBSD 8.1-RELEASE, but not in FreeBSD 
9.0-STABLE:

error = getaddrinfo("localhost", port, &hints, &res0);
 if (error)
    {
 fprintf(stderr,"getaddrinfo failed - %s\n", gai_strerror(error));
 exit(1);
    }

It complains: getaddrinfo failed - hostname nor servname provided, or not known

Any idea why?

Best regards
Unga

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


Re: which filesytems zfs needs to function

2012-05-01 Thread Edward M

On 04/30/2012 05:52 PM, Adam Vande More wrote:
The filesystems are mostly arbitrary.  You really only need the rootfs 
with appropriate directories underneath.  The list provided is simply 
a concise idealized layout.



Thanks!. I will try creating different filesytems to further my 
learning of zfs. :-)

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


Re: UFS Crash and directories now missing

2012-05-01 Thread Edward M

On 04/30/2012 10:58 PM, Robert Bonomi wrote:

Reading_both_  of McKusick's  "Design of .." books, and the 'Unix System
Admininstration Handbook', by Nemeth, et al.  is a good_start_.

Having a bunch of the books from O'Reilley&  Assoc. (),
especially for 'standard' tools that you need to get the most out of, is
also highly recommended.
  


   After realising  I lack ton of  knowledge, especially how the 
internals work. I'm using this advice:-) .

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


Re: UFS Crash and directories now missing

2012-05-01 Thread Robert Bonomi

Eitan Adler  wrote:
> On 30 April 2012 07:36, Robert Bonomi  wrote:
> > A competennt, "not stupid", sysadmin would know these things.  And not
> > 'remove all doubt' (in the words of Abraham Lincoln), by raising such
> > nonsense questions.
>
> A competent sysadmin would ask questions when they don't know the
> answer bringing up possibilities they thought about.
> A stupid sysadmin would yell at someone asking a question claiming
> they should have known the answer.

An informed critic would have recognized that the 'lack of knowledge' issue,
and the 'nonsense questions' were two -entirely- different matters. 

One who lacks knowledge of system fundamentals and asks questions _about_
_the_fundammentals_ that they do not understand is not subject to 
criticizm -- they are educatable.

Those who make grossly false-to-fact assumptions about the behavior of those 
fundamentals, and extrapolate wildly from those erroneous assumptions
cannot be engaged in rational conversation -without- hauling them back
to the initial erroneous assumptions, and correcting those errors.  And,
when that is done, it invaliates everything extrapolated from the false
premise.

Those who continue to extrapolate wildly in such manner cannot be helped.

It was also established that the OP's descriptions were woefully incomplete
and unreliable.  A second disk was involved.  'dangerously dedicated' or
otherwise?  partitioning?  slices? label type?  There is indirect indication
'everything of interest' was on a single slice, but that is only an inference.
There's no indication of where _in_the_filesystem_ on the slice that the 
jails '/' directories were located, or by what names they were known to the
system outside the jail.  The 'pattern' of the names, and placement in the 
hierarchy _is_ likely of some significance. As is (a) ownership, (b) 
permissions, and (c) 'flags', of (1) the original 'containing' directory,
(b) the external view of the jail '/' directories in that directory, and
(c) 'where they ended up'.  It is likely that that 'external view' (pre-
problem) of the jail '/'s does not exist -- unless one had historical data 
from before the problem.  "Everything" was running in jails.  Except for
things that weren't.

For any constructive analysis of "what happened", one needed to capture *all*
the bits in the directory (itself) where the jails ended up -- a directory
'listing', e.g. 'ls' (regardless of options), is not sufficient -- and the 
same for the directory where they 'should have been', plus a copy of the 
slice's complete inode table -- i.e., from _all_ the cylinder groups.  Then 
one would examine the 'last modified' timestamp on the directory where the 
jails were found, and -then- the timestamps on the jail directories 
themselves. 

Among other things, this data allows one to establish whether or not the
jail directories were ever _really_ where one thought they were, or whether
they just 'appeared' to be there, e.g. due to nullfs, or a 'link'.  And an 
'initial estimate' of -when- it may have happened.  (if 'malice' is involved,
or certain kinds of backup/restore activities, the timestamps _may_ not be 
accurate, but they are a 'best available' guess.)

Capturing -all- the data from the 'where they were' directory, allows one
to examine the 'deleted' entries -- where one _should_ find entries for
the jails, and 'last accessed' timestamps which put a lower bound on when
the 'move' occured.

When the 'apparently impossible' happens, it is *VERY*OFTEN* the case that
'reality' is *NOT* what someone 'knows' it is.  No matter how 'obvious' it
is, one has to =verify=.  

It is also _FAR_ 'easier to believe' that (especially) a nullfs mount (or,
less likely, a hard link) disappeared, than directories actually got moved.
The move may well have happened, but one must 'positively' eliminate the 
'more plausible' alternatives first.  Things that would 'give the appearance'
of what was reported, but from -very- different causations.

Of course, to capture this kind of information, one have to know "what's 
where" in the filesystem metadata, and have means to capture it _without_ 
changing any of that data.  And _that_ means that you have to have a fair
understanding of the mechanics of how the filesystem works.  Which rapidly
leads into gory details of how the O/S does disk I/O, and the various
performance optimizations (and trade-offs) employed.

Reading _both_ of McKusick's  "Design of .." books, and the 'Unix System 
Admininstration Handbook', by Nemeth, et al.  is a good _start_.

Having a bunch of the books from O'Reilley & Assoc. (),
especially for 'standard' tools that you need to get the most out of, is
also highly recommended.  

Disclaimer:  I know a lot of the authors of those books, persoally.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions