Re: Swapfile problem in 6?

2005-11-15 Thread Rob
--- Peter Jeremy [EMAIL PROTECTED] wrote:
 
 Since your /home is almost empty, how about
 (temporarily) moving the contents into /usr and
 swapping onto ad0s1e rather than into a
 swapfile.  This should at least enable you to
 build a debug kernel.

I'm now indeed building a new kernel, without using
a swapfile. I have following in the kernel config:

 makeoptions DEBUG=-g
 options INVARIANTS
 options WITNESS
 options WITNESS_KDB
 options KDB
 options DDB
 options DDB_NUMSYM
 options GDB

Is that enough?


 First I used 128 MB swapfile on root partition;
 then tried again with a 128 MB swapfile on /var.
 However, exactly the same deadlock occurs:
 
 Have you pre-allocated the swapfile or is it being
 allocated as necessary?
 If the latter, try dd if=/dev/zero of=swapfile
 bs=1m count=128

Yes, I always 'zero' the swapfile this way,
before adding. Because I have used this swapfile
construct extensively with previous 5-Stable on
the same PC, I assume that harddisk and hardware
are OK. Therefore my conclusion is, that there's
some problem related to swapfile with 6.

I will try to debug as much as I can, to find out
why the machine becomes dead at a particular point
while using a swapfile (fortunately this is very
reproducible).

I have never debugged a kernel, so I may ask soon
for some assistance. Already now I wonder:

1) Can I debug a kernel that does not crash, but
   just hangs in a deadlock? Everything seems to
   be frozen, except pinging the PC

2) Is such debugging possible on a headless PC
   without a keyboard attached?
   I do have serial console access.


Thanks,
Rob.





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Swapfile problem in 6?

2005-11-15 Thread Rob

One more thing, for those who are reading this thread.

Concerning my kernel locking up while using a
swapfile:

I had an infinite while loop running during the
kernel compilation, printing out 'swapinfo' every
15 seconds. The last output before the machine goes
dead is this:

 /dev/ad0s1b 39848118203984830%
 /dev/md0   131072 5908   131072 5%
 Total  17092017728   15319210%

which means that swap space is OK right before the
freeze, but within 15 seconds from here, the kernel
locks up

Rob.





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Swapfile problem in 6?

2005-11-15 Thread Peter Jeremy
On Tue, 2005-Nov-15 02:08:12 -0800, Rob wrote:
 makeoptions DEBUG=-g
 options INVARIANTS
 options WITNESS
 options WITNESS_KDB
 options KDB
 options DDB
 options DDB_NUMSYM
 options GDB

Is that enough?

If your system is headless, you probably want 'options BREAK_TO_DEBUGGER'
as well.

First question is: Does the system still deadlock?  INVARIANTS and
WITNESS will have added sanity checks which might have picked up the
problem.

1) Can I debug a kernel that does not crash, but
   just hangs in a deadlock? Everything seems to
   be frozen, except pinging the PC

Have a look at 
http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug-online-ddb.html
and ddb(4).  Unless you have another system handy, you might like to print
out ddb(4) - it's difficult to read man pages when you're in the kernel
debugger :-).

2) Is such debugging possible on a headless PC
   without a keyboard attached?
   I do have serial console access.

Yes.  See above URL.  The advantage is that you can (hopefully)
capture a log of your debug session.  Send a serial BREAK and you
should get a DDB prompt.

Basically, wait until your system deadlocks.  BREAK into DDB.
As a start, run 'show lockedvnods', 'ps'.  My guess is that you'll
see a lock that has a number of waiters - which is probably the
culprit.  Use 'panic' to get a crashdump and then you can use kgdb
to rummage around once you reboot - see
http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug-gdb.html

If in doubt, post the output from the above commands here and someone
will hopefully provide further input.

-- 
Peter Jeremy
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Promise TX4300 boot problems

2005-11-15 Thread Lawrence Farr
I've stuck a Promise TX4300 controller in to replace
the marvell onboard SATA that I can't boot off on a
Supermicro server. If I set 2 discs up as Raid 0
or Raid 1 it's fine, But 4 discs as Raid 0+1 is detected, 
installs without any problems, but hangs at the boot 
loader with elf32_loadimage: read failed. I'm guesssing 
the boot loader thinks it's a mirror, not a stripe and
fails to read past the first stripe on the disk?

Anyone come across this or have an idea?  


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Swapfile problem in 6?

2005-11-15 Thread Oliver Fromme
Rob [EMAIL PROTECTED] wrote:
  Kris Kennaway [EMAIL PROTECTED] wrote:
   Since you can compile a kernel without it, add DDB,
   WITNESS and INVARIANTS support, then trigger the
   deadlock with the swapfile, break to DDB and
   examine the state of the machine.  See the chapter
   on kernel debugging in the developers handbook for
   more instructions.
  
  Thanks, but for now, I cannot compile a new kernel,
  because the kernel compilation terminates with
  insufficient swap space error. Apparently 32 MB is
  not enough for a new kernel compilation.

Remove the -pipe option from CFLAGS and COPTFLAGS in your
/etc/make.conf file.  That will serialize compiler stages
that normally run in parallel, so it'll require less memory.
Also make sure that no processes run that you don't need,
i.e. kill cron, usbd, sendmail, ntpd and whatever else you
don't absolutely need.

I don't know if those measures will enable you to compile
the kernel with 32 Mbytes, but it's worth a try.

Best regards
   Oliver

-- 
Oliver Fromme,  secnetix GmbH  Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

C is quirky, flawed, and an enormous success.
-- Dennis M. Ritchie.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: ahd0: Invalid Sequencer interrupt occurred.

2005-11-15 Thread Sven Willenberger
On Fri, 2005-11-11 at 22:57 -0800, Ade Lovett wrote:
 On Nov 11, 2005, at 12:51 , Amit Rao wrote:
  0) Upgrade to Seagate 10K.7 drive firmware level 0008. That seems  
  to help. One ahd sequencer error message still appears at boot,  
  but after that it seems to work (with your fingers crossed).
 
 Of course, you then spend far too much time ensuring that any  
 replacement drives are flashed appropriately (which, afaict,  
 *requires* Windows to do), and also running the gauntlet of further  
 problems down the road when you throw the drives into a new machine  
 with a subtly different HBA bios.
 
 No thanks, I'll stick with option (2).  A few more months, and  
 Seagate drives will be a nice distant memory that I can look back on  
 in a few years, and laugh nervously about.
 
 -aDe

There was a flash-utility that was [hand-rolled?] able to run on FreeBSD
and I did successfully flash some Seagate drives' firmware -- didn't
help any as far as the error [messages] went so we dropped Seagate
drives altogether a little over a year ago. Since then we have been
using the IBM/Hitachi drives with no issues (much easier to change drive
manufacturers than try to respec the servers we were using or do some of
the borderline-absurd workarounds that Seagate suggested).

Sven

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Swapfile problem in 6?

2005-11-15 Thread Rob


--- Peter Jeremy [EMAIL PROTECTED] wrote:

 On Tue, 2005-Nov-15 02:08:12 -0800, Rob wrote:
  makeoptions DEBUG=-g
  options INVARIANTS
  options WITNESS
  options WITNESS_KDB
  options KDB
  options DDB
  options DDB_NUMSYM
  options GDB
 
 Is that enough?
 
 If your system is headless, you probably want
 'options BREAK_TO_DEBUGGER' as well.

If I merge all these options into the GENERIC kernel
config file, the kernel compilation ends with error:

$ make buildkernel KERNCONF=DEBUGKERNEL
[...snip...]
cc -c -O -pipe ... /usr/src/sys/dev/ata/atapi-cd.c
/usr/src/sys/dev/ata/atapi-cd.c: In function
`acd_geom_attach':
/usr/src/sys/dev/ata/atapi-cd.c:181: warning: implicit
declaration of function `_sx_assert'
/usr/src/sys/dev/ata/atapi-cd.c:181: warning: nested
extern declaration of `_sx_assert'
*** Error code 1

Stop in /usr/obj/usr/src/sys/MYKERNEL.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.

--
In /etc/make.conf, I have:

CFLAGS= -O -pipe
NO_PROFILE=true
NO_PF=true
RUBY_VER=1.8
PERL_VER=5.8.7
PERL_VERSION=5.8.7


Hence, so far no luck with building a debug
kernel with 6. Any ideas what's wrong here?

Thanks,
Rob.




__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


FreeBSD-6 amr and ahd trouble

2005-11-15 Thread Joerg Pulz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Hi guys,

I'm running an Fujitsu-Siemens Primergy RX300 dual-XEON hyperthreading 
enabled server with an onboard LSI MegaRAID controller and an Adaptec 
39320A Ultra320 dual channel SCSI adapter. The LSI MegaRAID controller is 
configured to RAID1 with two disk and one hotspare. On this array FreeBSD 
is installed.
Up to now, the system was running fine with FreeBSD-5.3 first and 
FreeBSD-5.4 now.
I tried to upgrade this beast to FreeBSD-6.0-RELEASE without success. The 
kernel is booting and detects all devices correctly but when it comes to 
read from the amr(4) the last thing i see is GEOM: new disk amrd0 after 
that the system hangs and its nearly impossible to scroll the kernel 
messages up or down (Scroll lock pressed). then after a while there are a 
lot of SCSI error messages about SCB timeouts coming from the ahd(4).
I decided to boot the old RELENG_5_4 kernel and cvsup'ed the sources to 
RELENG_6 but i got the same results. booting from a FreeBSD-6.0-RELEASE 
bootonly CDRom got again the same results.
I searched google about this, and found something about a tuneable 
sysctl/loader setting called hw.pci.do_powerstate and tried it, but the 
same result. later i saw, that in RELENG_6 this tuneable is renamed and 
set to 0 anyway.
the next step was removing the Adaptec card to make sure this one is not 
interrupting the amr(4) but the only thing that happened was the SCSI 
error messages going away so this was not the problem.
I decided to give CURRENT from today a try, and it was working without 
any problems. I have tested CURRENT some steps back until i hit 73 
dated to Sun Sep 18 05:12:39 2005 UTC which is exactly the same time the 
RELENG_6 branch was marked for 6.0-BETA5 and CURRENT was working with 
every point i checked out from cvs. Unfortunately 6.0-BETA5 is NOT 
working.
I checked out the sources for 6.0-BETA4 and it is working again. So 
somewhere between 6.0-BETA4 and 6.0-BETA5 the whole thing is broken, at 
least for me and my hardware.
I've seen some differences in sys/cam/cam_xpt.c, maybe these cause the 
trouble i have, but I'm not so deep in the FreeBSD kernel code to make 
this sure.


It would be nice if someone can take a look at this to get this fixed in 
RELENG_6.

Any patches to test are welcome.

regards
Joerg

- -- 
The beginning is the most important part of the work.

-Plato
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFDegcDSPOsGF+KA+MRAtErAJ4w6Y8jpTvd7Q0SWMDYepTCsjFq9wCgtyuW
XYxOUeRNY+DDtp7BfQOVMS8=
=QYI6
-END PGP SIGNATURE-
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Performance problem since updating from 6.0-RELEASE to 6.0-STABLE last friday

2005-11-15 Thread Hajimu UMEMOTO
Hi,

 On Mon, 14 Nov 2005 12:40:36 -0500
 Pierre-Luc Drouin [EMAIL PROTECTED] said:

pldrouin Yep, smart battery is definately the problem. The performance of my 
pldrouin laptop is back to normal when I remove the xfce4-battery-plugin. 
pldrouin acpiconf -i loop reproduces the problem for me too. So it looks like 
pldrouin there is something wrong in smart battery.

The cmbat has similar issue on some laptops.  So, acpi_cmbat.c uses
cache for retrieval to reduce its influence, and its expiration
time is set by hw.acpi.battery.info_expire.
However, acpi_smbat.c doesn't use cache.  So, I made a patch.  Since I
don't have a laptop which has smbat, I cannot test it by myself.
Please test it and let me know the result.

Index: sys/dev/acpica/acpi_smbat.c
diff -u -p sys/dev/acpica/acpi_smbat.c.orig sys/dev/acpica/acpi_smbat.c
--- sys/dev/acpica/acpi_smbat.c.origSun Nov  6 08:55:56 2005
+++ sys/dev/acpica/acpi_smbat.c Tue Nov 15 16:41:00 2005
@@ -44,11 +44,18 @@ __FBSDID($FreeBSD: src/sys/dev/acpica/a
 struct acpi_smbat_softc {
uint8_t sb_base_addr;
device_tec_dev;
+
+   struct acpi_bif bif;
+   struct acpi_bst bst;
+   struct timespec bif_lastupdated;
+   struct timespec bst_lastupdated;
 };
 
 static int acpi_smbat_probe(device_t dev);
 static int acpi_smbat_attach(device_t dev);
 static int acpi_smbat_shutdown(device_t dev);
+static int acpi_smbat_info_expired(struct timespec *lastupdated);
+static voidacpi_smbat_info_updated(struct timespec *lastupdated);
 static int acpi_smbat_get_bif(device_t dev, struct acpi_bif *bif);
 static int acpi_smbat_get_bst(device_t dev, struct acpi_bst *bst);
 
@@ -114,6 +121,9 @@ acpi_smbat_attach(device_t dev)
return (ENXIO);
}
 
+   timespecclear(sc-bif_lastupdated);
+   timespecclear(sc-bst_lastupdated);
+
if (acpi_battery_register(dev) != 0) {
device_printf(dev, cannot register battery\n);
return (ENXIO);
@@ -132,6 +142,34 @@ acpi_smbat_shutdown(device_t dev)
 }
 
 static int
+acpi_smbat_info_expired(struct timespec *lastupdated)
+{
+   struct timespec curtime;
+
+   ACPI_SERIAL_ASSERT(smbat);
+
+   if (lastupdated == NULL)
+   return (TRUE);
+   if (!timespecisset(lastupdated))
+   return (TRUE);
+
+   getnanotime(curtime);
+   timespecsub(curtime, lastupdated);
+   return (curtime.tv_sec  0 ||
+   curtime.tv_sec  acpi_battery_get_info_expire());
+}
+
+static void
+acpi_smbat_info_updated(struct timespec *lastupdated)
+{
+
+   ACPI_SERIAL_ASSERT(smbat);
+
+   if (lastupdated != NULL)
+   getnanotime(lastupdated);
+}
+
+static int
 acpi_smbus_read_2(struct acpi_smbat_softc *sc, uint8_t addr, uint8_t cmd,
 uint16_t *ptr)
 {
@@ -284,6 +322,11 @@ acpi_smbat_get_bst(device_t dev, struct 
error = ENXIO;
sc = device_get_softc(dev);
 
+   if (!acpi_smbat_info_expired(sc-bst_lastupdated)) {
+   error = 0;
+   goto out;
+   }
+
if (acpi_smbus_read_2(sc, addr, SMBATT_CMD_BATTERY_MODE, val))
goto out;
if (val  SMBATT_BM_CAPACITY_MODE) {
@@ -299,7 +342,7 @@ acpi_smbat_get_bst(device_t dev, struct 
goto out;
 
if (val  SMBATT_BS_DISCHARGING) {
-   bst-state |= ACPI_BATT_STAT_DISCHARG;
+   sc-bst.state |= ACPI_BATT_STAT_DISCHARG;
 
/*
 * If the rate is negative, it is discharging.  Otherwise,
@@ -308,27 +351,31 @@ acpi_smbat_get_bst(device_t dev, struct 
if (acpi_smbus_read_2(sc, addr, SMBATT_CMD_AT_RATE, val))
goto out;
if (val  0)
-   bst-rate = (-val) * factor;
+   sc-bst.rate = (-val) * factor;
else
-   bst-rate = -1;
+   sc-bst.rate = -1;
} else {
-   bst-state |= ACPI_BATT_STAT_CHARGING;
-   bst-rate = -1;
+   sc-bst.state |= ACPI_BATT_STAT_CHARGING;
+   sc-bst.rate = -1;
}
 
if (val  SMBATT_BS_REMAINING_CAPACITY_ALARM)
-   bst-state |= ACPI_BATT_STAT_CRITICAL;
+   sc-bst.state |= ACPI_BATT_STAT_CRITICAL;
 
if (acpi_smbus_read_2(sc, addr, SMBATT_CMD_REMAINING_CAPACITY, val))
goto out;
-   bst-cap = val * factor;
+   sc-bst.cap = val * factor;
 
if (acpi_smbus_read_2(sc, addr, SMBATT_CMD_VOLTAGE, val))
goto out;
-   bst-volt = val;
+   sc-bst.volt = val;
+
+   acpi_smbat_info_updated(sc-bst_lastupdated);
+
error = 0;
 
 out:
+   memcpy(bst, sc-bst, sizeof(sc-bst));
ACPI_SERIAL_END(smbat);
return (error);
 }
@@ -348,55 +395,63 @@ acpi_smbat_get_bif(device_t dev, struct 
error = ENXIO;
sc = device_get_softc(dev);
 
+   if 

Re: Swapfile problem in 6?

2005-11-15 Thread Brian Fundakowski Feldman
On Tue, Nov 15, 2005 at 07:16:47AM -0800, Rob wrote:
 
 
 --- Peter Jeremy [EMAIL PROTECTED] wrote:
 
  On Tue, 2005-Nov-15 02:08:12 -0800, Rob wrote:
   makeoptions DEBUG=-g
   options INVARIANTS
   options WITNESS
   options WITNESS_KDB
   options KDB
   options DDB
   options DDB_NUMSYM
   options GDB
  
  Is that enough?
  
  If your system is headless, you probably want
  'options BREAK_TO_DEBUGGER' as well.
 
 If I merge all these options into the GENERIC kernel
 config file, the kernel compilation ends with error:
 
 $ make buildkernel KERNCONF=DEBUGKERNEL
 [...snip...]
 cc -c -O -pipe ... /usr/src/sys/dev/ata/atapi-cd.c
 /usr/src/sys/dev/ata/atapi-cd.c: In function
 `acd_geom_attach':
 /usr/src/sys/dev/ata/atapi-cd.c:181: warning: implicit
 declaration of function `_sx_assert'
 /usr/src/sys/dev/ata/atapi-cd.c:181: warning: nested
 extern declaration of `_sx_assert'
 *** Error code 1
 
 Stop in /usr/obj/usr/src/sys/MYKERNEL.
 *** Error code 1
 
 Stop in /usr/src.
 *** Error code 1
 
 Stop in /usr/src.

You may not have INVARIANT_SUPPORT -- I don't see that listed explicitly,
but it's necessary as well.

-- 
Brian Fundakowski Feldman   \'[ FreeBSD ]''\
   [EMAIL PROTECTED]   \  The Power to Serve! \
 Opinions expressed are my own.   \,,\
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Swapfile problem in 6?

2005-11-15 Thread Brian Fundakowski Feldman
On Tue, Nov 15, 2005 at 02:15:37AM -0800, Rob wrote:
 
 One more thing, for those who are reading this thread.
 
 Concerning my kernel locking up while using a
 swapfile:
 
 I had an infinite while loop running during the
 kernel compilation, printing out 'swapinfo' every
 15 seconds. The last output before the machine goes
 dead is this:
 
  /dev/ad0s1b 39848118203984830%
  /dev/md0   131072 5908   131072 5%
  Total  17092017728   15319210%
 
 which means that swap space is OK right before the
 freeze, but within 15 seconds from here, the kernel
 locks up

In my experience, fifteen seconds is enough to fill up 130+MB of swap,
so a much smaller polling interval is necessary.

-- 
Brian Fundakowski Feldman   \'[ FreeBSD ]''\
   [EMAIL PROTECTED]   \  The Power to Serve! \
 Opinions expressed are my own.   \,,\
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Performance problem since updating from 6.0-RELEASE to 6.0-STABLE last friday

2005-11-15 Thread Pierre-Luc Drouin

Hajimu UMEMOTO wrote:


Hi,

 


On Mon, 14 Nov 2005 12:40:36 -0500
Pierre-Luc Drouin [EMAIL PROTECTED] said:
   



pldrouin Yep, smart battery is definately the problem. The performance of my 
pldrouin laptop is back to normal when I remove the xfce4-battery-plugin. 
pldrouin acpiconf -i loop reproduces the problem for me too. So it looks like 
pldrouin there is something wrong in smart battery.


The cmbat has similar issue on some laptops.  So, acpi_cmbat.c uses
cache for retrieval to reduce its influence, and its expiration
time is set by hw.acpi.battery.info_expire.
However, acpi_smbat.c doesn't use cache.  So, I made a patch.  Since I
don't have a laptop which has smbat, I cannot test it by myself.
Please test it and let me know the result.

Index: sys/dev/acpica/acpi_smbat.c
diff -u -p sys/dev/acpica/acpi_smbat.c.orig sys/dev/acpica/acpi_smbat.c
--- sys/dev/acpica/acpi_smbat.c.origSun Nov  6 08:55:56 2005
+++ sys/dev/acpica/acpi_smbat.c Tue Nov 15 16:41:00 2005
@@ -44,11 +44,18 @@ __FBSDID($FreeBSD: src/sys/dev/acpica/a
struct acpi_smbat_softc {
uint8_t sb_base_addr;
device_tec_dev;
+
+   struct acpi_bif bif;
+   struct acpi_bst bst;
+   struct timespec bif_lastupdated;
+   struct timespec bst_lastupdated;
};

static int  acpi_smbat_probe(device_t dev);
static int  acpi_smbat_attach(device_t dev);
static int  acpi_smbat_shutdown(device_t dev);
+static int acpi_smbat_info_expired(struct timespec *lastupdated);
+static voidacpi_smbat_info_updated(struct timespec *lastupdated);
static int  acpi_smbat_get_bif(device_t dev, struct acpi_bif *bif);
static int  acpi_smbat_get_bst(device_t dev, struct acpi_bst *bst);

@@ -114,6 +121,9 @@ acpi_smbat_attach(device_t dev)
return (ENXIO);
}

+   timespecclear(sc-bif_lastupdated);
+   timespecclear(sc-bst_lastupdated);
+
if (acpi_battery_register(dev) != 0) {
device_printf(dev, cannot register battery\n);
return (ENXIO);
@@ -132,6 +142,34 @@ acpi_smbat_shutdown(device_t dev)
}

