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 786309 - When shm support is not available at runtime symbol-db takes down anjuta with a segfault
When shm support is not available at runtime symbol-db takes down anjuta with...
Status: RESOLVED FIXED
Product: anjuta
Classification: Applications
Component: plugins: symbol-db
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: Massimo Cora'
Anjuta maintainers
Depends on:
Blocks:
 
 
Reported: 2017-08-15 09:58 UTC by Jens Mühlenhoff
Modified: 2017-08-20 12:13 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jens Mühlenhoff 2017-08-15 09:58:04 UTC
When the symbol-db plugin is compiled with shm support, but the system has no shm support at runtime symbol-db causes a segfault in anjuta.

There is a g_warning, but that really should be a g_critical or the plugin should fall back to "non-shm mode" instead of causing a segfault.

https://github.com/GNOME/anjuta/blob/1f196dd119b41ce70f50c028946017e1c98d4d72/plugins/symbol-db/symbol-db-engine-core.c#L1561

Here is a backtrace:

$ gdb anjuta

(anjuta:6501): libanjuta-symbol-db-WARNING **: Error while trying to
open a shared memory file. Besure to have /dev/shm mounted with tmpfs
[New Thread 0x7fffe5b0a700 (LWP 6563)]
[New Thread 0x7fffcffff700 (LWP 6564)]
[New Thread 0x7fffd8907700 (LWP 6565)]
[New Thread 0x7fffceffd700 (LWP 6566)]
[New Thread 0x7fffce7fc700 (LWP 6567)]
[New Thread 0x7fffcdffb700 (LWP 6568)]
[New Thread 0x7fffcd7fa700 (LWP 6569)]
[New Thread 0x7fffccff9700 (LWP 6570)]
[New Thread 0x7fffbffff700 (LWP 6571)]
[New Thread 0x7fffbe7fc700 (LWP 6655)]
[New Thread 0x7fffbdffb700 (LWP 6656)]

Program received signal SIGSEGV, Segmentation fault.

Thread 140736389433088 (LWP 6655)

  • #0 fwrite
    from /lib64/libc.so.6
  • #1 sdb_engine_ctags_output_thread
    at symbol-db-engine-core.c line 1074
  • #2 ??
    from /usr/lib64/libglib-2.0.so.0
  • #3 ??
    from /usr/lib64/libglib-2.0.so.0
  • #4 start_thread
    from /lib64/libpthread.so.0
  • #5 clone
    from /lib64/libc.so.6

Comment 1 Sébastien Granjoux 2017-08-16 19:26:31 UTC
Thank you for your answers on the mailing and this bug report.

I have looked at this plugin and the shared memory is mandatory, so I think I will just replace the warning with a fatal error.
Comment 2 Sébastien Granjoux 2017-08-20 12:13:30 UTC
I have replaced the g_warning by g_error to consider this as a fatal error. The fix will be available in the next release.