Posted: Sat Jun 19, 2004 8:19 am Post subject: [Asterisk-bsd] WARNING kernel panic was FreeBSD and Music on
I have an X101P installed
I have just updated the zaptel driver to 0.5.
If I now enable MOH I get an immediate kernel PANIC on
FreeBSD-5.2.1-RELEASE-p8
Chris
On Fri, 2004-06-18 at 23:54, Dr. Rich Murphey wrote:
Quote:
Something must be wrong. Pseudofs is non-negative, which means you have a
zaptel device available for timing, had reading it should produce a delay.
In which case, you shouldn't need the usleep() there. So, if the usleep()
makes a difference, perhaps it does so because the device is not providing
the timing expected.
Do you have a zaptel device?
Cheers,
Rich
> -----Original Message-----
> From: asterisk-bsd-admin@lists.digium.com [mailto:asterisk-bsd-
> admin@lists.digium.com] On Behalf Of Chris Stenton
> Sent: Friday, June 18, 2004 6:20 AM
> To: asterisk-bsd@lists.digium.com
> Subject: Re: [Asterisk-bsd] FreeBSD and Music on Hold -- Possible Fix
>
> Ok I've had part success in that if I change
> if (class->pseudofd > -1) {
> /* Pause some amount of time */
> res = read(class->pseudofd, buf, sizeof(buf));
> to
>
> if (class->pseudofd > -1) {
> /* Pause some amount of time */
> usleep(1);
> res = read(class->pseudofd, buf, sizeof(buf));
>
>
> At least asterisk responds at the cli now. I think on a 2 processor
> machine
> the above read took no time at all. What kind of delay should there be?
> However even though asterisk now starts up cleanly and can register
> external
> resouces. It does not respond to any connections sip/zap dialin etc. Looks
> like the select routine is being blocked somehow. Who wrote the FreeBSD
> MOH
> routines?
>
> Chris
>
>
> ----- Original Message -----
> From: "Dr. Rich Murphey" <Rich@WhiteOakLabs.com>
> To: <asterisk-bsd@lists.digium.com>
> Sent: Thursday, June 17, 2004 9:35 PM
> Subject: RE: [Asterisk-bsd] FreeBSD and Music on Hold -- Possible Fix
>
>
> > I had seen intermittent occurrences of mpg123 hogging the cpu with
> > concurrent absence of music on hold. It would occur immediately upon
> > starting asterisk about 1 out of 5 times.
> >
> > After the patch I haven't seen it happen again, and I can have several
> lines
> > on hold with music on hold and none are choppy.
> >
> > In your case, it appears that there are no music-on-hold 'classes' in
> the
> > context. I'm not certain, but my understanding is that each line below
> the
> > line '[classes]' in musiconhold.conf is a class:
> >
> > [classes]
> > default => mp3:/var/lib/asterisk/mohmp3
> >
> > Where default would apply to every context except those that have
> specified
> > another music on hold class.
> >
> > Does that help?
> >
> > Cheers,
> > Rich
> >
> >
> > > -----Original Message-----
> > > From: asterisk-bsd-admin@lists.digium.com [mailto:asterisk-bsd-
> > > admin@lists.digium.com] On Behalf Of Chris Stenton
> > > Sent: Thursday, June 17, 2004 1:26 PM
> > > To: asterisk-bsd@lists.digium.com
> > > Subject: Re: [Asterisk-bsd] FreeBSD and Music on Hold -- Possible Fix
> > >
> > > Rich,
> > >
> > > No there is very little additional CPU activity.
> > > mpg123 process is there.
> > > mpg123 runs fine standalone.
> > >
> > > I have not looked into the code in great detail but it seems like some
> > > form
> > > of select
> > > or poll issue with asterisk waiting patiently for some MOH event to
> > > happen.
> > >
> > > I take it that MOH works for you OK.
> > >
> > > Chris
> > >
> > > ----- Original Message -----
> > > From: "Dr. Rich Murphey" <Rich@WhiteOakLabs.com>
> > > To: <asterisk-bsd@lists.digium.com>
> > > Sent: Thursday, June 17, 2004 1:15 PM
> > > Subject: RE: [Asterisk-bsd] FreeBSD and Music on Hold -- Possible Fix
> > >
> > >
> > > > Hmm.. Is asterisk consuming the CPU rather than mpg123?
> > > >
> > > > I see an asterisk thread in the same loop, but it's not consuming
> CPU
> > > > inordinately because class->members is nonzero. Is it finding .mp3
> > > files
> > > > in the directories specified in musiconhold.conf?
> > > >
> > > > Rich
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: asterisk-bsd-admin@lists.digium.com [mailto:asterisk-bsd-
> > > > > admin@lists.digium.com] On Behalf Of Chris Stenton
> > > > > Sent: Thursday, June 17, 2004 5:00 AM
> > > > > To: asterisk-bsd@lists.digium.com
> > > > > Subject: RE: [Asterisk-bsd] FreeBSD and Music on Hold -- Possible
> Fix
> > > > >
> > > > > Rich,
> > > > >
> > > > > that makes no difference.
> > > > >
> > > > > Sticking asterisk in the gdb I notice that it appears to be in
> > > > > monmp3thread all the time.
> > > > >
> > > > >
> > > > > In the loop
> > > > >
> > > > > for(;/* ever */;) {
> > > > >
> > > > > Its doing this
> > > > > if (class->pseudofd > -1) {
> > > > > /* Pause some amount of time */
> > > > > res = read(class->pseudofd, buf, sizeof(buf));
> > > > >
> > > > > and then this
> > > > >
> > > > > if (!class->members)
> > > > > continue;
> > > > >
> > > > >
> > > > >
> > > > > Chris
> > > > >
> > > > > On Thu, 2004-06-17 at 05:30, Dr. Rich Murphey wrote:
> > > > > > It appears to be a bug in the FreeBSD mpg123 port.
> > > > > >
> > > > > > Try copying this patch to /usr/ports/audio/mpg123/files:
> > > > > >
> > > > > > http://www.whiteoaklabs.com/code/patch-mpg123.c
> > > > > >
> > > > > > and reinstall it, and see if that fixes it.
> > > > > >
> > > > > > mpg123 is going into an infinite loop in
> > > > > > play_frame() when it sees an end of file
> > > > > > while trying to read a command. The patch
> > > > > > breaks that loop upon an end of file.
> > > > > >
> > > > > > Cheers,
> > > > > > Rich
> > > > > >
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: asterisk-bsd-admin@lists.digium.com [mailto:asterisk-
> bsd-
> > > > > > > admin@lists.digium.com] On Behalf Of Chris Stenton
> > > > > > > Sent: Monday, June 14, 2004 12:02 PM
> > > > > > > To: asterisk-bsd@lists.digium.com
> > > > > > > Subject: [Asterisk-bsd] FreeBSD and Music on Hold
> > > > > > >
> > > > > > > I can't get Music on Hold to work on FreeBSD/asterisk-
> current.
> I
> > > am
> > > > > using
> > > > > > > the mpg123 port and once MOH is enabled the loading of the
> > > asterisk
> > > > > > > console
> > > > > > > goes incredibly slowly.
> > > > > > >
> > > > > > > _______________________________________________
> > > > > > > Asterisk-BSD mailing list
> > > > > > > Asterisk-BSD@lists.digium.com
> > > > > > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > _______________________________________________
> > > > > > Asterisk-BSD mailing list
> > > > > > Asterisk-BSD@lists.digium.com
> > > > > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> > > > >
> > > > > _______________________________________________
> > > > > Asterisk-BSD mailing list
> > > > > Asterisk-BSD@lists.digium.com
> > > > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > Asterisk-BSD mailing list
> > > > Asterisk-BSD@lists.digium.com
> > > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> > > >
> > >
> > > _______________________________________________
> > > Asterisk-BSD mailing list
> > > Asterisk-BSD@lists.digium.com
> > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> >
> >
> >
> > _______________________________________________
> > Asterisk-BSD mailing list
> > Asterisk-BSD@lists.digium.com
> > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> >
>
> _______________________________________________
> Asterisk-BSD mailing list
> Asterisk-BSD@lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-bsd
Posted: Sat Jun 19, 2004 9:05 am Post subject: [Asterisk-bsd] WARNING kernel panic was FreeBSD and Music on
If you use the zaptel 0.5 driver from ports and the asterisk-current server,
kernel panics can occur due to the mismatch of the interfaces. The zaptel
interface has been enhanced lately, and those newer parts of the interface
are missing in the 0.5 driver.
The asterisk server from freebsd ports should be compatible though.
If I now enable MOH I get an immediate kernel PANIC on
FreeBSD-5.2.1-RELEASE-p8
Chris
On Fri, 2004-06-18 at 23:54, Dr. Rich Murphey wrote:
> Something must be wrong. Pseudofs is non-negative, which means you have
a
> zaptel device available for timing, had reading it should produce a
delay.
> In which case, you shouldn't need the usleep() there. So, if the
usleep()
> makes a difference, perhaps it does so because the device is not
providing
> the timing expected.
>
> Do you have a zaptel device?
>
> Cheers,
> Rich
>
>
> > -----Original Message-----
> > From: asterisk-bsd-admin@lists.digium.com [mailto:asterisk-bsd-
> > admin@lists.digium.com] On Behalf Of Chris Stenton
> > Sent: Friday, June 18, 2004 6:20 AM
> > To: asterisk-bsd@lists.digium.com
> > Subject: Re: [Asterisk-bsd] FreeBSD and Music on Hold -- Possible Fix
> >
> > Ok I've had part success in that if I change
> > if (class->pseudofd > -1) {
> > /* Pause some amount of time */
> > res = read(class->pseudofd, buf, sizeof(buf));
> > to
> >
> > if (class->pseudofd > -1) {
> > /* Pause some amount of time */
> > usleep(1);
> > res = read(class->pseudofd, buf, sizeof(buf));
> >
> >
> > At least asterisk responds at the cli now. I think on a 2 processor
> > machine
> > the above read took no time at all. What kind of delay should there
be?
> > However even though asterisk now starts up cleanly and can register
> > external
> > resouces. It does not respond to any connections sip/zap dialin etc.
Looks
> > like the select routine is being blocked somehow. Who wrote the
FreeBSD
> > MOH
> > routines?
> >
> > Chris
> >
> >
> > ----- Original Message -----
> > From: "Dr. Rich Murphey" <Rich@WhiteOakLabs.com>
> > To: <asterisk-bsd@lists.digium.com>
> > Sent: Thursday, June 17, 2004 9:35 PM
> > Subject: RE: [Asterisk-bsd] FreeBSD and Music on Hold -- Possible Fix
> >
> >
> > > I had seen intermittent occurrences of mpg123 hogging the cpu with
> > > concurrent absence of music on hold. It would occur immediately
upon
> > > starting asterisk about 1 out of 5 times.
> > >
> > > After the patch I haven't seen it happen again, and I can have
several
> > lines
> > > on hold with music on hold and none are choppy.
> > >
> > > In your case, it appears that there are no music-on-hold 'classes'
in
> > the
> > > context. I'm not certain, but my understanding is that each line
below
> > the
> > > line '[classes]' in musiconhold.conf is a class:
> > >
> > > [classes]
> > > default => mp3:/var/lib/asterisk/mohmp3
> > >
> > > Where default would apply to every context except those that have
> > specified
> > > another music on hold class.
> > >
> > > Does that help?
> > >
> > > Cheers,
> > > Rich
> > >
> > >
> > > > -----Original Message-----
> > > > From: asterisk-bsd-admin@lists.digium.com [mailto:asterisk-bsd-
> > > > admin@lists.digium.com] On Behalf Of Chris Stenton
> > > > Sent: Thursday, June 17, 2004 1:26 PM
> > > > To: asterisk-bsd@lists.digium.com
> > > > Subject: Re: [Asterisk-bsd] FreeBSD and Music on Hold -- Possible
Fix
> > > >
> > > > Rich,
> > > >
> > > > No there is very little additional CPU activity.
> > > > mpg123 process is there.
> > > > mpg123 runs fine standalone.
> > > >
> > > > I have not looked into the code in great detail but it seems like
some
> > > > form
> > > > of select
> > > > or poll issue with asterisk waiting patiently for some MOH event
to
> > > > happen.
> > > >
> > > > I take it that MOH works for you OK.
> > > >
> > > > Chris
> > > >
> > > > ----- Original Message -----
> > > > From: "Dr. Rich Murphey" <Rich@WhiteOakLabs.com>
> > > > To: <asterisk-bsd@lists.digium.com>
> > > > Sent: Thursday, June 17, 2004 1:15 PM
> > > > Subject: RE: [Asterisk-bsd] FreeBSD and Music on Hold -- Possible
Fix
> > > >
> > > >
> > > > > Hmm.. Is asterisk consuming the CPU rather than mpg123?
> > > > >
> > > > > I see an asterisk thread in the same loop, but it's not
consuming
> > CPU
> > > > > inordinately because class->members is nonzero. Is it finding
.mp3
> > > > files
> > > > > in the directories specified in musiconhold.conf?
> > > > >
> > > > > Rich
> > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: asterisk-bsd-admin@lists.digium.com [mailto:asterisk-
bsd-
> > > > > > admin@lists.digium.com] On Behalf Of Chris Stenton
> > > > > > Sent: Thursday, June 17, 2004 5:00 AM
> > > > > > To: asterisk-bsd@lists.digium.com
> > > > > > Subject: RE: [Asterisk-bsd] FreeBSD and Music on Hold --
Possible
> > Fix
> > > > > >
> > > > > > Rich,
> > > > > >
> > > > > > that makes no difference.
> > > > > >
> > > > > > Sticking asterisk in the gdb I notice that it appears to be in
> > > > > > monmp3thread all the time.
> > > > > >
> > > > > >
> > > > > > In the loop
> > > > > >
> > > > > > for(;/* ever */;) {
> > > > > >
> > > > > > Its doing this
> > > > > > if (class->pseudofd > -1) {
> > > > > > /* Pause some amount of time */
> > > > > > res = read(class->pseudofd, buf,
sizeof(buf));
> > > > > >
> > > > > > and then this
> > > > > >
> > > > > > if (!class->members)
> > > > > > continue;
> > > > > >
> > > > > >
> > > > > >
> > > > > > Chris
> > > > > >
> > > > > > On Thu, 2004-06-17 at 05:30, Dr. Rich Murphey wrote:
> > > > > > > It appears to be a bug in the FreeBSD mpg123 port.
> > > > > > >
> > > > > > > Try copying this patch to /usr/ports/audio/mpg123/files:
> > > > > > >
> > > > > > > http://www.whiteoaklabs.com/code/patch-mpg123.c
> > > > > > >
> > > > > > > and reinstall it, and see if that fixes it.
> > > > > > >
> > > > > > > mpg123 is going into an infinite loop in
> > > > > > > play_frame() when it sees an end of file
> > > > > > > while trying to read a command. The patch
> > > > > > > breaks that loop upon an end of file.
> > > > > > >
> > > > > > > Cheers,
> > > > > > > Rich
> > > > > > >
> > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: asterisk-bsd-admin@lists.digium.com
[mailto:asterisk-
> > bsd-
> > > > > > > > admin@lists.digium.com] On Behalf Of Chris Stenton
> > > > > > > > Sent: Monday, June 14, 2004 12:02 PM
> > > > > > > > To: asterisk-bsd@lists.digium.com
> > > > > > > > Subject: [Asterisk-bsd] FreeBSD and Music on Hold
> > > > > > > >
> > > > > > > > I can't get Music on Hold to work on FreeBSD/asterisk-
> > current.
> > I
> > > > am
> > > > > > using
> > > > > > > > the mpg123 port and once MOH is enabled the loading of the
> > > > asterisk
> > > > > > > > console
> > > > > > > > goes incredibly slowly.
> > > > > > > >
> > > > > > > > _______________________________________________
> > > > > > > > Asterisk-BSD mailing list
> > > > > > > > Asterisk-BSD@lists.digium.com
> > > > > > > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > _______________________________________________
> > > > > > > Asterisk-BSD mailing list
> > > > > > > Asterisk-BSD@lists.digium.com
> > > > > > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> > > > > >
> > > > > > _______________________________________________
> > > > > > Asterisk-BSD mailing list
> > > > > > Asterisk-BSD@lists.digium.com
> > > > > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> > > > >
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > Asterisk-BSD mailing list
> > > > > Asterisk-BSD@lists.digium.com
> > > > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> > > > >
> > > >
> > > > _______________________________________________
> > > > Asterisk-BSD mailing list
> > > > Asterisk-BSD@lists.digium.com
> > > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> > >
> > >
> > >
> > > _______________________________________________
> > > Asterisk-BSD mailing list
> > > Asterisk-BSD@lists.digium.com
> > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> > >
> >
> > _______________________________________________
> > Asterisk-BSD mailing list
> > Asterisk-BSD@lists.digium.com
> > http://lists.digium.com/mailman/listinfo/asterisk-bsd
>
>
>
> _______________________________________________
> Asterisk-BSD mailing list
> Asterisk-BSD@lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-bsd
Posted: Sat Jun 19, 2004 9:29 am Post subject: [Asterisk-bsd] WARNING kernel panic was FreeBSD and Music on
Can't see why it should panic though. I thought it was just that some
ioctl calls are missing. The kernel did not panic when using
0.4 version of the driver.
Anyway I'll have a look to see which call is causing the problem.
Chris
On Sat, 2004-06-19 at 10:05, Dr. Rich Murphey wrote:
Quote:
If you use the zaptel 0.5 driver from ports and the asterisk-current server,
kernel panics can occur due to the mismatch of the interfaces. The zaptel
interface has been enhanced lately, and those newer parts of the interface
are missing in the 0.5 driver.
The asterisk server from freebsd ports should be compatible though.
Cheers,
Rich
> -----Original Message-----
> From: asterisk-bsd-admin@lists.digium.com [mailto:asterisk-bsd-
> admin@lists.digium.com] On Behalf Of Chris Stenton
> Sent: Saturday, June 19, 2004 3:19 AM
> To: asterisk-bsd@lists.digium.com
> Subject: [Asterisk-bsd] WARNING kernel panic was FreeBSD and Music on Hold
> -- Possible Fix
>
> I have an X101P installed
>
> I have just updated the zaptel driver to 0.5.
>
> If I now enable MOH I get an immediate kernel PANIC on
> FreeBSD-5.2.1-RELEASE-p8
>
> Chris
>
>
> On Fri, 2004-06-18 at 23:54, Dr. Rich Murphey wrote:
> > Something must be wrong. Pseudofs is non-negative, which means you have
> a
> > zaptel device available for timing, had reading it should produce a
> delay.
> > In which case, you shouldn't need the usleep() there. So, if the
> usleep()
> > makes a difference, perhaps it does so because the device is not
> providing
> > the timing expected.
> >
> > Do you have a zaptel device?
> >
> > Cheers,
> > Rich
> >
> >
> > > -----Original Message-----
> > > From: asterisk-bsd-admin@lists.digium.com [mailto:asterisk-bsd-
> > > admin@lists.digium.com] On Behalf Of Chris Stenton
> > > Sent: Friday, June 18, 2004 6:20 AM
> > > To: asterisk-bsd@lists.digium.com
> > > Subject: Re: [Asterisk-bsd] FreeBSD and Music on Hold -- Possible Fix
> > >
> > > Ok I've had part success in that if I change
> > > if (class->pseudofd > -1) {
> > > /* Pause some amount of time */
> > > res = read(class->pseudofd, buf, sizeof(buf));
> > > to
> > >
> > > if (class->pseudofd > -1) {
> > > /* Pause some amount of time */
> > > usleep(1);
> > > res = read(class->pseudofd, buf, sizeof(buf));
> > >
> > >
> > > At least asterisk responds at the cli now. I think on a 2 processor
> > > machine
> > > the above read took no time at all. What kind of delay should there
> be?
> > > However even though asterisk now starts up cleanly and can register
> > > external
> > > resouces. It does not respond to any connections sip/zap dialin etc.
> Looks
> > > like the select routine is being blocked somehow. Who wrote the
> FreeBSD
> > > MOH
> > > routines?
> > >
> > > Chris
> > >
> > >
> > > ----- Original Message -----
> > > From: "Dr. Rich Murphey" <Rich@WhiteOakLabs.com>
> > > To: <asterisk-bsd@lists.digium.com>
> > > Sent: Thursday, June 17, 2004 9:35 PM
> > > Subject: RE: [Asterisk-bsd] FreeBSD and Music on Hold -- Possible Fix
> > >
> > >
> > > > I had seen intermittent occurrences of mpg123 hogging the cpu with
> > > > concurrent absence of music on hold. It would occur immediately
> upon
> > > > starting asterisk about 1 out of 5 times.
> > > >
> > > > After the patch I haven't seen it happen again, and I can have
> several
> > > lines
> > > > on hold with music on hold and none are choppy.
> > > >
> > > > In your case, it appears that there are no music-on-hold 'classes'
> in
> > > the
> > > > context. I'm not certain, but my understanding is that each line
> below
> > > the
> > > > line '[classes]' in musiconhold.conf is a class:
> > > >
> > > > [classes]
> > > > default => mp3:/var/lib/asterisk/mohmp3
> > > >
> > > > Where default would apply to every context except those that have
> > > specified
> > > > another music on hold class.
> > > >
> > > > Does that help?
> > > >
> > > > Cheers,
> > > > Rich
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: asterisk-bsd-admin@lists.digium.com [mailto:asterisk-bsd-
> > > > > admin@lists.digium.com] On Behalf Of Chris Stenton
> > > > > Sent: Thursday, June 17, 2004 1:26 PM
> > > > > To: asterisk-bsd@lists.digium.com
> > > > > Subject: Re: [Asterisk-bsd] FreeBSD and Music on Hold -- Possible
> Fix
> > > > >
> > > > > Rich,
> > > > >
> > > > > No there is very little additional CPU activity.
> > > > > mpg123 process is there.
> > > > > mpg123 runs fine standalone.
> > > > >
> > > > > I have not looked into the code in great detail but it seems like
> some
> > > > > form
> > > > > of select
> > > > > or poll issue with asterisk waiting patiently for some MOH event
> to
> > > > > happen.
> > > > >
> > > > > I take it that MOH works for you OK.
> > > > >
> > > > > Chris
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Dr. Rich Murphey" <Rich@WhiteOakLabs.com>
> > > > > To: <asterisk-bsd@lists.digium.com>
> > > > > Sent: Thursday, June 17, 2004 1:15 PM
> > > > > Subject: RE: [Asterisk-bsd] FreeBSD and Music on Hold -- Possible
> Fix
> > > > >
> > > > >
> > > > > > Hmm.. Is asterisk consuming the CPU rather than mpg123?
> > > > > >
> > > > > > I see an asterisk thread in the same loop, but it's not
> consuming
> > > CPU
> > > > > > inordinately because class->members is nonzero. Is it finding
> .mp3
> > > > > files
> > > > > > in the directories specified in musiconhold.conf?
> > > > > >
> > > > > > Rich
> > > > > >
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: asterisk-bsd-admin@lists.digium.com [mailto:asterisk-
> bsd-
> > > > > > > admin@lists.digium.com] On Behalf Of Chris Stenton
> > > > > > > Sent: Thursday, June 17, 2004 5:00 AM
> > > > > > > To: asterisk-bsd@lists.digium.com
> > > > > > > Subject: RE: [Asterisk-bsd] FreeBSD and Music on Hold --
> Possible
> > > Fix
> > > > > > >
> > > > > > > Rich,
> > > > > > >
> > > > > > > that makes no difference.
> > > > > > >
> > > > > > > Sticking asterisk in the gdb I notice that it appears to be in
> > > > > > > monmp3thread all the time.
> > > > > > >
> > > > > > >
> > > > > > > In the loop
> > > > > > >
> > > > > > > for(;/* ever */;) {
> > > > > > >
> > > > > > > Its doing this
> > > > > > > if (class->pseudofd > -1) {
> > > > > > > /* Pause some amount of time */
> > > > > > > res = read(class->pseudofd, buf,
> sizeof(buf));
> > > > > > >
> > > > > > > and then this
> > > > > > >
> > > > > > > if (!class->members)
> > > > > > > continue;
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Chris
> > > > > > >
> > > > > > > On Thu, 2004-06-17 at 05:30, Dr. Rich Murphey wrote:
> > > > > > > > It appears to be a bug in the FreeBSD mpg123 port.
> > > > > > > >
> > > > > > > > Try copying this patch to /usr/ports/audio/mpg123/files:
> > > > > > > >
> > > > > > > > http://www.whiteoaklabs.com/code/patch-mpg123.c
> > > > > > > >
> > > > > > > > and reinstall it, and see if that fixes it.
> > > > > > > >
> > > > > > > > mpg123 is going into an infinite loop in
> > > > > > > > play_frame() when it sees an end of file
> > > > > > > > while trying to read a command. The patch
> > > > > > > > breaks that loop upon an end of file.
> > > > > > > >
> > > > > > > > Cheers,
> > > > > > > > Rich
> > > > > > > >
> > > > > > > >
> > > > > > > > > -----Original Message-----
> > > > > > > > > From: asterisk-bsd-admin@lists.digium.com
> [mailto:asterisk-
> > > bsd-
> > > > > > > > > admin@lists.digium.com] On Behalf Of Chris Stenton
> > > > > > > > > Sent: Monday, June 14, 2004 12:02 PM
> > > > > > > > > To: asterisk-bsd@lists.digium.com
> > > > > > > > > Subject: [Asterisk-bsd] FreeBSD and Music on Hold
> > > > > > > > >
> > > > > > > > > I can't get Music on Hold to work on FreeBSD/asterisk-
> > > current.
> > > I
> > > > > am
> > > > > > > using
> > > > > > > > > the mpg123 port and once MOH is enabled the loading of the
> > > > > asterisk
> > > > > > > > > console
> > > > > > > > > goes incredibly slowly.
> > > > > > > > >
> > > > > > > > > _______________________________________________
> > > > > > > > > Asterisk-BSD mailing list
> > > > > > > > > Asterisk-BSD@lists.digium.com
> > > > > > > > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > _______________________________________________
> > > > > > > > Asterisk-BSD mailing list
> > > > > > > > Asterisk-BSD@lists.digium.com
> > > > > > > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> > > > > > >
> > > > > > > _______________________________________________
> > > > > > > Asterisk-BSD mailing list
> > > > > > > Asterisk-BSD@lists.digium.com
> > > > > > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> > > > > >
> > > > > >
> > > > > >
> > > > > > _______________________________________________
> > > > > > Asterisk-BSD mailing list
> > > > > > Asterisk-BSD@lists.digium.com
> > > > > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> > > > > >
> > > > >
> > > > > _______________________________________________
> > > > > Asterisk-BSD mailing list
> > > > > Asterisk-BSD@lists.digium.com
> > > > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > Asterisk-BSD mailing list
> > > > Asterisk-BSD@lists.digium.com
> > > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> > > >
> > >
> > > _______________________________________________
> > > Asterisk-BSD mailing list
> > > Asterisk-BSD@lists.digium.com
> > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> >
> >
> >
> > _______________________________________________
> > Asterisk-BSD mailing list
> > Asterisk-BSD@lists.digium.com
> > http://lists.digium.com/mailman/listinfo/asterisk-bsd
>
> _______________________________________________
> Asterisk-BSD mailing list
> Asterisk-BSD@lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-bsd
Posted: Sat Jun 19, 2004 10:47 am Post subject: [Asterisk-bsd] WARNING kernel panic was FreeBSD and Music on
Ok looking at the diff between 0.4 and 0.5 you can see that the entire
zaptel interface has been changed I assume this is to interface with the
ports version of asterisk but this completely breaks astrerisk-current.
Maxim,
Any chance you could do a version with the current interface as well? I've
backed out to version 0.4 so that I can run asterisk-current.
Thanks
Chris
----- Original Message -----
From: "Chris Stenton" <jacs@gnome.co.uk>
To: <asterisk-bsd@lists.digium.com>
Sent: Saturday, June 19, 2004 10:29 AM
Subject: RE: [Asterisk-bsd] WARNING kernel panic was FreeBSD and Music
onHold -- Possible Fix
Quote:
Can't see why it should panic though. I thought it was just that some
ioctl calls are missing. The kernel did not panic when using
0.4 version of the driver.
Anyway I'll have a look to see which call is causing the problem.
Chris
On Sat, 2004-06-19 at 10:05, Dr. Rich Murphey wrote:
> If you use the zaptel 0.5 driver from ports and the asterisk-current
server,
Quote:
> kernel panics can occur due to the mismatch of the interfaces. The
zaptel
Quote:
> interface has been enhanced lately, and those newer parts of the
interface
Quote:
> are missing in the 0.5 driver.
>
> The asterisk server from freebsd ports should be compatible though.
>
> Cheers,
> Rich
>
>
> > -----Original Message-----
> > From: asterisk-bsd-admin@lists.digium.com [mailto:asterisk-bsd-
> > admin@lists.digium.com] On Behalf Of Chris Stenton
> > Sent: Saturday, June 19, 2004 3:19 AM
> > To: asterisk-bsd@lists.digium.com
> > Subject: [Asterisk-bsd] WARNING kernel panic was FreeBSD and Music on
Hold
Quote:
> > -- Possible Fix
> >
> > I have an X101P installed
> >
> > I have just updated the zaptel driver to 0.5.
> >
> > If I now enable MOH I get an immediate kernel PANIC on
> > FreeBSD-5.2.1-RELEASE-p8
> >
> > Chris
> >
> >
> > On Fri, 2004-06-18 at 23:54, Dr. Rich Murphey wrote:
> > > Something must be wrong. Pseudofs is non-negative, which means you
have
Quote:
> > a
> > > zaptel device available for timing, had reading it should produce a
> > delay.
> > > In which case, you shouldn't need the usleep() there. So, if the
> > usleep()
> > > makes a difference, perhaps it does so because the device is not
> > providing
> > > the timing expected.
> > >
> > > Do you have a zaptel device?
> > >
> > > Cheers,
> > > Rich
> > >
> > >
> > > > -----Original Message-----
> > > > From: asterisk-bsd-admin@lists.digium.com [mailto:asterisk-bsd-
> > > > admin@lists.digium.com] On Behalf Of Chris Stenton
> > > > Sent: Friday, June 18, 2004 6:20 AM
> > > > To: asterisk-bsd@lists.digium.com
> > > > Subject: Re: [Asterisk-bsd] FreeBSD and Music on Hold -- Possible
Fix
Quote:
> > > >
> > > > Ok I've had part success in that if I change
> > > > if (class->pseudofd > -1) {
> > > > /* Pause some amount of time */
> > > > res = read(class->pseudofd, buf, sizeof(buf));
> > > > to
> > > >
> > > > if (class->pseudofd > -1) {
> > > > /* Pause some amount of time */
> > > > usleep(1);
> > > > res = read(class->pseudofd, buf, sizeof(buf));
> > > >
> > > >
> > > > At least asterisk responds at the cli now. I think on a 2
processor
Quote:
> > > > machine
> > > > the above read took no time at all. What kind of delay should
there
Quote:
> > be?
> > > > However even though asterisk now starts up cleanly and can
register
Quote:
> > > > external
> > > > resouces. It does not respond to any connections sip/zap dialin
etc.
Quote:
> > Looks
> > > > like the select routine is being blocked somehow. Who wrote the
> > FreeBSD
> > > > MOH
> > > > routines?
> > > >
> > > > Chris
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Dr. Rich Murphey" <Rich@WhiteOakLabs.com>
> > > > To: <asterisk-bsd@lists.digium.com>
> > > > Sent: Thursday, June 17, 2004 9:35 PM
> > > > Subject: RE: [Asterisk-bsd] FreeBSD and Music on Hold -- Possible
Fix
Quote:
> > > >
> > > >
> > > > > I had seen intermittent occurrences of mpg123 hogging the cpu
with
Quote:
> > > > > concurrent absence of music on hold. It would occur immediately
> > upon
> > > > > starting asterisk about 1 out of 5 times.
> > > > >
> > > > > After the patch I haven't seen it happen again, and I can have
> > several
> > > > lines
> > > > > on hold with music on hold and none are choppy.
> > > > >
> > > > > In your case, it appears that there are no music-on-hold
'classes'
Quote:
> > in
> > > > the
> > > > > context. I'm not certain, but my understanding is that each
line
Quote:
> > below
> > > > the
> > > > > line '[classes]' in musiconhold.conf is a class:
> > > > >
> > > > > [classes]
> > > > > default => mp3:/var/lib/asterisk/mohmp3
> > > > >
> > > > > Where default would apply to every context except those that
have
> > > > > > admin@lists.digium.com] On Behalf Of Chris Stenton
> > > > > > Sent: Thursday, June 17, 2004 1:26 PM
> > > > > > To: asterisk-bsd@lists.digium.com
> > > > > > Subject: Re: [Asterisk-bsd] FreeBSD and Music on Hold --
Possible
Quote:
> > Fix
> > > > > >
> > > > > > Rich,
> > > > > >
> > > > > > No there is very little additional CPU activity.
> > > > > > mpg123 process is there.
> > > > > > mpg123 runs fine standalone.
> > > > > >
> > > > > > I have not looked into the code in great detail but it seems
like
Quote:
> > some
> > > > > > form
> > > > > > of select
> > > > > > or poll issue with asterisk waiting patiently for some MOH
event
Quote:
> > to
> > > > > > happen.
> > > > > >
> > > > > > I take it that MOH works for you OK.
> > > > > >
> > > > > > Chris
> > > > > >
> > > > > > ----- Original Message -----
> > > > > > From: "Dr. Rich Murphey" <Rich@WhiteOakLabs.com>
> > > > > > To: <asterisk-bsd@lists.digium.com>
> > > > > > Sent: Thursday, June 17, 2004 1:15 PM
> > > > > > Subject: RE: [Asterisk-bsd] FreeBSD and Music on Hold --
Possible
Quote:
> > Fix
> > > > > >
> > > > > >
> > > > > > > Hmm.. Is asterisk consuming the CPU rather than mpg123?
> > > > > > >
> > > > > > > I see an asterisk thread in the same loop, but it's not
> > consuming
> > > > CPU
> > > > > > > inordinately because class->members is nonzero. Is it
finding
Can't see why it should panic though. I thought it was just that some
ioctl calls are missing. The kernel did not panic when using
0.4 version of the driver.
Anyway I'll have a look to see which call is causing the problem.
Chris
On Sat, 2004-06-19 at 10:05, Dr. Rich Murphey wrote:
> If you use the zaptel 0.5 driver from ports and the asterisk-current
server,
> kernel panics can occur due to the mismatch of the interfaces. The
zaptel
> interface has been enhanced lately, and those newer parts of the
interface
> are missing in the 0.5 driver.
>
> The asterisk server from freebsd ports should be compatible though.
>
> Cheers,
> Rich
>
>
> > -----Original Message-----
> > From: asterisk-bsd-admin@lists.digium.com [mailto:asterisk-bsd-
> > admin@lists.digium.com] On Behalf Of Chris Stenton
> > Sent: Saturday, June 19, 2004 3:19 AM
> > To: asterisk-bsd@lists.digium.com
> > Subject: [Asterisk-bsd] WARNING kernel panic was FreeBSD and Music on
Hold
> > -- Possible Fix
> >
> > I have an X101P installed
> >
> > I have just updated the zaptel driver to 0.5.
> >
> > If I now enable MOH I get an immediate kernel PANIC on
> > FreeBSD-5.2.1-RELEASE-p8
> >
> > Chris
> >
> >
> > On Fri, 2004-06-18 at 23:54, Dr. Rich Murphey wrote:
> > > Something must be wrong. Pseudofs is non-negative, which means you
have
> > a
> > > zaptel device available for timing, had reading it should produce a
> > delay.
> > > In which case, you shouldn't need the usleep() there. So, if the
> > usleep()
> > > makes a difference, perhaps it does so because the device is not
> > providing
> > > the timing expected.
> > >
> > > Do you have a zaptel device?
> > >
> > > Cheers,
> > > Rich
> > >
> > >
> > > > -----Original Message-----
> > > > From: asterisk-bsd-admin@lists.digium.com [mailto:asterisk-bsd-
> > > > admin@lists.digium.com] On Behalf Of Chris Stenton
> > > > Sent: Friday, June 18, 2004 6:20 AM
> > > > To: asterisk-bsd@lists.digium.com
> > > > Subject: Re: [Asterisk-bsd] FreeBSD and Music on Hold -- Possible
Fix
> > > >
> > > > Ok I've had part success in that if I change
> > > > if (class->pseudofd > -1) {
> > > > /* Pause some amount of time */
> > > > res = read(class->pseudofd, buf, sizeof(buf));
> > > > to
> > > >
> > > > if (class->pseudofd > -1) {
> > > > /* Pause some amount of time */
> > > > usleep(1);
> > > > res = read(class->pseudofd, buf, sizeof(buf));
> > > >
> > > >
> > > > At least asterisk responds at the cli now. I think on a 2
processor
> > > > machine
> > > > the above read took no time at all. What kind of delay should
there
> > be?
> > > > However even though asterisk now starts up cleanly and can
register
> > > > external
> > > > resouces. It does not respond to any connections sip/zap dialin
etc.
> > Looks
> > > > like the select routine is being blocked somehow. Who wrote the
> > FreeBSD
> > > > MOH
> > > > routines?
> > > >
> > > > Chris
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Dr. Rich Murphey" <Rich@WhiteOakLabs.com>
> > > > To: <asterisk-bsd@lists.digium.com>
> > > > Sent: Thursday, June 17, 2004 9:35 PM
> > > > Subject: RE: [Asterisk-bsd] FreeBSD and Music on Hold -- Possible
Fix
> > > >
> > > >
> > > > > I had seen intermittent occurrences of mpg123 hogging the cpu
with
> > > > > concurrent absence of music on hold. It would occur immediately
> > upon
> > > > > starting asterisk about 1 out of 5 times.
> > > > >
> > > > > After the patch I haven't seen it happen again, and I can have
> > several
> > > > lines
> > > > > on hold with music on hold and none are choppy.
> > > > >
> > > > > In your case, it appears that there are no music-on-hold
'classes'
> > in
> > > > the
> > > > > context. I'm not certain, but my understanding is that each
line
> > below
> > > > the
> > > > > line '[classes]' in musiconhold.conf is a class:
> > > > >
> > > > > [classes]
> > > > > default => mp3:/var/lib/asterisk/mohmp3
> > > > >
> > > > > Where default would apply to every context except those that
have
> > > > specified
> > > > > another music on hold class.
> > > > >
> > > > > Does that help?
> > > > >
> > > > > Cheers,
> > > > > Rich
> > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: asterisk-bsd-admin@lists.digium.com [mailto:asterisk-
bsd-
> > > > > > admin@lists.digium.com] On Behalf Of Chris Stenton
> > > > > > Sent: Thursday, June 17, 2004 1:26 PM
> > > > > > To: asterisk-bsd@lists.digium.com
> > > > > > Subject: Re: [Asterisk-bsd] FreeBSD and Music on Hold --
Possible
> > Fix
> > > > > >
> > > > > > Rich,
> > > > > >
> > > > > > No there is very little additional CPU activity.
> > > > > > mpg123 process is there.
> > > > > > mpg123 runs fine standalone.
> > > > > >
> > > > > > I have not looked into the code in great detail but it seems
like
> > some
> > > > > > form
> > > > > > of select
> > > > > > or poll issue with asterisk waiting patiently for some MOH
event
> > to
> > > > > > happen.
> > > > > >
> > > > > > I take it that MOH works for you OK.
> > > > > >
> > > > > > Chris
> > > > > >
> > > > > > ----- Original Message -----
> > > > > > From: "Dr. Rich Murphey" <Rich@WhiteOakLabs.com>
> > > > > > To: <asterisk-bsd@lists.digium.com>
> > > > > > Sent: Thursday, June 17, 2004 1:15 PM
> > > > > > Subject: RE: [Asterisk-bsd] FreeBSD and Music on Hold --
Possible
> > Fix
> > > > > >
> > > > > >
> > > > > > > Hmm.. Is asterisk consuming the CPU rather than mpg123?
> > > > > > >
> > > > > > > I see an asterisk thread in the same loop, but it's not
> > consuming
> > > > CPU
> > > > > > > inordinately because class->members is nonzero. Is it
finding
> > .mp3
> > > > > > files
> > > > > > > in the directories specified in musiconhold.conf?
> > > > > > >
> > > > > > > Rich
> > > > > > >
> > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: asterisk-bsd-admin@lists.digium.com
[mailto:asterisk-
> > bsd-
> > > > > > > > admin@lists.digium.com] On Behalf Of Chris Stenton
> > > > > > > > Sent: Thursday, June 17, 2004 5:00 AM
> > > > > > > > To: asterisk-bsd@lists.digium.com
> > > > > > > > Subject: RE: [Asterisk-bsd] FreeBSD and Music on Hold --
> > Possible
> > > > Fix
> > > > > > > >
> > > > > > > > Rich,
> > > > > > > >
> > > > > > > > that makes no difference.
> > > > > > > >
> > > > > > > > Sticking asterisk in the gdb I notice that it appears to
be in
> > > > > > > > monmp3thread all the time.
> > > > > > > >
> > > > > > > >
> > > > > > > > In the loop
> > > > > > > >
> > > > > > > > for(;/* ever */;) {
> > > > > > > >
> > > > > > > > Its doing this
> > > > > > > > if (class->pseudofd > -1) {
> > > > > > > > /* Pause some amount of time */
> > > > > > > > res = read(class->pseudofd, buf,
> > sizeof(buf));
> > > > > > > >
> > > > > > > > and then this
> > > > > > > >
> > > > > > > > if (!class->members)
> > > > > > > > continue;
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > Chris
> > > > > > > >
> > > > > > > > On Thu, 2004-06-17 at 05:30, Dr. Rich Murphey wrote:
> > > > > > > > > It appears to be a bug in the FreeBSD mpg123 port.
> > > > > > > > >
> > > > > > > > > Try copying this patch to /usr/ports/audio/mpg123/files:
> > > > > > > > >
> > > > > > > > > http://www.whiteoaklabs.com/code/patch-mpg123.c
> > > > > > > > >
> > > > > > > > > and reinstall it, and see if that fixes it.
> > > > > > > > >
> > > > > > > > > mpg123 is going into an infinite loop in
> > > > > > > > > play_frame() when it sees an end of file
> > > > > > > > > while trying to read a command. The patch
> > > > > > > > > breaks that loop upon an end of file.
> > > > > > > > >
> > > > > > > > > Cheers,
> > > > > > > > > Rich
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > > -----Original Message-----
> > > > > > > > > > From: asterisk-bsd-admin@lists.digium.com
> > [mailto:asterisk-
> > > > bsd-
> > > > > > > > > > admin@lists.digium.com] On Behalf Of Chris Stenton
> > > > > > > > > > Sent: Monday, June 14, 2004 12:02 PM
> > > > > > > > > > To: asterisk-bsd@lists.digium.com
> > > > > > > > > > Subject: [Asterisk-bsd] FreeBSD and Music on Hold
> > > > > > > > > >
> > > > > > > > > > I can't get Music on Hold to work on
FreeBSD/asterisk-
> > > > current.
> > > > I
> > > > > > am
> > > > > > > > using
> > > > > > > > > > the mpg123 port and once MOH is enabled the loading of
the
> > > > > > asterisk
> > > > > > > > > > console
> > > > > > > > > > goes incredibly slowly.
> > > > > > > > > >
> > > > > > > > > > _______________________________________________
> > > > > > > > > > Asterisk-BSD mailing list
> > > > > > > > > > Asterisk-BSD@lists.digium.com
> > > > > > > > > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > _______________________________________________
> > > > > > > > > Asterisk-BSD mailing list
> > > > > > > > > Asterisk-BSD@lists.digium.com
> > > > > > > > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> > > > > > > >
> > > > > > > > _______________________________________________
> > > > > > > > Asterisk-BSD mailing list
> > > > > > > > Asterisk-BSD@lists.digium.com
> > > > > > > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > _______________________________________________
> > > > > > > Asterisk-BSD mailing list
> > > > > > > Asterisk-BSD@lists.digium.com
> > > > > > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> > > > > > >
> > > > > >
> > > > > > _______________________________________________
> > > > > > Asterisk-BSD mailing list
> > > > > > Asterisk-BSD@lists.digium.com
> > > > > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> > > > >
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > Asterisk-BSD mailing list
> > > > > Asterisk-BSD@lists.digium.com
> > > > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> > > > >
> > > >
> > > > _______________________________________________
> > > > Asterisk-BSD mailing list
> > > > Asterisk-BSD@lists.digium.com
> > > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> > >
> > >
> > >
> > > _______________________________________________
> > > Asterisk-BSD mailing list
> > > Asterisk-BSD@lists.digium.com
> > > http://lists.digium.com/mailman/listinfo/asterisk-bsd
> >
> > _______________________________________________
> > Asterisk-BSD mailing list
> > Asterisk-BSD@lists.digium.com
> > http://lists.digium.com/mailman/listinfo/asterisk-bsd
>
>
>
> _______________________________________________
> Asterisk-BSD mailing list
> Asterisk-BSD@lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-bsd
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum