Re: openbsd 5.0 lifebook p1110 kernal panic on suspend/standby

2012-03-08 Thread Kendall Shaw
Ted Unangst  writes:

> As a short term workaround, type -c at the boot prompt, then "disable
> cbb" at the next prompt, then quit, and see what happens.

I still get a panic and it didn't change the panic string or the trace.

Kendall

> On Wed, Mar 07, 2012, Kendall Shaw wrote:
>> Kendall Shaw  writes:
>> 
>>> Hi,
>>>
>>> I have a lifebook p1110 which causes a kernel panic related to APM, I
>>> think. Either by setting power savings settings in BIOS to suspend or
>> standby, or
>>> disabling power savings in BIOS and running apmd and apm -z or apm -S
>>> causes a kernal panic.
>>>
>>> Do you have any advice, other than give up on being able to use suspend?
>>>
>>> The sub-notebook has no serial port, so I'm typing the trace and ps
>>> results:
>>>
>>> trace:
>>>
>>> Debugger(d08cee78,d85dde58,d08ad043,d85dde58,0) at Debugger+0x4
>>> panic(d08ad043,d10cc000,d85dde8c,d10aea00,0) at panic+0x5d
>>> timeout_add(d10aea4c,a,8,0,d10aea00) at timeout_add+0xbf
>>> pccbb_checksockstat(d10aea00,0,0,ff00,0) at pccbb_checksockstat+0x6e
>>> pccbbactivate(d10aea00,3,d85ddeec,d059f4b8,d10b1e00) at
>>> pccbbactivate+0x409
>>> config_activate_children(d10b1e00,3,3,12,50307dc) at
>>> config_activate_children+0x45
>>> config_activate_children(d10b0fc0,3,246,0,1) at
>>> config_activate_children+0x45
>>> apm_suspend(2,0,d85ddf50,800b,0) at apm_suspend+0x91
>>> apm_periodic_check(d10b1f80,20,d097df84,0,d10b1f80) at
>>> apm_periodic_check+0x19c
>>> apm_thread(d10b1f80) at apm_thread+0x20
>>> Bad frame pointer: 0xd0b8ce38
>>>
>>> ps:
>>>
>>> apmd
>>> getty
>>> ksh
>>> cron
>>> inetd
>>> sendmail
>>> sshd
>>> ntpd
>>> pflogd
>>> syslogd
>>> dhclient
>>> aiodoned
>>> update
>>> cleaner
>>> reaper
>>> pagedown
>>> crypto
>>> pfpurge
>>> pcic0,0,1
>>> pcic0,0,0
>>> usbtask
>>> usbatsk
>>> apm0
>>> syswq
>>> idle0
>>> kmthread
>>> init
>>> swapper
>> 
>> Someone sent me email pointing out that I should include the panic
>> string:
>> 
>> timeout_add: not initialized
>> 
>> Kendall



Re: openbsd 5.0 lifebook p1110 kernal panic on suspend/standby

2012-03-07 Thread Kendall Shaw
Kendall Shaw  writes:

> Hi,
>
> I have a lifebook p1110 which causes a kernel panic related to APM, I
> think. Either by setting power savings settings in BIOS to suspend or 
> standby, or
> disabling power savings in BIOS and running apmd and apm -z or apm -S
> causes a kernal panic.
>
> Do you have any advice, other than give up on being able to use suspend?
>
> The sub-notebook has no serial port, so I'm typing the trace and ps
> results:
>
> trace:
>
> Debugger(d08cee78,d85dde58,d08ad043,d85dde58,0) at Debugger+0x4
> panic(d08ad043,d10cc000,d85dde8c,d10aea00,0) at panic+0x5d
> timeout_add(d10aea4c,a,8,0,d10aea00) at timeout_add+0xbf
> pccbb_checksockstat(d10aea00,0,0,ff00,0) at pccbb_checksockstat+0x6e
> pccbbactivate(d10aea00,3,d85ddeec,d059f4b8,d10b1e00) at
> pccbbactivate+0x409
> config_activate_children(d10b1e00,3,3,12,50307dc) at
> config_activate_children+0x45
> config_activate_children(d10b0fc0,3,246,0,1) at
> config_activate_children+0x45
> apm_suspend(2,0,d85ddf50,800b,0) at apm_suspend+0x91
> apm_periodic_check(d10b1f80,20,d097df84,0,d10b1f80) at
> apm_periodic_check+0x19c
> apm_thread(d10b1f80) at apm_thread+0x20
> Bad frame pointer: 0xd0b8ce38
>
> ps:
>
> apmd
> getty
> ksh
> cron
> inetd
> sendmail
> sshd
> ntpd
> pflogd
> syslogd
> dhclient
> aiodoned
> update
> cleaner
> reaper
> pagedown
> crypto
> pfpurge
> pcic0,0,1
> pcic0,0,0
> usbtask
> usbatsk
> apm0
> syswq
> idle0
> kmthread
> init
> swapper

