Skip to contentSkip to conversation

New: Kernel unaligned access at TPC[105d9fb4] nvkm_instobj_wr32+0x14/0x20 [nouveau]

Bug 96836 [email protected] 1 participant 20 messages Jul 7, 2016 – Dec 4, 2019 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=96836

Bug ID: 96836
Summary: Kernel unaligned access at TPC[105d9fb4]
nvkm_instobj_wr32+0x14/0x20 [nouveau]
Product: xorg
Version: unspecified
Hardware: SPARC
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Driver/nouveau
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]

When attempting to use Nouveau driver with Xorg on my SunBlade 2500 running the latested build from Debian-9.0 Sid SPARC64 CPU 0 runs up to 100% and then eventually the Xorg session shuts down. It appears that it's timing out on a GPU lock. A bunch of messages appears in the Xorg.0.log indicating fifo:
CACH_ERROR also with in the messages log there are several repeating errors.

log_unaligned: 598 callbacks suppressed
Kernel unaligned access at TPC[105d9fb4] nvkm_instobj_wr32+0x14/0x20 [nouveau]

Eventually the Xorg session gives up and times out.

I'll try and attach some more logs but it appears to have something to do with the iowrite32_native macro on SPARC V9 systems.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

A message that is not in the archive (sent off-list or not yet received): bug-96836-8800-V0hAGp6uBxMKqLRl/[email protected]/

#2 lore raw

[Bug 96836] Kernel unaligned access at TPC[105d9fb4] nvkm_instobj_wr32+0x14/0x20 [nouveau]

https://bugs.freedesktop.org/show_bug.cgi?id=96836

--- Comment #1 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]> --- What GPU is this? Is Sparc64 a BE system? Are you using 4K pages? (if not, use 4K pages)

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#3 lore raw

[Bug 96836] Kernel unaligned access at TPC[105d9fb4] nvkm_instobj_wr32+0x14/0x20 [nouveau]

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=96836

--- Comment #2 from Kieron Gillespie <[email protected]> --- So Sparc64 is a big endian archetecutre. The request to use 4K huge pages is
not possible on Sarc64 as the smallest it supports is 8K (which is what my
system is currently using.)

The card is a GeForce FX5200 128MB DDR PCI

The GPU I am currently testing is a bit of a fossil, but I had great success on this SPARC system in the past managed to get full hardware acceleration working, sometime early 2015.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#4 lore raw

[Bug 96836] Kernel unaligned access at TPC[105d9fb4] nvkm_instobj_wr32+0x14/0x20 [nouveau]

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=96836

--- Comment #3 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]> --- Hmmm... maybe with nv3x the 4K pages aren't such a hard requirement. Definitely people on PPC64 with 64K pages had trouble with nv4x though.

But, if it worked before, it can work again. Since this isn't exactly *the* most common setup, you're going to have to do a bit more of the work. Try more kernels. Nouveau got a huge rewrite in kernel 4.3, try 4.2 maybe? That rewrite ended up breaking BE briefly, but I fixed it up again and it was working semi-recently on my FX5200 in a G5 (PPC64, also BE).

iowrite32_native is used all over the place to write to the card's MMIO space in one of the BARs (can never remember which).

The specific error seems to indicate that we did a wr32 on an instobj to a non-32-bit-aligned address. This would be very surprising. Please boot with

nouveau.debug=trace

and attach a full log of the result. (It should be large.)

Also, please try several kernels, including both pre- and post-4.3 ones.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#5 lore raw

[Bug 96836] Kernel unaligned access at TPC[105d9fb4] nvkm_instobj_wr32+0x14/0x20 [nouveau]

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=96836

--- Comment #4 from Kieron Gillespie <[email protected]> --- Created attachment 124978
--> https://bugs.freedesktop.org/attachment.cgi?id=124978&action=edit
Message log while nouveau.debug=trace

So I enabled the debug trace and I let it run for sometime, roughly 15 minutes, though it looks like it didn't get terribly far. I am going to try and collected more information by having it run for several hours, but I figured I'd upload this in case it's at all useful.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#6 lore raw

[Bug 96836] Kernel unaligned access at TPC[105d9fb4] nvkm_instobj_wr32+0x14/0x20 [nouveau]

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=96836

--- Comment #5 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]> --- (In reply to Kieron Gillespie from comment #4)

Quoted 7 lines

Created attachment 124978 [details]
Message log while nouveau.debug=trace

So I enabled the debug trace and I let it run for sometime, roughly 15 minutes, though it looks like it didn't get terribly far. I am going to try and collected more information by having it run for several hours, but I figured I'd upload this in case it's at all useful.

