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

Segmentation fault in sound and temperature #1786

Closed
GladOSkar opened this issue Feb 26, 2023 · 5 comments
Closed

Segmentation fault in sound and temperature #1786

GladOSkar opened this issue Feb 26, 2023 · 5 comments

Comments

@GladOSkar
Copy link
Contributor

GladOSkar commented Feb 26, 2023

After updating to current master (i3status-rs 0.30.2 (commit 76e19f29 2023-02-22)) and fixing up my config, i got:

$ i3status-rs
{"version": 1, "click_events": true}
[
fish: Job 1, 'i3status-rs' terminated by signal SIGSEGV (Address boundary error)

sometimes also:

$ i3status-rs
{"version": 1, "click_events": true}
[
[],
fish: Job 1, 'i3status-rs' terminated by signal SIGSEGV (Address boundary error)

Minimal configs to reproduce:

[[block]]
block = "sound"

and

[[block]]
block = "temperature"

both create the segfault, most other blocks don't.

This happens both when compiling in debug and in release mode.

I attached the LLVM debugger and got this stack trace (sound block config):

https://gist.github.com/GladOSkar/3352afe39d26f052d4ba6610a369a5a9#file-i3status-rs_segfault-L139
(Segfault in Thread 3, Line 139 ff.)

Looks like a read from 0x0. Going further is a bit beyond me, especially with all that threading and stuff, help would be appreciated.

My system:

  • Distribution: Void
  • Kernel: Linux [...] 6.1.12_1 #1 SMP PREEMPT_DYNAMIC [...] x86_64 GNU/Linux
  • libc: musl
  • DE: sway
  • rustc: 1.67.1 (d5a82bbd2 2023-02-07)
  • cargo: 1.67.1 (8ecd4f20a 2023-01-10)
@MaxVerevkin
Copy link
Collaborator

Can you try #401 (comment)?

@ammgws
Copy link
Collaborator

ammgws commented Feb 26, 2023

libc: musl

worked before with this?>

@GladOSkar
Copy link
Contributor Author

@MaxVerevkin that works!

@ammgws yes never was a problem

@GladOSkar
Copy link
Contributor Author

GladOSkar commented Feb 26, 2023

Ohh i just remembered another thing i changed. I switched from void's rust package to rustup (because void's package is stuck on 1.64.0 so i can't compile i3-status-rust with it anymore).

And they apply patches to rustc to make it work better with musl (e.g. 0002 and 0010). So that's probably what was missing.

And sound and temperature might be the blocks (of those that i use) that link to libc somewhere eventually (via libpulse/libsensors)? I thought this wasn't an issue with rust, but if they link into C code it might of course be.

@GladOSkar
Copy link
Contributor Author

Guess I'll put a note on this into the install docs

GladOSkar added a commit to GladOSkar/i3status-rust that referenced this issue Feb 26, 2023
GladOSkar added a commit to GladOSkar/i3status-rust that referenced this issue Feb 27, 2023
GladOSkar added a commit to GladOSkar/i3status-rust that referenced this issue Feb 27, 2023
GladOSkar added a commit to GladOSkar/i3status-rust that referenced this issue Mar 1, 2023
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

3 participants