Someone sent me email pointing out that I should include the panic
string:

timeout_add: not initialized

Kendall



openbsd 5.0 lifebook p1110 kernal panic on suspend/standby

2012-03-05 Thread Kendall Shaw
Hi,

I have a lifebook p1110 which causes a kernel panic related to APM, I
think. Either by setting power savings settings in BIOS to suspend or standby, 
or
disabling power savings in BIOS and running apmd and apm -z or apm -S
causes a kernal panic.

Do you have any advice, other than give up on being able to use suspend?

The sub-notebook has no serial port, so I'm typing the trace and ps
results:

trace:

Debugger(d08cee78,d85dde58,d08ad043,d85dde58,0) at Debugger+0x4
panic(d08ad043,d10cc000,d85dde8c,d10aea00,0) at panic+0x5d
timeout_add(d10aea4c,a,8,0,d10aea00) at timeout_add+0xbf
pccbb_checksockstat(d10aea00,0,0,ff00,0) at pccbb_checksockstat+0x6e
pccbbactivate(d10aea00,3,d85ddeec,d059f4b8,d10b1e00) at
pccbbactivate+0x409
config_activate_children(d10b1e00,3,3,12,50307dc) at
config_activate_children+0x45
config_activate_children(d10b0fc0,3,246,0,1) at
config_activate_children+0x45
apm_suspend(2,0,d85ddf50,800b,0) at apm_suspend+0x91
apm_periodic_check(d10b1f80,20,d097df84,0,d10b1f80) at
apm_periodic_check+0x19c
apm_thread(d10b1f80) at apm_thread+0x20
Bad frame pointer: 0xd0b8ce38

ps:

apmd
getty
ksh
cron
inetd
sendmail
sshd
ntpd
pflogd
syslogd
dhclient
aiodoned
update
cleaner
reaper
pagedown
crypto
pfpurge
pcic0,0,1
pcic0,0,0
usbtask
usbatsk
apm0
syswq
idle0
kmthread
init
swapper

Kendall



Re: package ports tools, ftp and pf

2008-10-16 Thread Kendall Shaw
On Thu, 2008-10-16 at 11:25 -0700, Johan Beisser wrote:
> Either switch to passive ftp, or open your ftp-data port.
> 
> That should solve some of your problems.

My problem seems to be similar to the thread "Active FTP doesn't work
through a 3.3 firewall". I do actually have entries in pflog which I
missed because they are incoming with source port 20. So, I added:

pass in quick on $ext_if proto tcp from any port 20 to $ext_if port
{ 4 >< 65500 }

and I can now use pkg_info.

> On 10/16/08, Kendall Shaw <[EMAIL PROTECTED]> wrote:
> > I get no reply when I try to subscribe to the pf mailing list, so I'll
> > ask here. I'm running OpenBSD 4.3 stable on amd64. I use what is in the
> > pf faq to allow ftp from my internal lan via nat, which works, but I
> > can't ftp from the computer that is running pf unless I use ftp -AaE as
> > I read about in a post on this list I think. And, I am unable to
> > retrieve or query package or install ports.
> >
> > If I simply use ftp without arguments, I can login but I can't list
> > directories. It hangs after printing 200 EPRT command successful.
> >
> > I tried setting FETCH_CMD to '/usr/bin/ftp -AaE' but I still can not use
> > pkg_add, and I can't use pkg_info. If I try to build a port, it can't
> > retrieve the files. I would prefer to fix my pf rules. What do I need to
> > do to allow ftp, package tools and ports to work from the machine
> > running pf?
> >
> > Also, my filtering rules start with "block log all", which I hoped would
> > log anything that is blocked, but I don't see anything that looks like
> > ftp being blocked in pflog. If I disable pf, package tools work. Is
> > there a way to log everything that is blocked?
> >
> > Kendall



