Re: [anjuta-list] [anjuta-devel] Problem starting Anjuta



Hello Igor,

Am 14.08.2017 um 06:36 schrieb Igor Korot:
Hi, Jens,

I finally had time to recompile Anjuta.
Here is the gdb session:

igor@IgorReinCloud ~/dbhandler $ 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.
[Switching to Thread 0x7fffbe7fc700 (LWP 6655)]
0x00007ffff4506e7b in fwrite () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff4506e7b in fwrite () from /lib64/libc.so.6
#1  0x00007fffe4447bd3 in sdb_engine_ctags_output_thread
(data=0x18c9ac0, user_data=<optimized out>)
    at symbol-db-engine-core.c:1074
#2  0x00007ffff503f14d in ?? () from /usr/lib64/libglib-2.0.so.0
#3  0x00007ffff503e6d5 in ?? () from /usr/lib64/libglib-2.0.so.0
#4  0x00007ffff48455e6 in start_thread () from /lib64/libpthread.so.0
#5  0x00007ffff45889ad in clone () from /lib64/libc.so.6
(gdb)

Thank you.

So it really *is* closely related. The problem is in the symbol-db plugin:

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

There is a g_warning there (in fact the one you were seeing all along), but it really is a critical error how 
the code is currently written, because there is no working fallback when shm is not usable.

Ok, so `shm_open ("/dev/pts/anjuta [...]` fails on your system and that causes the segfault.

I had a look at the /etc/fstab included in your first post:

# <fs>            <mountpoint>    <type>        <opts>        <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda5        /boot        ext2        defaults,noatime,user_xattr    1 2
/dev/sda7        /        ext3        noatime,user_xattr        0 1
/dev/sda6        none        swap        sw        0 0
/dev/cdrom        /mnt/cdrom    auto        noauto,user    0 0
#/dev/fd0        /mnt/floppy    auto        noauto        0 0
/dev/sr0        /mnt/cdrom    auto        noauto,rw,user        0 0
proc            /proc        proc        defaults    0 0
shm            /dev/shm    tmpfs        nodev,nosuid,noexec    0 0
none            /dev/shm    devtmpfs    defaults    0 0

Why do you have two entries for shm?

Also on modern systems usually /dev/shm and /proc are set up for you by the init system, my fstab is much 
cleaner (I use Gentoo with systemd, btw):

# <fs>          <mountpoint>                    <type>  <opts>                  <dump/pass>
/dev/sda2       /boot                           vfat    defaults                0 2
/dev/sda3       none                            swap    sw                      0 0
/dev/nvme0n1p2  /                               ext4    noatime                 0 1

And shm is mounted correctly:

$ mount | grep shm
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)

I would try to comment out the last line of your fstab (and remount /dev/shm or reboot).

-- 
Mit freundlichen Grüßen
Jens Mühlenhoff

Attachment: signature.asc
Description: OpenPGP digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]