Hi, >>>>> On Thu, 25 Aug 2005 00:09:54 +0300 >>>>> Giorgos Keramidas <keramida_at_ceid.upatras.gr> said: keramida> On 2005-08-25 04:05, Hajimu UMEMOTO <ume_at_freebsd.org> wrote: > >>>>> On Wed, 24 Aug 2005 19:30:54 +0300 > >>>>> Giorgos Keramidas <keramida_at_freebsd.org> said: > > keramida> Recent CURRENT/i386 panics randomly at boot time at (manual copy of the > keramida> console output, so there may be some errors in the numbers copied): > > keramida> msleep(c1a761d4,0,54,c0986ce0,0) at msleep+0x6e > keramida> acpi_tz_cooling_thread(c1a76100,d5248d38,c1a76100,c09770bc,0 at acpi_tz_cooling_thread+0x58 > > Umm, the fifth argument to msleep() is zero. It means sc->tz_zone.tsp > is zero. But, it is tested not to zero before invoking > acpi_tz_cooling_thread(). Perhaps, it is cleared some where later. keramida> The panic message, which I failed to copy was "sleeping without a mutex". Okay, the message is out when timo is zero. keramida> Thanks for the quick reply. I'll give a try to your patch tomorrow keramida> morning, when I have access to that machine again. You are welcome. Perhaps, I found the cause. sc->tz_zone is initialized before each retrieval of new value from BIOS. It makes the period where sc->tz_zone.tsp is zero. Please try following patch, instead: Index: sys/dev/acpica/acpi_thermal.c diff -u -p sys/dev/acpica/acpi_thermal.c.orig sys/dev/acpica/acpi_thermal.c --- sys/dev/acpica/acpi_thermal.c.orig Mon Aug 22 15:25:16 2005 +++ sys/dev/acpica/acpi_thermal.c Thu Aug 25 16:46:15 2005 _at__at_ -347,7 +347,14 _at__at_ acpi_tz_establish(struct acpi_tz_softc * AcpiOsFree(sc->tz_zone.al[i].Pointer); if (sc->tz_zone.psl.Pointer != NULL) AcpiOsFree(sc->tz_zone.psl.Pointer); - bzero(&sc->tz_zone, sizeof(sc->tz_zone)); + + /* + * XXX: We initialize only ACPI_BUFFER to avoid race condition + * with passive cooling thread which refers psv, tc1, tc2 and tsp. + */ + bzero(sc->tz_zone.ac, sizeof(sc->tz_zone.ac)); + bzero(sc->tz_zone.al, sizeof(sc->tz_zone.al)); + bzero(&sc->tz_zone.psl, sizeof(sc->tz_zone.psl)); /* Evaluate thermal zone parameters. */ for (i = 0; i < TZ_NUMLEVELS; i++) { Sincerely, -- Hajimu UMEMOTO _at_ Internet Mutual Aid Society Yokohama, Japan ume_at_mahoroba.org ume_at_{,jp.}FreeBSD.org http://www.imasy.org/~ume/Received on Thu Aug 25 2005 - 06:12:26 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:42 UTC