package ports tools, ftp and pf

2008-10-16 Thread Kendall Shaw
I get no reply when I try to subscribe to the pf mailing list, so I'll
ask here. I'm running OpenBSD 4.3 stable on amd64. I use what is in the
pf faq to allow ftp from my internal lan via nat, which works, but I
can't ftp from the computer that is running pf unless I use ftp -AaE as
I read about in a post on this list I think. And, I am unable to
retrieve or query package or install ports.

If I simply use ftp without arguments, I can login but I can't list
directories. It hangs after printing 200 EPRT command successful.

I tried setting FETCH_CMD to '/usr/bin/ftp -AaE' but I still can not use
pkg_add, and I can't use pkg_info. If I try to build a port, it can't
retrieve the files. I would prefer to fix my pf rules. What do I need to
do to allow ftp, package tools and ports to work from the machine
running pf?

Also, my filtering rules start with "block log all", which I hoped would
log anything that is blocked, but I don't see anything that looks like
ftp being blocked in pflog. If I disable pf, package tools work. Is
there a way to log everything that is blocked?

Kendall



alix help

2008-09-20 Thread Kendall Shaw
Hi,

I got an alix2c2 which I'm hoping to install openbsd on. Is there a way to 
upgrade it's bios and install openbsd on it from openbsd?

I see instructions for upgrading the bios using freedos, so I got a CF card 
reader and used instructions to install freedos from windows xp, but when I 
boot the alix it complains "invalid system disk".

If I were able to upgrade the bios, I don't know how I will actually install 
openbsd on the disk.  Aside from transfering files using Xmodem, what is the 
procedure for actually installing an image onto the CF card?

Kendall



Re: [OT] C code

2008-05-25 Thread Kendall Shaw
On Mon, 2008-05-26 at 00:11 -0400, deoxy wrote:
> Hello.
> 
> apue.h is OK I take this of http://safari.oreilly.com/0201433079/app02
> and this is in my folder.
> The err_quit is in line 108 "void err_quit(const char *, ...)i;"
> err_dump and err_sys are similar.
> 
> regards.
> 
> Dmitri.
> 
> On Mon, May 26, 2008 at 09:11:51AM +0530, Amarendra Godbole wrote:
> > > $cc F3_10.c
> > > /tmp//ccnsuA79.o(.text+027): In function 'main':
> > > :undefined reference to 'err_quit'
> > > /tmp//ccnsuA79.o(.text+0x74): In fuction 'main':
> > > :undefined reference to 'err_sys'
> > > /tmp//ccnsuA79.o(.txt+0xdf): In functiion 'main':
> > > :undefined reference to 'err_dump'
> > > collect2: ld returned 1 exit status
> > >
> > > The source is:
> > >
> > >
> > > #include "apue.h"
> > 
> > This is the clue - where do you think is apue.h? Take a look at the
> > last few pages of the book, and you will see.
> > 
> > -Amarendra

It might be that you would prefer to start by learning more about C and
your compiler first, before unix programming in C.

Assuming that 'i;' at the end of the line isn't actually there, you are
probably not passing an object module to the linker. Aside from letting
the precompiler find apue.h, you also have to compile the code that
implements those functions and link it with the object module compiled
from your FE_10.c, or compile them together as someone else suggested.

Kendall



Re: [OT] C code

