mtolly / onyx

Toolkit for converting and building songs for Rock Band, Guitar Hero, Clone Hero, and other similar rhythm games
161 stars 16 forks source link

Lots of segfaults #249

Closed ooshlablu closed 1 year ago

ooshlablu commented 1 year ago

Operating System: Ubuntu 22.04 Customs Version: onyx-20230625-linux-x64.AppImage

For some reason I am hitting a lot of segfaults when trying to run the AppImage. The way they pop up also seems kind of indeterminate with no real way to reproduce other than just running it a few times and seeing them. It doesn't really matter what type of operation you try, sometimes it happens just loading up an existing song, sometimes trying to do a conversion between formats, and sometimes when it's writing files to disk. This is the message produced:

onyx-20230625-linux-x64.AppImage: mmap 4096 bytes at (nil): Cannot allocate memory
onyx-20230625-linux-x64.AppImage: Try specifying an address with +RTS -xm<addr> -RTS
Segmentation fault

FWIW it is that exact same error every time. There is no other type of message that pops up before Segmentation fault. The way the segfaults pop up also seems very strange to me. For instance, sometimes before any GUI is loaded or anything, just running a ./onyx-20230625-linux-x64.AppImage will produce those segfaults. Eventually, if you keep running it, it will start up. Another example: Sometimes those segfaults will appear when writing the files to disk. Eventually, if you load everything up again and try to write the files to disk, it will succeed. The puzzling thing about this is that it is possible to run without issues sometimes. Sometimes it loads up just fine and is able to do many operations without hitting any segfaults.

Let me know if there's any more information you need. I'm more than happy to provide anything that I can to help.

mtolly commented 1 year ago

Hi, thanks so much for reporting this. I haven't encountered this myself on my Mint or Manjaro systems, but it seems like this may just be a compiler bug that I can upgrade to fix:

https://discourse.haskell.org/t/facing-mmap-4096-bytes-at-nil-cannot-allocate-memory-youre-not-alone/6259

I am looking to get a release up soonish with some other bug fixes, so I'll make sure and do that to hopefully alleviate the issue, or if the other fixes take longer I'll just get a hotfix up for you to try.

mtolly commented 1 year ago

Hi @ooshlablu , I have recompiled the current build with an updated compiler which should work around the kernel issue. Can you confirm if this fixes it on your end?

https://github.com/mtolly/onyxite-customs/releases/download/20230625/onyx-20230625-linux-x64-fix1.AppImage

ooshlablu commented 1 year ago

Thanx for the build @mtolly Unfortunately, it seems like the issue may still be there. It looks like this was a debug build, so I attached the full output that was available this time. In this instance, I started it up, loaded an rb3con, and went to convert to CH, selected zip file, and it opened the midi and the ogg, and crashed some time after that.

I can try other operations and give you the output if you need. I figured I'd ask before spamming you with a billion text files :-)

segfault.txt

mtolly commented 1 year ago

Can you give the output of uname -a so I can try loading up your kernel version?

ooshlablu commented 1 year ago
Linux ooshlablu 6.2.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 13 16:27:29 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

(FWIW this is currently the "stock" kernel for Ubuntu 22.04, they bumped it up to 6.2 a couple of months ago)

mtolly commented 1 year ago

Thanks, I loaded the 22.04.3 live USB with that kernel and did indeed see the crash. Frustratingly random like you said, but a long batch process list especially converting to GH:WoR seems to do it after a few songs.

I upgraded compiler again, to the next major version (even though they said the fix was backported to the first one I tried), and as best as I can tell it is working now - let me know how it goes.

https://github.com/mtolly/onyxite-customs/releases/download/20230625/onyx-20230625-linux-x64-fix2.AppImage

ooshlablu commented 1 year ago

@mtolly That seems to work! I tried a few different things, fired it up and quit a few times, and didn't hit another segfault.

mtolly commented 1 year ago

The new build 20230917 and future ones should be good here