protonscr

USB disconnect crashes steam with "double free detected in tcache 2" (reproducible!)

steamopen Steam clientDistro Family: openSUSE
ValveSoftware/steam-for-linux#11577 · opened 2024-12-15 by eadavani · updated 2024-12-18 · 19 comments · github
Eeadavani 2024-12-15 github

Your system information

  • Steam client version (build number or date): 1733265492
  • Distribution (e.g. Ubuntu): OpenSUSE Tumbleweed
  • Opted into Steam client beta?: No
  • Have you checked for system updates?: Yes
  • Steam Logs: [generate by running this command in a terminal tar -zcvf ~/Desktop/steam-logs.tar.gz ~/.steam/steam/logs] Which logs are needed from this command?
  • GPU: AMD Radeon RX 6700XT

Please describe your issue in as much detail as possible:

Describe what you expected should happen and what did happen. Please link any large code pastes as a Github Gist Static discharge upon touching keyboard crashes Steam.
More details here:
https://www.reddit.com/r/openSUSE/comments/1hew9xc/comment/m28fdfe/
See lines 716 and 717 from this pastebin: https://pastebin.com/8rhvYX6D

Steps for reproducing this issue:

  1. Build up static charge
  2. Touch keyboard
  3. Steam crashes
PPatrick-Poitras 2024-12-16 github

I am a bystander. Got intrigued by this.

To condense the reddit thread: Steam would crash when the user touched the keyboard. With troubleshooting, they diagnosed as the keyboard resetting when suddenly jolted with static electricity, which disconnects the USB and crashes steam. The steam crashing was reproduced by unplugging the keyboard.

Lines 716 and 717 give

Dec 15 16:57:53.978685 TumbleweedSystem kernel: usb 1-6.2: USB disconnect, device number 6
Dec 15 16:57:54.506273 TumbleweedSystem steam[4058]: free(): double free detected in tcache 2
Dec 15 16:57:54.548599 TumbleweedSystem crash_20241215165754_36.dmp[5821]: Uploading dump (out-of-process)
                                                                           /tmp/dumps/crash_20241215165754_36.dmp
Dec 15 16:57:54.548871 TumbleweedSystem steam[4058]: crash_20241215165754_36.dmp[5821]: Uploading dump (out-of-process)
TTTimo 2024-12-16 github

Hello,

Please reproduce this with the latest beta client and provide a crash ID so we can investigate on our end.

Eeadavani 2024-12-16 github

Please reproduce this with the latest beta client and provide a crash ID so we can investigate on our end.

Hello, I will be attempting to complete this in about 4 hours and then I will update you. Where can I get the crash ID you are referring to?

TTTimo 2024-12-16 github

They are printed to stdout when you run the steam client in a terminal.

You had a crash above but you didn't give the ID (crash_20241215165754_36.dmp[5821]: Uploading dump (out-of-process)). It would have printed a few lines below. That's why it's important to always give full logs :)

I'd prefer having a crash ID against the latest beta also, as it'll be more current with our development process.

CCapricornucopia 2024-12-16 github

How do I get that to print?

On Mon, Dec 16, 2024, 5:25 p.m. TTimo @.***> wrote:

They are printed to stdout when you run the steam client in a terminal.

You had a crash above but you didn't give the ID (crash_20241215165754_36.dmp[5821]:
Uploading dump (out-of-process)). It would have printed a few lines
below. That's why it's important to always give full logs :)

I'd prefer having a crash ID against the latest beta also, as it'll be
more current with our development process.


Reply to this email directly, view it on GitHub
https://github.com/ValveSoftware/steam-for-linux/issues/11577#issuecomment-2546980391,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAIECHH5MD4QTE6E2C5ZDU32F5HOHAVCNFSM6AAAAABTU7YZJSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBWHE4DAMZZGE
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Eeadavani 2024-12-16 github

It would have printed a few lines below. That's why it's important to always give full logs :)

the pastebin I posted had the entire logs I got from the command I was given (sudo journalctl -b 0 --no-pager --output=short-precise).
Same question as the above comment. How do I print that?

TTTimo 2024-12-16 github

@eadavani can you reproduce with the beta version of the Steam client and provide an ID? There is indeed an crash ID for the stable release in the pastebin you provided.

Eeadavani 2024-12-16 github

I recreated the Steam crash while on the beta version. Here is the output from that command.
https://pastebin.com/MfH5JHXt
I believe the crash is somewhere around line 1900.

Eeadavani 2024-12-16 github

Or possibly line 1635

TTTimo 2024-12-18 github

Thanks, I'm checking to see if there is some useful information we can extract from the crash report.

The steam crashing was reproduced by unplugging the keyboard.

FWIW I can unplug and replug my keyboard without crashing Steam, so there's gotta be something more specific to OP's system than that.

TTTimo 2024-12-18 github

You may also want to run steam with MALLOC_CHECK_=0 (e.g. launch steam from the terminal as MALLOC_CHECK_=0 steam). Mostly out of curiosity if you still crash (likely not).

Eeadavani 2024-12-18 github

I will give that a try in about 4 hours and let you know.

TTTimo 2024-12-18 github

Actually, try with MALLOC_CHECK_=1 that may even be better (will print a diagnostic message and attempt to continue).

Eeadavani 2024-12-18 github

so the full command to run is MALLOC_CHECK_=1 steam ?

TTTimo 2024-12-18 github

Yes. Quite possibly it won't crash but it may also report some useful diagnostic info.

Eeadavani 2024-12-18 github

After launching Steam with that command, and while it was still running, I reproduced the crash. Everything should be in the link.
https://pastebin.com/N60KDwPK

TTTimo 2024-12-18 github

Nothing useful then. Unfortunate. I thought those errors came strictly from glibc's malloc checking and that we'd at the very least get a somewhat better diagnostic. Thanks for trying this!

Eeadavani 2024-12-18 github

should I close this issue, or was there still more you would like to try?

TTTimo 2024-12-18 github

That's ok we don't need to close it. It's still a known, active issue. We don't have reproduction and the crash dumps aren't much useful, so it's unlikely we'll make progress on this at this time, but still.