2008-05-25 Thread Kendall Shaw
On Sun, 2008-05-25 at 22:41 -0400, deoxy wrote:
> Hello.
> 
> I dont know if this a cuestion for this list, but I think is it a valid 
> cuestion...
> I reading a book recomended in http://www.openbsd.org/books.html The book is 
> "Advanced programmig in the unix environment".
> In this book I read Figure 3.1 but this not compile. the error is:
> 
> $cc F3_10.c
> /tmp//ccnsuA79.o(.text+027): In function 'main':
> :undefined reference to 'err_quit'
> /tmp//ccnsuA79.o(.text+0x74): In fuction 'main':
> :undefined reference to 'err_sys'
> /tmp//ccnsuA79.o(.txt+0xdf): In functiion 'main':
> :undefined reference to 'err_dump'
> collect2: ld returned 1 exit status
> 
> The source is:
> 
> 
> #include "apue.h"
> #include 
> 
> int
> main(int argc, char *argv[])
> {
>   int val;
>   if (argc != 2)
> err_quit("usage: a.out ");
>   if ((val = fcntl(atoi(argv[1]), F_GETFL, 0)) < 0)
> err_sys("fcntl error for fd %d", atoi(argv[1]));
> 
>   switch (val & O_ACCMODE) {
>   case O_RDONLY:
>   printf("read only");
>   break;
>   case O_WRONLY:
>   printf("write only");
>   break;
>   case O_RDWR:
>   printf("read write");
>   break;
>   default:
>   err_dump("unknown access mode");
>   }
>   if (val & O_APPEND)
>   printf(", append");
>   if (val & O_NONBLOCK)
>   printf(", nonblocking");
>   #if  defined(O_SYNC)
>   if (val & O_SYNC)
>   printf(", synchronous writes");
>   #endif
>   putchar('\n');
>   exit(0);
>   }
> 
> I dont know wath is the problem. your can helpme?
> 
> Sorry my bad english.
> 
> regards.
> 
> Dmitri.-

I think you are supposed to add the definitions for err_quit etc. from
the back of the book. You can download them I think and then you have to
link to them and make sure apue.h is on your include path.

Kendall



Re: [OT] C code

2008-05-25 Thread Kendall Shaw
On Sun, 2008-05-25 at 22:41 -0400, deoxy wrote:
> Hello.
> 
> I dont know if this a cuestion for this list, but I think is it a valid 
> cuestion...
> I reading a book recomended in http://www.openbsd.org/books.html The book is 
> "Advanced programmig in the unix environment".
> In this book I read Figure 3.1 but this not compile. the error is:
> 
> $cc F3_10.c
> /tmp//ccnsuA79.o(.text+027): In function 'main':
> :undefined reference to 'err_quit'
> /tmp//ccnsuA79.o(.text+0x74): In fuction 'main':
> :undefined reference to 'err_sys'
> /tmp//ccnsuA79.o(.txt+0xdf): In functiion 'main':
> :undefined reference to 'err_dump'
> collect2: ld returned 1 exit status
> 
> The source is:
> 
> 
> #include "apue.h"
> #include 
> 
> int
> main(int argc, char *argv[])
> {
>   int val;
>   if (argc != 2)
> err_quit("usage: a.out ");
>   if ((val = fcntl(atoi(argv[1]), F_GETFL, 0)) < 0)
> err_sys("fcntl error for fd %d", atoi(argv[1]));
> 
>   switch (val & O_ACCMODE) {
>   case O_RDONLY:
>   printf("read only");
>   break;
>   case O_WRONLY:
>   printf("write only");
>   break;
>   case O_RDWR:
>   printf("read write");
>   break;
>   default:
>   err_dump("unknown access mode");
>   }
>   if (val & O_APPEND)
>   printf(", append");
>   if (val & O_NONBLOCK)
>   printf(", nonblocking");
>   #if  defined(O_SYNC)
>   if (val & O_SYNC)
>   printf(", synchronous writes");
>   #endif
>   putchar('\n');
>   exit(0);
>   }
> 
> I dont know wath is the problem. your can helpme?
> 
> Sorry my bad english.
> 
> regards.
> 
> Dmitri.-

Those functions are defined in the back of the book, as I recall.



Re: Decipering "Understanding IP addressing"

