Re: Very recent NetBSD-current Xorg panic

2023-01-08 Thread Martin Husemann
On Sun, Jan 08, 2023 at 01:15:01PM +, Chavdar Ivanov wrote:
> As far as I understand it, there was a change with the dynamic loader at
> this time?

Yes, and after the ld.elf_so change the default linker options were adjusted,
which makes testing this now a bit tricky (you can't just downgrad ld.elf_so).

Martin


Re: Very recent NetBSD-current Xorg panic

2023-01-08 Thread Chavdar Ivanov




On 08 January 2023 12:15:12 (+00:00), Martin Husemann wrote:

> On Sun, Jan 08, 2023 at 11:28:18AM +, Chavdar Ivanov wrote:
> > This morning I upgraded the instance to my yesterday's build - as of
> > 07/01/2023. Now Xorg dumps core as follows:
> 
> Can you show the output of
> 
>   readelf -l /usr/X11R7/lib/modules/dri/i965_dri.so
> 
> for the new build? It probably has 4 LOAD sections now, while the old

> one only had 2.

Correct:



# readelf -l /usr/X11R7/lib/modules/dri/i965_dri.so

Elf file type is DYN (Shared object file)
Entry point 0x0
There are 9 program headers, starting at offset 64

Program Headers:
  Type   Offset VirtAddr   PhysAddr
 FileSizMemSiz  Flags  Align
  PHDR   0x0040 0x0040 0x0040
 0x01f8 0x01f8  R  0x8
  LOAD   0x 0x 0x
 0x0007ec68 0x0007ec68  R  0x1000
  LOAD   0x0007f000 0x0007f000 0x0007f000
 0x007c04be 0x007c04be  R E0x1000
  LOAD   0x0084 0x0084 0x0084
 0x001c9c72 0x001c9c72  R  0x1000
  LOAD   0x00a0a090 0x00a0a090 0x00a0a090
 0x000aa8e8 0x001f6078  RW 0x1000
  DYNAMIC0x00a7ecb8 0x00a7ecb8 0x00a7ecb8
 0x0280 0x0280  RW 0x8
  NOTE   0x0238 0x0238 0x0238
 0x0050 0x0050  R  0x4
  GNU_EH_FRAME   0x009684d8 0x009684d8 0x009684d8
 0x0001c8c4 0x0001c8c4  R  0x4
  GNU_RELRO  0x00a0a090 0x00a0a090 0x00a0a090
 0x00074f70 0x00074f70  R  0x1

 Section to Segment mapping:
  Segment Sections...
   00
   01 .note.gnu.build-id .note.netbsd.ident .note.netbsd.pax .hash 
.dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt

   02 .init .plt .plt.got .text .fini
   03 .rodata .eh_frame_hdr .eh_frame .gcc_except_table
   04 .init_array .fini_array .ctors .dtors .jcr .data.rel.ro .dynamic 
.got .got.plt .data .bss

   05 .dynamic
   06 .note.gnu.build-id .note.netbsd.ident .note.netbsd.pax
   07 .eh_frame_hdr
   08 .init_array .fini_array .ctors .dtors .jcr .data.rel.ro .dynamic 
.got
> 


> Martin

> 

I downgraded the system to the version from 03/01, it works fine; it might 
be interesting to mention that multimedia/obs, compiled on the version from 
07/01, does not work on the version from 03/01, even if it reports the same 
10.99.2:




$ uname -a
NetBSD tarkus.lorien.lan 10.99.2 NetBSD 10.99.2 (GENERIC) #4: Tue Jan  3 
20:39:31 GMT 2023  
sysbu...@ymir.lorien.lan:/home/sysbuild/sysbuild/amd64/obj/home/sysbuild/src/sys/arch/amd64/compile/GENERIC 
amd64

$ file /usr/pkg/bin/obs
/usr/pkg/bin/obs: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), 
dynamically linked, interpreter /usr/libexec/ld.elf_so, for NetBSD 10.99.2, 
stripped

$ ldd /usr/pkg/bin/obs
ldd: /usr/pkg/bin/obs: invalid ELF class 2; expected 1
$ /usr/pkg/bin/obs
/usr/pkg/bin/obs: Shared object "libobs-frontend-api.so.0" not found

As far as I understand it, there was a change with the dynamic loader at 
this time? 

BTW, I tried backing out sys/dev/ic/igpioreg.h, as mentioned above, it 
didn't make any difference. 


--

Chavdar Ivanov


Re: Very recent NetBSD-current Xorg panic

2023-01-08 Thread Martin Husemann
On Sun, Jan 08, 2023 at 11:28:18AM +, Chavdar Ivanov wrote:
> This morning I upgraded the instance to my yesterday's build - as of
> 07/01/2023. Now Xorg dumps core as follows:

Can you show the output of

  readelf -l /usr/X11R7/lib/modules/dri/i965_dri.so

for the new build? It probably has 4 LOAD sections now, while the old
one only had 2.

Martin


Very recent NetBSD-current Xorg panic

2023-01-08 Thread Chavdar Ivanov
Hi, 

My laptop, an HP Envy 17, has been running NetBSD (among others) -current 
since I've had it, almost seven years ago. It has an Intel 530 graphics, as 
well as NVidia GeForce GTX 950m, the latter has never worked for me under 
NetBSD, to get Xorg running, I usually run 'Xorg -configure' and get rid of 
all the configured options - screen, device, monitor - relating to the 
NVidia card. 

Up until 10.99.2 as of 03/01/2023, all was fine, more or less; Xorg ran 
using DRI2, everything was accelerated as expected, I didn't even have some 
of the graphics glitches which appeared previously. 

