Development

Ticket #12250 (Problems when relying on secondary DNS server) created

Latest Bugs & Tasks - Tue, 2015-07-28 13:25

This is hrev49292.

I have manually set primary and secondary DNS servers on Windows. The primary one is not available depending on where I am, but falling back to the secondary one is usually no problem. VirtualBox correctly communicates those settings to Haiku, so my /boot/system/settings/network/resolv.conf looks something like this:

nameserver 10.0.0.101
nameserver 8.8.8.8
domain fritz.box

Now, attempting to build Haiku results in all targets of type DownloadLocatedFile1 failing, which means that it is not possible to build Haiku (I guess it can be bootstrapped, I have not tried that). The reason for this is simple: wget is called with the argument --timeout 10. That this is the problem is easily verified:

~> wget --timeout 10 google.com
--2015-07-28 13:09:21--  http://google.com/
Resolving google.com... failed: Operation timed out.
wget: unable to resolve host address ‘google.com’
~> wget --timeout 10.1 google.com
--2015-07-28 13:09:35--  http://google.com/
Resolving google.com... 2a00:1450:4001:803::1007, 173.194.116.169, 173.194.116.167, ...
Connecting to google.com|2a00:1450:4001:803::1007|:80... failed: Network is unreachable.
Connecting to google.com|173.194.116.169|:80... connected.
HTTP request sent, awaiting response... 302 Found

Compare this to the values that can be found in /boot/system/develop/headers/posix/resolv.h:

130 #define MAXNS               3   /* max # name servers we'll track */
...
134 #define RES_TIMEOUT         5   /* min. seconds between retries */
...
139 #define RES_DFLRETRY        2   /* Default #/tries. */

It appears the requests at 0 and 5 seconds go to the first DNS server, and at 10 seconds, the second DNS server would be tried, but when building Haiku, the timeout is already reached and the target fails.
So, either the timeout when building Haiku needs to be increased or the order in which DNS servers are queried needs to be modified.

Regarding the latter idea:
I tested the same on Debian (with /etc/resolv.conf and /usr/include/resolv.h exactly matching) and wget succeeds with a timeout of 10, fails with a timeout of 5, but succeeds again with a timeout of 5.1. I assume that Debian recognizes that the request to the first DNS server was unsuccessful and tries the other DNS servers before retrying the first one. An advantage of that is that all other DNS requests (for instance when browsing the web) are delayed by "only" 5 seconds rather than the 10 seconds observed on Haiku when having to fall back to a secondary DNS server.

Categories: Development

Ticket #12249 (Document tests / unit tests in developer docs?) created

Latest Bugs & Tasks - Tue, 2015-07-28 10:20

I tried searching for docs on how to work with our unit tests, but didn't find any good info.
What I'd hope to find is where they are (src/tests?), how to build them and how to run them.

To me it looks like you add the tests you want to the image and run them in the build. Any better way? Perhaps to run them on the host platform?

Categories: Development

[haiku-development] Re: [proposal] Commit access for Barrett (Rene Gollent)

Development mailing list - Mon, 2015-07-27 23:46
On Wed, Jul 8, 2015 at 9:25 AM, Adrien Destugues pulkomandy@xxxxxxxxxxxxx wrote: This is a proposal to grant commit access to Barrett. He has been around for a very long time and he is trying to help with the Media Kit currently. Unfortunately none of the devs feel comfortable enough with the current codebase of the media kit to review his patches (see for example ...
Categories: Development

BNetworkAddress: Fix setting fStatus all over the place.

Source Activity - Mon, 2015-07-27 20:17
Relevant quote from IRC: i would expect all overloads of SetTo to return status_t actually, i don't think what i would expect from class with such interface bugs probably Relevant quote from IRC: i would expect all overloads of SetTo to return status_t actually, i don't think what i would expect from class with such interface bugs probably
Categories: Development

Media: Display alert before to quit when restarting

Source Activity - Mon, 2015-07-27 18:16
* Fixes 10770. * While more complex solutions are proposed, i think of it as a way to get out of an eventual deadlock or to protect from accident close. * Fixes 10770. * While more complex solutions are proposed, i think of it as a way to get out of an eventual deadlock or to protect from accident close.
Categories: Development

BMediaRoster: Definitely undertake the MediaRosterUndertaker

Source Activity - Mon, 2015-07-27 16:08
* On a more deep analysis i figured out that other than being a bad pratice quitting the BLooper explicitly was cause of more problems, such as the regression after my patches which led to have a zombie media_addon_server after media services restart. This should hopefully place a final stone on the BMediaRoster::Quit() issue as with the previous commit i've removed every attempt to do this in the system. For any application developer listening, this means that quitting the BMediaRoster is highly discouraged, don't do it. * On a more deep analysis i figured out that other than being a bad pratice quitting the BLooper explicitly was cause of more problems, such as the regression after my patches which led to have a zombie media_addon_server after media services restart. This should hopefully place a final stone on the BMediaRoster::Quit() issue as with the previous commit i've removed every attempt to do this in the system. For any application developer listening, this means that quitting the BMediaRoster is highly discouraged, don't do it.
Categories: Development

desklink: Fix problems with BMediaRoster Quit

Source Activity - Mon, 2015-07-27 16:07
* Improved the situation so that it should be always synchronized. Improved error message, and detection of media services not being run. * Improved the situation so that it should be always synchronized. Improved error message, and detection of media services not being run.
Categories: Development

Ticket #12248 ([patch] Add host as valid build target to configure's help) created

Latest Bugs & Tasks - Mon, 2015-07-27 16:04

According to ​HelperRules, host is also a valid build target. It is needed to build bfs_fuse on Linux.

Attached patch will add this target to the help of configure and also fix a paste error introduced in hrev49029.

Categories: Development

[haiku-development] Re: [proposal] removing waddlesplash from #haiku IRC channel operators (Adrien Destugues)

Development mailing list - Mon, 2015-07-27 12:45
8 juillet 2015 16:07 gus knight waddlesplash@xxxxxxxxx a écrit: pulkomandy@xxxxxxxxxxxxx wrote: may have op status there, I'm not allowed to control chanserv to change the topic, set channel options, etc. And I think that's a good thing, it's better that only a restricted set of people can do that. ...
Categories: Development

[haiku-development] Re: [proposal] removing waddlesplash from #haiku IRC channel operators (Alexander von Gluck IV)

Development mailing list - Mon, 2015-07-27 12:45
On , Adrien Destugues wrote: Hi, Recently waddlesplash decided to make the #haiku IRC channel require authentication with nickserv, apparently as an attempt to reduce trolling in there. The channel is known to largely derive into offtopic discussions. It ...
Categories: Development

[haiku] Re: build failure from source (Ingo Weinhold)

Haiku Mailing List - Mon, 2015-07-27 08:45
On 30.04.2015 14:05, Michael Mounteney wrote: Thanks Jessica. I think I started supplying the URL + branch because of the warning at the end of the pull: $ git pull -v From git://git.haiku-os.org/haiku 9c5e234..0e9c093 master - origin/master = [up to date] r1alpha1 - origin/r1alpha1 ...
Categories: Development

[haiku] Re: build failure from source (Michael Mounteney)

Haiku Mailing List - Mon, 2015-07-27 08:45
On Thu, 30 Apr 2015 21:53:04 +1200 Jessica Hamilton jessica.l.hamilton@xxxxxxxxx wrote: git pull -v Or if you're feeling paranoid: git pull -v --tags ...
Categories: Development