You are not logged in.

#1 2023-02-05 23:29:24

Zod
Member
From: Hoosiertucky
Registered: 2019-03-10
Posts: 631

(resolved) DKMS: nvidia 390.157 rebuild causing xorg to crash

I suspect this, or something like it, is happening to me...

https://bbs.archlinux.org/viewtopic.php?id=252685

I guess I'm wondering if I need to see to it that the kernel is built with the same version of gcc that builds dkms modules?

Packages that were updated just before...

gcc-libs (12.2.1-1 -> 12.2.1-2)
libelf (0.188-2 -> 0.188-3)
binutils (2.40-2 -> 2.40-4)
mpfr (4.2.0-2 -> 4.2.0-3)
gcc (12.2.1-1 -> 12.2.1-2)
libsysprof-capture (3.46.0-3 -> 3.46.0-4)
libtool (2.4.7+4+g1ec8fa28-1 -> 2.4.7+4+g1ec8fa28-2)
libx11 (1.8.3-6 -> 1.8.4-1)
linux-zen (6.1.9.zen1-1 -> 6.1.9.zen1-2)
linux-zen-headers (6.1.9.zen1-1 -> 6.1.9.zen1-2)
xkeyboard-config (2.37-1 -> 2.38-1)
qt5-base (5.15.8+kde+r178-1 -> 5.15.8+kde+r180-1)

This is from the DKMS make.log and I find it to be confusing...

warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (GCC) 12.2.1 20230201
  You are using:           cc (GCC) 12.2.1 20230201

The whole make.log...

http://0x0.st/oCJ2.txt

coredumpctl with backtrace

[jbarks@carlos ~]$ sudo coredumpctl
TIME                           PID  UID  GID SIG     COREFILE EXE                   SIZE
Fri 2023-01-27 11:30:23 EST   1204 1000 1000 SIGSEGV missing  /usr/bin/qbittorrent     -
Fri 2023-01-27 11:36:01 EST   1609 1000 1000 SIGSEGV missing  /usr/bin/qbittorrent     -
Tue 2023-01-31 14:37:43 EST   9018 1000 1000 SIGSEGV missing  /usr/bin/qbittorrent     -
Tue 2023-01-31 20:10:25 EST  17718 1000 1000 SIGSEGV missing  /usr/bin/qbittorrent     -
Tue 2023-01-31 20:14:01 EST   1214 1000 1000 SIGSEGV missing  /usr/bin/qbittorrent     -
Tue 2023-01-31 21:07:37 EST   5293 1000 1000 SIGSEGV missing  /usr/bin/qbittorrent     -
Wed 2023-02-01 13:21:52 EST 303746 1000 1000 SIGSEGV missing  /usr/bin/qbittorrent     -
Wed 2023-02-01 20:22:17 EST   1476 1000 1000 SIGSEGV missing  /usr/bin/qbittorrent     -
Thu 2023-02-02 12:25:53 EST   1373 1000 1000 SIGSEGV missing  /usr/bin/qbittorrent     -
Thu 2023-02-02 15:51:13 EST 202026 1000 1000 SIGSEGV present  /usr/bin/qbittorrent 13.7M
Fri 2023-02-03 13:21:48 EST   3047 1000 1000 SIGSEGV present  /usr/bin/qbittorrent  7.3M
Fri 2023-02-03 17:33:24 EST   1766 1000 1000 SIGSEGV present  /usr/bin/qbittorrent 10.7M
Sat 2023-02-04 16:40:14 EST   3240 1000 1000 SIGSEGV present  /usr/bin/qbittorrent 14.1M
Sun 2023-02-05 08:09:50 EST  53842    0    0 SIGSEGV present  /usr/lib/Xorg         1.1M
Sun 2023-02-05 08:09:53 EST  53853    0    0 SIGSEGV present  /usr/lib/Xorg         1.1M
Sun 2023-02-05 08:09:55 EST  53863    0    0 SIGSEGV present  /usr/lib/Xorg         1.1M
Sun 2023-02-05 08:16:07 EST    896    0    0 SIGSEGV present  /usr/lib/Xorg         1.1M
Sun 2023-02-05 08:16:10 EST   1019    0    0 SIGSEGV present  /usr/lib/Xorg         1.1M
Sun 2023-02-05 08:16:12 EST   1031    0    0 SIGSEGV present  /usr/lib/Xorg         1.1M
Sun 2023-02-05 09:14:26 EST    942    0    0 SIGSEGV present  /usr/lib/Xorg         1.1M
Sun 2023-02-05 09:14:29 EST   1058    0    0 SIGSEGV present  /usr/lib/Xorg         1.1M
Sun 2023-02-05 09:14:31 EST   1068    0    0 SIGSEGV present  /usr/lib/Xorg         1.1M
Sun 2023-02-05 13:46:54 EST    882    0    0 SIGSEGV present  /usr/lib/Xorg         1.1M
Sun 2023-02-05 13:46:56 EST    975    0    0 SIGSEGV present  /usr/lib/Xorg         1.1M
Sun 2023-02-05 13:46:59 EST   1026    0    0 SIGSEGV present  /usr/lib/Xorg         1.1M
[jbarks@carlos ~]$ sudo coredumpctl gdb
           PID: 1026 (Xorg)
           UID: 0 (root)
           GID: 0 (root)
        Signal: 11 (SEGV)
     Timestamp: Sun 2023-02-05 13:46:59 EST (4h 45min ago)
  Command Line: /usr/lib/Xorg -nolisten tcp -background none -seat seat0 vt1 -auth /var/run/sddm/{c35ee7c4-f4e0-492d-b50b-ef7aff2bff37} -noreset -displayfd 17
    Executable: /usr/lib/Xorg
 Control Group: /system.slice/sddm.service
          Unit: sddm.service
         Slice: system.slice
       Boot ID: b3b9589480814ece99bd738698def8e1
    Machine ID: 6921af50c76f4fe085743a89d82f8b05
      Hostname: carlos.home
       Storage: /var/lib/systemd/coredump/core.Xorg.0.b3b9589480814ece99bd738698def8e1.1026.1675622819000000.zst (present)
  Size on Disk: 1.1M
       Message: Process 1026 (Xorg) of user 0 dumped core.
                
                Module nvidia_drv.so without build-id.
                Module libnvidia-glcore.so.390.157 without build-id.
                Module libnvidia-tls.so.390.157 without build-id.
                Module libglx.so without build-id.
                Stack trace of thread 1026:
                #0  0x00007fa189fc3c58 n/a (libc.so.6 + 0x52c58)
                #1  0x00007fa189fca625 n/a (libc.so.6 + 0x59625)
                #2  0x00007fa189fcb2a2 n/a (libc.so.6 + 0x5a2a2)
                #3  0x00007fa18a0871d3 __fprintf_chk (libc.so.6 + 0x1161d3)
                #4  0x000055ceb3e32481 n/a (Xorg + 0x152481)
                #5  0x000055ceb3e32539 LogVMessageVerbSigSafe (Xorg + 0x152539)
                #6  0x000055ceb3e3712a ErrorFSigSafe (Xorg + 0x15712a)
                #7  0x000055ceb3e2c35a xorg_backtrace (Xorg + 0x14c35a)
                #8  0x000055ceb3e3753d n/a (Xorg + 0x15753d)
                #9  0x00007fa189fa9f50 n/a (libc.so.6 + 0x38f50)
                #10 0x00007fa18a006998 malloc (libc.so.6 + 0x95998)
                #11 0x000055ceb3d5e7ca AddCallback (Xorg + 0x7e7ca)
                #12 0x00007fa189046155 n/a (libglx.so + 0xa46155)
                ELF object binary architecture: AMD x86-64

