View Issue Details

IDProjectCategoryView StatusLast Update
0001389ardourbugspublic2008-11-20 23:50
ReporterStevenChamberlain Assigned Topaul  
PrioritynormalSeveritycrashReproducibilityrandom
Status closedResolutionfixed 
Summary0001389: Random crashes with jackdmp when starting record
DescriptionI'm not entirely sure if 'jackdmp' ('jackd' replacement implementation for multi-processor systems) is supposed to be 'supported' by ardour2 as such, but it has worked well with other JACK applications.

When I try to record in ardour2.0-beta9 on AMD64, it will sometimes crash with error:
  actually writing state
  actually writing state
  actually writing state
  programming error: no ardour-UI request buffer found for thread unknown
  Aborted

I can reproduce this as follows:
  1. Create new, blank session
  2. Add a single, mono track, but I *do not need to set record-enable*
  3. Click the 'record' toolbar button then 'play'.
  4. If it hasn't crashed already, hit the 'stop' button and repeat step '3'.

With only one track, I must repeat steps '3' and '4', 20 or more times before it crashes. If however I create between 5 and 8 mono tracks (but still not record-enable them) it seems to always crash first time. If I create 4 mono tracks it seems to work first time but crashes after fewer repetitions (eg. 10). Therefore, the greater the number of tracks (even though they're not rec-enabled), the more likely it is to crash. For 8-channel multitracking ardour2+jackdmp becomes useless to me. :(

I'm using 'jackdmp' purely because it suffers fewer xruns than 'jackd'. Playback through 'jackdmp' works perfectly, and there are no problems with other JACK apps. Both recording and playback work perfectly using normal 'jackd'.

This issue affects ardour2.0-beta9 and the latest SVN as of writing (1251); it does NOT seem to affect ardour2.0-beta8, though that actually suffered a memory corruption error and crash which I suspect was unrelated. I also tried with ardour2.0-beta5.1 and there seems to be no crash at all.

Thanks!!
Please let me know if I can provide any further information.
Additional Informationardour2 compiled just with 'scons -j5 && scons -j5 install'
kernel 2.6.20-rc2-rt2, 4-way SMP
jackdmp 0.60 or latest SVN running realtime, prio 75, 128 frames, 2 periods
ice1712 (Delta 1010) with softirq at RT prio 80
Debian 'etch' amd64
Tyan S2895 (Thunder) motherboard with 2x dual-core Opteron 285s
TagsNo tags attached.

Activities

paul

2007-01-03 20:24

administrator   ~0002986

this issue affects all versions of ardour2. it is caused by jackdmp using an extra thread that is not present in jackd; ardour requires any thread that might send a message to the GUI to be registered, and this extra thread is not.

i don't know the correct solution for this - stephane and i have debated many times the virtues of the two-thread design in jackdmp. something has to be done to register the new thread, somewhere, somehow.

sletz

2007-01-04 11:32

reporter   ~0002991

Hi Steven and Paul,

1) I remember you had a problem in december (No clients can connect to jackdmp...) on a 64 bits machine, how did you solved that?

2) Concerning the Ardour issue, Paul is right, this problem was discovered long time ago. The issue (if i remember correctly) is related to the use of the "jack_set_thread_init_callback" API call that allows a client to register a callback to be called "only once after the creation of the thread when other callbacks will be handled" (see http://jackaudio.org/files/docs/html/jack_8h.html#a11)
In jackd a unique thread handles Real-Time DSP code and notification code (basically events coming from the server). In jackdmp for various reasons, one thread is used only for Real-Time DSP code and a second one for notification code.
I just added code in jackdmp SVN so that *both* threads will call the init_callback only once.

- Steven, could you test jackdmp SVN version and report if it solves your problem?

- Paul, I'm not sure the init_callback should be called by both threads: there is a possible concurently issue, and maybe the call in the RT thread is not necessary since "other callback" are always called in the notification thread. What do you think?

StevenChamberlain

2007-02-11 03:44

reporter   ~0003201

I upgraded to the latest SVN of both ardour2 and jackdmp and this problem has been fixed. Thank you!

paul

2007-02-11 22:46

administrator   ~0003211

see reporter's notes.

Issue History

Date Modified Username Field Change
2006-12-30 02:32 StevenChamberlain New Issue
2007-01-03 20:24 paul Note Added: 0002986
2007-01-03 20:24 paul Status new => acknowledged
2007-01-04 11:32 sletz Note Added: 0002991
2007-02-11 03:44 StevenChamberlain Note Added: 0003201
2007-02-11 22:46 paul Status acknowledged => resolved
2007-02-11 22:46 paul Resolution open => fixed
2007-02-11 22:46 paul Assigned To => paul
2007-02-11 22:46 paul Note Added: 0003211
2008-11-20 23:50 seablade Status resolved => closed