Code Monkey home page Code Monkey logo

Comments (12)

rockowitz avatar rockowitz commented on September 26, 2024 2

A workaround for those using ddcutil 2.1.4 or earlier is to delete file 60-ddcutil-usb.rules from /usr/lib/udev/rules.d and /etc/udev/rules.d.

This file is relevant only if you have a monitor that uses USB instead of I2C to communicate with the monitor's Virtual Control Panel, and whose usage conforms to the USB Monitor Control Class Specification. Such monitors have proven unusual, and monitors that implement USB communication but not I2C communication extremely rare.

The UDEV rule in the file checks whether a /dev/hiddev device might possibly be used for VCP communication, and if so grants the logged on user RW access to the device.

from ddcutil.

keidax avatar keidax commented on September 26, 2024 1

@rockowitz I don't have a way to reliably reproduce this segfault, but I just installed from the 2.1.5-dev branch and rebooted a dozen times in a row without any crashes, so looking good so far. Will update if I get any more crashes.

from ddcutil.

rockowitz avatar rockowitz commented on September 26, 2024

I have hardened the strsplit() function in branch 2.1.5-dev against a NULL argument. However, I would still like to understand how it came to be called with a NULL argument. That happened because querying a USB device returned a NULL value. Please verify that the fix addresses the problem. Also, please execute ddcutil usbenvironment --verbose and submit the output as an attachment. Thank you.

from ddcutil.

rockowitz avatar rockowitz commented on September 26, 2024

issue unintentionally closed, awaiting user confirmation of bug fix

from ddcutil.

Galcian79 avatar Galcian79 commented on September 26, 2024

Idk. The bug happens very, very rarely so it's hard to reproduce. I'll reopen the issue if it's not fixed yet.

ddcutil usbenvironment --verbose

from ddcutil.

keidax avatar keidax commented on September 26, 2024

I've been having this same issue. It only seems to trigger during boot when ddcutil is called by this udev rule:

# SUBSYSTEM=="usbmisc", KERNEL=="hiddev*", PROGRAM="/usr/bin/ddcutil chkusbmon $env{DEVNAME} -v", TAG+="uaccess"

(I know that file is just a sample, but the Arch Linux package comes with the same rule installed.)

The segfault is rare; it doesn't happen on every boot.

from ddcutil.

Manix80 avatar Manix80 commented on September 26, 2024

same problem here.

avril 11 08:27:50 archlinux systemd-coredump[568]: [🡕] Process 423 (ddcutil) of user 0 dumped core.
                                                   
                                                   Stack trace of thread 423:
                                                   #0  0x00007e888dbb3fdd n/a (libc.so.6 + 0x159fdd)
                                                   #1  0x00005c4635f24031 strsplit (ddcutil + 0x8b031)
                                                   #2  0x00005c4635f364ba n/a (ddcutil + 0x9d4ba)
                                                   #3  0x00005c4635f36778 is_possible_monitor_by_hiddev_name (ddcutil + 0x9d778)
                                                   #4  0x00005c4635f368a9 check_usb_monitor (ddcutil + 0x9d8a9)
                                                   #5  0x00005c4635eb4752 main (ddcutil + 0x1b752)
                                                   #6  0x00007e888da7fcd0 n/a (libc.so.6 + 0x25cd0)
                                                   #7  0x00007e888da7fd8a __libc_start_main (libc.so.6 + 0x25d8a)
                                                   #8  0x00005c4635eb4895 _start (ddcutil + 0x1b895)
                                                   ELF object binary architecture: AMD x86-64
░░ Subject: Le processus 423 (ddcutil) a gĂ©nĂ©rĂ© un fichier « core »
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ Documentation: man:core(5)
░░ 
░░ Le processus 423 (ddcutil) a plantĂ© et gĂ©nĂ©rĂ© un fichier « core ».
░░ 
░░ Cela indique gĂ©nĂ©ralement une erreur de programmation dans le programme
░░ incriminĂ©, et cela devrait ĂȘtre notifiĂ© Ă  son concepteur comme un dĂ©faut (bug).
avril 11 08:27:50 archlinux systemd-coredump[567]: [🡕] Process 411 (ddcutil) of user 0 dumped core.
                                                   
                                                   Stack trace of thread 411:
                                                   #0  0x0000789827baafdd n/a (libc.so.6 + 0x159fdd)
                                                   #1  0x000060cf2feec031 strsplit (ddcutil + 0x8b031)
                                                   #2  0x000060cf2fefe4ba n/a (ddcutil + 0x9d4ba)
                                                   #3  0x000060cf2fefe778 is_possible_monitor_by_hiddev_name (ddcutil + 0x9d778)
                                                   #4  0x000060cf2fefe8a9 check_usb_monitor (ddcutil + 0x9d8a9)
                                                   #5  0x000060cf2fe7c752 main (ddcutil + 0x1b752)
                                                   #6  0x0000789827a76cd0 n/a (libc.so.6 + 0x25cd0)
                                                   #7  0x0000789827a76d8a __libc_start_main (libc.so.6 + 0x25d8a)
                                                   #8  0x000060cf2fe7c895 _start (ddcutil + 0x1b895)
                                                   ELF object binary architecture: AMD x86-64
░░ Subject: Le processus 411 (ddcutil) a gĂ©nĂ©rĂ© un fichier « core »
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ Documentation: man:core(5)
░░ 
░░ Le processus 411 (ddcutil) a plantĂ© et gĂ©nĂ©rĂ© un fichier « core ».
░░ 
░░ Cela indique gĂ©nĂ©ralement une erreur de programmation dans le programme
░░ incriminĂ©, et cela devrait ĂȘtre notifiĂ© Ă  son concepteur comme un dĂ©faut (bug).
avril 11 08:27:50 archlinux (udev-worker)[409]: hiddev3: Process '/usr/bin/ddcutil chkusbmon /dev/usb/hiddev3 -v' terminated by signal SEGV.
avril 11 08:27:50 archlinux (udev-worker)[406]: hiddev2: Process '/usr/bin/ddcutil chkusbmon /dev/usb/hiddev2 -v' terminated by signal SEGV.
avril 11 08:27:50 archlinux (udev-worker)[409]: hiddev3: Failed to wait for spawned command '/usr/bin/ddcutil chkusbmon /dev/usb/hiddev3 -v': Input/output error
avril 11 08:27:50 archlinux (udev-worker)[406]: hiddev2: Failed to wait for spawned command '/usr/bin/ddcutil chkusbmon /dev/usb/hiddev2 -v': Input/output error

ddcutil interrogate

from ddcutil.

rockowitz avatar rockowitz commented on September 26, 2024

For those of you confirming this segfault, please report whether it is resolved in branch 2.1.5-dev.

from ddcutil.

killajoe avatar killajoe commented on September 26, 2024

For those of you confirming this segfault, please report whether it is resolved in branch 2.1.5-dev.

Seems to not happen with rebuild from 2.1.5-dev here !
(arch/EndeavourOS Nvidia drivers) --> #406 (comment)

from ddcutil.

scr4bble avatar scr4bble commented on September 26, 2024

Is this the same issue?

Apr 22 09:34:19 lenovo-t480 systemd-coredump[118855]: [🡕] Process 118813 (ddcutil) of user 0 dumped core.
                                                      
                                                      Module libcap.so.2 from rpm libcap-2.48-9.fc39.x86_64
                                                      Module libpcre2-8.so.0 from rpm pcre2-10.42-1.fc39.2.x86_64
                                                      Module libdrm.so.2 from rpm libdrm-2.4.120-1.fc39.x86_64
                                                      Module libudev.so.1 from rpm systemd-254.10-1.fc39.x86_64
                                                      Module libglib-2.0.so.0 from rpm glib2-2.78.3-1.fc39.x86_64
                                                      Module libjansson.so.4 from rpm jansson-2.13.1-7.fc39.x86_64
                                                      Module ddcutil from rpm ddcutil-2.1.2-1.fc39.x86_64
                                                      Stack trace of thread 118813:
                                                      #0  0x00007fa35251e8dd __strlen_avx2 (libc.so.6 + 0x1618dd)
                                                      #1  0x0000559033d8b222 assemble_sysfs_path2.constprop.0 (ddcutil + 0xc1222)
                                                      #2  0x0000559033d83aed rpt_attr_note_indirect_subdir (ddcutil + 0xb9aed)
                                                      #3  0x0000559033d43256 find_adapter (ddcutil + 0x79256)
                                                      #4  0x0000559033d44533 one_drm_connector (ddcutil + 0x7a533)
                                                      #5  0x0000559033d7b598 dir_filtered_ordered_foreach (ddcutil + 0xb1598)
                                                      #6  0x0000559033d454fb scan_sys_drm_connectors (ddcutil + 0x7b4fb)
                                                      #7  0x0000559033d1f409 submaster_initializer (ddcutil + 0x55409)
                                                      #8  0x0000559033d09784 main (ddcutil + 0x3f784)
                                                      #9  0x00007fa3523e514a __libc_start_call_main (libc.so.6 + 0x2814a)
                                                      #10 0x00007fa3523e520b __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x2820b)
                                                      #11 0x0000559033d0aa15 _start (ddcutil + 0x40a15)
                                                      ELF object binary architecture: AMD x86-64
Apr 22 09:34:19 lenovo-t480 (udev-worker)[118811]: hiddev1: Process '/usr/bin/ddcutil chkusbmon /dev/usb/hiddev1 -v' terminated by signal SEGV.
Apr 22 09:34:19 lenovo-t480 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-coredump@2-118852-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Apr 22 09:34:19 lenovo-t480 (udev-worker)[118811]: hiddev1: Failed to wait for spawned command '/usr/bin/ddcutil chkusbmon /dev/usb/hiddev1 -v': Input/output error
Apr 22 09:34:19 lenovo-t480 (udev-worker)[118811]: hiddev1: /usr/lib/udev/rules.d/60-ddcutil-usb.rules:8 Failed to execute "/usr/bin/ddcutil chkusbmon /dev/usb/hiddev1 -v": Input/output error
Apr 22 09:34:19 lenovo-t480 systemd[1]: [email protected]: Deactivated successfully.

Does this issue cause the OS to hang on login? I usually get these when waking up laptop from sleep, typing password in, clicking enter and then getting 1-2 min freeze before getting into gnome...

from ddcutil.

killajoe avatar killajoe commented on September 26, 2024

Is this the same issue?

For me it was causing system to hang.. but looks more like a condition as that the segfault itself was causing the hang.

from ddcutil.

rockowitz avatar rockowitz commented on September 26, 2024

@scr4bble Your bug report has been moved to issue #408.

from ddcutil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.