GNU gdb (GDB) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://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 /usr/lib/Xorg...

This GDB supports auto-downloading debuginfo from the following URLs:
https://debuginfod.archlinux.org/
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
Reading symbols from /root/.cache/debuginfod_client/0dd6c9c4f63e01ac1fac4947b81776825cd6d745/debuginfo...

warning: Can't open file /dev/nvidiactl during file-backed mapping note processing

warning: Can't open file /dev/nvidia0 during file-backed mapping note processing
[New LWP 1026]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/usr/lib/Xorg -nolisten tcp -background none -seat seat0 vt1 -auth /var/run/sdd'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  _nl_lookup (item=65537, category=1, l=0x0) at ../include/../locale/localeinfo.h:331
331       return l->__locales[category]->values[_NL_ITEM_INDEX (item)].string;
(gdb) bt full
#0  _nl_lookup (item=65537, category=1, l=0x0) at ../include/../locale/localeinfo.h:331
No locals.
#1  __printf_fp_l_buffer (buf=0x7ffc85ac85e0, loc=0x0, info=0x7ffc85ac8130, args=0x7ffc85ac8118)
    at printf_fp.c:1111
        tmp = {base = {write_base = 0x0, write_ptr = 0x0, write_end = 0x0, written = 0, 
            mode = __printf_buffer_mode_failed}, thousands_sep = 0x0, decimal = 0x0, 
          decimal_point_bytes = 0 '\000', thousands_sep_length = 0 '\000', next = 0x0, ctype = 0x0, 
          untranslated = '\000' <repeats 63 times>}
#2  0x00007fa189fca625 in __printf_fp_spec (args=0x7ffc85ac8118, info=0x7ffc85ac8130, 
    target=0x7ffc85ac85e0) at vfprintf-internal.c:266
No locals.
#3  __printf_buffer (buf=buf@entry=0x7ffc85ac85e0, format=format@entry=0x55ceb3ed786c "[%10.3f] ", 
    ap=ap@entry=0x7ffc85ac86e0, mode_flags=mode_flags@entry=2) at vfprintf-internal.c:943
        info = {prec = 3, width = 10, spec = 102 L'f', is_long_double = 0, is_short = 0, is_long = 0, 
          alt = 0, space = 0, left = 0, showsign = 0, group = 0, extra = 0, is_char = 0, wide = 0, 
          i18n = 0, is_binary128 = 0, __pad = 0, user = 0, pad = 32 L' '}
        ptr = 0x7ffc85ac8120
        step0_jumps = {0, 1574, 1174, 3142, 3046, 2166, 2054, 2678, 2934, 1414, 2582, 2382, 2278, 3782, 
          3342, 1526, 3510, 3382, 3542, 422, 1270, 1038, 3686, 3246, 3574, 790, 426, 318, 322, 2838, 
          1630}
        space = 0
        is_short = 0
        use_outdigits = <optimized out>
        step1_jumps = {0, 0, 0, 0, 0, 0, 0, 0, 0, 1414, 2582, 2382, 2278, 3782, 3342, 1526, 3510, 3382, 
          3542, 422, 1270, 1038, 3686, 3246, 3574, 790, 426, 318, 322, 0, 1630}
        group = 0
        prec = <optimized out>
        step2_jumps = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2582, 2382, 2278, 3782, 3342, 1526, 3510, 3382, 
          3542, 422, 1270, 1038, 3686, 3246, 3574, 790, 426, 318, 322, 0, 1630}
        string = <optimized out>
        left = 0
        is_long_double = <optimized out>
        width = 10
        step3a_jumps = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2478, 0, 0, 0, 3342, 1526, 3510, 3382, 3542, 0, 
          0, 0, 0, 3246, 0, 0, 0, 0, 0, 0, 1630}
        alt = 0
        showsign = 0
        is_long = <optimized out>
        is_char = 0
        pad = 32 ' '
        step3b_jumps = {0 <repeats 11 times>, 2278, 0, 0, 3342, 1526, 3510, 3382, 3542, 422, 1270, 
          1038, 3686, 3246, 3574, 790, 426, 0, 0, 0, 1630}
        step4_jumps = {0 <repeats 14 times>, 3342, 1526, 3510, 3382, 3542, 422, 1270, 1038, 3686, 3246, 
       workend = 0x7ffc85ac8568 ""
        ap_save = {{gp_offset = 24, fp_offset = 48, overflow_arg_area = 0x7ffc85ac87c0, reg_save_area = 0x7ffc85ac8700}}
        nspecs_done = 0
        save_errno = 1397575748
        readonly_format = 0
        do_longlong_number = <optimized out>
#4  0x00007fa189fcb2a2 in __vfprintf_internal (s=0x55ceb4357e50, format=0x55ceb3ed786c "[%10.3f] ", ap=ap@entry=0x7ffc85ac86e0, mode_flags=mode_flags@entry=2) at vfprintf-internal.c:1459
        wrap = {base = {write_base = 0x7ffc85ac8610 "[", write_ptr = 0x7ffc85ac8611 "", write_end = 0x7ffc85ac8690 "", written = 0, mode = __printf_buffer_mode_to_file}, fp = 0x55ceb4357e50, stage = "[", '\000' <repeats 126 times>}
        done = <optimized out>
        __result = <optimized out>
#5  0x00007fa18a0871d3 in ___fprintf_chk (fp=fp@entry=0x55ceb4357e50, flag=flag@entry=1, format=format@entry=0x55ceb3ed786c "[%10.3f] ") at fprintf_chk.c:33
        mode = 2
        ap = {{gp_offset = 24, fp_offset = 64, overflow_arg_area = 0x7ffc85ac87c0, reg_save_area = 0x7ffc85ac8700}}
        ret = <optimized out>
#6  0x000055ceb3e32481 in fprintf (__fmt=<optimized out>, __stream=<optimized out>, __stream=<optimized out>, __fmt=<optimized out>) at /usr/include/bits/stdio2.h:79
No locals.
#7  LogSWrite (verb=verb@entry=-1, buf=buf@entry=0x55ceb3ed775f "(EE)", len=4, end_line=end_line@entry=0) at ../xorg-server-21.1.6/os/log.c:616
        ret = <optimized out>
        newline = 1
#8  0x000055ceb3e32539 in LogVMessageVerbSigSafe (type=type@entry=X_ERROR, verb=verb@entry=-1, format=0x55ceb3ed32e1 "\n", args=args@entry=0x7ffc85ac8c30) at ../xorg-server-21.1.6/os/log.c:181
        type_str = 0x55ceb3ed775f "(EE)"
        buf = "\000\211\254\205\374\177\000\000\250\262W\212\241\177\000\000\n", '\000' <repeats 15 times>, "\001", '\000' <repeats 15 times>, "\001\000\000\000\000\000\000\000\300RZ\212\241\177\000\000x\210\254\205\374\177\000\000\200\210\254\205\374\177\000\000HVZ\212\241\177", '\000' <repeats 34 times>, "\001", '\000' <repeats 15 times>, "\377\377\377\377\000\000\000\000XJ\"\212\241\177\000\000@_5\212\241\177", '\000' <repeats 36 times>, "\b\000\020\000\030\000"...
        len = <optimized out>
        newline = <optimized out>
#9  0x000055ceb3e3712a in VErrorFSigSafe (args=0x7ffc85ac8c30, f=<optimized out>) at ../xorg-server-21.1.6/os/log.c:1049
No locals.
#10 ErrorFSigSafe (f=<optimized out>) at ../xorg-server-21.1.6/os/log.c:1058
        args = {{gp_offset = 8, fp_offset = 48, overflow_arg_area = 0x7ffc85ac8d10, reg_save_area = 0x7ffc85ac8c50}}
#11 0x000055ceb3e2c35a in xorg_backtrace () at ../xorg-server-21.1.6/os/backtrace.c:71
        cursor = {opaque = {140722551164560, 140331784020448, 140722551164176, 94346269606689, 0, 206158430224, 140722551168224, 140720308486144, 140722551164704, 0, 140722551164696, 0, 140722551164712, 0, 1407
22551164688, 0, 140722551164672, 0, 140722551164664, 0, 140722551164680, 0, 140722551164720, 0, 140722551164600, 0, 140722551164608, 0, 140722551164616, 0, 140722551164624, 0, 140722551164632, 0, 140722551164640, 0, 140722551164648, 0, 140722551164656, 0, 140722551164728, 0, 94346275212786, 49, 0, 0, 1, 0, 1, 94346275222048, 2242679864, 0, 94343251623936, 140331704139040, 94346275222960, 0, 0, 2178980088, 140722551166272, 140331787465384, 0, 0, 1, 0, 1, 140331781644333, 140722551166136, 94346275028560, 140331783054368, 140722551166400, 2664, 140331781641168, 1, 94346275028560, 13, 140722551166400, 13, 13, 5, 140331781646177, 94346275352128, 140722551166352, 13, 140331783054368, 2, 140722551166352, 5, 140331781461769, 1, 94346275028560, 140722551166352, 94346270308460, 140722551166608, 140331781461956, 94346275028560, 140331781501610, 94346275358088, 94346275028560, 140722551166416, 94346270308460, 140722551166672, 140331781461956, 140722551166400, 140722551166400, 140722551166528, 13, 140329466462212, 94346275028560, 3329344436627841115, 139776979579190, 140331766949951, 140722551168000, 94346270258228, 140722551166896, 0, 140331781633550, 140722551166896, 140722551166901, 140722551167920, 0, 94343251623938, 140722551166960, 0, 140331781633550, 140722551166960, 2957178430080511488, 140722551167984}}
        context = {uc_flags = 3, uc_link = 0x20, uc_stack = {ss_sp = 0x6600000000, ss_flags = 1, ss_size = 140722551164368}, uc_mcontext = {gregs = {120, 94346270764528, 1, 140722551164320, 140722551164560, 94346270258228, 94346270764664, 0, 140722551164560, 140722551166960, 140722551166960, 11, 140722551166656, 0, 94346275226160, 140722551164176, 94346269606689, 0, 140331781471380, 0, 140722551166352, 140722551164864, 140722551164864}, fpregs = 0xffff0000ffff037f, __reserved1 = {4294967295, 0, 140329466470272, 94346270376491, 140331782798835, 140331782806357, 140722551128064, 94346270376515}}, uc_sigmask = {__val = {0, 0, 0, 0, 140331782798835, 140331782806357, 0, 0, 206158430232, 140722551167568, 2957178430080511488, 0, 140331781462057, 94346270308464, 140722551166352, 94346270308469}}, __fpregs_mem = {cwd = 36720, swd = 34220, ftw = 32764, fop = 0, rip = 0, rdp = 140331781494461, mxcsr = 2244877549, mxcr_mask = 32673, _st = {{significand = {6185, 35324, 0, 0}, exponent = 10, __glibc_reserved1 = {0, 0, 0}}, {significand = {38176, 34220, 0, 0}, exponent = 0, __glibc_reserved1 = {0, 0, 0}}, {significand = {1, 0, 0, 0}, exponent = 0, __glibc_reserved1 = {0, 0, 0}}, {significand = {38589, 35324, 2, 0}, exponent = 0, __glibc_reserved1 = {0, 0, 0}}, {significand = {0, 0, 0, 0}, exponent = 30828, __glibc_reserved1 = {46061, 21966, 0}}, {significand = {30829, 46061, 21966, 0}, exponent = 65535, __glibc_reserved1 = {65535, 65535, 65535}}, {significand = {1, 0, 0, 0}, exponent = 30837, __glibc_reserved1 = {46061, 21966, 0}}, {significand = {37072, 34220, 32764, 0}, exponent = 53477, __glibc_reserved1 = {56098, 20217, 16459}}}, _xmm = {{element = {3018684536, 21966, 3, 10}}, {element = {102, 0, 32, 4294967295}}, {element = {1, 0, 0, 0}}, {element = {24, 48, 2242680688, 32764}}, {element = {2242680496, 32764, 3, 10}}, {element = {102, 2, 0, 0}}, {element = {2315183969, 0, 3018684534, 21966}}, {element = {3018684534, 21966, 4294967295, 4294967295}}, {element = {1, 0, 3018684537, 21966}}, {element = {2242679280, 2, 0, 0}}, {element = {2314999561, 32673, 3018684534, 21966}}, {element = {3018684534, 21966, 4294967295, 4294967295}}, {element = {2314999849, 32673, 3018684537, 21966}}, {element = {2242680544, 32764, 2300487766, 32673}}, {element = {2242681856, 32764, 5, 0}}, {element = {2315031370, 32673, 0, 0}}}, __glibc_reserved1 = {2314999849, 32673, 2316963632, 32673, 2242680608, 32764, 3018634318, 21966, 3018634317, 21966, 4294967293, 0, 2315032253, 2, 2819, 0, 2314762200, 0, 2300487743, 32673, 2300487766, 32673, 0, 32512}}, __ssp = {1, 140331766949974, 8589934602, 0}}
        ip = 140722551166352
        off = 140722551164736
        pip = {start_ip = 140722551164736, end_ip = 140722551166352, lsda = 140722551164264, handler = 140331781466044, gp = 3977019518017179048, flags = 140331781464356, format = 0, unwind_info_size = -1610612736, unwind_info = 0x0, extra = {unused = -128 '\200'}}
        ret = 0
        i = 0
        procname = "\250\215\254\205\374\177\000\000\274'\374\211\241\177\000\000\t", '\000' <repeats 22 times>, "\240\000\000\000\000\000\000\000\000yx\355\263\316U\000\000`\223\254\205\374\177\000\000\000\000hH\377\377\377?\006\000\000\000\000\000\000\000\t", '\000' <repeats 15 times>, "vx\355\263\316U\000\000?#\374\211\241\177\000\000'x\357\263\001\000\000\000f\000\000\000\n\000\000\000\240\243\024\212\241\177\000\000\377\377\377\177\001\000\000\000`\215\254\205\374\177\000\000\002\000\000\000\000\000\000\000\000\000.\000.\000\000\000b\215\254\205\374\177\000\000\003\000\000\000\000\000\000\000\340\220\254\205\374\177\000\000\003\000\000\000\241\177\000\000"...
        filename = <optimized out>
        dlinfo = {dli_fname = 0x7ffc85ac8d68 "$!\374\211\241\177", dli_fbase = 0x7fa189fc1829 <__printf_buffer_write+73>, dli_sname = 0x7ffc85ac8ea0 "", dli_saddr = 0x6}
#12 0x000055ceb3e3753d in OsSigHandler (unused=<optimized out>, sip=0x7ffc85ac97f0, signo=11) at ../xorg-server-21.1.6/os/osinit.c:135
No locals.
#13 OsSigHandler (signo=11, sip=0x7ffc85ac97f0, unused=<optimized out>) at ../xorg-server-21.1.6/os/osinit.c:110
No locals.
#14 <signal handler called>
No locals.
#15 0x00007fa18a006998 in __GI___libc_malloc (bytes=bytes@entry=32) at malloc.c:3287
        ar_ptr = <optimized out>
        victim = <optimized out>
        tbytes = <optimized out>
        tc_idx = <optimized out>
        __PRETTY_FUNCTION__ = "__libc_malloc"
#16 0x000055ceb3d5e7ca in _AddCallback (data=0x0, callback=0x7fa189045ca0, pcbl=0x55ceb3f7d690 <ClientStateCallback>) at ../xorg-server-21.1.6/dix/dixutils.c:697
        cbr = <optimized out>
#17 AddCallback (pcbl=0x55ceb3f7d690 <ClientStateCallback>, callback=0x7fa189045ca0, data=0x0) at ../xorg-server-21.1.6/dix/dixutils.c:856
No locals.
#18 0x00007fa189046155 in ?? () from /usr/lib/nvidia/xorg/libglx.so
No symbol table info available.
#19 0x00000000c1d00052 in ?? ()
No symbol table info available.
#20 0x00007fa189041e4c in ?? () from /usr/lib/nvidia/xorg/libglx.so
No symbol table info available.
#21 0x000055ceb3f46e78 in screenInfo ()
No symbol table info available.
#22 0x000055ceb3d86207 in CreateNewResourceType (deleteFunc=0x2d0, name=0x7fa18964d018 "\300dس\316U") at ../xorg-server-21.1.6/dix/resource.c:526
        next = 3251634258
        types = <optimized out>
#23 0x000055ceb4449110 in ?? ()
No symbol table info available.
#24 0x000000000000001e in ?? ()
No symbol table info available.
#25 0x000055ceb3d2ada9 in InitExtensions (argc=<optimized out>, argv=<optimized out>) at ../xorg-server-21.1.6/mi/miinitext.c:272
        i = 0
        ext = 0x55ceb4449000
#26 0x000055ceb3d1deda in dix_main (envp=<optimized out>, argv=0x7ffc85ac9f58, argc=13) at ../xorg-server-21.1.6/dix/main.c:194
        i = <optimized out>
        alwaysCheckForInput = {0, 1}
        i = <optimized out>
        alwaysCheckForInput = <optimized out>
        pScreen = <optimized out>
        pScreen = <optimized out>
        remember_it = <optimized out>
        pScreen = <optimized out>
#27 main (argc=13, argv=0x7ffc85ac9f58, envp=<optimized out>) at ../xorg-server-21.1.6/dix/stubmain.c:34
No locals.
(gdb) 

Edit: After the initial system update and DKMS builds were done I manually rebuilt the initramfs and grub.cfg.
When that didn't help I removed nvidia from dkms, uninstalled nvidia from my system and configured it for nouveau.

I downgraded the kernel and headers, git cloned nvidia-390xx-utils, built and installed it,  edited /etc/default/grub and /etc/mkinitcpio.conf, rebuilt the initramfs and grub.cfg all with the same result.

The one thing I haven't tried is to disable testing in pacman.conf and downgrade with pacman -Syuu to back out gcc from testing.

Last edited by Zod (2023-02-06 23:10:29)

Offline

#2 2023-02-06 08:48:33

seth
Member
Registered: 2012-09-03
Posts: 58,873

Re: (resolved) DKMS: nvidia 390.157 rebuild causing xorg to crash

This is between the X11 server and /usr/lib/nvidia/xorg/libglx.so which is provided by nvidia-390xx-utils and binary only.

  The kernel was built by: gcc (GCC) 12.2.1 20230201
  You are using:           cc (GCC) 12.2.1 20230201
realpath /usr/bin/cc

Same.

I'd look at libx11 because xorg-server was built against an older version.

Offline

#3 2023-02-06 15:11:43

Filip62
Member
From: Slovakia
Registered: 2020-10-24
Posts: 36

Re: (resolved) DKMS: nvidia 390.157 rebuild causing xorg to crash

Hi!

I don't have the testing repo enabled.

What I do have, is the same Xorg crash backtrace after I updated my system today.

It can be avoided by NOT updating glibc from 2.36-7 to 2.37-2.

My gcc version now is 12.2.1-2 (although that's not the problem, like seth mentioned already), and without the glibc update, everything works.

nvidia-390xx-dkms version 390.157-1.

I am not sure what is at fault here exactly.

Last edited by Filip62 (2023-02-06 15:20:23)

Offline

#4 2023-02-06 15:32:30

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,098

Re: (resolved) DKMS: nvidia 390.157 rebuild causing xorg to crash

Logs?

Not updating glibc is not a solution in any way. As things get rebuilt against the new version, more and more things will stop working.

Offline

#5 2023-02-06 15:38:42

seth
Member
Registered: 2012-09-03
Posts: 58,873

Re: (resolved) DKMS: nvidia 390.157 rebuild causing xorg to crash

So it's actually the malloc, but that seems to come from Xorg which hasn't been updated since last december.

Fwwi, a similar pattern shows up in https://forums.developer.nvidia.com/t/3 … t/53121/32
Sanity check:

ldd /usr/lib/nvidia/xorg/libglx.so
ls -lR /usr/lib*/tls

Offline

#6 2023-02-06 16:12:05

Filip62
Member
From: Slovakia
Registered: 2020-10-24
Posts: 36

Re: (resolved) DKMS: nvidia 390.157 rebuild causing xorg to crash

Here are the commands and log snippet.

If you want to see more, please let me know what.

$ ldd /usr/lib/nvidia/xorg/libglx.so
	linux-vdso.so.1 (0x00007ffc657d3000)
	libnvidia-tls.so.390.157 => /usr/lib/tls/libnvidia-tls.so.390.157 (0x00007f261dc00000)
	libnvidia-glcore.so.390.157 => /usr/lib/libnvidia-glcore.so.390.157 (0x00007f261bc00000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007f261de19000)
	libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f261f10c000)
	libm.so.6 => /usr/lib/libm.so.6 (0x00007f261db18000)
	/usr/lib64/ld-linux-x86-64.so.2 (0x00007f261f13f000)
$ ls -lR /usr/lib*/tls
/usr/lib64/tls:
lrwxrwxrwx  24 root 14 dec  2022 libnvidia-tls.so -> libnvidia-tls.so.390.157
.rwxr-xr-x 14k root 14 dec  2022 libnvidia-tls.so.390.157

/usr/lib/tls:
lrwxrwxrwx  24 root 14 dec  2022 libnvidia-tls.so -> libnvidia-tls.so.390.157
.rwxr-xr-x 14k root 14 dec  2022 libnvidia-tls.so.390.157

journalctl snippet:

feb 06 15:48:24 maadcity systemd-coredump[603]: [?] Process 566 (Xorg) of user 0 dumped core.
                                                
                                                Module nvidia_drv.so without build-id.
                                                Module libnvidia-glcore.so.390.157 without build-id.
                                                Module libnvidia-tls.so.390.157 without build-id.
                                                Module libglx.so without build-id.
                                                Stack trace of thread 566:
                                                #0  0x00007f4f9e5c9c58 n/a (libc.so.6 + 0x52c58)
                                                #1  0x00007f4f9e5d0625 n/a (libc.so.6 + 0x59625)
                                                #2  0x00007f4f9e5d12a2 n/a (libc.so.6 + 0x5a2a2)
                                                #3  0x00007f4f9e68d1d3 __fprintf_chk (libc.so.6 + 0x1161d3)
                                                #4  0x0000556962509481 n/a (Xorg + 0x152481)
                                                #5  0x0000556962509539 LogVMessageVerbSigSafe (Xorg + 0x152539)
                                                #6  0x000055696250e12a ErrorFSigSafe (Xorg + 0x15712a)
                                                #7  0x000055696250335a xorg_backtrace (Xorg + 0x14c35a)
                                                #8  0x000055696250e53d n/a (Xorg + 0x15753d)
                                                #9  0x00007f4f9e5aff50 n/a (libc.so.6 + 0x38f50)
                                                #10 0x00007f4f9e60c998 malloc (libc.so.6 + 0x95998)
                                                #11 0x00005569624357ca AddCallback (Xorg + 0x7e7ca)
                                                #12 0x00007f4f9d646155 n/a (libglx.so + 0xa46155)
                                                ELF object binary architecture: AMD x86-64
feb 06 15:48:24 maadcity systemd[1]: systemd-coredump@0-602-0.service: Deactivated successfully.

Offline

#7 2023-02-06 17:50:10

Zod
Member
From: Hoosiertucky
Registered: 2019-03-10
Posts: 631

Re: (resolved) DKMS: nvidia 390.157 rebuild causing xorg to crash

First thing this am, I checked for updates and 6.1.10-zen was available so I updated to that and tested nvidia, didn't help.

I rebuilt libx11, didn't help.

I am currently building linux-zen 6.1.10 because I must.

Offline

#8 2023-02-06 17:55:00

Zod
Member
From: Hoosiertucky
Registered: 2019-03-10
Posts: 631

Re: (resolved) DKMS: nvidia 390.157 rebuild causing xorg to crash

First thing this am, I checked for updates and 6.1.10-zen was available so I updated to that and tested nvidia, didn't help.

I rebuilt libx11, didn't help.

I am currently building linux-zen 6.1.10 because I must.

Edit: Double post, damn tablet

Last edited by Zod (2023-02-06 17:56:32)

Offline

#9 2023-02-06 21:08:34

seth
Member
Registered: 2012-09-03
Posts: 58,873

Re: (resolved) DKMS: nvidia 390.157 rebuild causing xorg to crash

I am currently building linux-zen 6.1.10 because I must.

?
If you can confirm https://bbs.archlinux.org/viewtopic.php … 8#p2083308 you can stop playing w/ the kernel.
But since https://bbs.archlinux.org/viewtopic.php … 7#p2083317 shows that the proper TLS libraries are linked it's not like the much older thread on the nvidia forum

Unless this is a bug in glibc, there'll be no other solution but to nudge on https://forums.developer.nvidia.com/c/g … /linux/148 to provide a driver update release.
Until then you'd have to stall all updates to stay the working glibc (as Scimmia pointed out: stalling only glibc is a really bad idea)

What you can reasonably try instead of building libx11 (which was just updated) would be to rebuild xorg-server against the new glibc.
But I'd not hold my breath for that either.

Offline

#10 2023-02-06 21:56:37

salty9
Member
Registered: 2022-02-06
Posts: 8

Re: (resolved) DKMS: nvidia 390.157 rebuild causing xorg to crash

Same issue on both linux-lts and linux-zen. Downgrading glibc and xorg works.

Offline

#11 2023-02-06 23:05:42

Zod
Member
From: Hoosiertucky
Registered: 2019-03-10
Posts: 631

Re: (resolved) DKMS: nvidia 390.157 rebuild causing xorg to crash

Ok, I'm done playing with the kernel..it didn't help. (I never would have been satisfied if I had not tried)

I did build xorg-server against glibc 2.37-2..same result.

So, I guess barring intervention by Nvidia, 390xx is at the end of the line.

Offline

#12 2023-02-07 07:18:15

seth
Member
Registered: 2012-09-03
Posts: 58,873

Re: (resolved) DKMS: nvidia 390.157 rebuild causing xorg to crash

https://nvidia.custhelp.com/app/answers … /a_id/3142

The Linux 390.* legacy driver series is the last to support GF1xx ("Fermi") GPUs. Support for new Linux kernels and X servers, as well as fixes for critical bugs, will be included in 390.* legacy releases through the end of 2022.

So unless this is a regression/bug in glibc ( see eg. https://github.com/archlinux/svntogit-p … be93038b94 ) or nvidia provides an unsupported rebuild… seems so sad

Offline

#13 2023-02-07 08:03:46

artemklevtsov
Member
Registered: 2015-08-24
Posts: 5

Re: (resolved) DKMS: nvidia 390.157 rebuild causing xorg to crash

The same issue. Downgrade to glibc-2.36-7 solve the problem.

Offline

#14 2023-02-07 17:25:31

Piezoid
Member
Registered: 2017-12-04
Posts: 5

Re: (resolved) DKMS: nvidia 390.157 rebuild causing xorg to crash

Same issues, downgrading to glibc-2.36-7 solved it too.

After logging in KDE, I reverted back to glibc-2.37-2 and found that some kde applications failed to start with:

*** stack smashing detected ***: terminated

The application initializes a context with QOpenGLContext::create(). When libglvnd dlopen()s libGLX_nvidia.so.0, dlopen_implementation somehow fails and calls _dlerror_run(). When _dlerror_run returns, the stack protection triggers.

Maybe the malloc issue when initializing Xorg is another instance of such effects at a distance.

Full backtrace:

#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007f500c2a0953 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007f500c251ea8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007f500c23b53d in __GI_abort () at abort.c:79
#4  0x00007f500c23c29e in __libc_message (fmt=fmt@entry=0x7f500c3b3535 "*** %s ***: terminated\n") at ../sysdeps/posix/libc_fatal.c:150
#5  0x00007f500c330c5b in __GI___fortify_fail (msg=msg@entry=0x7f500c3b351d "stack smashing detected") at fortify_fail.c:24
#6  0x00007f500c330c36 in __stack_chk_fail () at stack_chk_fail.c:24
#7  0x00007f500c29a8c7 in _dlerror_run (operate=operate@entry=0x7f500c29ac30 <dlopen_doit>, args=args@entry=0x7ffefb7041f0) at dlerror.c:198
#8  0x00007f500c29ad41 in dlopen_implementation (dl_caller=<optimized out>, mode=<optimized out>, file=<optimized out>) at dlopen.c:71
#9  ___dlopen (file=<optimized out>, mode=<optimized out>) at dlopen.c:81
#10 0x00007f500bb9fb3d in __glXLookupVendorByName (vendorName=0x7f4ffc006f20 "nvidia") at ../libglvnd-v1.6.0/src/GLX/libglxmapping.c:428
#11 0x00007f500bba2375 in __glXLookupVendorByScreen (dpy=dpy@entry=0x55fcdffc8d70, screen=screen@entry=0) at ../libglvnd-v1.6.0/src/GLX/libglxmapping.c:572
#12 0x00007f500bba31ac in __glXGetDynDispatch (screen=0, dpy=0x55fcdffc8d70) at ../libglvnd-v1.6.0/src/GLX/libglxmapping.c:606
#13 glXChooseFBConfig (dpy=0x55fcdffc8d70, screen=0, attrib_list=0x55fce00b9e98, nelements=0x7ffefb7043b0) at ../libglvnd-v1.6.0/src/GLX/libglx.c:1484
#14 0x00007f50012b4098 in qglx_findConfig(_XDisplay*, int, QSurfaceFormat, bool, int, int) (display=0x55fcdffc8d70, screen=0, format=..., flags=flags@entry=0, drawableBit=1, highestPixelFormat=false)
    at ../../../../../platformsupport/glxconvenience/qglxconvenience.cpp:202
#15 0x00007f50012b4e04 in QGLXContext::init(QXcbScreen*, QPlatformOpenGLContext*) (share=0x0, screen=0x55fcdffe1b90, this=0x55fce00bde00)
    at /usr/src/debug/qt5-base/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp:255
#16 QGLXContext::QGLXContext(QXcbScreen*, QSurfaceFormat const&, QPlatformOpenGLContext*, QVariant const&) (nativeHandle=..., share=0x0, format=..., screen=0x55fcdffe1b90, this=0x55fce00bde00)
    at /usr/src/debug/qt5-base/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp:236
#17 QXcbGlxIntegration::createPlatformOpenGLContext(QOpenGLContext*) const (this=<optimized out>, context=0x7ffefb7045f0)
    at /usr/src/debug/qt5-base/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp:197
#18 0x00007f500cf83ee3 in QOpenGLContext::create() (this=this@entry=0x7ffefb7045f0) at kernel/qopenglcontext.cpp:612
#19 0x00007f500813c191 in checkBackend (checkContext=...) at /usr/src/debug/plasma-integration/plasma-integration-5.26.5/src/platformtheme/qtquickrenderersettings.cpp:43
#20 initializeRendererSessions() () at /usr/src/debug/plasma-integration/plasma-integration-5.26.5/src/platformtheme/qtquickrenderersettings.cpp:79
#21 initializeRendererSessions() () at /usr/src/debug/plasma-integration/plasma-integration-5.26.5/src/platformtheme/qtquickrenderersettings.cpp:52
#22 0x00007f500ca933ff in qt_call_pre_routines () at kernel/qcoreapplication.cpp:317
#23 QCoreApplicationPrivate::init() (this=this@entry=0x55fcdffb5340) at kernel/qcoreapplication.cpp:849
#24 0x00007f500cf3d049 in QGuiApplicationPrivate::init() (this=this@entry=0x55fcdffb5340) at kernel/qguiapplication.cpp:1530
#25 0x00007f500d775e0e in QApplicationPrivate::init() (this=0x55fcdffb5340) at kernel/qapplication.cpp:513
#26 0x000055fcdfb97333 in  ()
#27 0x00007f500c23c790 in __libc_start_call_main (main=main@entry=0x55fcdfb96cc0, argc=argc@entry=1, argv=argv@entry=0x7ffefb704a88) at ../sysdeps/nptl/libc_start_call_main.h:58
#28 0x00007f500c23c84a in __libc_start_main_impl (main=0x55fcdfb96cc0, argc=1, argv=0x7ffefb704a88, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffefb704a78)
    at ../csu/libc-start.c:360
#29 0x000055fcdfb98785 in  ()

edit: minimal reproduction:

#include <stddef.h>
#include <dlfcn.h>
int main() {
    void* handle = dlopen("libGLX_nvidia.so.0", RTLD_LAZY);
    return handle != NULL ? 0 : 1;
}
[glibc's abort frames]
#6  0x00007ffff7eacc36 in __stack_chk_fail () at stack_chk_fail.c:24
#7  0x00007ffff7e168c7 in _dlerror_run (operate=operate@entry=0x7ffff7e16c30 <dlopen_doit>, 
    args=args@entry=0x7fffffffd0f0) at dlerror.c:198
#8  0x00007ffff7e16d41 in dlopen_implementation (dl_caller=<optimized out>, mode=<optimized out>, 
    file=<optimized out>) at dlopen.c:71
#9  ___dlopen (file=<optimized out>, mode=<optimized out>) at dlopen.c:81
#10 0x0000555555555155 in main ()

For going further I'll have to build glibc with debug symbols and sanitizer.

Last edited by Piezoid (2023-02-07 19:45:42)

Offline

#15 2023-02-07 20:09:13

esbf
Member
Registered: 2023-02-07
Posts: 1

Re: (resolved) DKMS: nvidia 390.157 rebuild causing xorg to crash

Hi,

I was having GLX (OpenGL) errors with gzdoom and chromium which led me to this thread and I can confirm that

sudo downgrade glibc lib32-glibc

to 2.36-7, fixes it (with the integrated intel HD 4600 card)

I'm on

kernel 5.15.91-4-lts

with a Intel i7 with nvidia GTX 870M hybrid bumblebee laptop that is not working for some time now

(last time the dedicated GPU worked was last year and I'm sure it was fried by Manjaro piece of crap mhwd driver update to 470xx, when playing some nice Ashes Afterglow, I got stuttering and the system hanged on me with artefacts on screen, temps through the roof, nvidia GPU still appears fine with

primusrun nvidia-smi

, but never worked again. maybe it is fried maybe it is too old and unsupported, sadly...)

well , if someone finds this by

GLX is not present.

error, try the downgrade...

Offline

#16 2023-02-07 22:29:59

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,098

Re: (resolved) DKMS: nvidia 390.157 rebuild causing xorg to crash

Please don't tell people to downgrade glibc. Doing that pretty much freezing the system and never doing any more updates.

Offline

#17 2023-02-08 06:30:37

salty9
Member
Registered: 2022-02-06
Posts: 8

Re: (resolved) DKMS: nvidia 390.157 rebuild causing xorg to crash

Scimmia wrote:

Please don't tell people to downgrade glibc. Doing that pretty much freezing the system and never doing any more updates.

What else is there to do (until someone probably fixes this)? X not starting basically renders the desktop unusable, and for many moving to Wayland isn't really an option.

Offline

#18 2023-02-08 07:01:43

seth
Member
Registered: 2012-09-03
Posts: 58,873

Re: (resolved) DKMS: nvidia 390.157 rebuild causing xorg to crash

seth wrote:

https://nvidia.custhelp.com/app/answers … /a_id/3142

The Linux 390.* legacy driver series is the last to support GF1xx ("Fermi") GPUs. Support for new Linux kernels and X servers, as well as fixes for critical bugs, will be included in 390.* legacy releases through the end of 2022.

So unless this is a regression/bug in glibc ( see eg. https://github.com/archlinux/svntogit-p … be93038b94 ) or nvidia provides an unsupported rebuild… seems so sad

seth wrote:

Unless this is a bug in glibc, there'll be no other solution but to nudge on https://forums.developer.nvidia.com/c/g … /linux/148 to provide a driver update release.
Until then you'd have to stall all updates to stay the working glibc (as Scimmia pointed out: stalling only glibc is a really bad idea)

Downgrading or staying glibc in isolation is a recipe for disaster and the worst most dumb possible course of action.

Offline

#19 2023-02-08 09:19:06

drankinatty
Member
From: Nacogdoches, Texas
Registered: 2009-04-24
Posts: 73
Website

Re: (resolved) DKMS: nvidia 390.157 rebuild causing xorg to crash

So basically all nvidia-390xx cards are dead unless nvidia provides a goodness of its heart update (this can't be that difficult of an issue), or you dump the driver and go with nouveau?? So this has something to do with the way the driver version of glibc handles the auth strings and how it is handled under the new glibc? I've just done a strace and a sh -x with startx to see if I could identify where the failure was -- and all the auth tokens are properly prepared and pass the rudimentary tests in startx -- so it looks like its just a difference in how the tokens are handled between the differing glibc versions? There are literally no errors on my install other than initx returning -1 on the "Connection Refused" error. Everything else is fine.

At least nouveau should still work. (no way I'm staying with an old glibc version)

Last edited by drankinatty (2023-02-08 09:20:41)


David C. Rankin, J.D.,P.E.

Offline

#20 2023-02-08 12:19:13

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,098

Re: (resolved) DKMS: nvidia 390.157 rebuild causing xorg to crash

salty9 wrote:
Scimmia wrote:

Please don't tell people to downgrade glibc. Doing that pretty much freezing the system and never doing any more updates.

What else is there to do (until someone probably fixes this)? X not starting basically renders the desktop unusable, and for many moving to Wayland isn't really an option.

Nouveau is pretty much the only option.

Offline

#21 2023-02-08 16:47:28

chergav
Member
Registered: 2023-02-07
Posts: 1

Re: (resolved) DKMS: nvidia 390.157 rebuild causing xorg to crash

Offline

#22 2023-02-08 16:52:57

seth
Member
Registered: 2012-09-03
Posts: 58,873

Re: (resolved) DKMS: nvidia 390.157 rebuild causing xorg to crash

There's actually an official source for that that I've quoted twice in this thread, but yeah, 390xx is EOL.

Offline

#23 2023-02-08 20:13:56

Piezoid
Member
Registered: 2017-12-04
Posts: 5

Re: (resolved) DKMS: nvidia 390.157 rebuild causing xorg to crash

I tied to track the stack corruption when "libGLX_nvidia.so.0" is dlopened. Actually the glibc stacks in the dlopen machinery don't get corrupted, but the reference canary value in the thread local storage is! The overwriting of %fs:0x28 happens here:

   0x00007ffff7ab3210:  sub    $0x28,%rsp
   0x00007ffff7ab3214:  movzbl %dil,%edi
   0x00007ffff7ab3218:  mov    %esi,(%rsp)
   0x00007ffff7ab321b:  movzbl (%rsp),%eax
   0x00007ffff7ab321f:  mov    %rdx,0x8(%rsp)
   0x00007ffff7ab3224:  mov    %rdx,0x18(%rsp)
   0x00007ffff7ab3229:  mov    %al,0x10(%rsp)
   0x00007ffff7ab322d:  mov    0x10(%rsp),%esi
   0x00007ffff7ab3231:  call   0x7ffff7a4eb90 <_nv006tls@plt>
   0x00007ffff7ab3236:  test   %rax,%rax
   0x00007ffff7ab3239:  mov    %rax,%rsi
   0x00007ffff7ab323c:  je     0x7ffff7ab3276
   0x00007ffff7ab323e:  mov    0x27cfbb(%rip),%rcx        # 0x7ffff7d30200, load adress to tls offset from .data
   0x00007ffff7ab3245:  xor    %eax,%eax
   0x00007ffff7ab3247:  mov    (%rcx),%rdx  # load tls offset (from a libnvidia-glcore .bss)
   0x00007ffff7ab324a:  mov    %rax,%fs:(%rdx) # write zeroes to tls after this offset
   0x00007ffff7ab324e:  mov    0x8(%rcx),%rdx
=> 0x00007ffff7ab3252:  mov    %rax,%fs:(%rdx) 
   0x00007ffff7ab3256:  mov    0x10(%rcx),%rdx
   0x00007ffff7ab325a:  mov    %rax,%fs:(%rdx)
   0x00007ffff7ab325e:  mov    0x18(%rcx),%rdx
   0x00007ffff7ab3262:  mov    %rax,%fs:(%rdx)
   0x00007ffff7ab3266:  mov    0x20(%rcx),%rdx
   0x00007ffff7ab326a:  mov    %rax,%fs:(%rdx)
   0x00007ffff7ab326e:  mov    0x28(%rcx),%rdx
   0x00007ffff7ab3272:  mov    %rax,%fs:(%rdx)
   0x00007ffff7ab3276:  mov    %rsi,%rax
   0x00007ffff7ab3279:  add    $0x28,%rsp
   0x00007ffff7ab327d:  ret

This looks like the initialization of a dynamic library tls block.

In the glibc 2.37 release notes:

* The dynamic linker no longer loads shared objects from the "tls"
  subdirectories on the library search path or the subdirectory that
  corresponds to the AT_PLATFORM system name, or employs the legacy AT_HWCAP
  search mechanism, which was deprecated in version 2.33.

And sure enough, the dlopen sample no longer crashes when executed with LD_PRELOAD="/usr/lib/tls/libnvidia-tls.so".
I'll report back on Xorg status after trying that system-wide (using /etc/ld.so.preload, don't do this).
edit: yup that did it, Xorg/nvidia working with glibc 2.37!
Meanwhile, is there any alternatives to this hack, so that libnvidia-tls gets loaded before libnvidia-glcore only in applications loading the latter?

Last edited by Piezoid (2023-02-08 20:23:32)

Offline

#24 2023-02-08 20:59:40

loqs
Member
Registered: 2014-03-06
Posts: 18,056

Re: (resolved) DKMS: nvidia 390.157 rebuild causing xorg to crash

@Piezoid What if you replace /usr/lib/libnvidia-tls.so.390.157 with /usr/lib/tls/libnvidia-tls.so.390.157?

Last edited by loqs (2023-02-08 21:08:34)

Offline

#25 2023-02-08 21:12:17

Piezoid
Member
Registered: 2017-12-04
Posts: 5

Re: (resolved) DKMS: nvidia 390.157 rebuild causing xorg to crash

I think the proper solution is to create /etc/ld.so.conf.d/nvidia.conf containing: "/usr/lib/tls". After running ldconfig as root, Xorg restarted fine.

loqs wrote:

@Piezoid What if you replace /usr/lib/libnvidia-tls.so with /usr/lib/tls/libnvidia-tls.so?

This seems to work too!

Old glibc was resolving it this way:

find library=libnvidia-tls.so.390.157 [0]; searching
 search path=/usr/local/lib             (LD_LIBRARY_PATH)
   trying file=/usr/local/lib/libnvidia-tls.so.390.157
 search cache=/etc/ld.so.cache
  trying file=/usr/lib/tls/libnvidia-tls.so.390.157

So the /usr/lib/tls/libnvidia-tls.so was taking precedence over /usr/lib/libnvidia-tls.so.

From https://download.nvidia.com/XFree86/Lin … nents.html :

The nvidia-tls libraries (/usr/lib/libnvidia-tls.so.390.157 and /usr/lib/tls/libnvidia-tls.so.390.157); these files provide thread local storage support for the NVIDIA OpenGL libraries (libGL, libnvidia-glcore, and libglx). Each nvidia-tls library provides support for a particular thread local storage model (such as ELF TLS), and the one appropriate for your system will be loaded at run time.

So I guess that the most "modern" one is /usr/lib/tls/libnvidia-tls.so?

Last edited by Piezoid (2023-02-08 22:11:34)

Offline

Board footer

Powered by FluxBB