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

optimus-manager-qt crashes after sleep #128

Open
Flowneee opened this issue Jun 15, 2023 · 3 comments
Open

optimus-manager-qt crashes after sleep #128

Flowneee opened this issue Jun 15, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@Flowneee
Copy link

Bug description
After my laptop come back from sleep optimus-manager-qt crashes with ABRT. I checked with strace what is wrong and can't quite understand what goes wrong. One of the last calls is

write(2, "Unable to read current mode from"..., 60Unable to read current mode from Optimus Manager state file
) = 60

I found some attempt to open state in strace

openat(AT_FDCWD, "/var/lib/optimus-manager/tmp/state.json", O_RDONLY|O_CLOEXEC) = 9

and it is successful, and file is fine and available to current user.

Steps to reproduce

I don't know how to reproduce

Expected behavior

optimus-manager-qt started

Environment

  • OS: Arch Linux
  • Desktop environment: i3 (started via systemd)
  • Optimus Manager version: 1.4
  • Optimus Manager Qt version: 1.6.9

Additional context

Last part of strace output

futex(0x7ffc9bef7e50, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
futex(0x7f7636d35190, FUTEX_WAKE_PRIVATE, 1) = 1
openat(AT_FDCWD, "/var/lib/optimus-manager/tmp/state.json", O_RDONLY|O_CLOEXEC) = 9
statx(9, "", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT|AT_EMPTY_PATH, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0666, stx_size=95, ...}) = 0
statx(9, "", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT|AT_EMPTY_PATH, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0666, stx_size=95, ...}) = 0
statx(9, "", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT|AT_EMPTY_PATH, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0666, stx_size=95, ...}) = 0
read(9, "{\"type\": \"pending_post_xorg_star"..., 16384) = 95
read(9, "", 16289)                      = 0
openat(AT_FDCWD, "/dev/tty", O_RDONLY|O_CLOEXEC) = 10
close(10)                               = 0
write(2, "Unable to read current mode from"..., 60Unable to read current mode from Optimus Manager state file
) = 60
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
gettid()                                = 15130
getpid()                                = 15130
tgkill(15130, 15130, SIGABRT)           = 0
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=15130, si_uid=1000} ---
+++ killed by SIGABRT (core dumped) +++
Aborted (core dumped)

I recently switched from starting systemd target (and user services) from i3 config to starting everything from systemd including i3, however I don't see how this should affect anything here. I tried to restart both optimus-manager (it was and keep working just fine) and optimus-manager-qt (no success)

@Flowneee Flowneee added the bug Something isn't working label Jun 15, 2023
@Shatur
Copy link
Owner

Shatur commented Jun 15, 2023

Thank you for such detailed report!
Looks like after suspend the json file with optimus manager state is invalid. Could you show me the content of it?

@Flowneee
Copy link
Author

Thank you for such detailed report! Looks like after suspend the json file with optimus manager state is invalid. Could you show me the content of it?

Damn, I forgot to save it. But I remember I looked at it was at least valid JSON. I'll try to reproduce it and attach file here, if successful.

@Shatur
Copy link
Owner

Shatur commented Jun 15, 2023

Okay, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants