Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 643774 - media-gfx/slic3r-1.2.9-r2 segfaults in deleted file (NVidia GL?)
Summary: media-gfx/slic3r-1.2.9-r2 segfaults in deleted file (NVidia GL?)
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: 3D Printing Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-07 12:30 UTC by Kobboi
Modified: 2019-11-08 21:21 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
gdb thread backtrace (slic3r.pl-gdb-threads.log,40.71 KB, text/x-log)
2018-01-15 07:38 UTC, Kobboi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kobboi 2018-01-07 12:30:57 UTC
[13351.373702] perl[17596]: segfault at 0 ip 000000004051befc sp 00007ffe383743c8 error 4 in .gllAxPLL (deleted)[4051a000+2000]
[13399.034765] perl[17623]: segfault at 0 ip 000000004184cefc sp 00007ffefe05c1d8 error 4 in .glJQXGLM (deleted)[4184b000+2000]
[14375.051448] perl[8616]: segfault at 0 ip 0000000041737efc sp 00007ffd8ddce4a8 error 4 in .glcREnEZ (deleted)[41736000+2000]
[14787.494663] perl[22557]: segfault at 0 ip 00000000414c3efc sp 00007fffb790e928 error 4 in .glo0yd2U (deleted)[414c2000+2000]

Some kind of race condition?
Comment 1 Kobboi 2018-01-07 12:34:12 UTC
Looking at strace output:

(...)
unlink("/home/christophe/.nv/GLCache/39f7654ac692dffdc022929d113b8e33/3ffa1532a7ab8bff") = -1 EISDIR (Is a directory)
rmdir("/home/christophe/.nv/GLCache/39f7654ac692dffdc022929d113b8e33/3ffa1532a7ab8bff") = -1 ENOTEMPTY (Directory not empty)
stat("/home/christophe/.nv/GLCache/39f7654ac692dffdc022929d113b8e33/.", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat("/home/christophe/.nv/GLCache/39f7654ac692dffdc022929d113b8e33/..", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
unlink("/home/christophe/.nv/GLCache/39f7654ac692dffdc022929d113b8e33") = -1 EISDIR (Is a directory)
rmdir("/home/christophe/.nv/GLCache/39f7654ac692dffdc022929d113b8e33") = -1 ENOTEMPTY (Directory not empty)
(...)

I guess this is NVidia related. Will try to downstep a driver version (currently 390.12 on 4.14.12)
Comment 2 Jonas Stein gentoo-dev 2018-01-08 14:51:22 UTC
What exactly needs to be done to reproduce this?
Could you try to rebuild the package and attach the logs and the --info
Perhaps there are some hints or useful compiler warnings.
Please *attach* the logfiles,
https://wiki.gentoo.org/wiki/Attach_the_logs_to_the_bug_ticket
and reopen this ticket (Status:unconfirmed).
Comment 3 Kobboi 2018-01-09 18:31:15 UTC
- emerge slic3r
- run slic3r.pl
Comment 4 Kobboi 2018-01-09 18:33:35 UTC
Running slic3r on my machine at work (ATI Caicos XTX) works fine.
Comment 5 Jonas Stein gentoo-dev 2018-01-14 01:59:41 UTC
Still no logs. :(
I am not sure, if the maintainer can do anything with so few details.
I guess we can not do anything and this should be reported to upstream. @Maintainer: What do you think?
Comment 6 Kobboi 2018-01-14 11:34:10 UTC
How do I attach logs of a compilation that does not fail?
Comment 7 Michael 'veremitz' Everitt 2018-01-14 12:07:16 UTC
Could you rebuild with debug symbols maybe? There's a couple of wiki pages relating to how on the gentoo wiki.

Also, does it help to run through gdb .. do you get any more info from that .. stack dump, etc? or is that what you've already posted?

Can you explain what you were doing when this happened .. or did it literally do it completely spontaneously?

What suspects you to believe its Nvidia-related .. can you post whether you're using nvidia-drivers package, and which version .. or nouveau and what video card you're using if so.

I think you've given us a few clues in previous comments, but need to put the jigsaw pieces together, collectively! Tia.
Comment 8 Kobboi 2018-01-14 12:17:51 UTC
- I think it's nvidia because of the path of the deleted file, $HOME/.nv/
- I have tried all available nvidia-drivers as far as they are compatible with my kernel (4.14), but will also try 4.9 
- I just segfaults immediately, no GUI shown
- I will try to compile some relevant packages with debug symbols (feel free to give hints as to which ones), but with the actual segfault being in some kind of runtime generated file that might still not be enough. I don't know how this GLCache thing works either.
Comment 9 Kobboi 2018-01-14 14:07:25 UTC
By running perl -d $(which slic3r.pl) --gui, I get

main::(/usr/bin/slic3r.pl:114):	    $gui->MainLoop;
  DB<1> 

Signal SEGV at /usr/lib64/perl5/vendor_perl/5.26.1/Slic3r/GUI/3DScene.pm line 78.
	Slic3r::GUI::3DScene::Base::__ANON__[/usr/lib64/perl5/vendor_perl/5.26.1/Slic3r/GUI/3DScene.pm:79](Slic3r::GUI::Plater::3D=HASH(0x5580ad9ec958), Wx::PaintEvent=SCALAR(0x5580aded9a48)) called at /usr/bin/slic3r.pl line 114
	eval {...} called at /usr/bin/slic3r.pl line 114
Comment 10 Kobboi 2018-01-14 14:10:36 UTC
I am currently able to work around the segfault by switching to another opengl implementation:

$ eselect opengl set xorg-x11
Comment 11 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2018-01-15 02:38:44 UTC
(In reply to Kobboi from comment #9)
> By running perl -d $(which slic3r.pl) --gui, I get
> 
> main::(/usr/bin/slic3r.pl:114):	    $gui->MainLoop;
>   DB<1> 
> 
> Signal SEGV at /usr/lib64/perl5/vendor_perl/5.26.1/Slic3r/GUI/3DScene.pm
> line 78.
> 	Slic3r::GUI::3DScene::Base::__ANON__[/usr/lib64/perl5/vendor_perl/5.26.1/
> Slic3r/GUI/3DScene.pm:79](Slic3r::GUI::Plater::3D=HASH(0x5580ad9ec958),
> Wx::PaintEvent=SCALAR(0x5580aded9a48)) called at /usr/bin/slic3r.pl line 114
> 	eval {...} called at /usr/bin/slic3r.pl line 114


perl -d is not really useful for debugging segfaults, its only useful for debugging perl-space flow control.

SEGV's tend to occur in C-Space code, so you'll want to have relevant components compiled with -ggdb3 or something like that, and then run something like 

gdb --args perl $(which slice3r.pl) --gui 

and then when it crashes, do:

> thread apply all bt full

And the stack trace will show which *C* code was in play when the SEGV triggered.
Comment 12 Kobboi 2018-01-15 07:38:30 UTC
Created attachment 514852 [details]
gdb thread backtrace
Comment 13 Kobboi 2018-01-15 08:10:17 UTC
Minor improvement:

Thread 1 (Thread 0x7ffff7fad540 (LWP 1530)):
#0  0x00000000400a2efc in ?? ()
No symbol table info available.
#1  0x00007fffdb816604 in ?? () from /usr/lib64/libnvidia-glcore.so.387.34
No symbol table info available.
#2  0x00007fffdb3e4028 in ?? () from /usr/lib64/libnvidia-glcore.so.387.34
No symbol table info available.
#3  0x00007fffde655975 in XS_OpenGL_glDrawArrays (my_perl=<optimized out>, cv=<optimized out>) at pogl_gl_Accu_GetM.c:1176
        mode = 4
        first = 0
        count = <optimized out>
        sp = <optimized out>
        ax = <optimized out>
        __PRETTY_FUNCTION__ = "XS_OpenGL_glDrawArrays"
#4  0x00007ffff79dbe6d in Perl_pp_entersub (my_perl=0x555555757260) at pp_hot.c:4231
        is_scalar = false
        sp = <optimized out>
        sv = 0x555557e47710
        gv = 0x555555757260
        cv = 0x555557a56130
        old_savestack_ix = <optimized out>
        __PRETTY_FUNCTION__ = "Perl_pp_entersub"
#5  0x00007ffff79970fa in Perl_runops_debug (my_perl=0x555555757260) at dump.c:2451
No locals.
Comment 14 Andreas K. Hüttel archtester gentoo-dev 2019-10-24 16:39:05 UTC
Is this still happening?
Comment 15 Andreas K. Hüttel archtester gentoo-dev 2019-11-08 17:45:00 UTC
(In reply to Andreas K. Hüttel from comment #14)
> Is this still happening?

Seems not.
Comment 16 Kobboi 2019-11-08 21:21:54 UTC
(In reply to Andreas K. Hüttel from comment #14)
> Is this still happening?

I have moved to using PrusaSlicer