Hm, something bad is going on. It's supposed to work much more gracefully.

First off ... where are all the init messages from nouveau loading?

Do you have a digital screen you can connect? It looks like something keeps trying to get the scanout position but can't (see the error returned by nv04_disp_scanoutpos), which in turn floods the logs.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#7 lore raw

[Bug 96836] Kernel unaligned access at TPC[105d9fb4] nvkm_instobj_wr32+0x14/0x20 [nouveau]

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=96836

--- Comment #6 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]> --- (In reply to Kieron Gillespie from comment #4)

Quoted 7 lines

Created attachment 124978 [details]
Message log while nouveau.debug=trace

So I enabled the debug trace and I let it run for sometime, roughly 15 minutes, though it looks like it didn't get terribly far. I am going to try and collected more information by having it run for several hours, but I figured I'd upload this in case it's at all useful.

Also, looks like your Xorg is in a restart loop, perhaps logs from that could be interesting.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#8 lore raw

[Bug 96836] Kernel unaligned access at TPC[105d9fb4] nvkm_instobj_wr32+0x14/0x20 [nouveau]

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=96836

--- Comment #7 from Kieron Gillespie <[email protected]> --- So it is actually connected to a display, and I can get a console with nouveau, I'll try to get a better Xorg output, I think the driver is still having
trouble auto-detecting the device.

Also I am going to connect one of my serial cables so I can get a cleaner output, I think that messages is missing some of the very early boot messsages. Not sure but would like to rule it out.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#9 lore raw

[Bug 96836] Kernel unaligned access at TPC[105d9fb4] nvkm_instobj_wr32+0x14/0x20 [nouveau]

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=96836

--- Comment #8 from Kieron Gillespie <[email protected]> --- The constant restarting of Xorg is coming from the lightdm service. It's
constantly trying over and over again.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#10 lore raw

[Bug 96836] Kernel unaligned access at TPC[105d9fb4] nvkm_instobj_wr32+0x14/0x20 [nouveau]

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=96836

--- Comment #9 from Kieron Gillespie <[email protected]> --- Created attachment 124979
--> https://bugs.freedesktop.org/attachment.cgi?id=124979&action=edit
messages forcing BusID in Xorg config

So this time I logged into the box remotely and stop the lightdm service I then ran "Xorg -config xorg.conf.broke -verbose 6" I'll also attach the Xorg.0.log and the config file.

The Xorg log almost makes it look like it is working, though all I am left with on the screen is a blank screen with a single non-blinking cursor in the top left corner of the monitor, alsmost like it switched to the virtual terminal but didn't actually clear the screen and didn't start to draw anything.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#11 lore raw

[Bug 96836] Kernel unaligned access at TPC[105d9fb4] nvkm_instobj_wr32+0x14/0x20 [nouveau]

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=96836

--- Comment #10 from Kieron Gillespie <[email protected]> --- Created attachment 124980
--> https://bugs.freedesktop.org/attachment.cgi?id=124980&action=edit
Xorg.0.log using xorg.conf.broke

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#12 lore raw

[Bug 96836] Kernel unaligned access at TPC[105d9fb4] nvkm_instobj_wr32+0x14/0x20 [nouveau]

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=96836

--- Comment #11 from Kieron Gillespie <[email protected]> --- Created attachment 124981
--> https://bugs.freedesktop.org/attachment.cgi?id=124981&action=edit
xorg.conf.broke

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#13 lore raw

[Bug 96836] Kernel unaligned access at TPC[105d9fb4] nvkm_instobj_wr32+0x14/0x20 [nouveau]

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=96836

--- Comment #12 from Kieron Gillespie <[email protected]> --- Created attachment 124982
--> https://bugs.freedesktop.org/attachment.cgi?id=124982&action=edit
lspci output from the system in question

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#14 lore raw

[Bug 96836] Kernel unaligned access at TPC[105d9fb4] nvkm_instobj_wr32+0x14/0x20 [nouveau]

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=96836

--- Comment #13 from Kieron Gillespie <[email protected]> --- So I tried unplugging the monitor just to see what would happen, welp...

Message from syslogd@celestia at Jul 9 22:55:21 ...
kernel:[ 2211.347894] Kernel panic - not syncing: Irrecoverable deferred error
trap.

Message from syslogd@celestia at Jul 9 22:55:21 ...
kernel:[ 2211.347894]

Message from syslogd@celestia at Jul 9 22:55:21 ...
kernel:[ 2213.461991] Press Stop-A (L1-A) to return to the boot prom

