Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#58550 - [maim] Segmentation fault when attempting any file operation

Attached to Project: Community Packages
Opened by Raku Smith (raku-cat) - Saturday, 12 May 2018, 03:36 GMT
Last edited by Eli Schwartz (eschwartz) - Monday, 14 May 2018, 17:34 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Lukas Fleischer (lfleischer)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description:

After updating today I found maim segfaults, the help message and version will show but attempting to write an image to stdout, a file, or using slop all result in a core dump. I compiled it myself(didn't install) and ran the binary from that and maim runs fine, I think the package just needs to be rebuilt. I confirmed this isn't isolated to me with saucyfox on irc.

Additional info:
* package version(s)
5.5-1

* config and/or log files etc.
#0 0x00007ffff5ab386b in raise () from /usr/lib/libc.so.6
No symbol table info available.
#1 0x00007ffff5a9e40e in abort () from /usr/lib/libc.so.6
No symbol table info available.
#2 0x00007ffff5af58b8 in __libc_message () from /usr/lib/libc.so.6
No symbol table info available.
#3 0x00007ffff5afbd4a in malloc_printerr () from /usr/lib/libc.so.6
No symbol table info available.
#4 0x00007ffff5afd4dc in _int_free () from /usr/lib/libc.so.6
No symbol table info available.
#5 0x000055555556ce08 in ?? ()
No symbol table info available.
#6 0x00005555555758ca in app(int, char**) ()
No symbol table info available.
#7 0x000055555556e766 in main ()
No symbol table info available.

Steps to reproduce:

- Install maim
- Execute `maim`
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Monday, 14 May 2018, 17:34 GMT
Reason for closing:  Fixed
Additional comments about closing:  maim 5.5.1-1
Comment by Raku Smith (raku-cat) - Saturday, 12 May 2018, 05:08 GMT
I've done some more testing with this building with makepkg, I've determined the problem is the optimization flag, after building with `-O2` removed from CFLAGS and CXXFLAGS maim is able to run fine. I Assume this is indicitive of an upstream problem than a packaging problem.
Comment by Lukas Fleischer (lfleischer) - Saturday, 12 May 2018, 12:16 GMT
This has been reported upstream [1].

[1] https://github.com/naelstrof/maim/issues/139
Comment by Christian Rebischke (Shibumi) - Saturday, 12 May 2018, 22:46 GMT
I can confirm that the new version segfaults.
Comment by Rasmus Steinke (rasi) - Saturday, 12 May 2018, 22:52 GMT
I built the package without -O2 flag and it still segfaults...
Comment by Raku Smith (raku-cat) - Saturday, 12 May 2018, 23:33 GMT
I appologize, I should have specified, it only works with gcc if optimizations are turned off. Are you building with clang?
Comment by Rasmus Steinke (rasi) - Sunday, 13 May 2018, 03:31 GMT
I used this build function:

build() {
cd "$pkgname-$pkgver"
cmake -DCMAKE_INSTALL_PREFIX=/usr .
CC=gcc CFLAGS="-O0" CXXFLAGS="-O0" make
}

Resulting binary is still segfaulting.

*EDIT* using options=(!buildflags) indeed works.
Comment by Rasmus Steinke (rasi) - Sunday, 13 May 2018, 03:36 GMT
Here is a proper backtrace with debug symbols:

Thread 1 (Thread 0x7ffff7fa5740 (LWP 1298)):
#0 0x00007ffff5e49b9f in _Unwind_Resume () at /build/gcc/src/gcc/libgcc/unwind.inc:236
#1 0x000055555556d821 in ARGBImage::ARGBImage (this=<optimized out>, image=0x555500000010, iloc=..., selectionrect=...,
channels=1434252656, x11=0x5555557b4c90)
#2 0x000055555557606d in app(int, char**) () at /usr/include/glm/detail/type_vec4.inl:318
#3 0x000055555556f066 in main () at /home/carnager/maim/src/maim-5.5/src/main.cpp:578
#4 0x00007ffff5aa006b in __libc_start_main () from /usr/lib/libc.so.6
#5 0x000055555556f09a in _start () at /home/carnager/maim/src/maim-5.5/src/image.cpp:298
Comment by Raku Smith (raku-cat) - Sunday, 13 May 2018, 21:44 GMT
I'm not sure why this package was flagged out of date, the pr was merged, but there's not been a newer tagged release, it's technically still up to date.
Comment by Daniel Bershatsky (daskol) - Monday, 14 May 2018, 09:44 GMT
It seems that there is double free or memory corruption.
Comment by Daniel Bershatsky (daskol) - Monday, 14 May 2018, 09:58 GMT
Oh, well. This is issue is fixed in v5.5.1. I have built it and it works properly now.
Comment by Raku Smith (raku-cat) - Monday, 14 May 2018, 11:32 GMT
Oh, I didn't ever notice the new tag, I guess this bug should be closed now.

Loading...