Solved - Sangoma Drivers Panicing the Kernel on Reboot!
** Update ** - Wanpipe drives version 3.3.2 have fixed this problem - hopefully this can make it into the Repo's.
Grrrrr.....you guys REALLY need to fix this in your drivers - symptom is that Zaptel tries to unload before wanrouter has stopped - wanrouter may not stop for several reasons including Asterisk hung, whatever - anyways, if you have Sangoma drivers and they don't unload before Zaptel does, you have a kernel panic and a hung machine - not a big deal if you are sitting next to the machine - just punch reset and away you go - a HUGE deal if you are remote to the system and are trying to do maintenance, and you try a restart and it panics and hangs.
After some reading this morning, here is a partial solution - implement this BEFORE you have to reboot the machine remotely:
1) edit /etc/grub.conf and add the following to the end of the kernel load line:
panic=20
to have the system reboot after showing the Panic on the screen for 20 seconds or
2) edit /etc/sysctl.conf and add the following line to the end of the file:
kernel.panic = 20
If you have to implement this remotely, make the changes and shutdown Asterisk, and then do a wanrouter stop BEFORE you reboot, or you may end up with a hung machine.
This really needs to be fixed - if Asterisk hangs, wanrouter doesn't unload and then Zaptel unloading Panic's the kernel - this is a time bomb, and a STRONG reason not to use Sangoma cards - Digium and Rhino cards DON'T do this.
Greg
Fact is that if Asterisk Hangs, and wanrouter won't unload, you are going to panic the machine - this is a bad design because it will leave machines hung - same scenario with a Digium or Rhino card, and the machine will still reboot and come back up and be accessible.
This needs to be fixed - there are several work-arounds, but the design is flawed.
Greg
Hello guys, the reason why the system is panicking is because Zaptel is freaking out about not being able to stop a Zap channel. This will happen when any software is attached to a Zap channel and Zaptel tries to shutdown. If you have a system that is panicking on shutdown check the following:
1.)make sure that /etc/rc6.d/ has Amportal (Asterisk) shutting down first then Wanrouter (Wanpipe) and lastly Zaptel.
2.)make sure that the "stop" script for Wanpipe contains an "amportal stop". This file is located at /etc/wanpipe/scripts/stop. Feel free to add any command prompt commands to this file as they will be run before Wanpipe starts to shutdown. This file is created when you run "setup-sangoma".
3.)make sure that "safe_asterisk" is stopped before you stop Asterisk. "safe_asterisk" will restart Asterisk almost immediately after Asterisk is stopped. The only way to stop safe_asterisk is to "kill" it.
If you are still having problems after confirming these 3 things, give us at tech support a shout because you might be having a bigger problem.
Konrad, couple of question for you.
1.) I don't see wanpipe or amportal(asterisk) in my /etc/rc6.d/. This is a trixbox appliance so you'd figure it would be setup properly.
2.) I've run the setup-sangoma a few times now and there's also still nothing in my /etc/wanpipe/scripts folder. It's there, but empty.
3.) In general, shouldn't the shutdown scripts be handling killing the process?
The issue is still happening with wanpipe 3.3.9
The problem is caused because you cannot stop zaptel until wanrouter has stopped.
Wanrouter doesnt stop because asterisk is using it, and amportal stop command hasnt been executed before the wanrouter stop command
Best way of doing this is go to /etc/wanpipe/scripts
create a file named "stop" and in that file put the command "amportal stop"
Now when you try to restart your pbx, wanpipe will stop amportal & asterisk before stopping itself, then when zaptel comes to stop everything has stopped before it in the right order!
For reference the services should start in this order - wanrouter, zaptel, asterisk
They should always stop in this order - asterisk, wanrouter, zaptel, otherwise a panic occurs!
I have Trixbox 2.6.1 and the latest updates as of today (07/10/2008).
Will the above "stop" script in the wanrouter still fix the Kernel Panic on reboot? So i just call it "stop"? there is already a script in there called "wanpipe1-stop". I added it to this also just to be sure, but I cant perform a test reboot until business has closed.
I looked through the /etc/rc.d/rc6.d directory and they are supposed to be stopping in the correct order already...
K60asterisk -> ../init.d/asterisk
K91wanrouter -> /etc/init.d/wanrouter
K92zaptel -> ../init.d/zaptel
Hi
Yes you can simply just create a file called "stop" in "/etc/wanpipe/scripts/" and then place "amportal stop". This will run "amportal stop" before our drivers shut down which will insure Asterisk is not running when we shut down. If Asterisk is running when we shut down then this will cause a kernel panic on the server.
Marc
Sangoma Technologies
Hi,
I have a Sangoma A400DE card installed in a Trixbox 2.6.1 distribution.
The OS is Centos 5.2, updated
with "yum -y update" yesterday 19th of August 2008.
I get a kernel panic a few times/day.
I do have a stop script at the right location and it does contain
"amportal stop" command.
Still I get the kernel panic.
I tried to look for the latest zaptel 1.4.11 driver and looking to build
it on my kernel.
(I'm a newbie and kind of afraid to try it on my own).
Anyway at
http://readlist.com/lists/lists.digium.com/asterisk-users/16/8088...
I read that Centos 5.2 will not build the
zaptel 1.4.11 drivers.
What do you recommend me to do? Is there a waptel 1.4.11 RPM package
available that I could install on my system?
Thank you for your help.
I'd suggest you check the version of the sangoma drivers loaded and get the latest ones from the Sangoma site.
Also check that you have the latest of ALL of the Zaptel packages
zaptel (1.4.10.1-2)
zaptel-devel (1.4.10.1-2)
zaptel-modules (1.4.10.1-2.2.6.18_53.1.4.el5)
if one of these is out of step you'll get all sorts of problems!
You might want to check (against backups maybe??) that the config files are all okay.
Are you in US or elsewhere?
J
This is from README.external_scripts:
Stop Script Name : stop
Script "stop" will execute after a sucessfull
"wanrouter stop" command. The wanrouter stop
command will stop one or more configured
wanpipe devices.
How could this possibly work:
2.)make sure that the "stop" script for Wanpipe contains an "amportal stop". This file is located at /etc/wanpipe/scripts/stop. Feel free to add any command prompt commands to this file as they will be run before Wanpipe starts to shutdown. This file is created when you run "setup-sangoma".
Since this is not solved can you provide a solution?
Thank you.
Hi
This is how it originally was, then because of crashing issues like this it was changed and the docs have not been updated. Now for the issue that is still unresolved, please send an email into techdesk@sangoma.com and reference this thread. From here we will open a ticket up and solve the issue for you if it is our driver/card.
Marc
Sangoma Technologies


Member Since:
2006-11-19