Re: fsck recoveries, configuration

2012-08-18 Thread Polytropon
On Fri, 17 Aug 2012 23:53:55 -0600, Gary Aitken wrote:
 Hmmm:
 
 acpi0: 030811 XSDT1017 on motherboard
 acpi0: Power Button (fixed)
 acpi0: reservation of fec0, 1000 (3) failed
 acpi0: reservation of fee0, 1000 (3) failed
 acpi0: reservation of ffb8, 8 (3) failed
 acpi0: reservation of fec1, 20 (3) failed
 acpi0: reservation of fed8, 1000 (3) failed
 acpi0: reservation of 0, a (3) failed
 acpi0: reservation of 10, c7e0 (3) failed
 acpi_button0: Power Button on acpi0

 Do all those reservation failed indicate the interrupt is not
 going to actually be seen?

Seems to be messages related to an improperly implemented ACPI
BIOS I'd assume. Look:

acpi0: reservation of 0, a (3) failed
acpi0: reservation of 10, 7fde (3) failed

I also have two of such messages here. In my case, it's a
really cheap home PC (from a discounter).



 What does (fixed) mean?

A can only guess: It probably means that the button is fixed
(mounted) in the machine, e. g. at the front panel.



You could also check in sysctl's output on what state the button
will initiate when pressed (usually S3).



-- 
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: fsck recoveries, configuration

2012-08-18 Thread Bruce Cran


On 18/08/2012 07:09, Polytropon wrote:

A can only guess: It probably means that the button is fixed
(mounted) in the machine, e. g. at the front panel.


From 

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

ACPI-compliant systems interact with hardware through either a 
Function Fixed Hardware (FFH) Interface, or a platform-independent 
hardware programming model which relies on platform-specific ACPI 
Machine Language (AML) provided by the original equipment manufacturer 
(OEM).


Function Fixed Hardware interfaces are platform-specific features, 
provided by platform manufacturers for the purposes of performance and 
failure recovery. Standard Intel-based PCs have a fixed function 
interface defined by Intel,[10] which provides a set of core 
functionality that reduces an ACPI-compliant system's need for full 
driver stacks for providing basic functionality during boot time or in 
the case of major system failure.


--
Bruce Cran
___
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: fsck recoveries, configuration

2012-08-17 Thread Polytropon
On Fri, 17 Aug 2012 14:19:07 -0600, Gary Aitken wrote:
 1.  It appears to me that the file system (ufs) is not writing
 stuff out when things are idle.  If I do a sync manually and
 leave the machine idle and it crashes later, it comes up clean. 
 If I don't do a sync manually and it crashes later, it often
 comes up needing fsck.  Is there a way to configure the filesystem
 to cache but still write cached stuff at low priority?

Note that even if the OS orders a data write, it's up to the
disk driver to actually tell the disk to do it. And the disk
then _has_ to do it. There is no real connection (in time)
for those components of the task line, even though one would
assume that they happen immediately.

On a somewhat idle system, you could keep a process (e. g. top -S)
running to check system processes that could be responsible for
writes (or missing writes).



 2.  When my machine hung (could not rlogin or ping), I powered
 off and rebooted.

Does the machine have a soft power button and it is configured
to issue a shutdown -p now (which is quite common)? When you
have access to the machine, try that. Even if the machine does
not accept network logins, this mechanism might still work.



 Reboot did a deferred fsck. 

Is this intended? Personally, I'd rather wait some time to boot
in a fully checked file system environment then dealing with the
uncertain situation of snapshots and background FS check activity.
In worst case, I want to be prompted by fsck if a major defect has
been found that requires administrator attention.

Put

background_fsck=NO

into /etc/rc.conf to get this behaviour. Note that as long as fsck
is running, you can't enter any interactive commands, and it will
happen _prior_ to allowing any network connections. Also note that
this is in single user mode, so you can't switch VTs.



 After it booted I logged in, and also logged in on another system. 
 On the remote system I could do a ping but rlogin returned
 connection reset by peer, even though I could log in locally. 

Does rlogin work when you give the system some time to recover?



 I presume that is because the background fscks were not complete?

Possible. Background fsck is uncertain per se, so for diagnostics
better leave it aside and use the maybe less comfortable method.
This is easy when you have local access to the machine in question.



 I then did a 
   ps ax | grep fsck
 and saw only the logger process for the deferred fsck's.
 I did a 
   man logger
 which appeared to hang -- no output.  I'm guessing because it needed
 the filesystems which hadn't yet fsck'd.

Just a guess: Maybe you're experiencing a file system defect and fsck,
even though running in background, needs an input? I'm not really sure
about this, because I'm _intendedly_ not using fsck that way.



 I then attempted to switch consoles using
   altfn
 but could not.

