[Home]

Summary:ASTERISK-26639: core: Disabling xmldoc support does not work. Also results in abort during Asterisk startup.
Reporter:Mr Dini (MrDini)Labels:patch
Date Opened:2016-12-04 17:03:16.000-0600Date Closed:2017-10-31 06:18:35
Priority:MinorRegression?
Status:Closed/CompleteComponents:Core/BuildSystem
Versions:14.0.2 14.1.1 Frequency of
Occurrence
Related
Issues:
Environment:ARMv5 NAS with kernel linux 2.6.31.8, uClibc Also on x86_64 on Ubuntu 14.04, kernel 3.13.0-86-genericAttachments:( 0) 0001-Build-System-Fix-disable-xmldoc-option.patch
( 1) asterisk_14.0.2_error.txt
( 2) config.log
Description:I tried to compile the asterisk from source to my NAS, but when I try to start it in debugger mode (asterisk -vvvvvvc), it gives me this output:

http://pastebin.com/snpZEXNK

I compiled it with the "--prefix=/ffp --disable-xmldoc" configure flags.

What's wrong?

Many thanks!

[Edit by Rusty - doesn't appear to disable xml doc generation in /doc or disable the xmldoc dump command or config help sourced from xml]
Comments:By: Asterisk Team (asteriskteam) 2016-12-04 17:03:17.419-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Rusty Newton (rnewton) 2016-12-05 11:10:49.585-0600

Does Asterisk fail to start?

I tried on 14.1.1 with "--disable-xmldoc" and I don't get the logger output that you see. Asterisk starts up and runs fine.

I'm on x86_64, Ubuntu 14.04.4.





By: Rusty Newton (rnewton) 2016-12-05 11:35:13.143-0600

Still would like to know more about what happens in your case, however I was able to at least see that it didn't seem to disable any XML documentation. So the issue was reproduce in one aspect. I'm going to go ahead and open the issue up.

By: Mr Dini (MrDini) 2016-12-05 13:37:42.599-0600

Thanks for the quick replies!

No, the asterisk not starts up. That is mine problem. :)

Do You need the configure output? Tell me, what would be interesting and I will attach it.

BTW, as You Can see from the output, my system is not at standard pathes. Because the / is a read only mount from the NAS's fw img. But the /ffp is a symlink to my HDD's folder and here I have a complete FHS, with bin, sbin, var and So on. The compiled packages are also goes here. Can it cause the problem?

By: Rusty Newton (rnewton) 2016-12-05 17:01:22.081-0600

Thanks. Yes please provide:

* config.log / configure output
* Asterisk start up log with "warning,error,notice,verbose,debug" with both verbose and debug turned up to level 5.

Here are instructions for collecting debug: https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

By: Mr Dini (MrDini) 2016-12-06 13:23:00.386-0600

OK, I attached the config.log file and I modified the logger.conf, I added theese lines:

{code}
[logfiles]
debug_log_123456 => notice,warning,error,debug,verbose
{code}

But when I run it now, with the {code}asterisk -vvvvvc{code} and unfortunately it doesn't created a debug_log_123456 at /ffp/var/log/asterisk folder... So I Cannot attach that.

Maybe the config.log will be more telltale!

By: Rusty Newton (rnewton) 2016-12-06 17:45:47.516-0600

Well, you need to run

{noformat}
asterisk -cvvvvvddddd
{noformat}

That will set level 5 Verbose and level 5 Debug.

However, it should have put out a log regardless. Did you restart Asterisk or at least reload the logger?

If your Asterisk install is failing to output log files then you may have greater problems than just issues with xmldoc. I would recommend figuring out the logging issue as we will need logs for any other issues you run into.

By: Mr Dini (MrDini) 2016-12-06 23:57:25.425-0600

No, the asterisk cannot start up and I don't know why. I thought, that was the error... And still no log, with this command.

Here is the output:

http://pastebin.com/erhBTYZR

By: Rusty Newton (rnewton) 2016-12-09 09:37:40.039-0600

Per the guidelines: https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines , please don't use pastebin. Simply use "More > Attach Files" , found on the JIRA menu bar, to attach debug to the issue.

I re-read your description and comments so far. I didn't see where you said you had tested without --disable-xmldoc. Can you clarify that Asterisk starts up correctly when it is not compiled with that option?



By: Mr Dini (MrDini) 2016-12-09 14:47:17.393-0600

Okay, sorry. I am going to use the file attach option!

First, I just compiled with the '--prefix=/ffp' option only. But it doesn't started, and gave me exactly the same debug output, So I asked this first at the asterisk mailing list, where a man redirected me here. :)

By: Rusty Newton (rnewton) 2016-12-13 08:39:12.470-0600

Okay. I would recommend you to create a new JIRA issue for Asterisk failing at startup. As it doesn't seem to have anything to do with the --disable-xmldoc option not working. They look like two separate issues.

By: Corey Farrell (coreyfarrell) 2017-03-30 08:36:22.254-0500

I can confirm the startup issue is related to xmldoc not truly being disabled, even if you use standard {{--prefix}}.

Required conditions:
* Configure using {{--disable-xmldoc}}.
* Delete the installed {{core-en_US.xml}}.

Results:
* Asterisk gets compiled with xmldoc support enabled even though you disabled it.
* On startup {{bucket.c}} tries loading config using {{config_options.c}}.  This config load is rejected due to lack of xmldocs, bucket init fails so system startup aborts.

[~rnewton]: I have a fix for this but the current fix creates potential ABI concerns.  By making {{--disable-xmldoc}} work it will actually cause all {{ast_xmldoc_*}} symbols to be removed for anyone using that option.  To deal with this we probably need to create stubs for all symbols in {{xmldoc.c}}?  This is unlikely to effect 3rd party modules but {{res_agi}} directly uses xmldocs so not impossible.

By: Rusty Newton (rnewton) 2017-03-30 09:09:58.249-0500

[~coreyfarrell] thanks for the additional information. I don't have any insight for the fix itself, you might bring it up on the asterisk-dev list in the #asterisk-dev chat to see what the other think.

By: Corey Farrell (coreyfarrell) 2017-03-30 09:55:35.035-0500

I've attached my current patch.

Note my patch does not stop the Makefile's from generating xml documentation, it only disables loading it from Asterisk, allowing Asterisk to startup without failure.  I'm unsure if lack of xmldocs has any further effect on code that uses {{config_options.c}}, I assume it has a reason to abort for lack of xmldocs.

Part of me thinks that a better option would be to remove the {{--disable-xmldocs}} option, or update the help string in 13/14 to say it's ineffective, remove from master.

By: Friendly Automation (friendly-automation) 2017-10-31 06:18:36.555-0500

Change 6879 merged by Jenkins2:
Build System: Fix --disable-xmldoc option.

[https://gerrit.asterisk.org/6879|https://gerrit.asterisk.org/6879]

By: Friendly Automation (friendly-automation) 2017-10-31 06:38:05.638-0500

Change 6878 merged by Jenkins2:
Build System: Fix --disable-xmldoc option.

[https://gerrit.asterisk.org/6878|https://gerrit.asterisk.org/6878]

By: Friendly Automation (friendly-automation) 2017-10-31 15:15:40.226-0500

Change 6877 merged by Joshua Colp:
Build System: Fix --disable-xmldoc option.

[https://gerrit.asterisk.org/6877|https://gerrit.asterisk.org/6877]