Summary: | ASTERISK-08340: Spandsp + Ast 1.4B3 - crash on incoming RXFAX | ||
Reporter: | Matt Gibson (flewid) | Labels: | |
Date Opened: | 2006-12-12 16:50:00.000-0600 | Date Closed: | 2006-12-12 19:17:22.000-0600 |
Priority: | Critical | Regression? | No |
Status: | Closed/Complete | Components: | Applications/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | Posted this to -users a few days ago, figured a bug should be opened for the devs as well: Steps to take to reproduce: 1. Install Asterisk 1.4 from source 2. Download latest spandsp snapshot + app_rxfax and app_txfax 3. Patch Asterisk makefiles to include spandsp during compile 4. Create an extension to dial into app_rxfax 5. Dial app_rxfax from regular phone - will work, but wont' send fax obviously 6. Dial app_rxfax from a regular fax machine - will immediately segfault asterisk The mailing list suggested to remove the line from app_rxfax.so: ast_frfree(inf); Which was done. After this was removed from app_rxfax.so, i was able to dial to the extension from a regular phone without it crashing, but still trying to actually receive a fax causes a segfault. I tried hard linking asterisk to -lspandsp, to no avail. The segfault I see is something like this: Executing [402@default:1] RxFAX("SIP/101-081d63d0", "/tmp/test.tif") in new stack asterisk: symbol lookup error: /usr/lib/asterisk/modules/app_rxfax.so: undefined symbol: span_set_message_handler And here are some more error reports: error #2: ------------ -- Executing [s@fax:1] Macro("Zap/4-1", "faxreceive") in new stack -- Executing [s@macro-faxreceive:1] Set("Zap/4-1", "FAXFILE=/var/spool/asterisk-fax/1165782949.4.tif") in new stack [Dec 10 15:35:54] DEBUG[12068]: pbx.c:1621 pbx_substitute_variables_helper_full: Function result is 'email@address.com' -- Executing [s@macro-faxreceive:2] Set("Zap/4-1", "EMAILADDR=email@address.com") in new stack -- Executing [s@macro-faxreceive:3] RxFAX("Zap/4-1", "/var/spool/asterisk-fax/1165782949.4.tif") in new stack Segmentation fault (core dumped) working with just a call to the extension: ----------------------------------------------------------- -- Executing [8002@internal:1] Goto("SIP/8080-0820c678", "fax|s|1") in new stack -- Goto (fax,s,1) -- Executing [s@fax:1] Macro("SIP/8080-0820c678", "faxreceive") in new stack -- Executing [s@macro-faxreceive:1] Set("SIP/8080-0820c678", "FAXFILE=/var/spool/asterisk-fax/1165784325.0.tif") in new stack [Dec 10 15:58:45] DEBUG[12168]: pbx.c:1621 pbx_substitute_variables_helper_full: Function result is 'email@address.com' -- Executing [s@macro-faxreceive:2] Set("SIP/8080-0820c678", "EMAILADDR=email@address.com") in new stack -- Executing [s@macro-faxreceive:3] RxFAX("SIP/8080-0820c678", "/var/spool/asterisk-fax/1165784325.0.tif") in new stack [Dec 10 15:59:09] DEBUG[12168]: app_rxfax.c:123 phase_e_handler: ============================================================================== [Dec 10 15:59:09] DEBUG[12168]: app_rxfax.c:124 phase_e_handler: Fax receive not successful - result (60) Disconnected after permitted retries. [Dec 10 15:59:09] DEBUG[12168]: app_rxfax.c:125 phase_e_handler: ============================================================================== [Dec 10 16:00:48] DEBUG[12168]: app_rxfax.c:325 rxfax_exec: Got hangup [Dec 10 16:00:48] DEBUG[12168]: app_macro.c:267 _macro_exec: Extension s, macroexten s, priority 3 returned normally even though call was hung up [Dec 10 16:00:48] DEBUG[12168]: pbx.c:2383 __ast_pbx_run: Extension s, priority 1 returned normally even though call was hung up -- Executing [h@fax:1] System("SIP/8080-0820c678", "/usr/local/sbin/mailfax /var/spool/asterisk-fax/1165784325.0.tif email@address.com "" " "") in new stack TIFFOpen: /var/spool/asterisk-fax/1165784325.0.tif: Cannot open. tiff2pdf: Can't open input file /var/spool/asterisk-fax/1165784325.0.tif for reading. and this is the crash with strace enabled: ------------------------------------------------------------ -- Starting simple switch on 'Zap/4-1' 0xbff6229b, 1) = ? ERESTARTSYS (To be restarted) --- SIGURG (Urgent I/O condition) @ 0 (0) --- rt_sigaction(SIGURG, {0x8066cc0, [URG], SA_RESTART}, {0x8066cc0, [URG], SA_RESTART}, 8) = 0 sigreturn() = ? (mask now []) read(0, -- Executing [s@from-pstn:1] Goto("Zap/4-1", "main-menu|s|1") in new stack -- Goto (main-menu,s,1) -- Executing [s@main-menu:1] Wait("Zap/4-1", ".5") in new stack -- Executing [s@main-menu:2] Answer("Zap/4-1", "") in new stack [Dec 10 16:06:17] DEBUG[12305]: chan_zap.c:2789 zt_answer: Took Zap/4-1 off hook [Dec 10 16:06:17] DEBUG[12305]: chan_zap.c:1458 zt_enable_ec: Enabled echo cancellation on channel 4 [Dec 10 16:06:17] DEBUG[12305]: chan_zap.c:1477 zt_train_ec: No echo training requested -- Executing [s@main-menu:3] SetMusicOnHold("Zap/4-1", "oldschool") in new stack -- Executing [s@main-menu:4] Set("Zap/4-1", "TIMEOUT(digit)=10") in new stack -- Digit timeout set to 10 -- Executing [s@main-menu:5] Set("Zap/4-1", "TIMEOUT(response)=15") in new stack -- Response timeout set to 15 -- Executing [s@main-menu:6] Wait("Zap/4-1", ".25") in new stack -- Executing [s@main-menu:7] GotoIfTime("Zap/4-1", "9:00-17:00|*|*|*?flewid|s|1") in new stack -- Goto (flewid,s,1) -- Executing [s@flewid:1] BackGround("Zap/4-1", "flewid-ivr/initial-greet") in new stack [Dec 10 16:06:17] DEBUG[12305]: channel.c:1860 ast_settimeout: Scheduling timer at 160 sample intervals -- Playing 'flewid-ivr/initial-greet' (language 'en') 0xbff6229b, 1) = ? ERESTARTSYS (To be restarted) --- SIGURG (Urgent I/O condition) @ 0 (0) --- rt_sigaction(SIGURG, {0x8066cc0, [URG], SA_RESTART}, {0x8066cc0, [URG], SA_RESTART}, 8) = 0 sigreturn() = ? (mask now []) read(0, [Dec 10 16:06:20] DEBUG[12305]: channel.c:1860 ast_settimeout: Scheduling timer at 0 sample intervals [Dec 10 16:06:20] DEBUG[12305]: channel.c:1860 ast_settimeout: Scheduling timer at 0 sample intervals -- Executing [s@flewid:2] BackGround("Zap/4-1", "silence/1") in new stack [Dec 10 16:06:20] DEBUG[12305]: channel.c:1860 ast_settimeout: Scheduling timer at 160 sample intervals -- Playing 'silence/1' (language 'en') 0xbff6229b, 1) = ? ERESTARTSYS (To be restarted) --- SIGURG (Urgent I/O condition) @ 0 (0) --- rt_sigaction(SIGURG, {0x8066cc0, [URG], SA_RESTART}, {0x8066cc0, [URG], SA_RESTART}, 8) = 0 sigreturn() = ? (mask now []) read(0, [Dec 10 16:06:20] DEBUG[12305]: channel.c:1860 ast_settimeout: Scheduling timer at 158 sample intervals [Dec 10 16:06:20] DEBUG[12305]: channel.c:1860 ast_settimeout: Scheduling timer at 0 sample intervals [Dec 10 16:06:20] DEBUG[12305]: channel.c:1860 ast_settimeout: Scheduling timer at 0 sample intervals -- Executing [s@flewid:3] BackGround("Zap/4-1", "flewid-ivr/main-message") in new stack [Dec 10 16:06:20] DEBUG[12305]: channel.c:1860 ast_settimeout: Scheduling timer at 160 sample intervals -- Playing 'flewid-ivr/main-message' (language 'en') 0xbff6229b, 1) = ? ERESTARTSYS (To be restarted) --- SIGURG (Urgent I/O condition) @ 0 (0) --- rt_sigaction(SIGURG, {0x8066cc0, [URG], SA_RESTART}, {0x8066cc0, [URG], SA_RESTART}, 8) = 0 sigreturn() = ? (mask now []) read(0, [Dec 10 16:06:21] DEBUG[12305]: chan_zap.c:4805 zt_read: DTMF digit: f on Zap/4-1 -- Redirecting Zap/4-1 to fax extension [Dec 10 16:06:21] DEBUG[12305]: channel.c:1860 ast_settimeout: Scheduling timer at 0 sample intervals == Spawn extension (flewid, fax, 0) exited non-zero on 'Zap/4-1' -- Executing [fax@flewid:1] Goto("Zap/4-1", "fax|s|1") in new stack -- Goto (fax,s,1) -- Executing [s@fax:1] Macro("Zap/4-1", "faxreceive") in new stack -- Executing [s@macro-faxreceive:1] Set("Zap/4-1", "FAXFILE=/var/spool/asterisk-fax/1165784776.0.tif") in new stack [Dec 10 16:06:21] DEBUG[12305]: pbx.c:1621 pbx_substitute_variables_helper_full: Function result is 'email@address.com' -- Executing [s@macro-faxreceive:2] Set("Zap/4-1", "EMAILADDR=email@address.com") in new stack -- Executing [s@macro-faxreceive:3] RxFAX("Zap/4-1", "/var/spool/asterisk-fax/1165784776.0.tif") in new stack 0xbff6229b, 1) = ? ERESTARTSYS (To be restarted) +++ killed by SIGSEGV (core dumped) +++ Process 12268 detached pbx asterisk-fax # | ||
Comments: | By: Joshua C. Colp (jcolp) 2006-12-12 19:17:22.000-0600 Spandsp and rxfax is not part of the Asterisk tree and we do not maintain them. I suggest talking to Steve Underwood and seeing what he has to say. |