That would imply you're still stuck in SUM. A strange constellation
given that it appears that you have fsck running in background.



 I then attempted to kill the man logger process using ^C with no success.

Waiting / hanging process?



 Can someone shed light on the above sequence of events?  It's highly
 likely some of them occurred before the 60 second delay for fsck
 timed out, but I'd like to understand what the heck is going on.

Try to construct a more _defined_ situation for further diagnostics.
Also you could boot the system up in SUM (use boot -s) and then
perform fsck manually, just to make sure your disks are fine.




-- 
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: fsck recoveries, configuration

2012-08-17 Thread Gary Aitken
On 08/17/12 19:05, Polytropon wrote:
 2.  When my machine hung (could not rlogin or ping), I powered
 off and rebooted.
 
 Does the machine have a soft power button and it is configured
 to issue a shutdown -p now (which is quite common)? When you
 have access to the machine, try that. Even if the machine does
 not accept network logins, this mechanism might still work.

Hmmm.  It has a soft power button; have to hold it down 5 sec or so to power 
off.  Those things can be configured to issue a command that will actually get 
executed without a login?  I assume you're talking about a bios option?  How 
does that work?  sounds like magic of some sort...  Or is this a whole login 
sequence with the shutdown at the end?

 Reboot did a deferred fsck.
 
 Is this intended? Personally, I'd rather wait some time to boot
 in a fully checked file system environment then dealing with the
 uncertain situation of snapshots and background FS check activity.
 In worst case, I want to be prompted by fsck if a major defect has
 been found that requires administrator attention.
 
 Put
 
   background_fsck=NO
 
 into /etc/rc.conf to get this behaviour.

Yeah, I came to that conclusion...  Thanks.

 After it booted I logged in, and also logged in on another system.
 On the remote system I could do a ping but rlogin returned
 connection reset by peer, even though I could log in locally.
 
 Does rlogin work when you give the system some time to recover?

yes, if it's not hung -- i.e. done with fsck, I think.  I verified that by 
monitoring the delayed fsck process and as soon as it was done the rlogin 
worked.

 I then attempted to switch consoles using
altfn
 but could not.
 
 That would imply you're still stuck in SUM. A strange constellation
 given that it appears that you have fsck running in background.
 

It seems to me this is always the case -- delayed fsck waits 60 seconds by 
default to start.  During that time the system has come up multi-user, so it's 
trivial to be logged in under multi-user mode with fsck running.
___
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: fsck recoveries, configuration

2012-08-17 Thread Polytropon
On Fri, 17 Aug 2012 20:44:10 -0600, Gary Aitken wrote:
 On 08/17/12 19:05, Polytropon wrote:
  2.  When my machine hung (could not rlogin or ping), I powered
  off and rebooted.
  
  Does the machine have a soft power button and it is configured
  to issue a shutdown -p now (which is quite common)? When you
  have access to the machine, try that. Even if the machine does
  not accept network logins, this mechanism might still work.
 
 Hmmm.  It has a soft power button; have to hold it down 5 sec
 or so to power off. 

That's the override time for a hard power off. If you only
press it once, it should issue shutdown -p now, but of course
this only works if the system is still responding. Even if the
keyboard input and screen output, as well as networking services
stopped to work, this _might_ still be effective.



 Those things can be configured to issue a command that will actually
 get executed without a login? 

Sure, it has been working for many years. Check the BIOS setup,
some machines can be configured to what the button does. The
default setup of FreeBSD should perform the correct action via
ACPI.

In the past, it also worked with APM. In that case, /etc/apmd.conf
would contain the command executed when the button was pressed.
On APM-capable machines, the PSU would be switched off, just like
today's ACPI-based systems. Of course that only works with ATX
power supplies, the AT ones usually had a mechanical switch.



 I assume you're talking about a bios option?  How does that work? 

I've seen BIOS setups allowing different actions for the button,
from go to sleep to soft power off or hard power off. That
action (hard power off) is taken when pressing the button for
about 5 seconds. The OS can NOT deal with that case.



 sounds like magic of some sort...  Or is this a whole login
 sequence with the shutdown at the end?

No, it's a system action using ACPI. No magic involved. :-)



  Reboot did a deferred fsck.
  
  Is this intended? Personally, I'd rather wait some time to boot
  in a fully checked file system environment then dealing with the
  uncertain situation of snapshots and background FS check activity.
  In worst case, I want to be prompted by fsck if a major defect has
  been found that requires administrator attention.
  
  Put
  
  background_fsck=NO
  
  into /etc/rc.conf to get this behaviour.
 
 Yeah, I came to that conclusion...  Thanks.

