[Progress] Re: Bonaire XTX [Radeon R7 260X] - no Chromium, Firefox or FreeCAD
Rimvydas Jasinskas
rimvydasjas at gmail.com
Thu Dec 5 05:10:31 PST 2019
Hi,
thank you for your report, I'm looking into this issue.
Best regards,
Rimvydas
On Mon, Dec 2, 2019 at 12:15 AM Romick <yellowrabbit2010 at gmail.com> wrote:
>
> Hello,
> I was able to correct the situation with the crash of applications and
> successfully run the test program
> (https://peertube.social/videos/watch/e97a6aad-731a-4e8c-a6da-e3f0d92f888e),
> KiCad, FreeCAD and Chromium.
> (https://peertube.social/videos/watch/b44e75a5-9929-4cf4-8551-5a4396c92eae)
>
> Hardware acceleration was enabled by reverting commit
> e8de9e94be61d3d50fc134bbde36c014f25a6a56.
>
> The problem is this: the driver compiles the source text of the shaders with
> the help of llvm, which as a result produces a buffer in the elf format.
> Further, to load the shader into the GPU, the driver parses this buffer using
> the elf_* (elf_memory, elf_version etc) family of functions from the shared
> library /usr/local/lib/libelf.so (/usr/dports/devel/libelf).
>
> For simple programs like cuberender and glxgears this works fine, even the X
> server itself compiles and loads the shaders quite successfully. However, for
> large programs like FreeCAD or small, but based on QT, the situation changes:
> the fact is that these programs for some purpose use a shared library
> /usr/lib/libexecinfo.so that contains functions with the same names, but
> behaving differently (if the functions behaved identically, then there would be
> no crashes and freezes).
>
> To see how programs behave if they don’t have any confusion with the functions
> of the elf_ family, I stupidly renamed all the functions in the internal libelf
> library. As already mentioned, it helped --- I was able to run all the programs
> I needed:)
>
> But this is a bad and stupid way, and I am attaching the patch as an example
> only. There must be another way to make internal functions invisible to user
> space, maybe a compilation parameter or something.
>
> P.S. I wonder if we have other internal libraries that have visible functions
> with the same names as the functions from libraries from the ports. This kind
> of error is very hard to find (for me at least).
>
> ==========
> readelf -s /usr/lib/libexecinfo.so.1
>
> Symbol table '.dynsym' contains 132 entries:
> Num: Value Size Type Bind Vis Ndx Name
> 35: 00000000000073b0 73 FUNC GLOBAL DEFAULT 11 _libelf_getshdr
> 36: 0000000000004fc6 60 FUNC GLOBAL DEFAULT 11 elf_version
> 37: 0000000000015b33 149 FUNC GLOBAL DEFAULT 11 __register_frame_info_bas
> 38: 000000000001209a 8 FUNC GLOBAL DEFAULT 11 _Unwind_SetIP
> 39: 0000000000014134 414 FUNC GLOBAL DEFAULT 11 _Unwind_ForcedUnwind
> 40: 0000000000004777 135 FUNC GLOBAL DEFAULT 11 elf_flagelf
> 41: 0000000000006b09 1222 FUNC GLOBAL DEFAULT 11 _libelf_ehdr
> 42: 0000000000004577 370 FUNC GLOBAL DEFAULT 11 elf_rawdata
> 43: 000000000000490f 14 FUNC GLOBAL DEFAULT 11 elf_flagshdr
> 44: 00000000000050a9 214 FUNC GLOBAL DEFAULT 11 gelf_getshdr
> 45: 0000000000003b39 665 FUNC GLOBAL DEFAULT 11 symtab_create
> 46: 0000000000005684 224 FUNC GLOBAL DEFAULT 11 _libelf_allocate_elf
> 47: 000000000000643a 738 FUNC GLOBAL DEFAULT 11 _libelf_ar_get_translated
> 48: 000000000000502e 85 FUNC GLOBAL DEFAULT 11 gelf_fsize
> 49: 000000000001207a 8 FUNC GLOBAL DEFAULT 11 _Unwind_GetIP
> 50: 0000000000004dbe 66 FUNC GLOBAL DEFAULT 11 elf_nextscn
> 51: 0000000000005d95 328 FUNC GLOBAL DEFAULT 11 _libelf_ar_open_member
> 52: 0000000000012022 8 FUNC GLOBAL DEFAULT 11 _Unwind_GetCFA
> 53: 0000000000013d35 269 FUNC GLOBAL DEFAULT 11 __frame_state_for
> 54: 0000000000015c87 24 FUNC GLOBAL DEFAULT 11 __register_frame_info_tab
> 55: 0000000000006fcf 993 FUNC GLOBAL DEFAULT 11 _libelf_open_object
> 56: 0000000000005b19 636 FUNC GLOBAL DEFAULT 11 _libelf_ar_gethdr
> 57: 00000000000048c8 71 FUNC GLOBAL DEFAULT 11 elf_flagscn
> 58: 0000000000015bc8 24 FUNC GLOBAL DEFAULT 11 __register_frame_info
> 59: 000000000000746f 152 FUNC GLOBAL DEFAULT 11 _libelf_msize
> 60: 00000000000058a9 46 FUNC GLOBAL DEFAULT 11 _libelf_allocate_data
> 61: 00000000000069b5 340 FUNC GLOBAL DEFAULT 11 _libelf_xlate_shtype
> 62: 00000000000047fe 101 FUNC GLOBAL DEFAULT 11 elf_flagehdr
> 63: 00000000000058fb 140 FUNC GLOBAL DEFAULT 11 _libelf_allocate_scn
> 64: 0000000000011a44 81 FUNC GLOBAL DEFAULT 11 elf_hash
> 65: 000000000001bda0 0 NOTYPE GLOBAL DEFAULT ABS _edata
> 66: 00000000000040ac 964 FUNC GLOBAL DEFAULT 11 elf_getdata
> 67: 0000000000003ab7 21 FUNC GLOBAL DEFAULT 11 backtrace_symbols
> 68: 00000000000073f9 118 FUNC GLOBAL DEFAULT 11 _libelf_fsize
> 69: 000000000001202a 80 FUNC GLOBAL DEFAULT 11 _Unwind_SetGR
> 70: 0000000000005018 22 FUNC GLOBAL DEFAULT 11 elf64_fsize
> 71: 0000000000005083 19 FUNC GLOBAL DEFAULT 11 elf32_getshdr
> 72: 0000000000012082 24 FUNC GLOBAL DEFAULT 11 _Unwind_GetIPInfo
> 73: 0000000000004c7a 30 FUNC GLOBAL DEFAULT 11 elf_ndxscn
> 74: 0000000000006113 616 FUNC GLOBAL DEFAULT 11 _libelf_ar_process_svr4_s
> 75: 00000000000120b2 31 FUNC GLOBAL DEFAULT 11 _Unwind_FindEnclosingFunc
> 76: 00000000000034b7 79 FUNC GLOBAL DEFAULT 11 backtrace
> 77: 000000000000400b 140 FUNC GLOBAL DEFAULT 11 elf_errmsg
> 78: 00000000000058d7 36 FUNC GLOBAL DEFAULT 11 _libelf_release_data
> 79: 0000000000002de8 0 FUNC GLOBAL DEFAULT 9 _init
> 80: 000000000001604c 0 FUNC GLOBAL DEFAULT 12 _fini
> 81: 0000000000015c9f 27 FUNC GLOBAL DEFAULT 11 __register_frame_table
> 82: 0000000000005002 22 FUNC GLOBAL DEFAULT 11 elf32_fsize
> 83: 0000000000014615 29 FUNC GLOBAL DEFAULT 11 _Unwind_DeleteException
> 84: 0000000000015be0 33 FUNC GLOBAL DEFAULT 11 __register_frame
> 85: 00000000000046e9 71 FUNC GLOBAL DEFAULT 11 elf_flagarhdr
> 86: 0000000000004730 71 FUNC GLOBAL DEFAULT 11 elf_flagdata
> 87: 0000000000011fda 72 FUNC GLOBAL DEFAULT 11 _Unwind_GetGR
> 88: 000000000001bda0 0 NOTYPE GLOBAL DEFAULT ABS __bss_start
> 89: 0000000000014632 138 FUNC GLOBAL DEFAULT 11 _Unwind_Backtrace
> 90: 0000000000003e43 192 FUNC GLOBAL DEFAULT 11 elf_begin
> 91: 00000000000120d9 8 FUNC GLOBAL DEFAULT 11 _Unwind_GetTextRelBase
> 92: 000000000000517f 485 FUNC GLOBAL DEFAULT 11 gelf_update_shdr
> 93: 0000000000015c01 134 FUNC GLOBAL DEFAULT 11 __register_frame_info_tab
> 94: 0000000000005364 376 FUNC GLOBAL DEFAULT 11 gelf_getsym
> 95: 0000000000011ae0 345 FUNC GLOBAL DEFAULT 11 _libelf_memory
> 96: 000000000001bfc0 0 NOTYPE GLOBAL DEFAULT ABS _end
> 97: 00000000000054dc 424 FUNC GLOBAL DEFAULT 11 gelf_update_sym
> 98: 0000000000004863 101 FUNC GLOBAL DEFAULT 11 elf_flagphdr
> 99: 0000000000005edd 566 FUNC GLOBAL DEFAULT 11 _libelf_ar_process_bsd_sy
> 100: 0000000000003dd2 113 FUNC GLOBAL DEFAULT 11 symtab_find
> 101: 000000000000491d 699 FUNC GLOBAL DEFAULT 11 _libelf_load_section_head
> 102: 0000000000003ae9 80 FUNC GLOBAL DEFAULT 11 symtab_destroy
> 103: 0000000000006765 592 FUNC GLOBAL DEFAULT 11 _libelf_ar_open
> 104: 0000000000011a95 75 FUNC GLOBAL DEFAULT 11 elf_memory
> 105: 00000000000057d0 217 FUNC GLOBAL DEFAULT 11 _libelf_release_elf
> 106: 0000000000003692 951 FUNC GLOBAL DEFAULT 11 backtrace_symbols_fmt
> 107: 0000000000004e00 454 FUNC GLOBAL DEFAULT 11 elf_strptr
> 108: 000000000000671c 73 FUNC GLOBAL DEFAULT 11 _libelf_ar_get_raw_name
> 109: 00000000000120aa 8 FUNC GLOBAL DEFAULT 11 _Unwind_GetRegionStart
> 110: 0000000000003a49 110 FUNC GLOBAL DEFAULT 11 backtrace_symbols_fd_fmt
> 111: 000000000001b8e0 280 OBJECT GLOBAL DEFAULT 19 _libelf
> 112: 000000000001197c 200 FUNC GLOBAL DEFAULT 11 _libelf_get_translator
> 113: 0000000000004bd8 162 FUNC GLOBAL DEFAULT 11 elf_getscn
> 114: 000000000000637b 191 FUNC GLOBAL DEFAULT 11 _libelf_ar_get_number
> 115: 0000000000003acc 21 FUNC GLOBAL DEFAULT 11 backtrace_symbols_fd
> 116: 0000000000015de4 28 FUNC GLOBAL DEFAULT 11 __deregister_frame
> 117: 0000000000015e00 534 FUNC GLOBAL DEFAULT 11 _Unwind_Find_FDE
> 118: 00000000000120d1 8 FUNC GLOBAL DEFAULT 11 _Unwind_GetDataRelBase
> 119: 0000000000015cba 284 FUNC GLOBAL DEFAULT 11 __deregister_frame_info_b
> 120: 0000000000005096 19 FUNC GLOBAL DEFAULT 11 elf64_getshdr
> 121: 00000000000120a2 8 FUNC GLOBAL DEFAULT 11 _Unwind_GetLanguageSpecif
> 122: 0000000000013e43 753 FUNC GLOBAL DEFAULT 11 _Unwind_RaiseException
> 123: 0000000000004c98 294 FUNC GLOBAL DEFAULT 11 elf_newscn
> 124: 0000000000014470 421 FUNC GLOBAL DEFAULT 11 _Unwind_Resume_or_Rethrow
> 125: 0000000000005987 402 FUNC GLOBAL DEFAULT 11 _libelf_release_scn
> 126: 0000000000005764 108 FUNC GLOBAL DEFAULT 11 _libelf_init_elf
> 127: 00000000000142d2 414 FUNC GLOBAL DEFAULT 11 _Unwind_Resume
> 128: 0000000000003f03 264 FUNC GLOBAL DEFAULT 11 elf_end
> 129: 0000000000004470 263 FUNC GLOBAL DEFAULT 11 elf_newdata
> 130: 0000000000015dd6 14 FUNC GLOBAL DEFAULT 11 __deregister_frame_info
> 131: 0000000000004097 21 FUNC GLOBAL DEFAULT 11 elf_errno
> ==========
>
>
>
> --
> with best regards,
> Yellow Rabbit @yrabbit at mastodon.sdf.org
> DragonFly 5.5-DEVELOPMENT x86_64
More information about the Users
mailing list