This morning I upgraded the instance to my yesterday's build - as of 
07/01/2023. Now Xorg dumps core as follows:


-

Reading symbols from /usr/X11R7/bin/Xorg...
(No debugging symbols found in /usr/X11R7/bin/Xorg)
[New process 3404]
[New process 3397]
[New process 3229]
[New process 3555]
Core was generated by `Xorg'.
Program terminated with signal SIGABRT, Aborted.
#0  0x6fa66dcb845a in _lwp_kill () from /usr/lib/libc.so.12
[Current thread is 1 (process 3404)]
(gdb) bt
#0  0x6fa66dcb845a in _lwp_kill () from /usr/lib/libc.so.12
#1  0x6fa66dcb895a in abort () from /usr/lib/libc.so.12
#2  0x00aa3854 in OsAbort ()
#3  0x00a9eb6e in AbortServer ()
#4  0x00a9f7de in FatalError ()
#5  0x00aa44d2 in ?? ()
#6  
#7  0x6fa6665dec79 in _mesa_sha1_format () from 
/usr/X11R7/lib/modules/dri/i965_dri.so
#8  0x6fa6665d9161 in brw_disk_cache_init () from 
/usr/X11R7/lib/modules/dri/i965_dri.so

#9  0x6fa6664baa93 in ?? () from /usr/X11R7/lib/modules/dri/i965_dri.so
#10 0x6fa6668fdc03 in ?? () from /usr/X11R7/lib/modules/dri/i965_dri.so
#11 0x00aaefeb in ?? ()
#12 0x00ab834f in ?? ()
#13 0x0098d3a0 in _CallCallbacks ()
#14 0x00ab0201 in GlxExtensionInit ()
#15 0x009d7841 in InitExtensions ()
#16 0x0094bca7 in dix_main ()
#17 0x0094ba1d in ___start ()
#18 0x7f7ff7681820 in ?? () from /usr/libexec/ld.elf_so
#19 0x0001 in ?? ()
#20 0x7f7fff7a6fd0 in ?? ()
#21 0x in ?? ()
(gdb) quit

startx results in (I guess the same):

X.Org X Server 1.21.1.5
X Protocol Version 11, Revision 0
Current Operating System: NetBSD tarkus.lorien.lan 10.99.2 NetBSD 10.99.2 
(GENERIC) #5: Sat Jan  7 01:31:38 GMT 2023  
sysbu...@ymir.lorien.lan:/home/sysbuild/sysbuild/amd64/obj/home/sysbuild/src/sys/arch/amd64/compile/GENERIC 
amd64


Current version of pixman: 0.38.4
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sun Jan  8 10:44:14 2023
(==) Using config file: "/etc/X11/xorg.conf"
(EE)
(EE) Backtrace:
(EE) 0: /usr/X11R7/bin/X (xorg_backtrace+0x44) [0xa5c6c5]
(EE) 1: /usr/X11R7/bin/X (os_move_fd+0x79) [0xa58465]
(EE) 2: /usr/lib/libc.so.12 (__sigtramp_siginfo_2+0x0) [0x7d363a2b8510]
(EE) 3: /usr/X11R7/lib/modules/dri/i965_dri.so 
(__driDriverGetExtensions_i965+0x122e6f) [0x7d3632fdec79]
(EE) 4: /usr/X11R7/lib/modules/dri/i965_dri.so 
(__driDriverGetExtensions_i965+0x11d357) [0x7d3632fd9161]
(EE) 5: /usr/X11R7/lib/modules/dri/i965_dri.so 
(__driDriverGetExtensions_r200+0x24fbb3) [0x7d3632ebaa93]
(EE) 6: /usr/X11R7/lib/modules/dri/i965_dri.so 
(__driDriverGetExtensions_i915+0x44978) [0x7d36332fdc03]

(EE) 7: /usr/X11R7/bin/X (_XSERVTransConvertAddress+0xb4a) [0xa62feb]
(EE) 8: /usr/X11R7/bin/X (glxProbeDriver+0x6c5) [0xa6c34f]
(EE) 9: /usr/X11R7/bin/X (_CallCallbacks+0x35) [0x9413a0]
(EE) 10: /usr/X11R7/bin/X (GlxExtensionInit+0x146) [0xa64201]
(EE) 11: /usr/X11R7/bin/X (InitExtensions+0x85) [0x98b841]
(EE) 12: /usr/X11R7/bin/X (dix_main+0x1a7) [0x8ffca7]
(EE)
(EE) Segmentation fault at address 0x10
(EE)
Fatal server error:
(EE) Caught signal 11 (Segmentation fault). Server aborting
(EE) 



The same build appears to be working fine on the build machine using 
..
radeon0 at pci1 dev 0 function 0: ATI Technologies FirePro W5000 (rev. 
0x00)

..


(again, decent DRI2 performance here). 



I tried the kernel from the previous build - which was working OK - but 
obviously it didn't work, as the problem appears to be in 
/usr/X11R7/lib/modules/dri/i965_dri.so .



I examined the cvs changes between 03/01 and 07/01 and could not find 
anything directly related to Intel graphics, with the possible exception 
of:




cvs diff -u -r 1.2 -r 1.3 igpioreg.h
Index: igpioreg.h
===
RCS file: /cvsroot/src/sys/dev/ic/igpioreg.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- igpioreg.h  26 Mar 2022 19:35:35 -  1.2
+++ igpioreg.h  7 Jan 2023 00:39:20 -   1.3
@@ -1,4 +1,4 @@
-/* $NetBSD: igpioreg.h,v 1.2