2008-05-21 Thread Kendall Shaw
On Wed, 2008-05-21 at 13:10 -0700, Kendall Shaw wrote:
> On Wed, 2008-05-21 at 12:46 -0700, Chris Kuethe wrote:
> > On Wed, May 21, 2008 at 12:36 PM, Kendall Shaw <[EMAIL PROTECTED]> wrote:
> > 
> > > "IPv4 defines a 32-bit address which means that there are
> > > only 232 (4,294,967,296) IPv4 addresses available."
> > >
> > > 232 what?
> > 
> > Typesetting error. That should be 2^32 or 2**32 or pow(2, 32) or
> > 232 
> > 
> > > 23 or 8 what? Bits? What are 23 and 8 alternatives of? 24 or 16 looks
> > 
> > More typesetting problems. 2^3 = 2*2*2 = 8
> 
> Thanks everyone.
> 
> How about this then from page 4, about class A networks:
> 
> "Each Class A network address has an 8-bit network prefix, with the
> highest order bit set to 0 (zero) and a 7-bit network number, followed
> by a 24-bit host number...
> 
> A maximum of 126 (27 -2) /8 networks can be defined. The calculation
> subtracts two because the /8 network 0.0.0.0 is reserved for use as the
> default route and the /8 network 127.0.0.0"
> 
> 12^6? Is 27 - 2 supposed to be 128 - 2?

Oh, same thing 2^7 - 2 = 126. Never mind.



Re: Decipering "Understanding IP addressing"

2008-05-21 Thread Kendall Shaw
On Wed, 2008-05-21 at 12:46 -0700, Chris Kuethe wrote:
> On Wed, May 21, 2008 at 12:36 PM, Kendall Shaw <[EMAIL PROTECTED]> wrote:
> 
> > "IPv4 defines a 32-bit address which means that there are
> > only 232 (4,294,967,296) IPv4 addresses available."
> >
> > 232 what?
> 
> Typesetting error. That should be 2^32 or 2**32 or pow(2, 32) or
> 232 
> 
> > 23 or 8 what? Bits? What are 23 and 8 alternatives of? 24 or 16 looks
> 
> More typesetting problems. 2^3 = 2*2*2 = 8

Thanks everyone.

How about this then from page 4, about class A networks:

"Each Class A network address has an 8-bit network prefix, with the
highest order bit set to 0 (zero) and a 7-bit network number, followed
by a 24-bit host number...

A maximum of 126 (27 -2) /8 networks can be defined. The calculation
subtracts two because the /8 network 0.0.0.0 is reserved for use as the
default route and the /8 network 127.0.0.0"

12^6? Is 27 - 2 supposed to be 128 - 2?

Kendall



Decipering "Understanding IP addressing"

2008-05-21 Thread Kendall Shaw
In the networking section of the OpenBSD FAQ it suggests reading
"Understanding IP addressing":

http://www.3com.com/other/pdfs/infra/corpinfo/en_US/501302.pdf

I'm having a hard time understanding it. In many places they use 2
numbers, e.g. 2(21) or 232 (4,294,967,296). Can you understand what they
are saying?

For example, on page 3:

"IPv4 defines a 32-bit address which means that there are
only 232 (4,294,967,296) IPv4 addresses available."

232 what?

On page 11:

"The first step in the planning process is to take the maximum number of
subnets required and round up to the nearest power of two. For example,
if an organization needs nine subnets, 23 (or 8) will not provide
enough subnet addressing space, so the network administrator will
need to round up to 24 (or 16)."

23 or 8 what? Bits? What are 23 and 8 alternatives of? 24 or 16 looks
like alternative prefix lengths for class A or B networks, but I don't
get 23 or 8.

Kendall



Re: What's a patch? Can I build only changes to openbsd source?