I _know_ booting a system may take time when the file system
needs repair, but you have to set your priorities: I prefer
waiting 20 minutes instead of running stuff on a damaged
file system.



  After it booted I logged in, and also logged in on another system.
  On the remote system I could do a ping but rlogin returned
  connection reset by peer, even though I could log in locally.
  
  Does rlogin work when you give the system some time to recover?
 
 yes, if it's not hung -- i.e. done with fsck, I think.  I verified
 that by monitoring the delayed fsck process and as soon as it was
 done the rlogin worked.

It seems that background fsck stops certain services from working...
interesting; another reason for me to avoid it when possible. :-)






-- 
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: fsck recoveries, configuration

2012-08-17 Thread Gary Aitken
On 08/17/12 21:17, Polytropon wrote:
 On Fri, 17 Aug 2012 20:44:10 -0600, Gary Aitken wrote:
 On 08/17/12 19:05, Polytropon wrote:
 2.  When my machine hung (could not rlogin or ping), I powered
 off and rebooted.

 Does the machine have a soft power button and it is configured
 to issue a shutdown -p now (which is quite common)? When you
 have access to the machine, try that. Even if the machine does
 not accept network logins, this mechanism might still work.

 Hmmm.  It has a soft power button; have to hold it down 5 sec
 or so to power off.
 
 That's the override time for a hard power off. If you only
 press it once, it should issue shutdown -p now, but of course
 this only works if the system is still responding. Even if the
 keyboard input and screen output, as well as networking services
 stopped to work, this _might_ still be effective.

 Those things can be configured to issue a command that will actually
 get executed without a login?
 
 Sure, it has been working for many years. Check the BIOS setup,
 some machines can be configured to what the button does. The
 default setup of FreeBSD should perform the correct action via
 ACPI.
 
 In the past, it also worked with APM. In that case, /etc/apmd.conf
 would contain the command executed when the button was pressed.
 On APM-capable machines, the PSU would be switched off, just like
 today's ACPI-based systems. Of course that only works with ATX
 power supplies, the AT ones usually had a mechanical switch.

Ah, I see.  The driver raises a signal the system can respond to.

 I assume you're talking about a bios option?  How does that work?
 
 I've seen BIOS setups allowing different actions for the button,
 from go to sleep to soft power off or hard power off. That
 action (hard power off) is taken when pressing the button for
 about 5 seconds. The OS can NOT deal with that case.
 
 sounds like magic of some sort...  Or is this a whole login
 sequence with the shutdown at the end?
 
 No, it's a system action using ACPI. No magic involved. :-)

I'll look at it next time I reboot.  Reading the bios manual, it looks like 
acpi 2.0 support is disabled by default, which may be where it is; otherwise I 
don't see anything obvious.  Thanks.


___
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: fsck recoveries, configuration

2012-08-17 Thread Polytropon
On Fri, 17 Aug 2012 22:14:47 -0600, Gary Aitken wrote:
 On 08/17/12 21:17, Polytropon wrote:
  On Fri, 17 Aug 2012 20:44:10 -0600, Gary Aitken wrote:
  On 08/17/12 19:05, Polytropon wrote:
  2.  When my machine hung (could not rlogin or ping), I powered
  off and rebooted.
 
  Does the machine have a soft power button and it is configured
  to issue a shutdown -p now (which is quite common)? When you
  have access to the machine, try that. Even if the machine does
  not accept network logins, this mechanism might still work.
 
  Hmmm.  It has a soft power button; have to hold it down 5 sec
  or so to power off.
  
  That's the override time for a hard power off. If you only
  press it once, it should issue shutdown -p now, but of course
  this only works if the system is still responding. Even if the
  keyboard input and screen output, as well as networking services
  stopped to work, this _might_ still be effective.
 
  Those things can be configured to issue a command that will actually
  get executed without a login?
  
  Sure, it has been working for many years. Check the BIOS setup,
  some machines can be configured to what the button does. The
  default setup of FreeBSD should perform the correct action via
  ACPI.
  
  In the past, it also worked with APM. In that case, /etc/apmd.conf
  would contain the command executed when the button was pressed.
  On APM-capable machines, the PSU would be switched off, just like
  today's ACPI-based systems. Of course that only works with ATX
  power supplies, the AT ones usually had a mechanical switch.
 
 Ah, I see.  The driver raises a signal the system can respond to.

Yes, it's typically done in the kernel (or by a kernel module).



  I assume you're talking about a bios option?  How does that work?
  
  I've seen BIOS setups allowing different actions for the button,
  from go to sleep to soft power off or hard power off. That
  action (hard power off) is taken when pressing the button for
  about 5 seconds. The OS can NOT deal with that case.
  
  sounds like magic of some sort...  Or is this a whole login
  sequence with the shutdown at the end?
  
  No, it's a system action using ACPI. No magic involved. :-)
 
 I'll look at it next time I reboot.  Reading the bios manual, it
 looks like acpi 2.0 support is disabled by default, which may be
 where it is; otherwise I don't see anything obvious.  Thanks.

