[Bug 211418] x11-drivers/xf86-video-vesa: X11 fails to start; vesa_drv.so Undefined symbol "ioBase"
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Aug 23 06:59:02 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211418
--- Comment #1 from Damon Zwolinski <freebsd at g3os.org> ---
I'm still stuck but I tried to make some progress on my own. Right now I'm
thinking an include is missing or something similar to that.
I reinstalled 10.3, changed my /etc/make.conf to:
1 DEVELOPER=yes
2
3 WITH_CTF=1
4 WITH_DEBUG=yes
and rebuilt x11 ports (xorg-server, xauth, xinit, xf86-video-vesa, jwm). I
still see the same issue but I at least have debugging symbols now.
1) Does objdump verify that ioBase is in fact defined or not?
When I do:
cd /usr/local/lib/xorg/modules/drivers
objdump --dynamic-syms vesa_drv.so
I can see ioBase is undefined
122 00000000 D *UND* 00000000 VBEBankSwitch
123 00007c1c g DF .text 0000000c Base _restgpr_30
124 00007b90 g DF .text 0000004c Base _restfpr_14
125 00007bf0 g DF .text 00000038 Base _restgpr_19
126 00000000 D *UND* 00000000 xf86DPMSInit
127 00000000 D *UND* 00000000 miGetDefaultVisualMask
128 00000000 D *UND* 00000000 ioBase
129 00007b1c g DF .text 00000028 Base _savefpr_23
130 00007b2c g DF .text 00000018 Base _savefpr_27
131 00007b58 g DF .text 00000038 Base _savegpr_19
132 00007bc4 g DF .text 00000018 Base _restfpr_27
133 00007c10 g DF .text 00000018 Base _restgpr_27
134 00007cb4 g DF .text 00000024 Base _restgpr_27_x
I know a little bit of C but I'm pretty much out of my depth here. I'm
guessing that the error message is right and .so really doesn't have ioBase
defined or what's calling it needs to know about ioBase but it doesn't.
http://www.sourceware.org/binutils/docs/binutils/objdump.html says UND means
the symbol is referenced but not defined here. I see it defined in
/usr/ports/x11-drivers/xf86-video-vesa/work/xf86-video-vesa-2.3.4/src/vesa.h:
80 typedef struct _VESARec
81 {
82 vbeInfoPtr pVbe;
83 EntityInfoPtr pEnt;
84 CARD16 major, minor;
...
112 Bool accessEnabled;
113 OptionInfoPtr Options;
114 unsigned long ioBase;
115 Bool ModeSetClearScreen;
116 void *shadow;
117 ShadowUpdateProc update;
118 ShadowWindowProc window;
119 } VESARec, *VESAPtr;
and vesa.c includes it.
2) How can I see what loads vesa_drv.so get in gdb?
I know I can do ldd to see the libraries a binary links to. So that a config
can be used to set the driver, I know I won't see vesa_drv.so when I look at
xorg:
$ ldd /usr/local/bin/Xorg
/usr/local/bin/Xorg:
libcrypto.so.7 => /lib/libcrypto.so.7 (0x41b3b000)
libpciaccess.so.0 => /usr/local/lib/libpciaccess.so.0 (0x41cfd000)
libdrm.so.2 => /usr/local/lib/libdrm.so.2 (0x41d17000)
libpixman-1.so.0 => /usr/local/lib/libpixman-1.so.0 (0x41d28000)
libXfont.so.1 => /usr/local/lib/libXfont.so.1 (0x41fa9000)
libXau.so.6 => /usr/local/lib/libXau.so.6 (0x4200e000)
libxshmfence.so.1 => /usr/local/lib/libxshmfence.so.1 (0x42022000)
libXdmcp.so.6 => /usr/local/lib/libXdmcp.so.6 (0x42035000)
librpcsvc.so.5 => /usr/lib/librpcsvc.so.5 (0x4204c000)
libm.so.5 => /lib/libm.so.5 (0x42065000)
libc.so.7 => /lib/libc.so.7 (0x4209b000)
libthr.so.3 => /lib/libthr.so.3 (0x42234000)
libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 (0x4226b000)
libz.so.6 => /lib/libz.so.6 (0x42359000)
libfontenc.so.1 => /usr/local/lib/libfontenc.so.1 (0x4237d000)
libbz2.so.4 => /usr/lib/libbz2.so.4 (0x42396000)
I can't do the reverse though and see what loads a library. I installed gdb
7.10. But I don't see how to step into the code that tries to load
vesa_drv.so. I basically get one line of code to execute and that's not
helpful at all:
# gdb710 --tui --args Xorg -conf /root/xorg.conf.new
┌──stubmain.c────────────────────────────────────────────────────────────────────────────────┐
│26 int dix_main(int argc, char *argv[], char *envp[]);
│
│27
│
│28 /*
│
│29 A default implementation of main, which can be overridden by the
DDX │
│30 */
│
│31 int
│
│32 main(int argc, char *argv[], char *envp[])
│
│33 {
│
│34 return dix_main(argc, argv, envp);
│
│35 }
│
┌────────────────────────────────────────────────────────────────────────────────────────────┐
│0x181c518 <main> stwu r1,-32(r1)
│
│0x181c51c <main+4> mflr r0
│
│0x181c520 <main+8> stw r31,24(r1)
│
│0x181c524 <main+12> stw r0,36(r1)
│
│0x181c528 <main+16> mr r31,r1
│
│0x181c52c <main+20> stw r3,8(r31)
│
│0x181c530 <main+24> stw r4,12(r31)
│
│0x181c534 <main+28> stw r5,16(r31)
│
│0x181c538 <main+32> lwz r3,8(r31)
│
│0x181c53c <main+36> lwz r4,12(r31)
│
│0x181c540 <main+40> lwz r5,16(r31)
│
└────────────────────────────────────────────────────────────────────────────────────────────┘
exec No process In:
L?? PC: ??
and "show warranty" for details.
This GDB was configured as "powerpc-portbld-freebsd10.3".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from Xorg...done.
(gdb) start
Temporary breakpoint 1 at 0x181c538: file stubmain.c, line 34.
Starting program: /usr/local/bin/Xorg -conf /root/xorg.conf.new
Temporary breakpoint 1, main (argc=3, argv=0xffffd840, envp=0xffffd850) at
stubmain.c:34
(gdb) n
[Inferior 1 (process 73001) exited with code 01]
(gdb)
This video has some things I haven't tried so I'll give that a shot:
https://youtu.be/713ay4bZUrw?t=43m.
3) I can use truss where I can see the error happen but I'd really like to see
the code:
# truss -fo truss-xorg-conf-root-xorg-new Xorg -config /root/xorg.conf.new
478 73041: stat("/usr/local/lib/xorg/modules/drivers/vesa_drv.so",{
mode=-rwxr-xr-x ,inode=2411937,size=92916,blksize=32768 }) = 0 (0x0)
479 73041: stat("/usr/local/lib/xorg/modules/drivers/fbdev_drv.so",{
mode=-rwxr-xr-x ,inode=2412710,size=73167,blksize=32768 }) = 0 (0x0)
480 73041: getdirentries(0x4,0x42880000,0x1000,0x4287f084) = 0 (0x0)
481 73041: close(4) = 0 (0x0)
482 73041: write(2,"List of video drivers:\n",23) = 23 (0x17)
483 73041: clock_gettime(4,{ 20379.720870973 }) = 0 (0x0)
484 73041: write(0,"[ 20379.720] ",13) = 13 (0xd)
485 73041: write(0,"List of video drivers:\n",23) = 23 (0x17)
486 73041: write(2,"\tvesa\n",6) = 6 (0x6)
487 73041: clock_gettime(4,{ 20379.722989227 }) = 0 (0x0)
488 73041: write(0,"[ 20379.722] ",13) = 13 (0xd)
489 73041: write(0,"\tvesa\n",6) = 6 (0x6)
490 73041: write(2,"\tfbdev\n",7) = 7 (0x7)
491 73041: clock_gettime(4,{ 20379.724856510 }) = 0 (0x0)
492 73041: write(0,"[ 20379.724] ",13) = 13 (0xd)
493 73041: write(0,"\tfbdev\n",7) = 7 (0x7)
494 73041: write(2,"\tmodesetting\n",13) = 13 (0xd)
495 73041: clock_gettime(4,{ 20379.726715322 }) = 0 (0x0)
496 73041: write(0,"[ 20379.726] ",13) = 13 (0xd)
497 73041: write(0,"\tmodesetting\n",13) = 13 (0xd)
498 73041: clock_gettime(4,{ 20379.727474425 }) = 0 (0x0)
499 73041: write(0,"[ 20379.727] ",13) = 13 (0xd)
500 73041: write(0,"(II) LoadModule: "vesa"",23) = 23 (0x17)
501 73041: write(0,"\n",1) = 1 (0x1)
502 73041:
open("/usr/local/lib/xorg/modules/freebsd/",O_NONBLOCK|O_DIRECTORY|O_CLOEXEC,01)
ERR#2 'No such file or directory'
503 73041:
open("/usr/local/lib/xorg/modules/",O_NONBLOCK|O_DIRECTORY|O_CLOEXEC,01) = 4
(0x4)
504 73041: fstatfs(4,{
fstypename=ufs,mntonname=/,mntfromname=/dev/ada0s3,fsid=57b68b44ee2d35c7 }) = 0
(0x0)
505 73041: getdirentries(0x4,0x42880000,0x1000,0x4287f0b4) = 276 (0x114)
506 73041: stat("/usr/local/lib/xorg/modules/drivers/",{ mode=drwxr-xr-x
,inode=2412429,size=512,blksize=32768 }) = 0 (0x0)
507 73041:
open("/usr/local/lib/xorg/modules/drivers/",O_NONBLOCK|O_DIRECTORY|O_CLOEXEC,00)
= 5 (0x5)
508 73041: fstatfs(5,{
fstypename=ufs,mntonname=/,mntfromname=/dev/ada0s3,fsid=57b68b44ee2d35c7 }) = 0
(0x0)
509 73041: getdirentries(0x5,0x42881000,0x1000,0x4287f0e4) = 96 (0x60)
510 73041:
stat("/usr/local/lib/xorg/modules/drivers/modesetting_drv.so/",0xffffc898)
ERR#20 'Not a directory'
511 73041: stat("/usr/local/lib/xorg/modules/drivers/vesa_drv.so/",0xffffc898)
ERR#20 'Not a directory'
512 73041: close(5) = 0 (0x0)
513 73041: close(4) = 0 (0x0)
514 73041: clock_gettime(4,{ 20379.731177120 }) = 0 (0x0)
515 73041: write(0,"[ 20379.731] ",13) = 13 (0xd)
516 73041: write(0,"(II) Loading /usr/local/lib/xorg"...,61) = 61 (0x3d)
517 73041: __sysctl(0xffffcb44,0x2,0x41b30d80,0xffffcb4c,0x0,0x0) = 0 (0x0)
518 73041: __sysctl(0xffffcb44,0x2,0x41b30e80,0xffffcb4c,0x0,0x0) = 0 (0x0)
519 73041: __sysctl(0xffffcb44,0x2,0x41b30f80,0xffffcb4c,0x0,0x0) = 0 (0x0)
520 73041: __sysctl(0xffffcb44,0x2,0x41b31080,0xffffcb4c,0x0,0x0) = 0 (0x0)
521 73041: __sysctl(0xffffcb44,0x2,0x41b31180,0xffffcb4c,0x0,0x0) = 0 (0x0)
522 73041:
openat(AT_FDCWD,"/usr/local/lib/xorg/modules/drivers/vesa_drv.so",O_CLOEXEC,00)
= 4 (0x4)
523 73041: fstat(4,{ mode=-rwxr-xr-x ,inode=2411937,size=92916,blksize=32768 })
= 0 (0x0)
524 73041: mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,4,0x0) =
1102221312 (0x41b29000)
525 73041: mmap(0x0,102400,PROT_NONE,MAP_PRIVATE|MAP_ANON|MAP_NOCORE,-1,0x0) =
1111265280 (0x423c9000)
526 73041:
mmap(0x423c9000,36864,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE|MAP_PREFAULT_READ,4,0x0)
= 1111265280 (0x423c9000)
527 73041:
mmap(0x423e1000,4096,PROT_READ|PROT_WRITE|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_PREFAULT_READ,4,0x8000)
= 1111363584 (0x423e1000)
528 73041: munmap(0x41b29000,4096) = 0 (0x0)
529 73041: close(4) = 0 (0x0)
530 73041: munmap(0x423c9000,102400) = 0 (0x0)
531 73041: clock_gettime(4,{ 20379.735593770 }) = 0 (0x0)
532 73041: write(0,"[ 20379.735] ",13) = 13 (0xd)
533 73041: write(0,"(EE) Failed to load /usr/local/l"...,144) = 144 (0x90)
534 73041: clock_gettime(4,{ 20379.736342239 }) = 0 (0x0)
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-x11
mailing list