Message from syslogd@celestia at Jul 9 22:55:21 ...
kernel:[ 2213.534081] ---[ end Kernel panic - not syncing: Irrecoverable
deferred error trap.

Message from syslogd@celestia at Jul 9 22:55:21 ...
kernel:[ 2213.534081]

Message from syslogd@celestia at Jul 9 22:55:54 ...
kernel:[ 2246.560543] NMI watchdog: BUG: soft lockup - CPU#1 stuck for 23s!
[Xorg:3774]

Well now I know what happens! :P

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#15 lore raw

[Bug 96836] Kernel unaligned access at TPC[105d9fb4] nvkm_instobj_wr32+0x14/0x20 [nouveau]

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=96836

--- Comment #14 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]> --- OK, well let's start small. One source of problems is that we have

drivers/gpu/drm/nouveau/nouveau_bios.h:#define ROM16(x) le16_to_cpu(*(u16 *)&(x))

Which can only work on aligned pointers x, but it gets called with unaligned offsets in nouveau_bios.c

Can you try changing that to

#define ROM16(x) get_unaligned_le16(&(x))

I'm guessing that will help with the first group of unaligned traps.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#16 lore raw

[Bug 96836] Kernel unaligned access at TPC[105d9fb4] nvkm_instobj_wr32+0x14/0x20 [nouveau]

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=96836

--- Comment #15 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]> --- (In reply to Ilia Mirkin from comment #14)

Quoted 5 lines

OK, well let's start small. One source of problems is that we have

drivers/gpu/drm/nouveau/nouveau_bios.h:#define ROM16(x) le16_to_cpu(*(u16 *)&(x))

Quoted 8 lines

Which can only work on aligned pointers x, but it gets called with unaligned offsets in nouveau_bios.c

Can you try changing that to

#define ROM16(x) get_unaligned_le16(&(x))

I'm guessing that will help with the first group of unaligned traps.

Oh, and same treatment for ROM32 of course (and ROM64 while you're at it, but that never gets called from what I can tell).

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#17 lore raw

[Bug 96836] Kernel unaligned access at TPC[105d9fb4] nvkm_instobj_wr32+0x14/0x20 [nouveau]

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=96836

--- Comment #16 from Kieron Gillespie <[email protected]> --- Created attachment 124983
--> https://bugs.freedesktop.org/attachment.cgi?id=124983&action=edit
panic_console.out

So now that I am logging directly from the seiral terminal I appear to be getting more information.

There are times when the system boots the nouveau driver it's self crashes. I was able to catch it this time.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#18 lore raw

[Bug 96836] Kernel unaligned access at TPC[105d9fb4] nvkm_instobj_wr32+0x14/0x20 [nouveau]

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=96836

--- Comment #17 from Kieron Gillespie <[email protected]> --- (In reply to Ilia Mirkin from comment #15)

Quoted 9 lines

(In reply to Ilia Mirkin from comment #14)

Quoted 8 lines

OK, well let's start small. One source of problems is that we have

drivers/gpu/drm/nouveau/nouveau_bios.h:#define ROM16(x) le16_to_cpu(*(u16 *)&(x))

Which can only work on aligned pointers x, but it gets called with unaligned offsets in nouveau_bios.c

Quoted 8 lines
Quoted 5 lines

Can you try changing that to

#define ROM16(x) get_unaligned_le16(&(x))

I'm guessing that will help with the first group of unaligned traps.

Oh, and same treatment for ROM32 of course (and ROM64 while you're at it, but that never gets called from what I can tell).

Alright I'll give that a shot and let you know, thanks for the help!

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#19 lore raw

[Bug 96836] Kernel unaligned access at TPC[105d9fb4] nvkm_instobj_wr32+0x14/0x20 [nouveau]

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=96836

--- Comment #18 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]> --- I believe these two patches should be relevant to your situation:

https://lists.freedesktop.org/archives/nouveau/2016-July/025683.html
https://lists.freedesktop.org/archives/nouveau/2016-July/025688.html

Whether it resolves anything ... who knows. Should at least get rid of all the unaligned access errors.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#20 lore raw

[Bug 96836] Kernel unaligned access at TPC[105d9fb4] nvkm_instobj_wr32+0x14/0x20 [nouveau]

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=96836

Martin Peres <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

         Resolution|---                         |MOVED
             Status|NEW                         |RESOLVED

--- Comment #19 from Martin Peres <[email protected]> --- -- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance:
https://gitlab.freedesktop.org/xorg/driver/xf86-video-nouveau/issues/273.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau