Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 853973 - >=media-gfx/prusaslicer-2.4.2_p20220506 crashes : longjmp causes uninitialized stack frame
Summary: >=media-gfx/prusaslicer-2.4.2_p20220506 crashes : longjmp causes uninitialize...
Status: RESOLVED FIXED
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: 2022-06-24 07:36 UTC by xiaojie+bugzillagentoo
Modified: 2022-10-31 20:30 UTC (History)
4 users (show)

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


Attachments
prusa-2.4.2_p20220506 with loglevel 5 trace (prusa-2.4.2_p20220506,6.91 KB, text/plain)
2022-06-24 07:39 UTC, xiaojie+bugzillagentoo
Details
prusa-2.6.0_pre20220601 loglevel 5 trace (prusa-2.6.0_pre20220601,6.91 KB, text/plain)
2022-06-24 07:40 UTC, xiaojie+bugzillagentoo
Details
prusaliscer-2.6.0_pre20220620 loglevel 5 trace (prusa-2.6.0_pre20220620,7.01 KB, text/plain)
2022-06-24 07:40 UTC, xiaojie+bugzillagentoo
Details
emerge --info (info,6.06 KB, text/plain)
2022-06-24 07:42 UTC, xiaojie+bugzillagentoo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description xiaojie+bugzillagentoo 2022-06-24 07:36:57 UTC
With latest ebuilds, prusaslicer crashes very often even without user interaction. 

Reproducible: Sometimes

Steps to Reproduce:
1.launch prusa-slicer
2.use it somehow
3.crash

Happens most of the time
Actual Results:  
Prusa-slicer crashes. Using --loglever 5, last stderr line is usually 
*** longjmp causes uninitialized stack frame ***: terminated


Expected Results:  
Should work okay
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-24 07:38:55 UTC
Need to grab a backtrace if possible. See https://wiki.gentoo.org/wiki/Debugging.
Comment 2 xiaojie+bugzillagentoo 2022-06-24 07:39:56 UTC
Created attachment 787304 [details]
prusa-2.4.2_p20220506 with loglevel 5 trace
Comment 3 xiaojie+bugzillagentoo 2022-06-24 07:40:28 UTC
Created attachment 787307 [details]
prusa-2.6.0_pre20220601 loglevel 5 trace
Comment 4 xiaojie+bugzillagentoo 2022-06-24 07:40:58 UTC
Created attachment 787310 [details]
prusaliscer-2.6.0_pre20220620 loglevel 5 trace
Comment 5 xiaojie+bugzillagentoo 2022-06-24 07:42:17 UTC
Created attachment 787313 [details]
emerge --info
Comment 6 xiaojie+bugzillagentoo 2022-06-24 07:42:53 UTC
(In reply to Sam James from comment #1)
> Need to grab a backtrace if possible. See
> https://wiki.gentoo.org/wiki/Debugging.

Ok preparing that.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-24 07:45:34 UTC
https://github.com/prusa3d/PrusaSlicer/issues/8395 maybe.
Comment 8 Piotr Karbowski (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2022-06-26 20:22:15 UTC
Do you still face the issue on media-gfx/prusaslicer-2.6.0_pre20220620?
Comment 9 Kuba Marek 2022-06-30 13:17:51 UTC
(In reply to Piotr Karbowski from comment #8)
> Do you still face the issue on media-gfx/prusaslicer-2.6.0_pre20220620?

I have tried for a bit, but have not encountered the longjmp crash. I've had couple crashes with `Alarm clock`, but these are probably unrelated.
Comment 10 Piotr Karbowski (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2022-06-30 20:10:13 UTC
Were the alarm clock crashes seen only by gdb, or actually the application were crashing and closing?
Comment 11 Kuba Marek 2022-07-01 06:30:57 UTC
(In reply to Piotr Karbowski from comment #10)
> Were the alarm clock crashes seen only by gdb, or actually the application
> were crashing and closing?

Not through GDB. And correction: The longjmp problems are still here, only less frequent.
Comment 12 Piotr Karbowski (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2022-07-02 10:20:35 UTC
Please check 2.5.0_alpha2. It seems to not be based on master branch but on 2.4.2 instead, perhaps it will solve your problems. I consider it to replace 2.6.0_pre* snapshots later once stabilized.

For now you will need to merge exact version like: emerge -av '=media-gfx/prusaslicer-2.5.0_alpha2'
Comment 13 xiaojie+bugzillagentoo 2022-07-03 19:08:25 UTC
(In reply to Piotr Karbowski from comment #8)
> Do you still face the issue on media-gfx/prusaslicer-2.6.0_pre20220620?

Yes, and with latest 2.6.0_pre20220620-r1 also.
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-03 21:02:45 UTC
Commented upstream (https://github.com/prusa3d/PrusaSlicer/issues/8395#issuecomment-1173170799):
```
1. Can folks hitting this show me `emerge -v1p net-misc/curl` (to see the flags)? Flipping USE=threads on curl may make a difference. Also, try flipping USE=adns.
3. Yeah, I really think this is to do with the curl timeout being safe or not:
- https://bugzilla.redhat.com/show_bug.cgi?id=539809
- https://curl.se/mail/lib-2008-09/0197.html
- https://curl.se/mail/lib-2015-03/0136.html
```
Comment 15 xiaojie+bugzillagentoo 2022-07-03 21:37:26 UTC
(In reply to Sam James from comment #14)
> Commented upstream
> (https://github.com/prusa3d/PrusaSlicer/issues/8395#issuecomment-1173170799):
> ```
> 1. Can folks hitting this show me `emerge -v1p net-misc/curl` (to see the
> flags)? Flipping USE=threads on curl may make a difference. Also, try
> flipping USE=adns.

[ebuild     U  ] net-misc/curl-7.84.0::gentoo [7.83.1::gentoo] USE="ftp http2 imap openssl pop3 progress-meter smtp ssl tftp -adns -alt-svc -brotli -gnutls -gopher -hsts -idn -ipv6 -kerberos -ldap -mbedtls (-nghttp3) -nss (-quiche) -rtmp -samba -ssh -sslv3 -static-libs -telnet -test -threads -verify-sig -zstd" CURL_SSL="openssl -gnutls -mbedtls -nss" 2,420 KiB

So currently no useflags threads nor adns. Setting them up, will test tomorrow (Europe time)
Comment 16 xiaojie+bugzillagentoo 2022-07-03 21:43:51 UTC
(In reply to xiaojie+bugzillagentoo from comment #15)
> (In reply to Sam James from comment #14)
> > Commented upstream
> > (https://github.com/prusa3d/PrusaSlicer/issues/8395#issuecomment-1173170799):
> > ```
> > 1. Can folks hitting this show me `emerge -v1p net-misc/curl` (to see the
> > flags)? Flipping USE=threads on curl may make a difference. Also, try
> > flipping USE=adns.
> 
> [ebuild     U  ] net-misc/curl-7.84.0::gentoo [7.83.1::gentoo] USE="ftp
> http2 imap openssl pop3 progress-meter smtp ssl tftp -adns -alt-svc -brotli
> -gnutls -gopher -hsts -idn -ipv6 -kerberos -ldap -mbedtls (-nghttp3) -nss
> (-quiche) -rtmp -samba -ssh -sslv3 -static-libs -telnet -test -threads
> -verify-sig -zstd" CURL_SSL="openssl -gnutls -mbedtls -nss" 2,420 KiB
> 
> So currently no useflags threads nor adns. Setting them up, will test
> tomorrow (Europe time)

Btw, seems to be either threads or adns, not both (emerge does not allow this).
Comment 17 xiaojie+bugzillagentoo 2022-07-04 21:57:03 UTC
(In reply to xiaojie+bugzillagentoo from comment #15)
> (In reply to Sam James from comment #14)
> > Commented upstream
> > (https://github.com/prusa3d/PrusaSlicer/issues/8395#issuecomment-1173170799):
> > ```
> > 1. Can folks hitting this show me `emerge -v1p net-misc/curl` (to see the
> > flags)? Flipping USE=threads on curl may make a difference. Also, try
> > flipping USE=adns.
> 
> [ebuild     U  ] net-misc/curl-7.84.0::gentoo [7.83.1::gentoo] USE="ftp
> http2 imap openssl pop3 progress-meter smtp ssl tftp -adns -alt-svc -brotli
> -gnutls -gopher -hsts -idn -ipv6 -kerberos -ldap -mbedtls (-nghttp3) -nss
> (-quiche) -rtmp -samba -ssh -sslv3 -static-libs -telnet -test -threads
> -verify-sig -zstd" CURL_SSL="openssl -gnutls -mbedtls -nss" 2,420 KiB
> 
> So currently no useflags threads nor adns. Setting them up, will test
> tomorrow (Europe time)

As far as the tests I did go, curl[threads] or curl[adns] do NOT trigger the crashes. Will go on using prusaslicer a little bit more to be more affirmative (or not, depends).
Comment 18 Piotr Karbowski (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2022-07-05 15:42:43 UTC
What do you have on mind is that, as long as curl (libcurl) is built with threads, prusa-slicer do not have random crashes for you? That's rather odd, given that those crashes are random, and we do not get any of undefined reference errors.
Comment 19 xiaojie+bugzillagentoo 2022-07-05 16:58:18 UTC
(In reply to Piotr Karbowski from comment #18)
> What do you have on mind is that, as long as curl (libcurl) is built with
> threads, prusa-slicer do not have random crashes for you? That's rather odd,
> given that those crashes are random, and we do not get any of undefined
> reference errors.

I only followed what is hinted at https://github.com/prusa3d/PrusaSlicer/issues/8395#issuecomment-1173170799. 

Seems to work (at least got no crashes yesterday and today).
Comment 20 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-05 17:49:04 UTC
(In reply to Piotr Karbowski from comment #18)
> What do you have on mind is that, as long as curl (libcurl) is built with
> threads, prusa-slicer do not have random crashes for you? That's rather odd,
> given that those crashes are random, and we do not get any of undefined
> reference errors.

It's not random at all -- see my explanation on the upstream bug. It's to do with timeouts when curl doesn't have asynchronous DNS support. The timeouts then interrupt unsafely.
Comment 21 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-05 17:49:25 UTC
(In reply to Sam James from comment #20)
> It's not random at all -- see my explanation on the upstream bug. It's to do
> with timeouts when curl doesn't have asynchronous DNS support. The timeouts
> then interrupt unsafely.

We're likely to have to add a dep on net-misc/curl[adns], but let's await more testing first.
Comment 22 Larry the Git Cow gentoo-dev 2022-07-06 21:25:15 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4affbff1644fa09e286957bd246a00b3c9dc5799

commit 4affbff1644fa09e286957bd246a00b3c9dc5799
Author:     Piotr Karbowski <slashbeast@gentoo.org>
AuthorDate: 2022-07-06 21:01:43 +0000
Commit:     Piotr Karbowski <slashbeast@gentoo.org>
CommitDate: 2022-07-06 21:25:12 +0000

    media-gfx/prusaslicer: depend on curl with async DNS support.
    
    Closes: https://bugs.gentoo.org/853973
    Signed-off-by: Piotr Karbowski <slashbeast@gentoo.org>

 ...usaslicer-2.5.0_alpha2.ebuild => prusaslicer-2.5.0_alpha2-r1.ebuild} | 2 +-
 ....0_pre20220601-r1.ebuild => prusaslicer-2.6.0_pre20220601-r2.ebuild} | 2 +-
 ....0_pre20220620-r1.ebuild => prusaslicer-2.6.0_pre20220620-r2.ebuild} | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)