-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with ask crashing when hitting terminator digit # as first digit #30
Comments
Please try the following minimal reproduction and paste the output: require 'ruby_speech'
grammar = RubySpeech::GRXML::Builtins.digits length: 1
matcher = RubySpeech::GRXML::Matcher.new grammar
p matcher.match('1') |
Also, you did not mention details of your OS. Please provide the output of |
Output of the minimal reproduction is:
and
|
Did you execute that minimal repro stand-alone or from the Adhearsion console? If the former, please try the latter. I would have expected it to fail in the same way. |
First attempt was a separate testspeech.rb file run with "ruby testspeech.rb". Now I put this code into my call controller and execute it upon answering a call. It does not fail. I'm very new to all of this so I'm writing the output to Asterisk via verbose and get:
It does not crash. If I subsequently, during the same call, use ask and press # directly, it crashes as before. |
In that case, please try cloning and running the test suites of ruby_speech and punchblock. Basically I'm looking for something that does not depend on making real calls to reproduce the problem to narrow things down. |
Spent a good number of hours looking (googling) for ways not to ask, but can you point me in the direction of how I might go about running these test suites you mention? I'm well versed in Asterisk but a total beginner with Ruby and Adhearsion but picking this up rather fast now and would like to see what I can do to either help track this down if it's a bug, or correct my line of thinking if I'm abusing the system somehow. The reason I started with Adhearsion is a specific app I need to have for Asterisk. I've implemented it more or less now, but this thing here is a complete showstopper for me because obviously user input can not be avoided with IVR. I'm prepared to go to great lengths figuring this out and appreciate your help very much! |
Also wondering if it's perhaps language related. Thinking how do I change
Just a thought. |
It's not language related, it'll be some problem with how ruby or the ruby_speech C extension was compiled. Segfaults are not normal occurrences in Ruby, and indicate a serious problem. I can assure you, however, you are alone in experiencing this particular one. In terms of running test suites, you simply need to clone the repositories (adhearsion/punchblock and this one) and run |
Thank you for this. Running it for ruby_speech gives me:
And for punchblock
Hopefully this information can help us in the right direction? Sincerely, |
Unfortunately that doesn't help, no. That basically says everything is fine. Are you able to try this on another machine to confirm it can be reproduced? If so, we'll be able to look for commonalities at least. |
I just installed a completely fresh machine with Ubuntu 12.04.3 LTS followed up by installing Asterisk 11.9.0 from source and rvm, rails 2.1.0 and adhearsion. After going through this, I get the exact same error on this fresh install. The only thing I was not sure about during the setup process was if I should install ruby_speech before adhearsion or have adhearsion install it as a dependency. I opted to install ruby_speech before adhearsion. I've tried leaving out adhearsion-asr which leaves me with no crash but the So this leaves me with a reproducible error on Ubuntu 12.04.3 LTS but I'm not sure what steps to take now to go forward. My current
|
Are you using any particularly interesting hardware? Is it something I could reproduce all the way to the hardware, for example EC2? I'll try to reproduce this when I get some spare time, hopefully this week. |
I'm afraid this is running on very uninteresting hardware. Intel Intel(R) Core(TM) i5-4440 CPU @ 3.10GHz with 4GB memory and a GIGABYTE mother board called GA-B85M-HD3. Some more details: Architecture: i686 and
Mem: 8161216 1149100 7012116 0 142096 860504 That's about it. |
Just for adding to the information on this. Re-installed a new machine. Different (older) hardware but same operating system. Exact same problem. |
@baldvinhansson You mentioned above "rvm and rails 2.1.0" but I think that's a typo. I think you meant 'Ruby 2.1.0', but can you confirm the exact version of Ruby you have installed? I'll try to reproduce this on a 32-but Ubuntu Hardy VM. If you have any specific steps you can share for how you installed everything, that would be appreciated. |
Edit, not Hardy, but Precise (12.04). |
Yes, I meant Ruby 2.1.0.
|
This is I think more or less what I did to get things from zero to hero: Ubuntu 12.04.3 installed pretty basic, not LAMP but ssh ... don't think there's much more interesting going on there. Then (not necessarily every single step ... but gives the big picture at least) sudo apt-get update sudo apt-get -y install curl libmysqlclient-dev \curl -sSL https://get.rvm.io | bash wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz and unpack, compile and install all of this Asterisk stuff. Then just running a basic adhearsion app (set it up and did a bundle install in the folder and that was all) and it comes crashing down as soon as I hit # without any digits. If I press 1# no problem. Any digit or string of digits works. But don't dare to hit # without entering some digit first. |
And the bundle install log shows (in case it makes things more clear)
|
Your output from bundle install looks like you've not provided all of it, and looks like a gem with native extensions failed to install... |
Here is what I have done:
class DefaultController < Adhearsion::CallController
def run
answer
result = ask 'WhatMonth', timeout: 3.seconds, terminator: '#', limit: 4
end
end
The app worked fine for me, no segfault at all. |
Yes, sorry about that. Did not provide the whole file because the log file wasn't clean when I started it because I copied it accidentally with the app from the other computer and then it got appended to. Below is a complete log file after doing bundle install (though all the required gems were already installed at the time I did this now I think it should be relevant?). As far as I can tell there are no gems missing or errors of any kind that should affect the adhearsion app?
|
@baldvinhansson Could you also post trace level Adhearsion logs so we can see what Asterisk sent to Adhearsion right before the segfault? |
Also, for completeness' sake, I compiled and installed Asterisk 11. Still no segfault was observed. |
I've now applied your Gemfile.lock (and installed the required |
Ok I finally reproduced this. I had missed the detail where you have to press We'll look into it. |
Thank you so much for sticking with this long enough to reproduce it. I am used to dealing with this kind of problems from where you are sitting so it is interesting to experience this from the user end this time. I am ready to do whatever I can to help sort this out. I really appreciate your attention to this matter! |
Dear sir(s). Realize I'm in no position to push or expect anything here, but I am truly interested in getting my first Adhearsion application up and running and this issue is a bit of a showstopper for that at the moment. I just wonder if there is any chance of giving me any kind of indication about when anyone might look into this? I just ask because I am trying to decide if I wait or if I need to figure out another way of getting the functionality I need implemented. Your help here is very appreciated and please excuse me for sounding as if I am rushing anyone on this. Just trying to evaluate the status of things. |
I will take a look before Monday. |
So I was unable to reproduce this on OS X. I tried a repro on a Ubuntu VM, but was foiled by lack of internet access. That's what I'm working on now. |
If there is anything I can do to help I am ready, able and willing. Though
|
Confirmed that I cannot reproduce this on a Ubuntu VM (Telephony-Dev-Box) with Ruby 2.0.0-p451 installed via rbenv. I'll try testing 2.1.1 installed via rbenv and then rvm. |
Working under Ruby 2.1.1 installed via rbenv. I wonder if this is going to turn out to be yet another rvm problem... |
Unable to reproduce using Ruby 2.1.0 or 2.1.1 installed via RVM. I'm lost, I just can't make this segfault. I'm going to put together a full Vagrant project for you to confirm this. |
Ok, I got a segfault when I switch to a 32bit VM! Now we're cooking, more details coming soon. |
Ok, here's a minimal repro which segfaults on a 32bit Ubuntu VM with Ruby 2.1.0: require 'ruby_speech'
grammar = RubySpeech::GRXML.draw mode: :dtmf, root: 'digits' do
rule id: 'digits', scope: 'public' do
item repeat: "0-4" do
one_of do
0.upto(9) { |d| item { d.to_s } }
end
end
end
end
matcher = RubySpeech::GRXML::Matcher.new grammar
p matcher.match('1')
p matcher.match('') The If the repeat is changed to |
So @baldvinhansson, considering I can only repro this on a 32bit VM, could you try testing on a 64bit kernel and letting me know if it works better? This is a strange edge case, as described above, and your fastest resolution will be 64bit. |
It's been great to watch you work on this and I will download and install 64bit Ubuntu 12.04 tomorrow. As soon as I have it up and running I will test and report back here. Again, thank you all so much for your hard work! |
I can confirm this works like a charm on 64 bits. That is a very acceptable solution for me at this time and until further notice, this is a closed case as far as my expectations are concerned. I hope catching this contributes to the project in some way but even if not, I thank you for your great work and support which to me is very valuable and builds confidence in Adhearsion and everything that's needed to run apps with Adhearsion. For me it's back to writing code now and looking forward to seeing what can be created using this great framework. |
I'll leave this ticket open incase I find time to look at it again, but for now we'll just state that we've got problems on 32bit and it should be avoided. Contributions in this regard are welcome, but for now I have more urgent things to deal with. |
Hello.
I want to collect a four digit PIN from the caller for further processing in my application.
Adhearsion 2.5.3, doing:
and then calling in and hitting # (the terminator digit) without any other DTMF input before the timeout passes, results in a crash.
Am I doing something wrong or is there a bug that I'm hitting?
Ruby installed roughly by:
I can't see any way to attach log files so I'm posting full details below. Hope this is ok.
********************** Output from pcre-config --version
8.12
********************** Gemfile.lock contents:
*************************** Log from running ahn start digilog
The text was updated successfully, but these errors were encountered: