Douglas Regehr
2013-01-31 18:40:22 UTC
Hi, I'm trying to load a session in non-session-manager that used to load
just fine a couple days ago. However, when I tried to load it today
non-daw got stuck when it was 58% done loading my session. I tried
aborting in non-session-manager but non-daw remained open. I eventually
had to kill it violently from the command line. The problem is
repeatable. I attached a debugger to see what was going on and here is the
backtrace:
#0 0x00007f1b0d78483d in nanosleep () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f1b0d7b2774 in usleep () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x000000000041a534 in Disk_Stream::shutdown (this=0x213ae70)
at ../timeline/src/Engine/Disk_Stream.C:151
#3 0x000000000041a257 in Disk_Stream::~Disk_Stream (this=0x213ae70,
__in_chrg=<optimized out>) at ../timeline/src/Engine/Disk_Stream.C:78
#4 0x000000000041f5e1 in Playback_DS::~Playback_DS (this=0x213ae70,
__in_chrg=<optimized out>) at ../timeline/src/Engine/Playback_DS.H:22
#5 0x000000000041f614 in Playback_DS::~Playback_DS (this=0x213ae70,
__in_chrg=<optimized out>) at ../timeline/src/Engine/Playback_DS.H:22
#6 0x0000000000420e21 in Track::configure_outputs (this=0x213bb20, n=0)
at ../timeline/src/Engine/Track.C:82
#7 0x0000000000437473 in Track::~Track (this=0x213bb20,
__in_chrg=<optimized out>) at ../timeline/src/Track.C:119
#8 0x000000000043758e in Track::~Track (this=0x213bb20,
__in_chrg=<optimized out>) at ../timeline/src/Track.C:127
#9 0x000000000044e02f in Loggable::do_this (
s=0x7fff7bc28af0 "Track 0x94A destroy << :name \"snare crack\"
:sequence 0x0 :selected 0 :color 2118157429", reverse=false) at
../nonlib/Loggable.C:415
#10 0x000000000044d7f0 in Loggable::replay (fp=0x2007ce0)
at ../nonlib/Loggable.C:215
#11 0x000000000044d54f in Loggable::open (filename=0x45cc4a "history")
at ../nonlib/Loggable.C:138
#12 0x000000000042438d in Project::open (
name=0x1fb57a0 "/home/oem/NSM Sessions/The Source/Non-DAW.nAICS")
at ../timeline/src/Project.C:317
#13 0x000000000043462a in Timeline::command_load (this=0x1e98730,
name=0x1fb57a0 "/home/oem/NSM Sessions/The Source/Non-DAW.nAICS",
display_name=0x1fb57d0 "The Source") at ../timeline/src/Timeline.C:1999
#14 0x000000000042377d in command_open (
name=0x1fb57a0 "/home/oem/NSM Sessions/The Source/Non-DAW.nAICS",
display_name=0x1fb57d0 "The Source", client_id=0x1fb57dc
"Non-DAW.nAICS",
out_msg=0x7fff7bc2aca8, userdata=0x0) at ../timeline/src/NSM.C:64
#15 0x000000000043d1c4 in _nsm_osc_open (path=0x1ebe8c0 "/nsm/client/open",
types=0x1eea491 "sss", argv=0x1fb3a80, argc=3, msg=0x1fb3a30,
user_data=0x1eb7550) at /home/oem/non/nonlib/nsm.h:369
#16 0x00007f1b0ecb1a28 in ?? () from /usr/lib/liblo.so.7
#17 0x00007f1b0ecb2262 in lo_server_dispatch_data () from
/usr/lib/liblo.so.7
#18 0x00007f1b0ecb2835 in lo_server_recv () from /usr/lib/liblo.so.7
#19 0x000000000043cf80 in nsm_check_wait (nsm=0x1eb7550, timeout=0)
at /home/oem/non/nonlib/nsm.h:252
#20 0x000000000043cfa8 in nsm_check_nowait (nsm=0x1eb7550)
at /home/oem/non/nonlib/nsm.h:259
#21 0x000000000043daf3 in check_nsm (v=0x0) at ../timeline/src/main.C:124
#22 0x00007f1b0e502a8c in Fl::wait (time_to_wait=1e+20) at ../src/Fl.cxx:499
#23 0x00007f1b0e502bad in Fl::run () at ../src/Fl.cxx:542
#24 0x000000000043e09f in main (argc=1, argv=0x7fff7bc2b478)
at ../timeline/src/main.C:290
Here's my interpretation: It seems that the Track destructor is getting
called twice on the same object. The second time it tries to delete the
underlying disk stream there is no thread to destroy, and so it continues
waiting for the thread to terminate forever. I have no idea why the Track
destructor is getting called twice for the same object.
I have problems loading sessions a couple times a week on average, though
this is the first time I've ever bothered to attach gdb and get a trace.
Usually what I do is revert to a backup (I use a cron job to nightly backup
my sessions to an external drive) or open up the history file with a text
editor and delete lines from the bottom of the file until the session
finally loads. Today I found a new way to work-around the problem: "cp
snapshot history" -- not an ideal solution in the least, but the best I
could do for now. In general I find loading sessions to be unreliable. I
feel I have no way to guarantee a session will open again after I've done
some work on it. It is quite scary. Problems seem to occur mostly when I
am adding/removing a lot of tracks and/or takes in short succession.
Note I'm using the latest code from git...
One more thing: As part of my nightly backup I run a script to replace all
the symlinks in the sources directory with copies of the actual files. I
can't imagine this would cause non-daw to have trouble loading sessions,
but I'm mentioning it just in case. There is a script included in non-daw
called import-external-sources but I do not think it works anymore, so I
have written my own...
Regards,
Doug
just fine a couple days ago. However, when I tried to load it today
non-daw got stuck when it was 58% done loading my session. I tried
aborting in non-session-manager but non-daw remained open. I eventually
had to kill it violently from the command line. The problem is
repeatable. I attached a debugger to see what was going on and here is the
backtrace:
#0 0x00007f1b0d78483d in nanosleep () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f1b0d7b2774 in usleep () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x000000000041a534 in Disk_Stream::shutdown (this=0x213ae70)
at ../timeline/src/Engine/Disk_Stream.C:151
#3 0x000000000041a257 in Disk_Stream::~Disk_Stream (this=0x213ae70,
__in_chrg=<optimized out>) at ../timeline/src/Engine/Disk_Stream.C:78
#4 0x000000000041f5e1 in Playback_DS::~Playback_DS (this=0x213ae70,
__in_chrg=<optimized out>) at ../timeline/src/Engine/Playback_DS.H:22
#5 0x000000000041f614 in Playback_DS::~Playback_DS (this=0x213ae70,
__in_chrg=<optimized out>) at ../timeline/src/Engine/Playback_DS.H:22
#6 0x0000000000420e21 in Track::configure_outputs (this=0x213bb20, n=0)
at ../timeline/src/Engine/Track.C:82
#7 0x0000000000437473 in Track::~Track (this=0x213bb20,
__in_chrg=<optimized out>) at ../timeline/src/Track.C:119
#8 0x000000000043758e in Track::~Track (this=0x213bb20,
__in_chrg=<optimized out>) at ../timeline/src/Track.C:127
#9 0x000000000044e02f in Loggable::do_this (
s=0x7fff7bc28af0 "Track 0x94A destroy << :name \"snare crack\"
:sequence 0x0 :selected 0 :color 2118157429", reverse=false) at
../nonlib/Loggable.C:415
#10 0x000000000044d7f0 in Loggable::replay (fp=0x2007ce0)
at ../nonlib/Loggable.C:215
#11 0x000000000044d54f in Loggable::open (filename=0x45cc4a "history")
at ../nonlib/Loggable.C:138
#12 0x000000000042438d in Project::open (
name=0x1fb57a0 "/home/oem/NSM Sessions/The Source/Non-DAW.nAICS")
at ../timeline/src/Project.C:317
#13 0x000000000043462a in Timeline::command_load (this=0x1e98730,
name=0x1fb57a0 "/home/oem/NSM Sessions/The Source/Non-DAW.nAICS",
display_name=0x1fb57d0 "The Source") at ../timeline/src/Timeline.C:1999
#14 0x000000000042377d in command_open (
name=0x1fb57a0 "/home/oem/NSM Sessions/The Source/Non-DAW.nAICS",
display_name=0x1fb57d0 "The Source", client_id=0x1fb57dc
"Non-DAW.nAICS",
out_msg=0x7fff7bc2aca8, userdata=0x0) at ../timeline/src/NSM.C:64
#15 0x000000000043d1c4 in _nsm_osc_open (path=0x1ebe8c0 "/nsm/client/open",
types=0x1eea491 "sss", argv=0x1fb3a80, argc=3, msg=0x1fb3a30,
user_data=0x1eb7550) at /home/oem/non/nonlib/nsm.h:369
#16 0x00007f1b0ecb1a28 in ?? () from /usr/lib/liblo.so.7
#17 0x00007f1b0ecb2262 in lo_server_dispatch_data () from
/usr/lib/liblo.so.7
#18 0x00007f1b0ecb2835 in lo_server_recv () from /usr/lib/liblo.so.7
#19 0x000000000043cf80 in nsm_check_wait (nsm=0x1eb7550, timeout=0)
at /home/oem/non/nonlib/nsm.h:252
#20 0x000000000043cfa8 in nsm_check_nowait (nsm=0x1eb7550)
at /home/oem/non/nonlib/nsm.h:259
#21 0x000000000043daf3 in check_nsm (v=0x0) at ../timeline/src/main.C:124
#22 0x00007f1b0e502a8c in Fl::wait (time_to_wait=1e+20) at ../src/Fl.cxx:499
#23 0x00007f1b0e502bad in Fl::run () at ../src/Fl.cxx:542
#24 0x000000000043e09f in main (argc=1, argv=0x7fff7bc2b478)
at ../timeline/src/main.C:290
Here's my interpretation: It seems that the Track destructor is getting
called twice on the same object. The second time it tries to delete the
underlying disk stream there is no thread to destroy, and so it continues
waiting for the thread to terminate forever. I have no idea why the Track
destructor is getting called twice for the same object.
I have problems loading sessions a couple times a week on average, though
this is the first time I've ever bothered to attach gdb and get a trace.
Usually what I do is revert to a backup (I use a cron job to nightly backup
my sessions to an external drive) or open up the history file with a text
editor and delete lines from the bottom of the file until the session
finally loads. Today I found a new way to work-around the problem: "cp
snapshot history" -- not an ideal solution in the least, but the best I
could do for now. In general I find loading sessions to be unreliable. I
feel I have no way to guarantee a session will open again after I've done
some work on it. It is quite scary. Problems seem to occur mostly when I
am adding/removing a lot of tracks and/or takes in short succession.
Note I'm using the latest code from git...
One more thing: As part of my nightly backup I run a script to replace all
the symlinks in the sources directory with copies of the actual files. I
can't imagine this would cause non-daw to have trouble loading sessions,
but I'm mentioning it just in case. There is a script included in non-daw
called import-external-sources but I do not think it works anymore, so I
have written my own...
Regards,
Doug