2008-05-20 Thread Kendall Shaw
On Tue, 2008-05-20 at 22:37 -0400, Martin Gignac wrote:
> On Tue, 20 May 2008, Kendall Shaw wrote:
> 
> > Can you also help me understand these words about -current, from the
> > FAQ:
> >
> > "There are also flag days and major system changes that the developers
> > navigate with one-time tools, which mean that source-based updating is
> > not possible."
> >
> > There are changes that don't occur in the source?
> 
> Maybe it's better if someone else confirms what I'm about to say (and 
> corrects me if I'm wrong), but here's how I understand it:
> 
> Sometimes, there'll be such important and drastic changes in some parts of 
> the source that it becomes impossible to compile this new version of the 
> source using the tools/kernel built with the older version of the source, 
> before the drastic changes were committed.
> 
> In these cases the developers use some one-off methods/tools to get the 
> "tricky" parts of the new sources compiled. With the relevant tools/parts 
> updated in a "customized" fashion they can then perform a recompile of the 
> whole base using the traditional methods and release a binary-form 
> snapshot, which people running -current are expected to upgrade with if 
> they want to continue following -current.
> 
> Makes sense?
> 
> -Martin

Yes, thanks.



Re: What's a patch? Can I build only changes to openbsd source?

2008-05-20 Thread Kendall Shaw
On Tue, 2008-05-20 at 18:25 -0400, Martin Gignac wrote:
> On Tue, 20 May 2008, Kendall Shaw wrote:
> 
> > I'm following -stable until I read some more, and I'm unclear on some
> > aspects of syncing source.
> >
> > There was an earlier post about why there are no security patches for
> > 4.3 listed at:
> >
> > http://www.openbsd.org/pkg-stable.html
> >
> > Is that different from:
> >
> > http://www.openbsd.org/errata43.html
> >
> > which lists some patches?
> 
> The first link is for add-on packages which are not part of the OpenBSD 
> base system.
> 
> The second is for patches of the base system.
> 
> > Since running -stable, there were changes to userland in /usr/src which
> > I built. Was that not considered a patch?
> 
> If I understand your question correctly, you may find the answer here:
> 
>http://www.openbsd.org/stable.html
> 
> Of interest:
> 
> "[..] OpenBSD provides a source tree that contains important patches and 
> fixes (i.e. those from the errata plus others which are obvious and 
> simple, but do not deserve an errata entry) [..]"
> 
> "[..] * Errata entries are made for bugs which affect many people. Other 
> patches may be merged into the patch branch if they affect a few people in 
> drastic ways."
> 
> -Martin

Thanks, that clears up what "patch" refers to.

Can you also help me understand these words about -current, from the
FAQ:

"There are also flag days and major system changes that the developers
navigate with one-time tools, which mean that source-based updating is
not possible."

There are changes that don't occur in the source?

Kendall



What's a patch? Can I build only changes to openbsd source?

2008-05-20 Thread Kendall Shaw
I'm following -stable until I read some more, and I'm unclear on some
aspects of syncing source.

What's a patch?
---

There was an earlier post about why there are no security patches for
4.3 listed at:

http://www.openbsd.org/pkg-stable.html

Is that different from:

http://www.openbsd.org/errata43.html

which lists some patches?

Since running -stable, there were changes to userland in /usr/src which
I built. Was that not considered a patch?

Building only changes?
--

The FAQ describes building userland in which you first delete /usr/obj.
Do I need to do that, or can I just run make obj and maybe have it only
build what has changed? (There were no changes to try this with
recently)

Kendall



Re: How can I determine ethernet speed?

2008-05-19 Thread Kendall Shaw
On Mon, 2008-05-19 at 15:18 -0700, Lord Sporkton wrote:
> 2008/5/19 Kendall Shaw <[EMAIL PROTECTED]>:
> > I'm an openbsd novice. I replaced cards on computers in my home network
> > with gigabit ethernet and got a a gigabit switch. Can I determine what
> > speed or maybe what media my re0 interface is using?
> >
> >
> 
> You can use ifconfig, it should have a "media:" line, telling what speed
> and duplex you are at and how you got there, whether it was auto select or 
> not.
> 
> 
> angie# ifconfig em0 | grep media
> media: Ethernet autoselect (100baseTX full-duplex)

D'oh!



How can I determine ethernet speed?

2008-05-19 Thread Kendall Shaw
I'm an openbsd novice. I replaced cards on computers in my home network
with gigabit ethernet and got a a gigabit switch. Can I determine what
speed or maybe what media my re0 interface is using?