After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 783338 - random crash (SIGSEGV)
random crash (SIGSEGV)
Status: RESOLVED OBSOLETE
Product: gnome-shell
Classification: Core
Component: general
3.22.x
Other Linux
: Normal critical
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2017-06-02 03:10 UTC by Paul Wise
Modified: 2021-07-05 14:10 UTC
See Also:
GNOME target: ---
GNOME version: 3.21/3.22


Attachments
gdb backtrace of the crash (29.18 KB, text/plain)
2017-06-02 03:10 UTC, Paul Wise
Details

Description Paul Wise 2017-06-02 03:10:03 UTC
Created attachment 353041 [details]
gdb backtrace of the crash

I got a random crash (SIGSEGV) in gnome-shell. I am using gnome-shell 3.22.3-3, Xorg and GNOME 3.22 on Debian stretch. If the below gdb backtrace and the attached full gdb backtrace isn't useful, please close this bug.

Core was generated by `gnome-shell --replace'.
Program terminated with signal SIGSEGV, Segmentation fault.
  • #0 _clutter_input_device_reset_scroll_info
    at clutter-input-device.c line 1911
  • #0 _clutter_input_device_reset_scroll_info
    at clutter-input-device.c line 1911
  • #1 clutter_device_manager_xi2_translate_event
    at x11/clutter-device-manager-xi2.c line 1456
  • #2 clutter_backend_real_translate_event
    at clutter-backend.c line 596
  • #3 clutter_x11_handle_event
    at x11/clutter-event-x11.c line 200
  • #4 handle_host_xevent
    at backends/x11/meta-backend-x11.c line 338
  • #5 x_event_source_dispatch
    at backends/x11/meta-backend-x11.c line 391
  • #6 g_main_dispatch
    at ././glib/gmain.c line 3203
  • #7 g_main_context_dispatch
    at ././glib/gmain.c line 3856
  • #8 g_main_context_iterate
    at ././glib/gmain.c line 3929
  • #9 g_main_loop_run
    at ././glib/gmain.c line 4125
  • #10 meta_run
    at core/main.c line 572
  • #11 main
    at main.c line 471

Comment 1 Paul Menzel 2017-07-02 08:14:19 UTC
The function in question seems to be in the package libclutter-1.0-0 1.26.0+dfsg-3. Unfortunately, the line number 1911 [1] doesn’t match with the function `_clutter_input_device_reset_scroll_info` [2].


Patches touching this file are also not applied [3].

So function looks like below.

```
void
_clutter_input_device_reset_scroll_info (ClutterInputDevice *device)
{
  guint i;

  if (device->scroll_info == NULL)
    return;

  for (i = 0; i < device->scroll_info->len; i++)
    {
      ClutterScrollInfo *info = &g_array_index (device->scroll_info,
                                                ClutterScrollInfo,
                                                i);

      info->last_value_valid = FALSE;
    }
}
```

Maybe some GNOME Shell or Clutter developer has an idea.


[1] https://sources.debian.net/src/clutter-1.0/1.26.0%2Bdfsg-3/clutter/clutter-input-device.c/#L1911
[2] https://sources.debian.net/src/clutter-1.0/1.26.0%2Bdfsg-3/clutter/clutter-input-device.c/#L1805
[3]
Comment 2 Florian Müllner 2017-07-02 08:24:57 UTC
(In reply to Paul Menzel from comment #1)
> The function in question seems to be in the package libclutter-1.0-0
> 1.26.0+dfsg-3.

No, since 3.22 mutter/gnome-shell use an in-tree fork of cogl and clutter:
https://git.gnome.org//browse/mutter/tree/clutter
Comment 3 Paul Menzel 2017-07-02 08:52:45 UTC
(In reply to Florian Müllner from comment #2)
> (In reply to Paul Menzel from comment #1)
> > The function in question seems to be in the package libclutter-1.0-0
> > 1.26.0+dfsg-3.
> 
> No, since 3.22 mutter/gnome-shell use an in-tree fork of cogl and clutter:
> https://git.gnome.org//browse/mutter/tree/clutter

Ah, then all this makes sense [1].

```
void
_clutter_input_device_reset_scroll_info (ClutterInputDevice *device)
{
  guint i;

→  if (device->scroll_info == NULL)
    return;

  for (i = 0; i < device->scroll_info->len; i++)
    {
      ClutterScrollInfo *info = &g_array_index (device->scroll_info,
                                                ClutterScrollInfo,
                                                i);

      info->last_value_valid = FALSE;
    }
}
```

So I guess, `CLUTTER_IS_INPUT_DEVICE (device)` could be added to the if condition to avoid the segmentation fault. But, that of course doesn’t fix the root cause, why an invalid “clutter input device” is passed.

```
if (CLUTTER_IS_INPUT_DEVICE (device) && device->scroll_info == NULL)
        return;
```

[1] https://sources.debian.net/src/mutter/3.22.4-1/clutter/clutter/clutter-input-device.c/?hl=1907#L1911
Comment 4 GNOME Infrastructure Team 2021-07-05 14:10:22 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of  gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/

Thank you for your understanding and your help.