static int
+acpi_smbat_info_expired(struct timespec *lastupdated)
+{
+   struct timespec curtime;
+
+   ACPI_SERIAL_ASSERT(smbat);
+
+   if (lastupdated == NULL)
+   return (TRUE);
+   if (!timespecisset(lastupdated))
+   return (TRUE);
+
+   getnanotime(curtime);
+   timespecsub(curtime, lastupdated);
+   return (curtime.tv_sec  0 ||
+   curtime.tv_sec  acpi_battery_get_info_expire());
+}
+
+static void
+acpi_smbat_info_updated(struct timespec *lastupdated)
+{
+
+   ACPI_SERIAL_ASSERT(smbat);
+
+   if (lastupdated != NULL)
+   getnanotime(lastupdated);
+}
+
+static int
acpi_smbus_read_2(struct acpi_smbat_softc *sc, uint8_t addr, uint8_t cmd,
uint16_t *ptr)
{
@@ -284,6 +322,11 @@ acpi_smbat_get_bst(device_t dev, struct 
	error = ENXIO;

sc = device_get_softc(dev);

+   if (!acpi_smbat_info_expired(sc-bst_lastupdated)) {
+   error = 0;
+   goto out;
+   }
+
if (acpi_smbus_read_2(sc, addr, SMBATT_CMD_BATTERY_MODE, val))
goto out;
if (val  SMBATT_BM_CAPACITY_MODE) {
@@ -299,7 +342,7 @@ acpi_smbat_get_bst(device_t dev, struct 
		goto out;


if (val  SMBATT_BS_DISCHARGING) {
-   bst-state |= ACPI_BATT_STAT_DISCHARG;
+   sc-bst.state |= ACPI_BATT_STAT_DISCHARG;

/*
 * If the rate is negative, it is discharging.  Otherwise,
@@ -308,27 +351,31 @@ acpi_smbat_get_bst(device_t dev, struct 
		if (acpi_smbus_read_2(sc, addr, SMBATT_CMD_AT_RATE, val))

goto out;
if (val  0)
-   bst-rate = (-val) * factor;
+   sc-bst.rate = (-val) * factor;
else
-   bst-rate = -1;
+   sc-bst.rate = -1;
} else {
-   bst-state |= ACPI_BATT_STAT_CHARGING;
-   bst-rate = -1;
+   sc-bst.state |= ACPI_BATT_STAT_CHARGING;
+   sc-bst.rate = -1;
}

if (val  SMBATT_BS_REMAINING_CAPACITY_ALARM)
-   bst-state |= ACPI_BATT_STAT_CRITICAL;
+   sc-bst.state |= ACPI_BATT_STAT_CRITICAL;

if (acpi_smbus_read_2(sc, addr, SMBATT_CMD_REMAINING_CAPACITY, val))
goto out;
-   bst-cap = val * factor;
+   sc-bst.cap = val * factor;

if (acpi_smbus_read_2(sc, addr, SMBATT_CMD_VOLTAGE, val))
goto out;
-   bst-volt = val;
+   sc-bst.volt = val;
+
+   acpi_smbat_info_updated(sc-bst_lastupdated);
+
error = 0;

out:
+   memcpy(bst, sc-bst, sizeof(sc-bst));
ACPI_SERIAL_END(smbat);
return (error);
}
@@ -348,55 +395,63 @@ acpi_smbat_get_bif(device_t dev, struct 
	error = ENXIO;

sc = device_get_softc(dev);

+   if 

Re: Performance problem since updating from 6.0-RELEASE to 6.0-STABLE last friday

2005-11-15 Thread Nate Lawson

Pierre-Luc Drouin wrote:

Hajimu UMEMOTO wrote:

On Mon, 14 Nov 2005 12:40:36 -0500
Pierre-Luc Drouin [EMAIL PROTECTED] said:
pldrouin Yep, smart battery is definately the problem. The 
performance of my pldrouin laptop is back to normal when I remove the 
xfce4-battery-plugin. pldrouin acpiconf -i loop reproduces the 
problem for me too. So it looks like pldrouin there is something 
wrong in smart battery.


The cmbat has similar issue on some laptops.  So, acpi_cmbat.c uses
cache for retrieval to reduce its influence, and its expiration
time is set by hw.acpi.battery.info_expire.
However, acpi_smbat.c doesn't use cache.  So, I made a patch.  Since I
don't have a laptop which has smbat, I cannot test it by myself.
Please test it and let me know the result.
 

The patch seams to do its job correctly, but it is still very annoying 
to have the whole computer to freeze for 1 second when the cache 
expires. What does make the whole system to freeze? Before the code was 
changed in 6.0-stable, FreeBSD was able to read the battery status 
without freezing my laptop... I have been running 3 OSes (FreeBSD, 
Ubuntu and Win XP) on my laptop for a while and never experienced that 
kind of problem with either Linux or Win XP. I guess there is something 
wrong in the new code added after 6.0-release.


If you have both smbat and cmbat, just disable smbat if you don't like 
it.  Add this to /boot/loader.conf:


debug.acpi.disabled=smbat

The pause is related to a buggy or slow EC.  Caching the values happens 
to hide it.  Do you get pauses with smbat disabled (see above for how to 
do this)?  Can you still get battery status from cmbat?


--
Nate
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Filesystems 1TB not possible on 6.0-R (anymore?).

2005-11-15 Thread David Kirchner
FWIW, we have a 6.0-RELEASE machine running now with two 2TB
partitions, using disklabel(bsdlabel) rather than gpt. This is with
the 3ware driver. Could the problem you're having be with the arcmsr
driver in some way? Anyone else on the list using that card able to
confirm it?
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Swapfile problem in 6?

2005-11-15 Thread Lars Kristiansen
 On Tue, Nov 15, 2005 at 07:16:47AM -0800, Rob wrote:


 --- Peter Jeremy [EMAIL PROTECTED] wrote:

  On Tue, 2005-Nov-15 02:08:12 -0800, Rob wrote:
   makeoptions DEBUG=-g
   options INVARIANTS
   options WITNESS
   options WITNESS_KDB
   options KDB
   options DDB
   options DDB_NUMSYM
   options GDB
  
  Is that enough?
 
  If your system is headless, you probably want
  'options BREAK_TO_DEBUGGER' as well.

 If I merge all these options into the GENERIC kernel
 config file, the kernel compilation ends with error:

 $ make buildkernel KERNCONF=DEBUGKERNEL
 [...snip...]
 cc -c -O -pipe ... /usr/src/sys/dev/ata/atapi-cd.c
 /usr/src/sys/dev/ata/atapi-cd.c: In function
 `acd_geom_attach':
 /usr/src/sys/dev/ata/atapi-cd.c:181: warning: implicit
 declaration of function `_sx_assert'
 /usr/src/sys/dev/ata/atapi-cd.c:181: warning: nested
 extern declaration of `_sx_assert'
 *** Error code 1

 Stop in /usr/obj/usr/src/sys/MYKERNEL.
 *** Error code 1

 Stop in /usr/src.
 *** Error code 1

 Stop in /usr/src.

 You may not have INVARIANT_SUPPORT -- I don't see that listed explicitly,
 but it's necessary as well.

That seemed to get the buildkernel going for me at least.

I have been following this thread and can confirm this freezing when
using swapfile. It happens here while rebuilding different ports, after
upgrade to 6.0-release.
A couple of the times but not everytime the following message was
repeatedly displayed at the console before freezing:

swap_pager: indefinite wait buffer: bufobj: 0, blkno: 273427, size: 4096

To mostly rule out diskfailure I also disabled this swapfile and tried to
have the swapfile on another disk.

Additional information about frozen behavior:
When frozen I can change virtual terminals: alt-F2, alt-F3...
But that is all i can do whith keyboard. ie. I cannot write username.

Got a swap partition on another disk now. That speeds things up too.
However, this is a pentium2-200MHz so I cannot tell if buildkernel was a
success until tomorrow.
Never done debugging before, but I will continue to follow this thread
tomorrow and try to do what is adviced here if the cause has not been
identified in the meantime.


Regards
--
Lars



 --
 Brian Fundakowski Feldman   \'[ FreeBSD
 ]''\
[EMAIL PROTECTED]   \  The Power to
 Serve! \
  Opinions expressed are my own.
 \,,\
 ___
 freebsd-stable@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-stable
 To unsubscribe, send any mail to [EMAIL PROTECTED]


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: kernel land ppp makes mage fault

2005-11-15 Thread Gleb Smirnoff
On Tue, Nov 15, 2005 at 09:38:16AM +0200, Anatoli Marinov wrote:
A I try to use pptp (pptpclient) and ppp connection to my ISP with FreeBSD 
A 6-STABLE. 
A If I compile pptp from ports after installation it works in user land and 
A consume 50-60% from my CPU time (for 200 KB/sec). 
A Before 6-STABLE with 6-TESTx and RCx my pptp, compiled to use kernel level 
ppp 
A works great, but with 6-STABLE after 5 to 10 minutes I have page fault and 
A reboot.
A pptpclient from ports by default compiles to work with user land ppp but 
with 
A simple changes in Makefile I compile it to work with kernel level ppp. 
A 
A Would you help me how can I use pptp with kernel level ppp and FreeBSD 
A 6-STABLE?

Use ports/net/mpd. It is a userland daemon, that configures in-kernel
PPP (including PPTP).

-- 
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Swapfile problem in 6?

2005-11-15 Thread Lars Kristiansen
 On Tue, Nov 15, 2005 at 02:15:37AM -0800, Rob wrote:

 One more thing, for those who are reading this thread.

 Concerning my kernel locking up while using a
 swapfile:

 I had an infinite while loop running during the
 kernel compilation, printing out 'swapinfo' every
 15 seconds. The last output before the machine goes
 dead is this:

  /dev/ad0s1b 39848118203984830%
  /dev/md0   131072 5908   131072 5%
  Total  17092017728   15319210%

 which means that swap space is OK right before the
 freeze, but within 15 seconds from here, the kernel
 locks up

 In my experience, fifteen seconds is enough to fill up 130+MB of swap,
 so a much smaller polling interval is necessary.

Probably true, but when trying with only one swap partition instead of
swapfile, and that partition gets filled up, the build process failed and
the computer continued to work as normal.

Regards
--
Lars


 --
 Brian Fundakowski Feldman   \'[ FreeBSD
 ]''\
[EMAIL PROTECTED]   \  The Power to
 Serve! \
  Opinions expressed are my own.
 \,,\
 ___
 freebsd-stable@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-stable
 To unsubscribe, send any mail to [EMAIL PROTECTED]


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Swapfile problem in 6?

2005-11-15 Thread Brian Fundakowski Feldman
On Tue, Nov 15, 2005 at 09:49:57PM +0100, Lars Kristiansen wrote:
  On Tue, Nov 15, 2005 at 02:15:37AM -0800, Rob wrote:
 
  One more thing, for those who are reading this thread.
 
  Concerning my kernel locking up while using a
  swapfile:
 
  I had an infinite while loop running during the
  kernel compilation, printing out 'swapinfo' every
  15 seconds. The last output before the machine goes
  dead is this:
 
   /dev/ad0s1b 39848118203984830%
   /dev/md0   131072 5908   131072 5%
   Total  17092017728   15319210%
 
  which means that swap space is OK right before the
  freeze, but within 15 seconds from here, the kernel
  locks up
 
  In my experience, fifteen seconds is enough to fill up 130+MB of swap,
  so a much smaller polling interval is necessary.
 
 Probably true, but when trying with only one swap partition instead of
 swapfile, and that partition gets filled up, the build process failed and
 the computer continued to work as normal.

Yeah, it sounds like you're running into a buffer cache/VFS/VM deadlock.
They're nasty, but generally not hard to fix individually.

-- 
Brian Fundakowski Feldman   \'[ FreeBSD ]''\
   [EMAIL PROTECTED]   \  The Power to Serve! \
 Opinions expressed are my own.   \,,\
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Swapfile problem in 6?

2005-11-15 Thread Kris Kennaway
On Tue, Nov 15, 2005 at 09:44:12PM +0100, Lars Kristiansen wrote:

 A couple of the times but not everytime the following message was
 repeatedly displayed at the console before freezing:
 
 swap_pager: indefinite wait buffer: bufobj: 0, blkno: 273427, size: 4096

AFAICT that is just a trigger-happy timer..it's supposed to detect
when a swap operation took too long to complete, but it also triggers
on swapfiles since they're so much less efficient (i.e. slower) than
swapping onto a bare device.

Kris


pgpzur3FSifHZ.pgp
Description: PGP signature


Re: Performance problem since updating from 6.0-RELEASE to 6.0-STABLE last friday

2005-11-15 Thread Pierre-Luc Drouin

Nate Lawson wrote:


Pierre-Luc Drouin wrote:


Hajimu UMEMOTO wrote:


On Mon, 14 Nov 2005 12:40:36 -0500
Pierre-Luc Drouin [EMAIL PROTECTED] said:


pldrouin Yep, smart battery is definately the problem. The 
performance of my pldrouin laptop is back to normal when I remove 
the xfce4-battery-plugin. pldrouin acpiconf -i loop reproduces the 
problem for me too. So it looks like pldrouin there is something 
wrong in smart battery.


The cmbat has similar issue on some laptops.  So, acpi_cmbat.c uses
cache for retrieval to reduce its influence, and its expiration
time is set by hw.acpi.battery.info_expire.
However, acpi_smbat.c doesn't use cache.  So, I made a patch.  Since I
don't have a laptop which has smbat, I cannot test it by myself.
Please test it and let me know the result.
 

The patch seams to do its job correctly, but it is still very 
annoying to have the whole computer to freeze for 1 second when the 
cache expires. What does make the whole system to freeze? Before the 
code was changed in 6.0-stable, FreeBSD was able to read the battery 
status without freezing my laptop... I have been running 3 OSes 
(FreeBSD, Ubuntu and Win XP) on my laptop for a while and never 
experienced that kind of problem with either Linux or Win XP. I guess 
there is something wrong in the new code added after 6.0-release.



If you have both smbat and cmbat, just disable smbat if you don't like 
it.  Add this to /boot/loader.conf:


debug.acpi.disabled=smbat

The pause is related to a buggy or slow EC.  Caching the values 
happens to hide it.  Do you get pauses with smbat disabled (see above 
for how to do this)?  Can you still get battery status from cmbat?


Ok, there is new development. I realized by playing with 
debug.acpi.disabled=smbat, debug.acpi.disabled=smbat cmbat and 
debug.acpi.disabled=cmbat, that my laptop battery is not a smbat, but 
a cmbat. When I played with hw.acpi.battery.info_expire after to have 
applied the patch for acpi_smbat.c, it was freezing less often because 
that sysctl variable was shared by both cmbat and smbat. So I can only 
get battery status from cmbat (disabling cmbat disables the use of 
acpiconf -i loop). To get the status of my battery via cmbat was working 
fine up to 6.0-RELEASE (included), but makes my laptop to freeze since I 
upgraded to 6.0-stable with Nov 10th sources. What change related to 
cmbat between 6.0-release and 6.0-stable could be causing this?

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Swapfile problem in 6?

2005-11-15 Thread Johny Mattsson

On 11/16/05 07:49, Lars Kristiansen wrote:

I had an infinite while loop running during the
kernel compilation, printing out 'swapinfo' every
15 seconds. The last output before the machine goes
dead is this:

/dev/ad0s1b 39848118203984830%
/dev/md0   131072 5908   131072 5%
Total  17092017728   15319210%


Quite possibly not related, but on 5.4 I can reliably cause a panic by 
attaching md0 to a file residing on an NFS drive and then use it for 
swap. After 3-5k of used swap on md0, the box dies and reboots. If I run 
swapon directly on the NFS file, things work fine, but it did mean 
that I couldn't use the default addswap rc script to set up the swap 
on my diskless system.
I'm not sure whether it's supposed to work or not, but I haven't had 
time to look into it yet. Just thought it might be another datapoint for 
someone in the know to consider, just in case it is related.


Cheers,
/Johny
--
Johny Mattsson - Making IT work  ,-.   ,-.   ,-.  When all else fails,
http://www.earthmagic.org _.'  `-'   `-'   Murphy's Law still works!
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Swapfile problem in 6?

2005-11-15 Thread Kris Kennaway
On Wed, Nov 16, 2005 at 09:26:43AM +1100, Johny Mattsson wrote:
 On 11/16/05 07:49, Lars Kristiansen wrote:
 I had an infinite while loop running during the
 kernel compilation, printing out 'swapinfo' every
 15 seconds. The last output before the machine goes
 dead is this:
 
 /dev/ad0s1b 39848118203984830%
 /dev/md0   131072 5908   131072 5%
 Total  17092017728   15319210%
 
 Quite possibly not related, but on 5.4 I can reliably cause a panic by 
 attaching md0 to a file residing on an NFS drive and then use it for 
 swap. After 3-5k of used swap on md0, the box dies and reboots. If I run 
 swapon directly on the NFS file, things work fine, but it did mean 
 that I couldn't use the default addswap rc script to set up the swap 
 on my diskless system.
 I'm not sure whether it's supposed to work or not, but I haven't had 
 time to look into it yet. Just thought it might be another datapoint for 
 someone in the know to consider, just in case it is related.

It's a situation few people have probably tried.  If it persists on
6.0, please go through the same reporting procedure (debugging
traceback, file PR).

Kris



pgpk2nma0h72W.pgp
Description: PGP signature


Re: Strange boot messages under 6.0-STABLE

2005-11-15 Thread David Scheidt
On Mon, Nov 14, 2005 at 03:01:19PM -0500, Kris Kennaway wrote:
 On Mon, Nov 14, 2005 at 06:45:15PM +0100, Ales wrote:
  During boot process under 6.0-STABLE I spoted some strange messages.
  
  Nov 14 18:18:45 romcek savecore: reboot after panic: page fault
  Nov 14 18:18:45 romcek savecore: no dump, not enough free space on 
 
 Your system panicked at some point in the past, but it can't save the
 dump for the reason specified.

If you just want to prevent the message from printing at the next boot
time, run 'savecore -c'.  If you want to try and retrieve the dump,
you can specify an alternate location to save the dump on the savecore
command line.

David
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


moused flags behaviour in 6.0 -- regression?

2005-11-15 Thread martinko

hello,

until freebsd 6.0 (that is to say in 5.3 and 5.4) i used 
moused_flags=-3 in rc.conf and both my mice worked correctly (or as 
desired) -- synaptics touchpad missing 3rd button was emulated while the 
wheel on my USB mouse worked as expected.
now, in 6.0, with the same setting, touchpad 3rd button is emulated but 
USB mouse's wheel doesn't work. if i don't use the flag, USB mouse's 
wheel work but obviously there is no 3rd button on my touchpad. :-(
also, iirc back on 5.x even on wheel mouse the 3rd button could be 
emulated by pressing buttons 1 and 2, which is not possible now with 
wheel being on.


now, i know about moused_ums0_flags=, i'm just wondering why has this 
changed (to worse from my point of view).
also, at first i tried moused_psm0_flags=-3 but that didn't work as 
touchpad is apparently initialised without specifying psm0 device.


i hope i made myself clear (enough).

regards,

martin

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Promise TX4300 boot problems

2005-11-15 Thread Doug White
On Tue, 15 Nov 2005, Lawrence Farr wrote:

 I've stuck a Promise TX4300 controller in to replace
 the marvell onboard SATA that I can't boot off on a
 Supermicro server. If I set 2 discs up as Raid 0
 or Raid 1 it's fine, But 4 discs as Raid 0+1 is detected,
 installs without any problems, but hangs at the boot
 loader with elf32_loadimage: read failed. I'm guesssing
 the boot loader thinks it's a mirror, not a stripe and
 fails to read past the first stripe on the disk?

If this is the case then its a bug in the controller firmware; loader is
just doing BIOS I/O calls. Check for a firmware update for your
controller.

-- 
Doug White|  FreeBSD: The Power to Serve
[EMAIL PROTECTED]  |  www.FreeBSD.org
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Swapfile problem in 6?

2005-11-15 Thread Rob
--- Peter Jeremy [EMAIL PROTECTED] wrote:

 On Tue, 2005-Nov-15 02:08:12 -0800, Rob wrote:
 
 2) Is such debugging possible on a headless PC
without a keyboard attached?
I do have serial console access.
 
 Yes.  See above URL.  The advantage is that you can
 (hopefully) capture a log of your debug session.
 Send a serial BREAK and you should get a DDB
 prompt.

What is this serial BREAK?
How do I send a serial BREAK at the serial
console? Is this some magic key combination?

And, eh, at the moment of deadlock, there is no
response at all from the serial console; will the
serial BREAK not be bothered by that?

Rob.





__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Swapfile problem in 6?

2005-11-15 Thread David Wolfskill
On Tue, Nov 15, 2005 at 06:09:33PM -0800, Rob wrote:
 ...

  Yes.  See above URL.  The advantage is that you can
  (hopefully) capture a log of your debug session.
  Send a serial BREAK and you should get a DDB
  prompt.
 
 What is this serial BREAK?
 How do I send a serial BREAK at the serial
 console? Is this some magic key combination?

I'm probably saying something about my age by doing this  :-}

A BREAK (in serial communications) is an absence of start or stop
bits for more than a character's worth of bits, is handled as a
framing error, and is distinct from any character.

Now, to generate one, you would normally hit the BREAK key of your
terminal (Control-BREAK on some; I think Hazeltine had this feature of
dubious merit).

If you are using a serial communications program (such as tip) instead
of an ASCII terminal, it depends on the program you're using.

In the case of tip, the sequence ~# at the beginning of a line will
generate tip's best approximation of a framing error.

In the case of kermit, Control-\B does it.

 And, eh, at the moment of deadlock, there is no
 response at all from the serial console; will the
 serial BREAK not be bothered by that?

The serial BREAK won't be bothered at all.  :-}  The issue is (if I
understand properly) whether or not there's enough of the system to be
able to have the tty driver recognize the framing error and do something
appropriate as a result.

Peace,
david
-- 
David H. Wolfskill  [EMAIL PROTECTED]
Prediction is difficult, especially if it involves the future. -- Niels Bohr

See http://www.catwhisker.org/~david/publickey.gpg for public key.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


xorg-clients conflicts with xterm (patch)

2005-11-15 Thread James Long
After hours of head-banging over the past couple of days,
I have finally succeeded in installing EITHER 
xorg-clients-6.8.2_1 OR xterm-206_1.  Previously,
installing either port told me that it conflicted
with the other, in spite of having cvsupped my 
ports tree twice to ensure I was getting the most
recent version of the ports, hopefully including a
fix to the chicken-and-egg problem noted in 
/usr/ports/UPDATING

Once I spotted an odd bit of output in the portupgrade
dialogue, I made a change to xorg-clients Makefile 
which allowed everything to install.  pkgdb -F afterwards
and all my dependencies are tidied up.

May I suggest the following patch to 
/usr/ports/x11/xorg-clients/Makefile:


--- MakefileSun Nov 13 21:47:34 2005
+++ foo Tue Nov 15 19:19:37 2005
@@ -18,7 +18,7 @@
 MAINTAINER=[EMAIL PROTECTED]
 COMMENT=   X client programs and related files from X.Org
 
-RUN_DEPENDS=   xterm0:${PORTSDIR}/x11/xterm
+RUN_DEPENDS=   xterm:${PORTSDIR}/x11/xterm
 LIB_DEPENDS=   png.5:${PORTSDIR}/graphics/png \
Xft.2:${PORTSDIR}/x11-fonts/libXft
 
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Swapfile problem in 6?

2005-11-15 Thread Kris Kennaway
On Tue, Nov 15, 2005 at 07:18:35PM -0800, David Wolfskill wrote:
 On Tue, Nov 15, 2005 at 06:09:33PM -0800, Rob wrote:
  ...
 
   Yes.  See above URL.  The advantage is that you can
   (hopefully) capture a log of your debug session.
   Send a serial BREAK and you should get a DDB
   prompt.
  
  What is this serial BREAK?
  How do I send a serial BREAK at the serial
  console? Is this some magic key combination?
 
 I'm probably saying something about my age by doing this  :-}
 
 A BREAK (in serial communications) is an absence of start or stop
 bits for more than a character's worth of bits, is handled as a
 framing error, and is distinct from any character.

If your serial program has trouble sending a break, you can use the
ALT_BREAK_TO_DEBUGGER config option which instead listens for a
sequence of ascii input:

#define KEY_CR  13  /* CR '\r' */
#define KEY_TILDE   126 /* ~ */
#define KEY_CRTLB   2   /* ^B */

Kris

pgpg8eJLqZ8qu.pgp
Description: PGP signature


Re: xorg-clients conflicts with xterm (patch)

2005-11-15 Thread James Long
On Tue, Nov 15, 2005 at 07:32:45PM -0800, David Wolfskill wrote:
 On Tue, Nov 15, 2005 at 07:26:16PM -0800, James Long wrote:
  After hours of head-banging over the past couple of days,
  I have finally succeeded in installing EITHER 
  xorg-clients-6.8.2_1 OR xterm-206_1.  Previously,
  installing either port told me that it conflicted
  with the other, in spite of having cvsupped my 
  ports tree twice to ensure I was getting the most
  recent version of the ports, hopefully including a
  fix to the chicken-and-egg problem noted in 
  /usr/ports/UPDATING
 
 It mentioned a conflict; I don't recall a chicken-and-egg issue.

Forgive me for not including enough background.

Due to an improper procedure on my part in converting from
XFree86 to Xorg, plus a complete rebuild of all ports as
part of upgrading to 6.0-STABLE, and a bit of ignorance on
my part, I wound up in a situation where I had pkg_deleted
both xorg-clients and xterm.  I was then in a situation
where I couldn't install xorg-clients because it depended
on xterm, but xterm couldn't be installed because it con-
flicted with xorg-clients.  That was my 
chicken-and-egg dilemma.  pkgdb -F was dutifully showing 
several packages with dangling dependencies to those two, 
but I couldn't install either of them.  cvsupping to the most 
recent ports tree didn't change the problem.  

Then I noticed:

===   xorg-clients-6.8.2_1 depends on package: xterm0 - not found

and investigated the Makefile to find why the odd package
name of xterm0.

I then patched the Makefile as I posted, and I was able to
make install in xorg-clients and pkgdb -F and everything
installed.

Further documentation of the state of my pkg_info and 
dependencies is below.


Jim



[pkg_info | egrep xorg|xterm # note lack of xorg-clients and xterm]
t21 : 19:04:41 /root# pkg_info | egrep xorg|xterm
xorg-6.8.2  X.Org distribution metaport
xorg-documents-6.8.2 Documentation of X11 protocol and libraries from X.Org
xorg-fonts-100dpi-6.8.2 X.Org 100dpi bitmap fonts
xorg-fonts-75dpi-6.8.2 X.Org 75dpi bitmap fonts
xorg-fonts-cyrillic-6.8.2 X.Org Cyrillic bitmap fonts
xorg-fonts-encodings-6.8.2 X.Org font encoding files
xorg-fonts-miscbitmaps-6.8.2 X.Org miscellaneous bitmap fonts
xorg-fonts-truetype-6.8.2 X.Org TrueType fonts
xorg-fonts-type1-6.8.2 X.Org Type1 fonts
xorg-fontserver-6.8.2 X font server from X.Org
xorg-libraries-6.8.2 X11 libraries and headers from X.Org
xorg-manpages-6.8.2 X.Org library manual pages
xorg-nestserver-6.8.2 Nesting X server from X.Org
xorg-printserver-6.8.2_2 X Print server from X.Org
xorg-server-6.8.2_6 X.Org X server and related programs
xorg-vfbserver-6.8.2 X virtual framebuffer server from X.Org

[Initial state of ports dependencies:]
[EMAIL PROTECTED] pkgdb -F
---  Checking the package registry database
Stale dependency: kde-3.4.2 - xorg-clients-6.8.2_1 (x11/xorg-clients):
xorg-vfbserver-6.8.2 (score:27%) ? ([y]es/[n]o/[a]ll) [no]
New dependency? (? to help):
Skip this? ([y]es/[n]o/[a]ll) [yes]
Skipped.
Stale dependency: kde-3.4.2 - xterm-205_1 (x11/xterm):
New dependency? (? to help):
Skip this? ([y]es/[n]o/[a]ll) [yes]
Skipped.
Stale dependency: kdeadmin-3.4.2 - xterm-205_1 (x11/xterm):
Skip this? ([y]es/[n]o/[a]ll) [yes]
Stale dependency: kdeadmin-3.4.2 - xorg-clients-6.8.2_1 (x11/xorg-clients):
Skip this? ([y]es/[n]o/[a]ll) [yes]
Stale dependency: kdebase-3.4.2_2 - xterm-205_1 (x11/xterm):
Skip this? ([y]es/[n]o/[a]ll) [yes]
Stale dependency: kdebase-3.4.2_2 - xorg-clients-6.8.2_1 (x11/xorg-clients):
Skip this? ([y]es/[n]o/[a]ll) [yes]
Stale dependency: kdegames-3.4.2_1 - xterm-205_1 (x11/xterm):
Skip this? ([y]es/[n]o/[a]ll) [yes]
Stale dependency: kdegames-3.4.2_1 - xorg-clients-6.8.2_1 (x11/xorg-clients):
Skip this? ([y]es/[n]o/[a]ll) [yes]
Stale dependency: kdelibs-3.4.2_1 - xterm-205_1 (x11/xterm):
Skip this? ([y]es/[n]o/[a]ll) [yes]
Stale dependency: kdelibs-3.4.2_1 - xorg-clients-6.8.2_1 (x11/xorg-clients):
Skip this? ([y]es/[n]o/[a]ll) [yes]
Stale dependency: kdemultimedia-3.4.2_1 - xterm-205_1 (x11/xterm):
Skip this? ([y]es/[n]o/[a]ll) [yes]
Stale dependency: kdemultimedia-3.4.2_1 - xorg-clients-6.8.2_1 
(x11/xorg-clients):
Skip this? ([y]es/[n]o/[a]ll) [yes]
Stale dependency: kdemultimedia-akode-3.4.2 - xterm-205_1 (x11/xterm):
Skip this? ([y]es/[n]o/[a]ll) [yes]
Stale dependency: kdemultimedia-akode-3.4.2 - xorg-clients-6.8.2_1 
(x11/xorg-clients):
Skip this? ([y]es/[n]o/[a]ll) [yes]
Stale dependency: kdemultimedia-mpeglib_artsplug-3.4.2 - xterm-205_1 
(x11/xterm):
Skip this? ([y]es/[n]o/[a]ll) [yes]
Stale dependency: kdemultimedia-mpeglib_artsplug-3.4.2 - xorg-clients-6.8.2_1 
(x11/xorg-clients):
Skip this? ([y]es/[n]o/[a]ll) [yes]
Stale dependency: kdetoys-3.4.2 - xterm-205_1 (x11/xterm):
Skip this? ([y]es/[n]o/[a]ll) [yes]
Stale dependency: kdetoys-3.4.2 - xorg-clients-6.8.2_1 (x11/xorg-clients):
Skip this? ([y]es/[n]o/[a]ll) [yes]
Stale dependency: koffice-1.4.1_1,1 - xterm-205_1 (x11/xterm):
Skip this? ([y]es/[n]o/[a]ll) [yes]

Re: Swapfile problem in 6?

2005-11-15 Thread John-Mark Gurney
Kris Kennaway wrote this message on Tue, Nov 15, 2005 at 22:35 -0500:
   What is this serial BREAK?
   How do I send a serial BREAK at the serial
   console? Is this some magic key combination?
  
  I'm probably saying something about my age by doing this  :-}
  
  A BREAK (in serial communications) is an absence of start or stop
  bits for more than a character's worth of bits, is handled as a
  framing error, and is distinct from any character.
 
 If your serial program has trouble sending a break, you can use the
 ALT_BREAK_TO_DEBUGGER config option which instead listens for a
 sequence of ascii input:
 
 #define KEY_CR  13  /* CR '\r' */
 #define KEY_TILDE   126 /* ~ */
 #define KEY_CRTLB   2   /* ^B */

ALT_BREAK_TO_DEBUGGER has an advantage over break is that some terminal
servers and computers when you turn them off (or power is disconnected)
will send a BREAK down the line, which can cause your machine to stop
when you didn't want to..

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 All that I will do, has been done, All that I have, has not.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Swapfile problem in 6?

2005-11-15 Thread David Scheidt
On Tue, Nov 15, 2005 at 07:18:35PM -0800, David Wolfskill wrote:
 On Tue, Nov 15, 2005 at 06:09:33PM -0800, Rob wrote:
  ...
 
  
  What is this serial BREAK?
  How do I send a serial BREAK at the serial
  console? Is this some magic key combination?
 
 I'm probably saying something about my age by doing this  :-}
 
 A BREAK (in serial communications) is an absence of start or stop
 bits for more than a character's worth of bits, is handled as a
 framing error, and is distinct from any character.
 
 Now, to generate one, you would normally hit the BREAK key of your
 terminal (Control-BREAK on some; I think Hazeltine had this feature of
 dubious merit).
 
 If you are using a serial communications program (such as tip) instead
 of an ASCII terminal, it depends on the program you're using.
 
 In the case of tip, the sequence ~# at the beginning of a line will
 generate tip's best approximation of a framing error.
 
 In the case of kermit, Control-\B does it.

If you're using a terminal program on something like Windows or a
Macintosh, there's usually a menu option to send a BREAK.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: xorg-clients conflicts with xterm (patch)

2005-11-15 Thread Rob
James Long wrote:
  
  Then I noticed:
  
  ===   xorg-clients-6.8.2_1 depends on package: xterm0 - not found
  
  and investigated the Makefile to find why the odd package
  name of xterm0.
 
 My portstree from Nov. 12th, has this at this particular place:
 
RUN_DEPENDS=xterm-static:${PORTSDIR}/x11/xterm
LIB_DEPENDS=png.5:${PORTSDIR}/graphics/png \
 Xft.2:${PORTSDIR}/x11-fonts/libXft
 
 
 Is this xterm0 line a broken download with cvsup, or something?
 
 Rob.
 
 
__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: xorg-clients conflicts with xterm (patch)

2005-11-15 Thread Kevin Oberman
 Date: Tue, 15 Nov 2005 20:44:25 -0800 (PST)
 From: Rob [EMAIL PROTECTED]
 Sender: [EMAIL PROTECTED]
 
 James Long wrote:
   
   Then I noticed:
   
   ===   xorg-clients-6.8.2_1 depends on package: xterm0 - not found
   
   and investigated the Makefile to find why the odd package
   name of xterm0.
  
  My portstree from Nov. 12th, has this at this particular place:
  
 RUN_DEPENDS=xterm-static:${PORTSDIR}/x11/xterm
 LIB_DEPENDS=png.5:${PORTSDIR}/graphics/png \
  Xft.2:${PORTSDIR}/x11-fonts/libXft
  
  
  Is this xterm0 line a broken download with cvsup, or something?

Nope! It's that way in CVS.

I got xterm-206_1 to install by deleting xorg-clients and then
installing xterm-206_1 followed by xorg-clisents-6.8.2_1. It has worked
fine on all 5 systems I have done it on to this point.
-- 
R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: [EMAIL PROTECTED]   Phone: +1 510 486-8634
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: mplayer + bktr

2005-11-15 Thread Daniel O'Connor
On Mon, 14 Nov 2005 12:51, Danny Pansters wrote:
 I myself am not really doing anything with capturing, but some ideas that
 may be helpful:

 FWIW, from what I know in ring capture mode the video gets synch'd by the
 audio by having enough frames per audio sample. So if audio sample size or
 expected speed or expected kHz is somehow wrong...

Hmm..
Certainly worth instrumenting.. Although wading through the mplayer source is 
always an 'interesting' experience :)

 Also the code for ring capture mode (as opposed to immediate which does not
 do audio but does give a video one could capture at 25 fps) has its own
 timing (perhaps it uses rtc down the line, I dunno, is rtc.ko alright?).
 You may get into a worst-worst-worst-even worst scenario where the software
 timer degrades on and on possibly.

FreeBSD doesn't have rtc.ko.. Mine doesn't anyway :)

I'm not sure how mplayer in FreeBSD stamps frames either.

 Maybe capturing only works well if you use immediate (case 2 in bktr(4)
 IIRC) and you should capture audio seperately and later merge them to
 frames.

Hmm, well in any capture you're going to have to worry about clock drift 
(between the sound card and the bktr card) and dropped frames.

I don't use either of those, but a small program I wrote which
captures YUV frames and uses the Xv extension doesn't show the
problem.

 Capturing only pictures at 25 fps (with mplayer vo) can be handled easily.

Hmm OK.

So much to learn! :)

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
The nice thing about standards is that there
are so many of them to choose from.
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C


pgpTEXoU6aqIV.pgp
Description: PGP signature


Re: xorg-clients conflicts with xterm (patch)

2005-11-15 Thread James Long
On Tue, Nov 15, 2005 at 07:56:33PM -0800, David Wolfskill wrote:
 On Tue, Nov 15, 2005 at 07:49:10PM -0800, James Long wrote:
  
  ===   xorg-clients-6.8.2_1 depends on package: xterm0 - not found
  
  and investigated the Makefile to find why the odd package
  name of xterm0.
 
 Looks as if the thing to do would have been to run pkgdb -F and delete
 that dependency.

Again, at that time, xorg-clients was not installed, thus
that dependency was not in the package database.  Notice
that the portupgrade output with that xterm0 line is
a portupgrade -N invocation, to install a new port, not
to upgrade an existing port.  I always welcome and try to
learn from corrections, but I can't see that pkgdb -F would
be able to remove a dependency for a port that is not (yet)
installed.

That dependency is actually verbatim in the Makefile, I quote:

RUN_DEPENDS=xterm0:${PORTSDIR}/x11/xterm

Hence my patch.  Or if the above syntax is correct, perhaps 
someone can point me towards an explanation of the syntax found 
in that RUN_DEPENDS= line for my edification.  Once I removed
the 0 from the Makefile, and since portupgrade had already 
built (but failed to install) xorg-clients, I was able to
simply make install in the xorg-clients ports directory,
and all the previously-built stuff got installed, along
with xterm-206_1.

I'm just asking someone (my original post cc'ed $MAINTAINER)
to review the accuracy of that RUN_DEPENDS line.  portupgrade
certainly seems to parse the 0 as part of the port name,
rather than as some sort of conditional operator.

Regards,

Jim


 
 Peace,
 david
 -- 
 David H. Wolfskill[EMAIL PROTECTED]
 Prediction is difficult, especially if it involves the future. -- Niels Bohr
 
 See http://www.catwhisker.org/~david/publickey.gpg for public key.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: mplayer + bktr

2005-11-15 Thread Stephen Hurd

Daniel O'Connor wrote:


FreeBSD doesn't have rtc.ko.. Mine doesn't anyway :)

I'm not sure how mplayer in FreeBSD stamps frames either.
 


It's not stock, but /dev/rtc (via rtc.ko) can be had via emulators/rtc
if rtc.ko exists, it's a dependency, to force it to be built you can 
frob the WITH_RTC knob.

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]