lmms
lmms copied to clipboard
SIGABRT when moving a track in the song editor while playing
Hi,
I cannot reproduce, that’s the kind of crash I get randomly from time to time. I don’t know if just a backtrace can be useful in this case but in doubt, I put it there. Let me know if I must avoid to open such issue, for just a crash without further details, I’ll stop then. All I can tell is that it happened when I was moving a track in the song editor, LMMS was playing. There it is:
ASSERT: "std::is_sorted(clips.begin(), clips.end(), Clip::comparePosition)" in file /usr/local/src/lmms/src/core/TrackContainer.cpp, line 287
Thread 38 "AudioEngine::fi" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fff51bfe6c0 (LWP 33517)]
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
44 ./nptl/pthread_kill.c: Aucun fichier ou dossier de ce type.
(gdb) bt full
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
tid = <optimized out>
ret = 0
pd = <optimized out>
old_mask = {__val = {4702111234474983745}}
ret = <optimized out>
#1 0x00007ffff62a9d9f in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2 0x00007ffff625af32 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
ret = <optimized out>
#3 0x00007ffff6245472 in __GI_abort () at ./stdlib/abort.c:79
save_stage = 1
act = {__sigaction_handler = {sa_handler = 0x20, sa_sigaction = 0x20}, sa_mask = {__val = {1880844493789993498, 0, 0, 0, 0, 2314885530818453536, 2314885530818453536, 2314885530818453536, 2314885530818453536, 0, 0, 0, 0, 3, 140734564915016, 1}}, sa_flags = -162775960, sa_restorer = 0x0}
#4 0x00007ffff6490c79 in () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#5 0x00007ffff6490024 in qt_assert_x(char const*, char const*, char const*, int) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#6 0x000055555589b709 in lmms::TrackContainer::automatedValuesFromTracks(std::vector<lmms::Track*, std::allocator<lmms::Track*> > const&, lmms::TimePos, int) (tracks=std::vector of length 17, capacity 32 = {...}, time=..., clipNum=18) at /usr/local/src/lmms/src/core/TrackContainer.cpp:287
clips = std::vector of length 5, capacity 8 = {0x7ffff2b84900, 0x7ffeee803500, 0x7ffeee803280, 0x7ffeee804180, 0x7ffeee804400}
valueMap = {d = 0x7ffff6798660 <QMapDataBase::shared_null>}
#7 0x000055555589b50f in lmms::TrackContainer::automatedValuesAt(lmms::TimePos, int) const (this=0x5555569eb1a0, time=..., clipNum=18)
at /usr/local/src/lmms/src/core/TrackContainer.cpp:255
#8 0x0000555555867fa7 in lmms::PatternStore::automatedValuesAt(lmms::TimePos, int) const (this=0x5555569eb1a0, time=..., clipNum=18)
at /usr/local/src/lmms/src/core/PatternStore.cpp:252
lengthBars = 16
lengthTicks = 3072
#9 0x000055555589ba99 in lmms::TrackContainer::automatedValuesFromTracks(std::vector<lmms::Track*, std::allocator<lmms::Track*> > const&, lmms::TimePos, int) (tracks=std::vector of length 45, capacity 45 = {...}, time=..., clipNum=-1) at /usr/local/src/lmms/src/core/TrackContainer.cpp:320
patIndex = 18
patStore = 0x5555569eb1a0
patTime = {m_ticks = 672}
patValues = {d = 0x7ffff6798660 <QMapDataBase::shared_null>}
pattern = 0x7ffeee7f1100
p = 0x0
clip = 0x7ffeee7f1100
__for_range = std::vector of length 95, capacity 128 = {0x7ffff2ae0d00, 0x7ffff2ae0f80, 0x7ffff2ae0a80, 0x7ffff2ae0800, 0x7ffff2ae0580, 0x7ffff2ae0300, 0x7ffff2ae0080, 0x7ffff2ae1200, 0x7ffff2ae1480, 0x7ffff2ae1700, 0x7ffeee7c04a0, 0x7ffeee7fb3f0, 0x7ffeee802880, 0x7ffeee802b00, 0x7ffeee7c25a0, 0x7ffeee7c5300, 0x7ffeee4e8780, 0x7ffeee4e9400, 0x7ffeee4e9900, 0x7ffeee4e9b80, 0x7ffeee4ea580, 0x7ffeee4eaf80, 0x7ffeee4eb700, 0x7ffeee7e5510, 0x7ffeee7eadc0, 0x7ffeee4ec600, 0x7ffeee4ec880, 0x7ffeee7c06b0, 0x7ffeee7c1520, 0x7ffeee7c5510, 0x7ffeee7e50f0, 0x7ffeee7f1100, 0x7ffeee4ecb00, 0x7ffeee4ed000, 0x7ffeee7fb600, 0x7ffeee7e5300, 0x7ffeee7c1730, 0x7ffeee7c5720, 0x7ffeee7c1940, 0x7ffeee7c5930, 0x7ffeee7f1310, 0x7ffeee7fb810, 0x7ffeee7c1b50, 0x7ffeee7c5b40, 0x7ffeee7eafd0, 0x7ffeee7c1d60, 0x7ffeee7c5d50, 0x7ffeee7f0ef0, 0x7ffeee7f1520, 0x7ffeee4ef300, 0x7ffeee7fba20, 0x7ffeee7c1f70, 0x7ffeee7c5f60, 0x7ffeee7e5720, 0x7ffeee7c2180, 0x7ffeee7c6170, 0x7ffeee7e5930, 0x7ffeee7fbc30, 0x7ffeee7c2390, 0x7ffeee7c6380, 0x7ffeee7e5b40, 0x7ffeee7f0ce0, 0x7ffeee7c8cc0, 0x7ffeee7cabb0, 0x7ffeee7e5f60, 0x7ffeee7eb1e0, 0x7ffeee7f1730, 0x7ffeee801700, 0x7ffeee7fbe40, 0x7ffeee7e5d50, 0x7ffeee7c90e0, 0x7ffeee7cadc0, 0x7ffeee7eb3f0, 0x7ffeee7eb600, 0x7ffeee7f1940, 0x7ffeee801480, 0x7ffeee7fc050, 0x7ffeee7c92f0, 0x7ffeee7cafd0, 0x7ffeee7c9500, 0x7ffeee7cb1e0, 0x7ffeee7c9710, 0x7ffeee7cb3f0, 0x7ffeee7c3e60, 0x7ffeee7c6590, 0x7ffeee7f1b50, 0x7ffeee4ed280, 0x7ffeee7eb810, 0x7ffeee7f1d60, 0x7ffeee7e6170, 0x7ffeee7eba20, 0x7ffeee7f2180, 0x7ffeee7fc260, 0x7ffeee7c4070, 0x7ffeee7c67a0}
--Type <RET> for more, q to quit, c to continue without paging--
__for_begin = 0x7ffeee7f1100
__for_end = 0x2751
clips = std::vector of length 95, capacity 128 = {0x7ffff2ae0d00, 0x7ffff2ae0f80, 0x7ffff2ae0a80, 0x7ffff2ae0800, 0x7ffff2ae0580, 0x7ffff2ae0300, 0x7ffff2ae0080, 0x7ffff2ae1200, 0x7ffff2ae1480, 0x7ffff2ae1700, 0x7ffeee7c04a0, 0x7ffeee7fb3f0, 0x7ffeee802880, 0x7ffeee802b00, 0x7ffeee7c25a0, 0x7ffeee7c5300, 0x7ffeee4e8780, 0x7ffeee4e9400, 0x7ffeee4e9900, 0x7ffeee4e9b80, 0x7ffeee4ea580, 0x7ffeee4eaf80, 0x7ffeee4eb700, 0x7ffeee7e5510, 0x7ffeee7eadc0, 0x7ffeee4ec600, 0x7ffeee4ec880, 0x7ffeee7c06b0, 0x7ffeee7c1520, 0x7ffeee7c5510, 0x7ffeee7e50f0, 0x7ffeee7f1100, 0x7ffeee4ecb00, 0x7ffeee4ed000, 0x7ffeee7fb600, 0x7ffeee7e5300, 0x7ffeee7c1730, 0x7ffeee7c5720, 0x7ffeee7c1940, 0x7ffeee7c5930, 0x7ffeee7f1310, 0x7ffeee7fb810, 0x7ffeee7c1b50, 0x7ffeee7c5b40, 0x7ffeee7eafd0, 0x7ffeee7c1d60, 0x7ffeee7c5d50, 0x7ffeee7f0ef0, 0x7ffeee7f1520, 0x7ffeee4ef300, 0x7ffeee7fba20, 0x7ffeee7c1f70, 0x7ffeee7c5f60, 0x7ffeee7e5720, 0x7ffeee7c2180, 0x7ffeee7c6170, 0x7ffeee7e5930, 0x7ffeee7fbc30, 0x7ffeee7c2390, 0x7ffeee7c6380, 0x7ffeee7e5b40, 0x7ffeee7f0ce0, 0x7ffeee7c8cc0, 0x7ffeee7cabb0, 0x7ffeee7e5f60, 0x7ffeee7eb1e0, 0x7ffeee7f1730, 0x7ffeee801700, 0x7ffeee7fbe40, 0x7ffeee7e5d50, 0x7ffeee7c90e0, 0x7ffeee7cadc0, 0x7ffeee7eb3f0, 0x7ffeee7eb600, 0x7ffeee7f1940, 0x7ffeee801480, 0x7ffeee7fc050, 0x7ffeee7c92f0, 0x7ffeee7cafd0, 0x7ffeee7c9500, 0x7ffeee7cb1e0, 0x7ffeee7c9710, 0x7ffeee7cb3f0, 0x7ffeee7c3e60, 0x7ffeee7c6590, 0x7ffeee7f1b50, 0x7ffeee4ed280, 0x7ffeee7eb810, 0x7ffeee7f1d60, 0x7ffeee7e6170, 0x7ffeee7eba20, 0x7ffeee7f2180, 0x7ffeee7fc260, 0x7ffeee7c4070, 0x7ffeee7c67a0}
valueMap = {d = 0x7fff44071a30}
#10 0x000055555588c0ec in lmms::Song::automatedValuesAt(lmms::TimePos, int) const (this=0x555556a003c0, time=..., clipNum=-1)
at /usr/local/src/lmms/src/core/Song.cpp:845
trackList = std::vector of length 45, capacity 45 = {0x7ffff2a60080, 0x7ffff2b50080, 0x7ffeee4f3f80, 0x7ffeee4f41c0, 0x7ffeee4f4400, 0x7ffeee4f4640, 0x7ffeee4f4880, 0x7ffeee4f4ac0, 0x7ffeee4f4d00, 0x7ffeee4f4f40, 0x7ffeee4f5180, 0x7ffeee4f53c0, 0x7ffeee4f5600, 0x7ffeee4f5840, 0x7ffff2a60da0, 0x7ffff2a60fd0, 0x7ffff2a61200, 0x7ffff2a61430, 0x7ffff2a61660, 0x7ffeee4f5a80, 0x7ffeee4f5cc0, 0x7ffff2a61890, 0x7ffeee4f5f00, 0x7ffeee4f6140, 0x7ffff2a61ac0, 0x7ffff2a61cf0, 0x7ffff2a61f20, 0x7ffff2a62150, 0x7ffeee4f6380, 0x7ffff2a62380, 0x7ffff2a625b0, 0x7ffeee4f9980, 0x7ffeee4f65c0, 0x7ffff2a627e0, 0x7ffff2a62a10, 0x7ffeee4f6800, 0x7ffeee4f6a40, 0x7ffff2a62c40, 0x7ffff2a62e70, 0x7ffeee4f6c80, 0x7ffff2a630a0, 0x7ffff2a632d0, 0x7ffeee4f6ec0, 0x7ffff2a63500, 0x7ffff2a63730}
#11 0x000055555588a756 in lmms::Song::processAutomations(std::vector<lmms::Track*, std::allocator<lmms::Track*> > const&, lmms::TimePos, short)
(this=0x555556a003c0, tracklist=std::vector of length 44, capacity 44 = {...}, timeStart=...) at /usr/local/src/lmms/src/core/Song.cpp:385
values = {d = 0x7ffff6798660 <QMapDataBase::shared_null>}
recordedModels = {q_hash = {{d = 0x7ffff67985a0 <QHashData::shared_null>, e = 0x7ffff67985a0 <QHashData::shared_null>}}}
container = 0x555556a003c0
clipNum = -1
tracks = <error reading variable: Cannot access memory at address 0x151bfdc08>
clips = Python Exception <class 'gdb.MemoryError'>: Cannot access memory at address 0x51bfdb80
#12 0x000055555588a38f in lmms::Song::processNextBuffer() (this=0x555556a003c0) at /usr/local/src/lmms/src/core/Song.cpp:341
frameOffsetInTick = 0.25
framesUntilNextPeriod = 51
framesUntilNextTick = 383
framesToPlay = 51
trackList = std::vector of length 44, capacity 44 = {0x7ffff2b50080, 0x7ffeee4f3f80, 0x7ffeee4f41c0, 0x7ffeee4f4400, 0x7ffeee4f4640, 0x7ffeee4f4880, 0x7ffeee4f4ac0, 0x7ffeee4f4d00, 0x7ffeee4f4f40, 0x7ffeee4f5180, 0x7ffeee4f53c0, 0x7ffeee4f5600, 0x7ffeee4f5840, 0x7ffff2a60da0, 0x7ffff2a60fd0, 0x7ffff2a61200, 0x7ffff2a61430, 0x7ffff2a61660, 0x7ffeee4f5a80, 0x7ffeee4f5cc0, 0x7ffff2a61890, 0x7ffeee4f5f00, 0x7ffeee4f6140, 0x7ffff2a61ac0, 0x7ffff2a61cf0, 0x7ffff2a61f20, 0x7ffff2a62150, 0x7ffeee4f6380, 0x7ffff2a62380, 0x7ffff2a625b0, 0x7ffeee4f9980, 0x7ffeee4f65c0, 0x7ffff2a627e0, 0x7ffff2a62a10, 0x7ffeee4f6800, 0x7ffeee4f6a40, 0x7ffff2a62c40, 0x7ffff2a62e70, 0x7ffeee4f6c80, 0x7ffff2a630a0, 0x7ffff2a632d0, 0x7ffeee4f6ec0, 0x7ffff2a63500, 0x7ffff2a63730}
clipNum = -1
enforceLoop = {__this = 0x555556a003c0}
timeline = 0x55555d0a6480
loopEnabled = true
framesPerTick = 382.8125
framesPerPeriod = 128
frameOffsetInPeriod = 77
#13 0x00005555557d5005 in lmms::AudioEngine::renderStageNoteSetup() (this=0x555556951ba0) at /usr/local/src/lmms/src/core/AudioEngine.cpp:380
--Type <RET> for more, q to quit, c to continue without paging--
profilerProbe = {m_profiler = @0x555556951ca0, m_type = lmms::AudioEngineProfiler::DetailType::NoteSetup}
it_rem = {i = 0x7fff44012750}
mixer = 0x555556954ce0
#14 0x00005555557d5446 in lmms::AudioEngine::renderNextBuffer() (this=0x555556951ba0) at /usr/local/src/lmms/src/core/AudioEngine.cpp:465
#15 0x00005555557d76cd in lmms::AudioEngine::fifoWriter::run() (this=0x55555c630940) at /usr/local/src/lmms/src/core/AudioEngine.cpp:1298
buffer = 0x7fff44081b10
b = 0x555556984660
frames = 128
#16 0x00007ffff64cbd43 in () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007ffff62a8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
ret = <optimized out>
pd = <optimized out>
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140734564918976, 1130618180011386498, -288, 11, 140737488344016, 140734556528640, -1130860623447628158, -1130632847377340798}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call = <optimized out>
#18 0x00007ffff632861c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
This is with LMMS master branch built on Debian 12, commit 7839a5760cc4f (November the 3rd)
While it’s clearly a development version and as such, should not be used “in production”, I’d like to let you know it is quite stable though. I’ve been using LMMS nearly 20+ hours the last couple of days and only had 2 crashes. You’re all doing great job. I’m happy to see LMMS’s development very active since a couple of years. So many enhancements have been done recently.
Do not hesitate if you think I can be of any help in testing a particular branch or doing any test which could be useful.
Have a nice day.
I tested this with ThreadSanitizer and compared the behavior for both the master branch and #6881 with a sample track. Whats similar is the occasional data race on calls to lmms::SampleClip::setIsPlaying
and does not happen all the time. For the differences, most of the time when I move the track on the master branch, I get a data race involving the requestChangeInModel
and doneChangeInModel
mechanism, along with some with rpmalloc
. #6881 doesn't seem to exhibit these data races, and as mentioned I only saw the data race on calls to lmms::SampleClip::setIsPlaying
. I can't say with any guarantee that #6881 fixes this issue, but I don't mind probing the idea.
Could you see if that PR fixes this for you @M4rotte? I understand that reproducing this could take a while, so if you go ahead with testing this, I would probably try it out for a few days/weeks to see if anything pops up. If it ends up not fixing it, then we'll have to look elsewhere. Link to the builds are here (would usually use the link from lmms.io, but the current builds are failing).
Hi, Sorry for the late answer, I didn’t get this particular error with the last builds. So it seems to be fixed as you suggest.
About the specific version I use: I use to checkout the last master every times I use LMMS, and to build the program if there is any new commit. My brand new workstation builds LMMS in about one minute (I don’t build VST, SDL, Portaudio and Pulseaudio support though), So this is not a constraint in any way. But I’ll try to specify the exact commit when I open another case.
So it seems to be fixed as you suggest.
@M4rotte fine with closing?
Yes, this one can be closed. I did not experience the bug recently. Thank you.