Also check the BIOS setup. In most cases, the default configuration
will assign the button press to a soft power down, raising the
proper signal via ACPI. You can also check dmesg's output:

acpi_button0: Power Button on acpi0
acpi_button1: Sleep Button on acpi1

I don't know where this 2nd button is on my system, it only has
one which - when being pressed - lets the system shut down and
then power off properly.

You can find even more elaborate data in sysctl's output:

hw.acpi.power_button_state: S5
hw.acpi.sleep_button_state: S3
dev.acpi_button.0.%desc: Power Button
dev.acpi_button.0.%driver: acpi_button
dev.acpi_button.0.%location: handle=\_SB_.PWRB
dev.acpi_button.0.%pnpinfo: _HID=PNP0C0C _UID=0
dev.acpi_button.0.%parent: acpi0
dev.acpi_button.1.%desc: Sleep Button
dev.acpi_button.1.%driver: acpi_button
dev.acpi_button.1.%location: handle=\_SB_.SLPB
dev.acpi_button.1.%pnpinfo: _HID=PNP0C0E _UID=0
dev.acpi_button.1.%parent: acpi0
dev.acpi_button.1.wake: 1

As I said, my system doesn't have that 2nd sleep button anywhere,
but addressing the power button is correct, the S3 state explained
as Commonly referred to as Standby, Sleep, or Suspend to RAM. RAM
remains powered is then used as a signal to perform the system
shutdown as intended.


-- 
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: fsck recoveries, configuration

2012-08-17 Thread Gary Aitken
On 08/17/12 22:23, Polytropon wrote:

 Also check the BIOS setup. In most cases, the default configuration
 will assign the button press to a soft power down, raising the
 proper signal via ACPI. You can also check dmesg's output:
 
   acpi_button0: Power Button on acpi0
   acpi_button1: Sleep Button on acpi1
 
 I don't know where this 2nd button is on my system, it only has
 one which - when being pressed - lets the system shut down and
 then power off properly.
 
 You can find even more elaborate data in sysctl's output:
 
   hw.acpi.power_button_state: S5
   hw.acpi.sleep_button_state: S3
   dev.acpi_button.0.%desc: Power Button
   dev.acpi_button.0.%driver: acpi_button
   dev.acpi_button.0.%location: handle=\_SB_.PWRB
   dev.acpi_button.0.%pnpinfo: _HID=PNP0C0C _UID=0
   dev.acpi_button.0.%parent: acpi0
   dev.acpi_button.1.%desc: Sleep Button
   dev.acpi_button.1.%driver: acpi_button
   dev.acpi_button.1.%location: handle=\_SB_.SLPB
   dev.acpi_button.1.%pnpinfo: _HID=PNP0C0E _UID=0
   dev.acpi_button.1.%parent: acpi0
   dev.acpi_button.1.wake: 1
 
 As I said, my system doesn't have that 2nd sleep button anywhere,
 but addressing the power button is correct, the S3 state explained
 as Commonly referred to as Standby, Sleep, or Suspend to RAM. RAM
 remains powered is then used as a signal to perform the system
 shutdown as intended.

Hmmm:

acpi0: 030811 XSDT1017 on motherboard
acpi0: Power Button (fixed)
acpi0: reservation of fec0, 1000 (3) failed
acpi0: reservation of fee0, 1000 (3) failed
acpi0: reservation of ffb8, 8 (3) failed
acpi0: reservation of fec1, 20 (3) failed
acpi0: reservation of fed8, 1000 (3) failed
acpi0: reservation of 0, a (3) failed
acpi0: reservation of 10, c7e0 (3) failed
acpi_timer0: 32-bit timer at 3.579545MHz port 0x808-0x80b on acpi0
cpu0: ACPI CPU on acpi0
cpu1: ACPI CPU on acpi0
cpu2: ACPI CPU on acpi0
cpu3: ACPI CPU on acpi0
acpi_ec0: Embedded Controller: GPE 0xa port 0x62,0x66 on acpi0
pcib0: ACPI Host-PCI bridge port 0xcf8-0xcff on acpi0
acpi_button0: Power Button on acpi0
attimer0: AT timer port 0x40-0x43 irq 0 on acpi0
atrtc0: AT realtime clock port 0x70-0x71 irq 8 on acpi0
uart0: 16550 or compatible port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
hpet0: High Precision Event Timer iomem 0xfed0-0xfed003ff on acpi0
atkbdc0: Keyboard controller (i8042) port 0x60,0x64 irq 1 on acpi0
acpi_throttle0: ACPI CPU Throttling on cpu0

Do all those reservation failed indicate the interrupt is not going to actually 
be seen?  What does (fixed) mean?
___
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