WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: sfwbar has futex-related crashes on TCL14  (Read 1122 times)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1439
sfwbar has futex-related crashes on TCL14
« on: November 13, 2023, 03:07:21 PM »
I'm on TCL14 x86_64, experimenting with wayland. Everything works perfectly except that  sfwbar  randomly becomes completely unresponsive, requiring SIGKILL. Crashes sometimes happens within 5 minutes of booting, sometimes after an hour or more. I have not figured out how to provoke a crash.

I've reported this issue to the  sfwbar  developer, but he seems unable to reproduce the problem. I think I need to exclude something TCL14-specific (e.g., kernel, python, or some library version) being the issue.

When I run  sfwbar  with  strace  and redirect output to a file, the last line in the file (just before my SIGKILL) is always this:
Code: [Select]
futex(0x7fecb17f1c40, FUTEX_WAIT_PRIVATE, 2, NULL) = ?
futex appears elsewhere in the strace the but the = ? part only appears as part of the last line, which makes me think that it is the cause of the crash.

Does seeing futex ... = ? in strace cast suspicion on anything specific that you can think of?

P.S. If you'd like to see some complete straces, here you go:
  a. strace of a crash: https://gnuser.ddns.net/public/log1.txt
  b. strace of another crash: https://gnuser.ddns.net/public/log2.txt
  c. strace of sfwbar running for an hour without crashing: https://gnuser.ddns.net/public/okay.txt

« Last Edit: November 13, 2023, 03:10:39 PM by GNUser »

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1439
Re: sfwbar has futex-related crashes on TCL14
« Reply #1 on: November 13, 2023, 03:40:38 PM »
futex is a kernel system call. I scoured the internet and it seems that, at least some of the time, futex-related hangs are associated with python code. sfwbar does use python3 for some of its widgets.

I'm going to disable all the widgets I don't really need. That will only leave a total of 4 widgets, 1 of which relies on python. I'll try using python3.9 instead of 3.6 for the widget that needs it. We'll see how it goes.
« Last Edit: November 13, 2023, 03:45:12 PM by GNUser »

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1439
Re: sfwbar has futex-related crashes on TCL14
« Reply #2 on: November 13, 2023, 07:21:16 PM »
Problem was the bluetooth widget, which crashes on a system that does not have bluetooth enabled. I alerted the sfwbar developer. Issue is solved.