Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unrecoverable Crash in Cosmic-Comp on ThinkPad T14s Gen 6 with X Elite 1 Snapdragon Processor #1062

Open
contra-bit opened this issue Dec 14, 2024 · 1 comment

Comments

@contra-bit
Copy link

Description
I'm experiencing an unrecoverable crash in cosmic-comp on my ThinkPad T14s Gen 6, which uses the X Elite 1 Snapdragon processor. The issues has occured in the last few alpha releases and on the current master branch. The crash occurs when the system is running on the built-in display, but I can recover by connecting an external monitor and toggling the display on again.

The crash occurs in the file backend/kms/render/surface/mod.rs in the function redraw_queue.

Error Message:

The stderr message is as follows:

cosmic-comp[9715]: thread 'surface-eDP-1' panicked at 'overflow in iter::sum over durations': /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/time.rs:1237
 0: log_panics::Config::install_panic_hook::{{closure}}
 1: std::panicking::rust_panic_with_hook
 2: std::panicking::begin_panic_handler::{{closure}}
 3: std::sys_common::backtrace::__rust_end_short_backtrace
 4: rust_begin_unwind
 5: core::panicking::panic_fmt
 6: core::option::expect_failed
 7: cosmic_comp::backend::kms::surface::SurfaceThreadState::queue_redraw
 8: <core::cell::RefCell<calloop::sources::DispatcherInner<S,F>> as calloop::sources::EventDispatcher<Data>>::process_events
 9: cosmic_comp::backend::kms::surface::surface_thread
10: std::sys_common::backtrace::__rust_begin_short_backtrace
11: core::ops::function::FnOnce::call_once{{vtable.shim}}
12: std::sys::pal::unix::thread::Thread::new::thread_start
13: start_thread
           at ./nptl/pthread_create.c:447:8
14: thread_start
           at ./misc/../sysdeps/unix/sysv/linux/aarch64/clone3.S:76

System Information:

  • OS: Ubuntu oracular 24.10 aarch64
  • Host: 21N10007GE (ThinkPad T14s Gen 6)
  • Kernel: Linux 6.12.0-18-qcom-x1e
  • Uptime: 1 day, 1 hour, 51 mins
  • Display (CSO1413): 1920x1200 @ 60Hz [Built-in]
  • CPU: Qualcomm + Qualcomm (12) @ 3.42 GHz
  • GPU: Qualcomm Adreno X1-85 [Integrated]
  • Memory: 3.69 GiB / 29.84 GiB (12%)

Steps to Reproduce:

  1. Run cosmic-comp on the built-in display of the ThinkPad T14s Gen 6.
  2. The system will crash, and the error message will be displayed.

Additional Information:

I'm not sure if there are any additional environment variables or settings that I should set, besides WAYLAND_DEBUG or RUST_BACKTRACE. If there's any further information that I can provide to help resolve this issue, please let me know.

Suggestions
Overflow Protection:

  • Using saturating_add() to prevent integer overflow
  • Introducing Option return types for safer calculations

Error Handling:

  • Added warning logs for timing calculation failures
  • Implemented early return mechanisms when timing calculations cannot be completed
@contra-bit
Copy link
Author

In order to reproduce the crash.

  • Use a X Elite Laptop
  • Wait for it to crash.

The crash always happens within the first hour of normal usage. Sometimes even when idle. I have not found out how to trigger it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant