nV News Forums


nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA FreeBSD (http://www.nvnews.net/vbulletin/forumdisplay.php?f=47)
-   -   FreeBSD 8.0 amd64 with 8GB RAM (deadlock) (http://www.nvnews.net/vbulletin/showthread.php?t=143241)

miwi 01-01-10 01:06 PM

FreeBSD 8.0 amd64 with 8GB RAM (deadlock)

I played a bit with the 64bit driver under FreeBD-8.0 (RELENG_8).
RELEASE works perfect, after updating to RELENG_8 I get a hang, which
means, i can't start xorg with nvidia driver. Hang means that machine
stops responding completely, not reacting to keyboard input or network

I have added all kernel debug stuff to my kernel [1] in hope to get
any more information. As that didn't really help I then downgraded
day by day to find out which src/sys commit breaks it seems I found

I wrote a mail to Konstantin (kib@) and explained him my problem,
he told me that he need more infomation.
And he also said that he thinks that this commit is not related to
this problem but he liked to know more about this problem.

We attempted to debug the hung machine using kgdb over firewire. We
were able to successfully attach over firewire with kgdb before
starting X, but firewire host lost connection to the target upon start
of the X. It looks like whole machine become dead.

Upon detailed reading of the dmesg, the nvidia card appeared to share
the interrupt with on-board network controller. Disabling the
controller from the BIOS temporary (until next reboot) enabled the X
to start. Unfortunately, after the reboot, one of the USB controllers
was assigned IRQ18, used by the nvidia card, attempt to start X killed
the machine. We disabled USB in BIOS, and again, were able to start X
once until the reboot.

We were unable to found the way to force card to use MSI to confirm
the natural theory of interrupt sharing causing the hang.

Another test was to disable smp support. i've set kern.smp.disabled=1
in loader.conf nvidia started here and works fine.

About my Hardware:
I've a Asus M4A78T-E with 8 GB ram, the onboard gfx card
is disabled via BIOS.
Nvidia card is a: GeForce 7300 GS


# Debugging for use in -current
options KDB # Enable kernel debugger support.
options DDB # Support DDB.
options GDB # Support remote GDB.
options INVARIANTS # Enable calls of extra sanity checking
options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS
options WITNESS # Enable checks to detect deadlocks and cycles
options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed
#options MP_WATCHDOG
options KSTACK_PAGES=7

here my dmesg where nvidia failed: [2]

here my dmesg where nvidia works:

pciconf -lv

nvidia debug script where nvidia was working:

I found an other people with the same mainboard also 8 GB ram, but a different
gfx card (GeForce 8400 GS), for him works RELENG_8/HEAD fine.

Any Ideas?

miwi 03-16-10 05:10 AM

Re: FreeBSD 8.0 amd64 with 8GB RAM (deadlock)
sadly my problem is still present with 195.36.15 ;(

zander 03-16-10 11:06 AM

Re: FreeBSD 8.0 amd64 with 8GB RAM (deadlock)
Unfortunately, I haven't been able to reproduce this problem so far. Is the problem really tied to the 8GB memory configuration? Or does it also reproduce with less RAM?

miwi 03-16-10 11:53 AM

Re: FreeBSD 8.0 amd64 with 8GB RAM (deadlock)

Originally Posted by zander (Post 2210192)
Unfortunately, I haven't been able to reproduce this problem so far. Is the problem really tied to the 8GB memory configuration? Or does it also reproduce with less RAM?

it also reproducible with 2, 4 ,6 GB.

miwi 03-17-10 03:47 AM

Re: FreeBSD 8.0 amd64 with 8GB RAM (deadlock)

I got this to work now with 2 and 4 gb ram,

i need to added machdep.disable_mtrrs=1 and hw.nvidia.registry.EnableMSI=1
this works fine with 195.36.15. With 6 and 8 GB i still get the Deadlock.

zander 03-17-10 10:13 AM

Re: FreeBSD 8.0 amd64 with 8GB RAM (deadlock)
Interesting, thanks for the update. The 195.36.15 driver release does not yet support MSI (it ignores the sysctl knob), nor should it make use of MTRRs; so there's a chance that the problem you're seeing is a system-level one. I believe we've seen one hang on PC-BSD with an 8.0-RELEASE-p2 kernel that may be consistent with yours; when I find some time, I'll take a closer look at that.

In the meantime, can you dump your system's static/dynamic MTRR configuration with 6GB/8GB just before starting X?

zander 03-17-10 10:24 AM

Re: FreeBSD 8.0 amd64 with 8GB RAM (deadlock)
1 Attachment(s)
BTW, it's been a while and I don't recall if there's a standard tool for dumping MTRRs. If not, the attached tool should still work. You an build/run it via:
# mv /path/to/show-mtrr.c.txt show-mtrr.c
# gcc -o show-mtrr show-mtrr.c
# ./show-mtrr
The program needs to be run as root.

Skalla 04-05-10 04:05 AM

Re: FreeBSD 8.0 amd64 with 8GB RAM (deadlock)
I guess you mean

memcontrol list

All times are GMT -5. The time now is 09:36 PM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.