Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1040375: /usr/lib/x86_64-linux-gnu/simplescreenrecorder/libssr-glinject.so: Segmentation fault when used with anything

49 views
Skip to first unread message

Petter Reinholdtsen

unread,
Jul 6, 2023, 8:10:04 AM7/6/23
to
[BZZZZ]
> * What led up to the situation?
> Trying to "Record OpenGL" in simplescreenrecorder.
> * What exactly did you do (or not do) that was effective (or ineffective)?
> LD_PRELOAD=/usr/lib/x86_64-linux-gnu/simplescreenrecorder/libssr-glinject.so /usr/bin/true

It is unclear to me why you believe this should work. Can you tell me
where you got the idea to run the shared library like this?

Note, I am able to reproduce the crash. I only use the package by
starting simplescreenrecorder, so I have never seen the problem you are
reporting before, and do not understand when it would occur in normal
use. Can you explain?

I tried running from valgrind, but it did not work. I get the segfault,
but no information about where the segfault happen.

valgrind --trace-children=yes dash -c "LD_PRELOAD=/usr/lib/x86_64-linux-gnu/simplescreenrecorder/libssr-glinject.so /usr/bin/true"

Same problem with gdb:

(gdb) set environment LD_PRELOAD /usr/lib/x86_64-linux-gnu/simplescreenrecorder/libssr-glinject.so
(gdb) run
Starting program: /usr/bin/true
During startup program terminated with signal SIGSEGV, Segmentation fault.
(gdb) bt
No stack.
(gdb)

I have no idea how to debug this.
--
Happy hacking
Petter Reinholdtsen

Petter Reinholdtsen

unread,
Sep 6, 2023, 3:00:04 AM9/6/23
to

I figured out a way to run this under valgrind:

cp /usr/lib/x86_64-linux-gnu/simplescreenrecorder/libssr-glinject.so .
chmod a+rx libssr-glinject.so
valgrind ./libssr-glinject.so

This provide something semi-sensible from valgrind. No idea what the
mapped region is, might have to build the library with debug information
for this. Installing simplescreenrecorder-dbgsym and
simplescreenrecorder-lib-dbgsym did not help to get more sensible
information about where it crashes. Perhaps printf debugging is the
only option?

==125603== Memcheck, a memory error detector
==125603== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==125603== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==125603== Command: ./libssr-glinject.so
==125603==
==125603==
==125603== Process terminating with default action of signal 11 (SIGSEGV)
==125603== Bad permissions for mapped region at address 0x108000
==125603== at 0x108000: ??? (in /scratch/pere/src/opencamlib-salsa/libssr-glinject.so)
==125603==
==125603== HEAP SUMMARY:
==125603== in use at exit: 0 bytes in 0 blocks
==125603== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==125603==
==125603== All heap blocks were freed -- no leaks are possible
==125603==
==125603== For lists of detected and suppressed errors, rerun with: -s
==125603== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Segmentation fault (core dumped)

Petter Reinholdtsen

unread,
Feb 10, 2024, 5:10:05 AM2/10/24
to
[Petter Reinholdtsen]
> I do not use ssr much myself, and have not had time to test.

I applied the upstream commit in git branch fix-1040375-glinject and
tested it on Bookworm, but alas, the .so file still segfaults with a
useless backtrace. I might have applied the commit incorrectly, as it
did not apply without changes, but hope not. Perhaps someone
who understand what is happening can have a look?
0 new messages