[Home]

Summary:ASTERISK-12796: [patch] AGI processes going to defunct
Reporter:Hakan C (hakanc)Labels:
Date Opened:2008-09-29 06:29:43Date Closed:2008-11-25 18:22:31.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Resources/res_agi
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) res_agi.c-nozombies.diff
Description:Hello.
I am using, Asterisk 1.4.21.2, chan_ss7-1.0.10, libpri-1.4.7, zaptel-1.4.12.1.
I've tried Perl and PHP for my AGI scripts.

I tried these kernel distros:
2.6.22-14-server
2.6.24-16-server
2.6.20-15-server

GCC versions:
gcc version 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)

I've tried "agi-test.agi" with SIP and over SS7, it hangs too.
One solution is restarting Asterisk.

I have different servers and Ubuntu distros, when i upgraded to Asterisk 1.4.21.2 this problem happening.

I've tried clean ubuntu install and installing asterisk, but no solution.

****** STEPS TO REPRODUCE ******

Install Ubuntu 8.04
Install in order:

zaptel-1.4.12.1,
asterisk 1.4.21.2,
libpri-1.4.7,
chan_ss7-1.0.10

and try to execute a PHP or Perl AGI.
When a playbacking a file, hang up phone and then list process by 'ps auxf'
Comments:By: mdu113 (mdu113) 2008-09-29 12:27:04

It was broken some time ago and then reported in issue 12648. The change commited in that issue didn't fix the problem completely though. I've fixed it for myself with uploaded patch, which actually waits for agi processes for up to 500ms.
To asterisk developers: please feel free to use it if you find it good enough. You should have my disclaimer on file as I've signed and faxed it to you several years ago.

By: snuffy (snuffy) 2008-09-30 04:29:58

If you did sign it along time ago and say faxed it in..
You will need to re-sign the new electronic form within mantis (should be along the top from memory).
It will take up to a few days for your license to be approved

By: Tilghman Lesher (tilghman) 2008-10-01 14:18:08

Are you calling AGI or are you calling DeadAGI?  I'd understand completely if this were DeadAGI, as we don't send a SIGHUP on channel death with DeadAGI.

By: mdu113 (mdu113) 2008-10-01 14:52:12

I'm calling AGI, but my scripts catch SIGHUP to do some cleanup and logging at the end and so require to be waited for some short period of time.

By: Hakan C (hakanc) 2008-10-03 16:51:27

I am using AGI, i am ok with DeadAGI.
I think problem can be about starting Asterisk over SSH.
How should i start Asterisk in background?
I think it's about with TTY or something else. Scripts cannot send outputs and they are going to defunct.

I am starting Asterisk on my dedicated server with:
"asterisk start"
"safe_asterisk"
"asterisk"

but it's not resolving AGI issue.

By: Brian J. Conway (bconway) 2008-10-22 20:08:03

FWIW, I'm seeing the same thing with AGI (not DeadAGI) and Python. I've been developing across various 1.4 versions over time, here's what my current platforms do:

Asterisk 1.4.22 compiled on CentOS 5.2, latest 2.6.18 kernel- zombies
Asterisk 1.4.20.1 compiled on CentOS 5.2, latest 2.6.18 kernel- zombies
Asterisk 1.4.19.1 compiled on Debian 4.0/Etch, latest 2.6.18 kernel- no zombies

Also catching SIGHUP for cleanup purposes. I'm not sure my versions jive with what's in ASTERISK-12018, so I'll test further.

By: Brian J. Conway (bconway) 2008-10-23 15:18:18

Adding:

Asterisk 1.4.22 compiled on Debian 4.0/Etch, latest 2.6.18 kernel- no zombies

Guess I will look further, perhaps an issue elsewhere. Thanks.

By: Tilghman Lesher (tilghman) 2008-11-25 18:22:30.000-0600

Closing as duplicate of ASTERISK-13119